<?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.NamespaceInfo</code>
 */
class NamespaceInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 2;</code>
     */
    protected $state = 0;
    /**
     * Generated from protobuf field <code>string description = 3;</code>
     */
    protected $description = '';
    /**
     * Generated from protobuf field <code>string owner_email = 4;</code>
     */
    protected $owner_email = '';
    /**
     * A key-value map for any customized purpose.
     *
     * Generated from protobuf field <code>map<string, string> data = 5;</code>
     */
    private $data;
    /**
     * Generated from protobuf field <code>string id = 6;</code>
     */
    protected $id = '';
    /**
     * All capabilities the namespace supports.
     *
     * Generated from protobuf field <code>.temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7;</code>
     */
    protected $capabilities = null;
    /**
     * Whether scheduled workflows are supported on this namespace. This is only needed
     * temporarily while the feature is experimental, so we can give it a high tag.
     *
     * Generated from protobuf field <code>bool supports_schedules = 100;</code>
     */
    protected $supports_schedules = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $state
     *     @type string $description
     *     @type string $owner_email
     *     @type array|\Google\Protobuf\Internal\MapField $data
     *           A key-value map for any customized purpose.
     *     @type string $id
     *     @type \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities $capabilities
     *           All capabilities the namespace supports.
     *     @type bool $supports_schedules
     *           Whether scheduled workflows are supported on this namespace. This is only needed
     *           temporarily while the feature is experimental, so we can give it a high tag.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\PBNamespace\V1\Message::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 2;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.NamespaceState state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\NamespaceState::class);
        $this->state = $var;

        return $this;
    }

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

    /**
     * Generated from protobuf field <code>string description = 3;</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 = 4;</code>
     * @return string
     */
    public function getOwnerEmail()
    {
        return $this->owner_email;
    }

    /**
     * Generated from protobuf field <code>string owner_email = 4;</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.
     *
     * Generated from protobuf field <code>map<string, string> data = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * A key-value map for any customized purpose.
     *
     * Generated from protobuf field <code>map<string, string> data = 5;</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;
    }

    /**
     * Generated from protobuf field <code>string id = 6;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

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

        return $this;
    }

    /**
     * All capabilities the namespace supports.
     *
     * Generated from protobuf field <code>.temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7;</code>
     * @return \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities|null
     */
    public function getCapabilities()
    {
        return $this->capabilities;
    }

    public function hasCapabilities()
    {
        return isset($this->capabilities);
    }

    public function clearCapabilities()
    {
        unset($this->capabilities);
    }

    /**
     * All capabilities the namespace supports.
     *
     * Generated from protobuf field <code>.temporal.api.namespace.v1.NamespaceInfo.Capabilities capabilities = 7;</code>
     * @param \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities $var
     * @return $this
     */
    public function setCapabilities($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\PBNamespace\V1\NamespaceInfo\Capabilities::class);
        $this->capabilities = $var;

        return $this;
    }

    /**
     * Whether scheduled workflows are supported on this namespace. This is only needed
     * temporarily while the feature is experimental, so we can give it a high tag.
     *
     * Generated from protobuf field <code>bool supports_schedules = 100;</code>
     * @return bool
     */
    public function getSupportsSchedules()
    {
        return $this->supports_schedules;
    }

    /**
     * Whether scheduled workflows are supported on this namespace. This is only needed
     * temporarily while the feature is experimental, so we can give it a high tag.
     *
     * Generated from protobuf field <code>bool supports_schedules = 100;</code>
     * @param bool $var
     * @return $this
     */
    public function setSupportsSchedules($var)
    {
        GPBUtil::checkBool($var);
        $this->supports_schedules = $var;

        return $this;
    }

}

