<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/memorystore/v1beta/memorystore.proto

namespace Google\Cloud\Memorystore\V1beta;

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

/**
 * A Memorystore instance.
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1beta.Instance</code>
 */
class Instance extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Unique name of the instance.
     * Format: projects/{project}/locations/{location}/instances/{instance}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. Creation timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Latest update timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. Labels to represent user-provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Output only. Current state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Output only. Additional information about the state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state_info = null;
    /**
     * Output only. System assigned, unique identifier for the instance.
     *
     * Generated from protobuf field <code>string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     */
    protected $uid = '';
    /**
     * Optional. Number of replica nodes per shard. If omitted the default is 0
     * replicas.
     *
     * Generated from protobuf field <code>optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $replica_count = null;
    /**
     * Optional. Immutable. Authorization mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $authorization_mode = 0;
    /**
     * Optional. Immutable. In-transit encryption mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $transit_encryption_mode = 0;
    /**
     * Optional. Number of shards for the instance.
     *
     * Generated from protobuf field <code>int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $shard_count = 0;
    /**
     * Output only. Endpoints clients can connect to the instance through.
     * Currently only one discovery endpoint is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $discovery_endpoints;
    /**
     * Optional. Immutable. Machine type for individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $node_type = 0;
    /**
     * Optional. Persistence configuration of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $persistence_config = null;
    /**
     * Optional. Immutable. Engine version of the instance.
     *
     * Generated from protobuf field <code>string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $engine_version = '';
    /**
     * Optional. User-provided engine configurations for the instance.
     *
     * Generated from protobuf field <code>map<string, string> engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $engine_configs;
    /**
     * Output only. Configuration of individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $node_config = null;
    /**
     * Optional. Immutable. Zone distribution configuration of the instance for
     * node allocation.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $zone_distribution_config = null;
    /**
     * Optional. If set to true deletion of the instance will fail.
     *
     * Generated from protobuf field <code>optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $deletion_protection_enabled = null;
    /**
     * Required. Immutable. User inputs and resource details of the auto-created
     * PSC connections.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $psc_auto_connections;
    /**
     * Optional. Endpoints for the instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $endpoints;
    /**
     * Optional. The mode config for the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $mode = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Unique name of the instance.
     *           Format: projects/{project}/locations/{location}/instances/{instance}
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Creation timestamp of the instance.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Latest update timestamp of the instance.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. Labels to represent user-provided metadata.
     *     @type int $state
     *           Output only. Current state of the instance.
     *     @type \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $state_info
     *           Output only. Additional information about the state of the instance.
     *     @type string $uid
     *           Output only. System assigned, unique identifier for the instance.
     *     @type int $replica_count
     *           Optional. Number of replica nodes per shard. If omitted the default is 0
     *           replicas.
     *     @type int $authorization_mode
     *           Optional. Immutable. Authorization mode of the instance.
     *     @type int $transit_encryption_mode
     *           Optional. Immutable. In-transit encryption mode of the instance.
     *     @type int $shard_count
     *           Optional. Number of shards for the instance.
     *     @type array<\Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint>|\Google\Protobuf\Internal\RepeatedField $discovery_endpoints
     *           Output only. Endpoints clients can connect to the instance through.
     *           Currently only one discovery endpoint is supported.
     *     @type int $node_type
     *           Optional. Immutable. Machine type for individual nodes of the instance.
     *     @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig $persistence_config
     *           Optional. Persistence configuration of the instance.
     *     @type string $engine_version
     *           Optional. Immutable. Engine version of the instance.
     *     @type array|\Google\Protobuf\Internal\MapField $engine_configs
     *           Optional. User-provided engine configurations for the instance.
     *     @type \Google\Cloud\Memorystore\V1beta\NodeConfig $node_config
     *           Output only. Configuration of individual nodes of the instance.
     *     @type \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $zone_distribution_config
     *           Optional. Immutable. Zone distribution configuration of the instance for
     *           node allocation.
     *     @type bool $deletion_protection_enabled
     *           Optional. If set to true deletion of the instance will fail.
     *     @type array<\Google\Cloud\Memorystore\V1beta\PscAutoConnection>|\Google\Protobuf\Internal\RepeatedField $psc_auto_connections
     *           Required. Immutable. User inputs and resource details of the auto-created
     *           PSC connections.
     *     @type array<\Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints
     *           Optional. Endpoints for the instance.
     *     @type int $mode
     *           Optional. The mode config for the instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Unique name of the instance.
     * Format: projects/{project}/locations/{location}/instances/{instance}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Unique name of the instance.
     * Format: projects/{project}/locations/{location}/instances/{instance}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Creation timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</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);
    }

    /**
     * Output only. Creation timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</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;
    }

    /**
     * Output only. Latest update timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Latest update timestamp of the instance.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional. Labels to represent user-provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. Labels to represent user-provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Output only. Current state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. Current state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. Additional information about the state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Memorystore\V1beta\Instance\StateInfo|null
     */
    public function getStateInfo()
    {
        return $this->state_info;
    }

    public function hasStateInfo()
    {
        return isset($this->state_info);
    }

    public function clearStateInfo()
    {
        unset($this->state_info);
    }

    /**
     * Output only. Additional information about the state of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $var
     * @return $this
     */
    public function setStateInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance\StateInfo::class);
        $this->state_info = $var;

        return $this;
    }

    /**
     * Output only. System assigned, unique identifier for the instance.
     *
     * Generated from protobuf field <code>string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. System assigned, unique identifier for the instance.
     *
     * Generated from protobuf field <code>string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Optional. Number of replica nodes per shard. If omitted the default is 0
     * replicas.
     *
     * Generated from protobuf field <code>optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getReplicaCount()
    {
        return isset($this->replica_count) ? $this->replica_count : 0;
    }

    public function hasReplicaCount()
    {
        return isset($this->replica_count);
    }

    public function clearReplicaCount()
    {
        unset($this->replica_count);
    }

    /**
     * Optional. Number of replica nodes per shard. If omitted the default is 0
     * replicas.
     *
     * Generated from protobuf field <code>optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setReplicaCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->replica_count = $var;

        return $this;
    }

    /**
     * Optional. Immutable. Authorization mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getAuthorizationMode()
    {
        return $this->authorization_mode;
    }

    /**
     * Optional. Immutable. Authorization mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setAuthorizationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\AuthorizationMode::class);
        $this->authorization_mode = $var;

        return $this;
    }

    /**
     * Optional. Immutable. In-transit encryption mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getTransitEncryptionMode()
    {
        return $this->transit_encryption_mode;
    }

    /**
     * Optional. Immutable. In-transit encryption mode of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setTransitEncryptionMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\TransitEncryptionMode::class);
        $this->transit_encryption_mode = $var;

        return $this;
    }

    /**
     * Optional. Number of shards for the instance.
     *
     * Generated from protobuf field <code>int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getShardCount()
    {
        return $this->shard_count;
    }

    /**
     * Optional. Number of shards for the instance.
     *
     * Generated from protobuf field <code>int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setShardCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->shard_count = $var;

        return $this;
    }

    /**
     * Output only. Endpoints clients can connect to the instance through.
     * Currently only one discovery endpoint is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDiscoveryEndpoints()
    {
        return $this->discovery_endpoints;
    }

    /**
     * Output only. Endpoints clients can connect to the instance through.
     * Currently only one discovery endpoint is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDiscoveryEndpoints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint::class);
        $this->discovery_endpoints = $arr;

        return $this;
    }

    /**
     * Optional. Immutable. Machine type for individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getNodeType()
    {
        return $this->node_type;
    }

    /**
     * Optional. Immutable. Machine type for individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setNodeType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\NodeType::class);
        $this->node_type = $var;

        return $this;
    }

    /**
     * Optional. Persistence configuration of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig|null
     */
    public function getPersistenceConfig()
    {
        return $this->persistence_config;
    }

    public function hasPersistenceConfig()
    {
        return isset($this->persistence_config);
    }

    public function clearPersistenceConfig()
    {
        unset($this->persistence_config);
    }

    /**
     * Optional. Persistence configuration of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig $var
     * @return $this
     */
    public function setPersistenceConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig::class);
        $this->persistence_config = $var;

        return $this;
    }

    /**
     * Optional. Immutable. Engine version of the instance.
     *
     * Generated from protobuf field <code>string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getEngineVersion()
    {
        return $this->engine_version;
    }

    /**
     * Optional. Immutable. Engine version of the instance.
     *
     * Generated from protobuf field <code>string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setEngineVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->engine_version = $var;

        return $this;
    }

    /**
     * Optional. User-provided engine configurations for the instance.
     *
     * Generated from protobuf field <code>map<string, string> engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getEngineConfigs()
    {
        return $this->engine_configs;
    }

    /**
     * Optional. User-provided engine configurations for the instance.
     *
     * Generated from protobuf field <code>map<string, string> engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setEngineConfigs($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->engine_configs = $arr;

        return $this;
    }

    /**
     * Output only. Configuration of individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Memorystore\V1beta\NodeConfig|null
     */
    public function getNodeConfig()
    {
        return $this->node_config;
    }

    public function hasNodeConfig()
    {
        return isset($this->node_config);
    }

    public function clearNodeConfig()
    {
        unset($this->node_config);
    }

    /**
     * Output only. Configuration of individual nodes of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Memorystore\V1beta\NodeConfig $var
     * @return $this
     */
    public function setNodeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\NodeConfig::class);
        $this->node_config = $var;

        return $this;
    }

    /**
     * Optional. Immutable. Zone distribution configuration of the instance for
     * node allocation.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig|null
     */
    public function getZoneDistributionConfig()
    {
        return $this->zone_distribution_config;
    }

    public function hasZoneDistributionConfig()
    {
        return isset($this->zone_distribution_config);
    }

    public function clearZoneDistributionConfig()
    {
        unset($this->zone_distribution_config);
    }

    /**
     * Optional. Immutable. Zone distribution configuration of the instance for
     * node allocation.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $var
     * @return $this
     */
    public function setZoneDistributionConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig::class);
        $this->zone_distribution_config = $var;

        return $this;
    }

    /**
     * Optional. If set to true deletion of the instance will fail.
     *
     * Generated from protobuf field <code>optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getDeletionProtectionEnabled()
    {
        return isset($this->deletion_protection_enabled) ? $this->deletion_protection_enabled : false;
    }

    public function hasDeletionProtectionEnabled()
    {
        return isset($this->deletion_protection_enabled);
    }

    public function clearDeletionProtectionEnabled()
    {
        unset($this->deletion_protection_enabled);
    }

    /**
     * Optional. If set to true deletion of the instance will fail.
     *
     * Generated from protobuf field <code>optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setDeletionProtectionEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->deletion_protection_enabled = $var;

        return $this;
    }

    /**
     * Required. Immutable. User inputs and resource details of the auto-created
     * PSC connections.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPscAutoConnections()
    {
        return $this->psc_auto_connections;
    }

    /**
     * Required. Immutable. User inputs and resource details of the auto-created
     * PSC connections.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param array<\Google\Cloud\Memorystore\V1beta\PscAutoConnection>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPscAutoConnections($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\PscAutoConnection::class);
        $this->psc_auto_connections = $arr;

        return $this;
    }

    /**
     * Optional. Endpoints for the instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEndpoints()
    {
        return $this->endpoints;
    }

    /**
     * Optional. Endpoints for the instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEndpoints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint::class);
        $this->endpoints = $arr;

        return $this;
    }

    /**
     * Optional. The mode config for the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * Optional. The mode config for the instance.
     *
     * Generated from protobuf field <code>.google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\Mode::class);
        $this->mode = $var;

        return $this;
    }

}

