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

namespace Temporal\Api\Workflowservice\V1;

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

/**
 * NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateActivityOptionsRequest</code>
 */
class UpdateActivityOptionsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Namespace of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Execution info of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     */
    protected $execution = null;
    /**
     * The identity of the client who initiated this request
     *
     * Generated from protobuf field <code>string identity = 3;</code>
     */
    protected $identity = '';
    /**
     * Activity options. Partial updates are accepted and controlled by update_mask
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 4;</code>
     */
    protected $activity_options = null;
    /**
     * Controls which fields from `activity_options` will be applied
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5;</code>
     */
    protected $update_mask = null;
    /**
     * If set, the activity options will be restored to the default.
     * Default options are then options activity was created with.
     * They are part of the first SCHEDULE event.
     * This flag cannot be combined with any other option; if you supply
     * restore_original together with other options, the request will be rejected.
     *
     * Generated from protobuf field <code>bool restore_original = 8;</code>
     */
    protected $restore_original = false;
    protected $activity;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           Namespace of the workflow which scheduled this activity
     *     @type \Temporal\Api\Common\V1\WorkflowExecution $execution
     *           Execution info of the workflow which scheduled this activity
     *     @type string $identity
     *           The identity of the client who initiated this request
     *     @type \Temporal\Api\Activity\V1\ActivityOptions $activity_options
     *           Activity options. Partial updates are accepted and controlled by update_mask
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Controls which fields from `activity_options` will be applied
     *     @type string $id
     *           Only activity with this ID will be updated.
     *     @type string $type
     *           Update all running activities of this type.
     *     @type bool $match_all
     *           Update all running activities.
     *     @type bool $restore_original
     *           If set, the activity options will be restored to the default.
     *           Default options are then options activity was created with.
     *           They are part of the first SCHEDULE event.
     *           This flag cannot be combined with any other option; if you supply
     *           restore_original together with other options, the request will be rejected.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Namespace of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Namespace of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Execution info of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     * @return \Temporal\Api\Common\V1\WorkflowExecution|null
     */
    public function getExecution()
    {
        return $this->execution;
    }

    public function hasExecution()
    {
        return isset($this->execution);
    }

    public function clearExecution()
    {
        unset($this->execution);
    }

    /**
     * Execution info of the workflow which scheduled this activity
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     * @param \Temporal\Api\Common\V1\WorkflowExecution $var
     * @return $this
     */
    public function setExecution($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class);
        $this->execution = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Activity options. Partial updates are accepted and controlled by update_mask
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 4;</code>
     * @return \Temporal\Api\Activity\V1\ActivityOptions|null
     */
    public function getActivityOptions()
    {
        return $this->activity_options;
    }

    public function hasActivityOptions()
    {
        return isset($this->activity_options);
    }

    public function clearActivityOptions()
    {
        unset($this->activity_options);
    }

    /**
     * Activity options. Partial updates are accepted and controlled by update_mask
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 4;</code>
     * @param \Temporal\Api\Activity\V1\ActivityOptions $var
     * @return $this
     */
    public function setActivityOptions($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Activity\V1\ActivityOptions::class);
        $this->activity_options = $var;

        return $this;
    }

    /**
     * Controls which fields from `activity_options` will be applied
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5;</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 `activity_options` will be applied
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5;</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;
    }

    /**
     * Only activity with this ID will be updated.
     *
     * Generated from protobuf field <code>string id = 6;</code>
     * @return string
     */
    public function getId()
    {
        return $this->readOneof(6);
    }

    public function hasId()
    {
        return $this->hasOneof(6);
    }

    /**
     * Only activity with this ID will be updated.
     *
     * Generated from protobuf field <code>string id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Update all running activities of this type.
     *
     * Generated from protobuf field <code>string type = 7;</code>
     * @return string
     */
    public function getType()
    {
        return $this->readOneof(7);
    }

    public function hasType()
    {
        return $this->hasOneof(7);
    }

    /**
     * Update all running activities of this type.
     *
     * Generated from protobuf field <code>string type = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Update all running activities.
     *
     * Generated from protobuf field <code>bool match_all = 9;</code>
     * @return bool
     */
    public function getMatchAll()
    {
        return $this->readOneof(9);
    }

    public function hasMatchAll()
    {
        return $this->hasOneof(9);
    }

    /**
     * Update all running activities.
     *
     * Generated from protobuf field <code>bool match_all = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setMatchAll($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * If set, the activity options will be restored to the default.
     * Default options are then options activity was created with.
     * They are part of the first SCHEDULE event.
     * This flag cannot be combined with any other option; if you supply
     * restore_original together with other options, the request will be rejected.
     *
     * Generated from protobuf field <code>bool restore_original = 8;</code>
     * @return bool
     */
    public function getRestoreOriginal()
    {
        return $this->restore_original;
    }

    /**
     * If set, the activity options will be restored to the default.
     * Default options are then options activity was created with.
     * They are part of the first SCHEDULE event.
     * This flag cannot be combined with any other option; if you supply
     * restore_original together with other options, the request will be rejected.
     *
     * Generated from protobuf field <code>bool restore_original = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setRestoreOriginal($var)
    {
        GPBUtil::checkBool($var);
        $this->restore_original = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getActivity()
    {
        return $this->whichOneof("activity");
    }

}

