<?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.FetchWorkerConfigRequest</code>
 */
class FetchWorkerConfigRequest 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 = '';
    /**
     * Defines which workers should receive this command.
     * only single worker is supported at this time.
     *
     * 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\Common\V1\WorkerSelector $selector
     *           Defines which workers should receive this command.
     *           only single worker is supported at this time.
     * }
     */
    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;
    }

    /**
     * Defines which workers should receive this command.
     * only single worker is supported at this time.
     *
     * 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.
     * only single worker is supported at this time.
     *
     * 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;
    }

}

