<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/workflow/v1/message.proto

namespace Temporal\Api\Workflow\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * When StartWorkflowExecution uses the conflict policy WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING and
 * there is already an existing running workflow, OnConflictOptions defines actions to be taken on
 * the existing running workflow. In this case, it will create a WorkflowExecutionOptionsUpdatedEvent
 * history event in the running workflow with the changes requested in this object.
 *
 * Generated from protobuf message <code>temporal.api.workflow.v1.OnConflictOptions</code>
 */
class OnConflictOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Attaches the request ID to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_request_id = 1;</code>
     */
    protected $attach_request_id = false;
    /**
     * Attaches the completion callbacks to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_completion_callbacks = 2;</code>
     */
    protected $attach_completion_callbacks = false;
    /**
     * Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
     *
     * Generated from protobuf field <code>bool attach_links = 3;</code>
     */
    protected $attach_links = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $attach_request_id
     *           Attaches the request ID to the running workflow.
     *     @type bool $attach_completion_callbacks
     *           Attaches the completion callbacks to the running workflow.
     *     @type bool $attach_links
     *           Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Attaches the request ID to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_request_id = 1;</code>
     * @return bool
     */
    public function getAttachRequestId()
    {
        return $this->attach_request_id;
    }

    /**
     * Attaches the request ID to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_request_id = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setAttachRequestId($var)
    {
        GPBUtil::checkBool($var);
        $this->attach_request_id = $var;

        return $this;
    }

    /**
     * Attaches the completion callbacks to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_completion_callbacks = 2;</code>
     * @return bool
     */
    public function getAttachCompletionCallbacks()
    {
        return $this->attach_completion_callbacks;
    }

    /**
     * Attaches the completion callbacks to the running workflow.
     *
     * Generated from protobuf field <code>bool attach_completion_callbacks = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setAttachCompletionCallbacks($var)
    {
        GPBUtil::checkBool($var);
        $this->attach_completion_callbacks = $var;

        return $this;
    }

    /**
     * Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
     *
     * Generated from protobuf field <code>bool attach_links = 3;</code>
     * @return bool
     */
    public function getAttachLinks()
    {
        return $this->attach_links;
    }

    /**
     * Attaches the links to the WorkflowExecutionOptionsUpdatedEvent history event.
     *
     * Generated from protobuf field <code>bool attach_links = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setAttachLinks($var)
    {
        GPBUtil::checkBool($var);
        $this->attach_links = $var;

        return $this;
    }

}

