<?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;

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateWorkerConfigRequest</code>
 */
class UpdateWorkerConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Namespace this worker belongs to.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';
    /**
     * Reason for sending worker command, can be used for audit purpose.
     *
     * Generated from protobuf field <code>string reason = 3;</code>
     */
    protected $reason = '';
    /**
     * Partial updates are accepted and controlled by update_mask.
     * The worker configuration to set.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkerConfig worker_config = 4;</code>
     */
    protected $worker_config = null;
    /**
     * Controls which fields from `worker_config` will be applied
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5;</code>
     */
    protected $update_mask = null;
    /**
     * Defines which workers should receive this command.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerSelector selector = 6;</code>
     */
    protected $selector = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           Namespace this worker belongs to.
     *     @type string $identity
     *           The identity of the client who initiated this request.
     *     @type string $reason
     *           Reason for sending worker command, can be used for audit purpose.
     *     @type \Temporal\Api\Sdk\V1\WorkerConfig $worker_config
     *           Partial updates are accepted and controlled by update_mask.
     *           The worker configuration to set.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Controls which fields from `worker_config` will be applied
     *     @type \Temporal\Api\Common\V1\WorkerSelector $selector
     *           Defines which workers should receive this command.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Namespace this worker belongs to.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Namespace this worker belongs to.
     *
     * 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;
    }

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

        return $this;
    }

    /**
     * Reason for sending worker command, can be used for audit purpose.
     *
     * Generated from protobuf field <code>string reason = 3;</code>
     * @return string
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Reason for sending worker command, can be used for audit purpose.
     *
     * Generated from protobuf field <code>string reason = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkString($var, True);
        $this->reason = $var;

        return $this;
    }

    /**
     * Partial updates are accepted and controlled by update_mask.
     * The worker configuration to set.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkerConfig worker_config = 4;</code>
     * @return \Temporal\Api\Sdk\V1\WorkerConfig|null
     */
    public function getWorkerConfig()
    {
        return $this->worker_config;
    }

    public function hasWorkerConfig()
    {
        return isset($this->worker_config);
    }

    public function clearWorkerConfig()
    {
        unset($this->worker_config);
    }

    /**
     * Partial updates are accepted and controlled by update_mask.
     * The worker configuration to set.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.WorkerConfig worker_config = 4;</code>
     * @param \Temporal\Api\Sdk\V1\WorkerConfig $var
     * @return $this
     */
    public function setWorkerConfig($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\WorkerConfig::class);
        $this->worker_config = $var;

        return $this;
    }

    /**
     * Controls which fields from `worker_config` 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 `worker_config` 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;
    }

    /**
     * Defines which workers should receive this command.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerSelector selector = 6;</code>
     * @return \Temporal\Api\Common\V1\WorkerSelector|null
     */
    public function getSelector()
    {
        return $this->selector;
    }

    public function hasSelector()
    {
        return isset($this->selector);
    }

    public function clearSelector()
    {
        unset($this->selector);
    }

    /**
     * Defines which workers should receive this command.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerSelector selector = 6;</code>
     * @param \Temporal\Api\Common\V1\WorkerSelector $var
     * @return $this
     */
    public function setSelector($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerSelector::class);
        $this->selector = $var;

        return $this;
    }

}

