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

namespace Temporal\Api\Operatorservice\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.operatorservice.v1.ClusterMetadata</code>
 */
class ClusterMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the cluster name.
     *
     * Generated from protobuf field <code>string cluster_name = 1;</code>
     */
    protected $cluster_name = '';
    /**
     * Id of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 2;</code>
     */
    protected $cluster_id = '';
    /**
     * gRPC address.
     *
     * Generated from protobuf field <code>string address = 3;</code>
     */
    protected $address = '';
    /**
     * HTTP address, if one exists.
     *
     * Generated from protobuf field <code>string http_address = 7;</code>
     */
    protected $http_address = '';
    /**
     * A unique failover version across all connected clusters.
     *
     * Generated from protobuf field <code>int64 initial_failover_version = 4;</code>
     */
    protected $initial_failover_version = 0;
    /**
     * History service shard number.
     *
     * Generated from protobuf field <code>int32 history_shard_count = 5;</code>
     */
    protected $history_shard_count = 0;
    /**
     * A flag to indicate if a connection is active.
     *
     * Generated from protobuf field <code>bool is_connection_enabled = 6;</code>
     */
    protected $is_connection_enabled = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $cluster_name
     *           Name of the cluster name.
     *     @type string $cluster_id
     *           Id of the cluster.
     *     @type string $address
     *           gRPC address.
     *     @type string $http_address
     *           HTTP address, if one exists.
     *     @type int|string $initial_failover_version
     *           A unique failover version across all connected clusters.
     *     @type int $history_shard_count
     *           History service shard number.
     *     @type bool $is_connection_enabled
     *           A flag to indicate if a connection is active.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Operatorservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the cluster name.
     *
     * Generated from protobuf field <code>string cluster_name = 1;</code>
     * @return string
     */
    public function getClusterName()
    {
        return $this->cluster_name;
    }

    /**
     * Name of the cluster name.
     *
     * Generated from protobuf field <code>string cluster_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setClusterName($var)
    {
        GPBUtil::checkString($var, True);
        $this->cluster_name = $var;

        return $this;
    }

    /**
     * Id of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 2;</code>
     * @return string
     */
    public function getClusterId()
    {
        return $this->cluster_id;
    }

    /**
     * Id of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setClusterId($var)
    {
        GPBUtil::checkString($var, True);
        $this->cluster_id = $var;

        return $this;
    }

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

    /**
     * gRPC address.
     *
     * Generated from protobuf field <code>string address = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->address = $var;

        return $this;
    }

    /**
     * HTTP address, if one exists.
     *
     * Generated from protobuf field <code>string http_address = 7;</code>
     * @return string
     */
    public function getHttpAddress()
    {
        return $this->http_address;
    }

    /**
     * HTTP address, if one exists.
     *
     * Generated from protobuf field <code>string http_address = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setHttpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->http_address = $var;

        return $this;
    }

    /**
     * A unique failover version across all connected clusters.
     *
     * Generated from protobuf field <code>int64 initial_failover_version = 4;</code>
     * @return int|string
     */
    public function getInitialFailoverVersion()
    {
        return $this->initial_failover_version;
    }

    /**
     * A unique failover version across all connected clusters.
     *
     * Generated from protobuf field <code>int64 initial_failover_version = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setInitialFailoverVersion($var)
    {
        GPBUtil::checkInt64($var);
        $this->initial_failover_version = $var;

        return $this;
    }

    /**
     * History service shard number.
     *
     * Generated from protobuf field <code>int32 history_shard_count = 5;</code>
     * @return int
     */
    public function getHistoryShardCount()
    {
        return $this->history_shard_count;
    }

    /**
     * History service shard number.
     *
     * Generated from protobuf field <code>int32 history_shard_count = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setHistoryShardCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->history_shard_count = $var;

        return $this;
    }

    /**
     * A flag to indicate if a connection is active.
     *
     * Generated from protobuf field <code>bool is_connection_enabled = 6;</code>
     * @return bool
     */
    public function getIsConnectionEnabled()
    {
        return $this->is_connection_enabled;
    }

    /**
     * A flag to indicate if a connection is active.
     *
     * Generated from protobuf field <code>bool is_connection_enabled = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsConnectionEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->is_connection_enabled = $var;

        return $this;
    }

}

