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

namespace Temporal\Api\Deployment\V1;

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

/**
 * `DeploymentInfo` holds information about a deployment. Deployment information is tracked
 * automatically by server as soon as the first poll from that deployment reaches the server. There
 * can be multiple task queue workers in a single deployment which are listed in this message.
 * Deprecated.
 *
 * Generated from protobuf message <code>temporal.api.deployment.v1.DeploymentInfo</code>
 */
class DeploymentInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.temporal.api.deployment.v1.Deployment deployment = 1;</code>
     */
    protected $deployment = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</code>
     */
    protected $create_time = null;
    /**
     * Generated from protobuf field <code>repeated .temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo task_queue_infos = 3;</code>
     */
    private $task_queue_infos;
    /**
     * A user-defined set of key-values. Can be updated as part of write operations to the
     * deployment, such as `SetCurrentDeployment`.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> metadata = 4;</code>
     */
    private $metadata;
    /**
     * If this deployment is the current deployment of its deployment series.
     *
     * Generated from protobuf field <code>bool is_current = 5;</code>
     */
    protected $is_current = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Deployment\V1\Deployment $deployment
     *     @type \Google\Protobuf\Timestamp $create_time
     *     @type \Temporal\Api\Deployment\V1\DeploymentInfo\TaskQueueInfo[] $task_queue_infos
     *     @type array|\Google\Protobuf\Internal\MapField $metadata
     *           A user-defined set of key-values. Can be updated as part of write operations to the
     *           deployment, such as `SetCurrentDeployment`.
     *     @type bool $is_current
     *           If this deployment is the current deployment of its deployment series.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Deployment\V1\Message::initOnce();
        parent::__construct($data);
    }

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

    public function hasDeployment()
    {
        return isset($this->deployment);
    }

    public function clearDeployment()
    {
        unset($this->deployment);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo task_queue_infos = 3;</code>
     * @return RepeatedField<\Temporal\Api\Deployment\V1\DeploymentInfo\TaskQueueInfo>
     */
    public function getTaskQueueInfos()
    {
        return $this->task_queue_infos;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.deployment.v1.DeploymentInfo.TaskQueueInfo task_queue_infos = 3;</code>
     * @param \Temporal\Api\Deployment\V1\DeploymentInfo\TaskQueueInfo[] $var
     * @return $this
     */
    public function setTaskQueueInfos($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Deployment\V1\DeploymentInfo\TaskQueueInfo::class);
        $this->task_queue_infos = $arr;

        return $this;
    }

    /**
     * A user-defined set of key-values. Can be updated as part of write operations to the
     * deployment, such as `SetCurrentDeployment`.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> metadata = 4;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * A user-defined set of key-values. Can be updated as part of write operations to the
     * deployment, such as `SetCurrentDeployment`.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.common.v1.Payload> metadata = 4;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setMetadata($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Payload::class);
        $this->metadata = $arr;

        return $this;
    }

    /**
     * If this deployment is the current deployment of its deployment series.
     *
     * Generated from protobuf field <code>bool is_current = 5;</code>
     * @return bool
     */
    public function getIsCurrent()
    {
        return $this->is_current;
    }

    /**
     * If this deployment is the current deployment of its deployment series.
     *
     * Generated from protobuf field <code>bool is_current = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsCurrent($var)
    {
        GPBUtil::checkBool($var);
        $this->is_current = $var;

        return $this;
    }

}

