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

/**
 * Used to update the user-defined metadata of a Worker Deployment Version.
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateWorkerDeploymentVersionMetadataRequest</code>
 */
class UpdateWorkerDeploymentVersionMetadataRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Deprecated. Use `deployment_version`.
     *
     * Generated from protobuf field <code>string version = 2 [deprecated = true];</code>
     * @deprecated
     */
    protected $version = '';
    /**
     * Required.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5;</code>
     */
    protected $deployment_version = null;
    /**
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> upsert_entries = 3;</code>
     */
    private $upsert_entries;
    /**
     * List of keys to remove from the metadata.
     *
     * Generated from protobuf field <code>repeated string remove_entries = 4;</code>
     */
    private $remove_entries;
    /**
     * Optional. The identity of the client who initiated this request.
     *
     * Generated from protobuf field <code>string identity = 6;</code>
     */
    protected $identity = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *     @type string $version
     *           Deprecated. Use `deployment_version`.
     *     @type \Temporal\Api\Deployment\V1\WorkerDeploymentVersion $deployment_version
     *           Required.
     *     @type array|\Google\Protobuf\Internal\MapField $upsert_entries
     *     @type string[] $remove_entries
     *           List of keys to remove from the metadata.
     *     @type string $identity
     *           Optional. The identity of the client who initiated this request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

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

    /**
     * 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;
    }

    /**
     * Deprecated. Use `deployment_version`.
     *
     * Generated from protobuf field <code>string version = 2 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getVersion()
    {
        if ($this->version !== '') {
            @trigger_error('version is deprecated.', E_USER_DEPRECATED);
        }
        return $this->version;
    }

    /**
     * Deprecated. Use `deployment_version`.
     *
     * Generated from protobuf field <code>string version = 2 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setVersion($var)
    {
        @trigger_error('version is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Required.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5;</code>
     * @return \Temporal\Api\Deployment\V1\WorkerDeploymentVersion|null
     */
    public function getDeploymentVersion()
    {
        return $this->deployment_version;
    }

    public function hasDeploymentVersion()
    {
        return isset($this->deployment_version);
    }

    public function clearDeploymentVersion()
    {
        unset($this->deployment_version);
    }

    /**
     * Required.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5;</code>
     * @param \Temporal\Api\Deployment\V1\WorkerDeploymentVersion $var
     * @return $this
     */
    public function setDeploymentVersion($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Deployment\V1\WorkerDeploymentVersion::class);
        $this->deployment_version = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> upsert_entries = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getUpsertEntries()
    {
        return $this->upsert_entries;
    }

    /**
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> upsert_entries = 3;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setUpsertEntries($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payload::class);
        $this->upsert_entries = $arr;

        return $this;
    }

    /**
     * List of keys to remove from the metadata.
     *
     * Generated from protobuf field <code>repeated string remove_entries = 4;</code>
     * @return RepeatedField<string>
     */
    public function getRemoveEntries()
    {
        return $this->remove_entries;
    }

    /**
     * List of keys to remove from the metadata.
     *
     * Generated from protobuf field <code>repeated string remove_entries = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setRemoveEntries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->remove_entries = $arr;

        return $this;
    }

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

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

        return $this;
    }

}

