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

namespace Temporal\Api\PBNamespace\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.namespace.v1.UpdateNamespaceInfo</code>
 */
class UpdateNamespaceInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string description = 1;</code>
     */
    protected $description = '';
    /**
     * Generated from protobuf field <code>string owner_email = 2;</code>
     */
    protected $owner_email = '';
    /**
     * A key-value map for any customized purpose.
     * If data already exists on the namespace, 
     * this will merge with the existing key values. 
     *
     * Generated from protobuf field <code>map<string, string> data = 3;</code>
     */
    private $data;
    /**
     * New namespace state, server will reject if transition is not allowed.
     * Allowed transitions are:
     *  Registered -> [ Deleted | Deprecated | Handover ]
     *  Handover -> [ Registered ]
     * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 4;</code>
     */
    protected $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $description
     *     @type string $owner_email
     *     @type array|\Google\Protobuf\Internal\MapField $data
     *           A key-value map for any customized purpose.
     *           If data already exists on the namespace, 
     *           this will merge with the existing key values. 
     *     @type int $state
     *           New namespace state, server will reject if transition is not allowed.
     *           Allowed transitions are:
     *            Registered -> [ Deleted | Deprecated | Handover ]
     *            Handover -> [ Registered ]
     *           Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Generated from protobuf field <code>string description = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string owner_email = 2;</code>
     * @return string
     */
    public function getOwnerEmail()
    {
        return $this->owner_email;
    }

    /**
     * Generated from protobuf field <code>string owner_email = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setOwnerEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->owner_email = $var;

        return $this;
    }

    /**
     * A key-value map for any customized purpose.
     * If data already exists on the namespace, 
     * this will merge with the existing key values. 
     *
     * Generated from protobuf field <code>map<string, string> data = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * A key-value map for any customized purpose.
     * If data already exists on the namespace, 
     * this will merge with the existing key values. 
     *
     * Generated from protobuf field <code>map<string, string> data = 3;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setData($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->data = $arr;

        return $this;
    }

    /**
     * New namespace state, server will reject if transition is not allowed.
     * Allowed transitions are:
     *  Registered -> [ Deleted | Deprecated | Handover ]
     *  Handover -> [ Registered ]
     * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 4;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * New namespace state, server will reject if transition is not allowed.
     * Allowed transitions are:
     *  Registered -> [ Deleted | Deprecated | Handover ]
     *  Handover -> [ Registered ]
     * Default is NAMESPACE_STATE_UNSPECIFIED which is do not change state.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NamespaceState::class);
        $this->state = $var;

        return $this;
    }

}

