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

namespace Temporal\Api\Batch\V1;

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

/**
 * BatchOperationUpdateWorkflowExecutionOptions sends UpdateWorkflowExecutionOptions requests to batch workflows.
 * Keep the parameters in sync with temporal.api.workflowservice.v1.UpdateWorkflowExecutionOptionsRequest.
 *
 * Generated from protobuf message <code>temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions</code>
 */
class BatchOperationUpdateWorkflowExecutionOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     */
    protected $identity = '';
    /**
     * Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.WorkflowExecutionOptions workflow_execution_options = 2;</code>
     */
    protected $workflow_execution_options = null;
    /**
     * Controls which fields from `workflow_execution_options` will be applied.
     * To unset a field, set it to null and use the update mask to indicate that it should be mutated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     */
    protected $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $identity
     *           The identity of the worker/client.
     *     @type \Temporal\Api\Workflow\V1\WorkflowExecutionOptions $workflow_execution_options
     *           Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Controls which fields from `workflow_execution_options` will be applied.
     *           To unset a field, set it to null and use the update mask to indicate that it should be mutated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.WorkflowExecutionOptions workflow_execution_options = 2;</code>
     * @return \Temporal\Api\Workflow\V1\WorkflowExecutionOptions|null
     */
    public function getWorkflowExecutionOptions()
    {
        return $this->workflow_execution_options;
    }

    public function hasWorkflowExecutionOptions()
    {
        return isset($this->workflow_execution_options);
    }

    public function clearWorkflowExecutionOptions()
    {
        unset($this->workflow_execution_options);
    }

    /**
     * Update Workflow options that were originally specified via StartWorkflowExecution. Partial updates are accepted and controlled by update_mask.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.WorkflowExecutionOptions workflow_execution_options = 2;</code>
     * @param \Temporal\Api\Workflow\V1\WorkflowExecutionOptions $var
     * @return $this
     */
    public function setWorkflowExecutionOptions($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\WorkflowExecutionOptions::class);
        $this->workflow_execution_options = $var;

        return $this;
    }

    /**
     * Controls which fields from `workflow_execution_options` will be applied.
     * To unset a field, set it to null and use the update mask to indicate that it should be mutated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Controls which fields from `workflow_execution_options` will be applied.
     * To unset a field, set it to null and use the update mask to indicate that it should be mutated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 3;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

