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

namespace Google\Cloud\Memcache\V1beta2;

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

/**
 * A Memorystore for Memcached instance
 *
 * Generated from protobuf message <code>google.cloud.memcache.v1beta2.Instance</code>
 */
class Instance extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     * Note: Memcached instances are managed and addressed at the regional level
     * so `location_id` here refers to a Google Cloud region; however, users may
     * choose which zones Memcached nodes should be provisioned in within an
     * instance. Refer to [zones][google.cloud.memcache.v1beta2.Instance.zones] field for more details.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * User provided name for the instance, which is only used for display
     * purposes. Cannot be more than 80 characters.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     */
    private $display_name = '';
    /**
     * Resource labels to represent user-provided metadata.
     * Refer to cloud documentation on labels for more details.
     * https://cloud.google.com/compute/docs/labeling-resources
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</code>
     */
    private $labels;
    /**
     * The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     *
     * Generated from protobuf field <code>string authorized_network = 4;</code>
     */
    private $authorized_network = '';
    /**
     * Zones in which Memcached nodes should be provisioned.
     * Memcached nodes will be equally distributed across these zones. If not
     * provided, the service will by default create nodes in all zones in the
     * region for the instance.
     *
     * Generated from protobuf field <code>repeated string zones = 5;</code>
     */
    private $zones;
    /**
     * Required. Number of nodes in the Memcached instance.
     *
     * Generated from protobuf field <code>int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $node_count = 0;
    /**
     * Required. Configuration for Memcached nodes.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $node_config = null;
    /**
     * The major version of Memcached software.
     * If not provided, latest supported version will be used. Currently the
     * latest supported major version is `MEMCACHE_1_5`.
     * The minor version will be automatically determined by our system based on
     * the latest supported minor version.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheVersion memcache_version = 9;</code>
     */
    private $memcache_version = 0;
    /**
     * User defined parameters to apply to the memcached process
     * on each node.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheParameters parameters = 11;</code>
     */
    private $parameters = null;
    /**
     * Output only. List of Memcached nodes.
     * Refer to [Node][google.cloud.memcache.v1beta2.Instance.Node] message for more details.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $memcache_nodes;
    /**
     * Output only. The time the instance was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The time the instance was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Output only. The state of this Memcached instance.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Output only. The full version of memcached server running on this instance.
     * System automatically determines the full memcached version for an instance
     * based on the input MemcacheVersion.
     * The full version format will be "memcached-1.5.16".
     *
     * Generated from protobuf field <code>string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $memcache_full_version = '';
    /**
     * List of messages that describe the current state of the Memcached instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.InstanceMessage instance_messages = 19;</code>
     */
    private $instance_messages;
    /**
     * Output only. Endpoint for the Discovery API.
     *
     * Generated from protobuf field <code>string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $discovery_endpoint = '';
    /**
     * Output only. Returns true if there is an update waiting to be applied
     *
     * Generated from protobuf field <code>bool update_available = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_available = false;
    /**
     * The maintenance policy for the instance. If not provided,
     * the maintenance event will be performed based on Memorystore
     * internal rollout schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenancePolicy maintenance_policy = 22;</code>
     */
    private $maintenance_policy = null;
    /**
     * Output only. Published maintenance schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenanceSchedule maintenance_schedule = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $maintenance_schedule = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Unique name of the resource in this scope including project and
     *           location using the form:
     *               `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *           Note: Memcached instances are managed and addressed at the regional level
     *           so `location_id` here refers to a Google Cloud region; however, users may
     *           choose which zones Memcached nodes should be provisioned in within an
     *           instance. Refer to [zones][google.cloud.memcache.v1beta2.Instance.zones] field for more details.
     *     @type string $display_name
     *           User provided name for the instance, which is only used for display
     *           purposes. Cannot be more than 80 characters.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Resource labels to represent user-provided metadata.
     *           Refer to cloud documentation on labels for more details.
     *           https://cloud.google.com/compute/docs/labeling-resources
     *     @type string $authorized_network
     *           The full name of the Google Compute Engine
     *           [network](https://cloud.google.com/vpc/docs/vpc) to which the
     *           instance is connected. If left unspecified, the `default` network
     *           will be used.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $zones
     *           Zones in which Memcached nodes should be provisioned.
     *           Memcached nodes will be equally distributed across these zones. If not
     *           provided, the service will by default create nodes in all zones in the
     *           region for the instance.
     *     @type int $node_count
     *           Required. Number of nodes in the Memcached instance.
     *     @type \Google\Cloud\Memcache\V1beta2\Instance\NodeConfig $node_config
     *           Required. Configuration for Memcached nodes.
     *     @type int $memcache_version
     *           The major version of Memcached software.
     *           If not provided, latest supported version will be used. Currently the
     *           latest supported major version is `MEMCACHE_1_5`.
     *           The minor version will be automatically determined by our system based on
     *           the latest supported minor version.
     *     @type \Google\Cloud\Memcache\V1beta2\MemcacheParameters $parameters
     *           User defined parameters to apply to the memcached process
     *           on each node.
     *     @type array<\Google\Cloud\Memcache\V1beta2\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $memcache_nodes
     *           Output only. List of Memcached nodes.
     *           Refer to [Node][google.cloud.memcache.v1beta2.Instance.Node] message for more details.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time the instance was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time the instance was updated.
     *     @type int $state
     *           Output only. The state of this Memcached instance.
     *     @type string $memcache_full_version
     *           Output only. The full version of memcached server running on this instance.
     *           System automatically determines the full memcached version for an instance
     *           based on the input MemcacheVersion.
     *           The full version format will be "memcached-1.5.16".
     *     @type array<\Google\Cloud\Memcache\V1beta2\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $instance_messages
     *           List of messages that describe the current state of the Memcached instance.
     *     @type string $discovery_endpoint
     *           Output only. Endpoint for the Discovery API.
     *     @type bool $update_available
     *           Output only. Returns true if there is an update waiting to be applied
     *     @type \Google\Cloud\Memcache\V1beta2\MaintenancePolicy $maintenance_policy
     *           The maintenance policy for the instance. If not provided,
     *           the maintenance event will be performed based on Memorystore
     *           internal rollout schedule.
     *     @type \Google\Cloud\Memcache\V1beta2\MaintenanceSchedule $maintenance_schedule
     *           Output only. Published maintenance schedule.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memcache\V1Beta2\CloudMemcache::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     * Note: Memcached instances are managed and addressed at the regional level
     * so `location_id` here refers to a Google Cloud region; however, users may
     * choose which zones Memcached nodes should be provisioned in within an
     * instance. Refer to [zones][google.cloud.memcache.v1beta2.Instance.zones] field for more details.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     * Note: Memcached instances are managed and addressed at the regional level
     * so `location_id` here refers to a Google Cloud region; however, users may
     * choose which zones Memcached nodes should be provisioned in within an
     * instance. Refer to [zones][google.cloud.memcache.v1beta2.Instance.zones] field for more details.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * User provided name for the instance, which is only used for display
     * purposes. Cannot be more than 80 characters.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * User provided name for the instance, which is only used for display
     * purposes. Cannot be more than 80 characters.
     *
     * Generated from protobuf field <code>string display_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Resource labels to represent user-provided metadata.
     * Refer to cloud documentation on labels for more details.
     * https://cloud.google.com/compute/docs/labeling-resources
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Resource labels to represent user-provided metadata.
     * Refer to cloud documentation on labels for more details.
     * https://cloud.google.com/compute/docs/labeling-resources
     *
     * Generated from protobuf field <code>map<string, string> labels = 3;</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;
    }

    /**
     * The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     *
     * Generated from protobuf field <code>string authorized_network = 4;</code>
     * @return string
     */
    public function getAuthorizedNetwork()
    {
        return $this->authorized_network;
    }

    /**
     * The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     *
     * Generated from protobuf field <code>string authorized_network = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAuthorizedNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->authorized_network = $var;

        return $this;
    }

    /**
     * Zones in which Memcached nodes should be provisioned.
     * Memcached nodes will be equally distributed across these zones. If not
     * provided, the service will by default create nodes in all zones in the
     * region for the instance.
     *
     * Generated from protobuf field <code>repeated string zones = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getZones()
    {
        return $this->zones;
    }

    /**
     * Zones in which Memcached nodes should be provisioned.
     * Memcached nodes will be equally distributed across these zones. If not
     * provided, the service will by default create nodes in all zones in the
     * region for the instance.
     *
     * Generated from protobuf field <code>repeated string zones = 5;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setZones($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->zones = $arr;

        return $this;
    }

    /**
     * Required. Number of nodes in the Memcached instance.
     *
     * Generated from protobuf field <code>int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getNodeCount()
    {
        return $this->node_count;
    }

    /**
     * Required. Number of nodes in the Memcached instance.
     *
     * Generated from protobuf field <code>int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setNodeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->node_count = $var;

        return $this;
    }

    /**
     * Required. Configuration for Memcached nodes.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Memcache\V1beta2\Instance\NodeConfig|null
     */
    public function getNodeConfig()
    {
        return $this->node_config;
    }

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

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

    /**
     * Required. Configuration for Memcached nodes.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Memcache\V1beta2\Instance\NodeConfig $var
     * @return $this
     */
    public function setNodeConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1beta2\Instance\NodeConfig::class);
        $this->node_config = $var;

        return $this;
    }

    /**
     * The major version of Memcached software.
     * If not provided, latest supported version will be used. Currently the
     * latest supported major version is `MEMCACHE_1_5`.
     * The minor version will be automatically determined by our system based on
     * the latest supported minor version.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheVersion memcache_version = 9;</code>
     * @return int
     */
    public function getMemcacheVersion()
    {
        return $this->memcache_version;
    }

    /**
     * The major version of Memcached software.
     * If not provided, latest supported version will be used. Currently the
     * latest supported major version is `MEMCACHE_1_5`.
     * The minor version will be automatically determined by our system based on
     * the latest supported minor version.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheVersion memcache_version = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setMemcacheVersion($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1beta2\MemcacheVersion::class);
        $this->memcache_version = $var;

        return $this;
    }

    /**
     * User defined parameters to apply to the memcached process
     * on each node.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheParameters parameters = 11;</code>
     * @return \Google\Cloud\Memcache\V1beta2\MemcacheParameters|null
     */
    public function getParameters()
    {
        return $this->parameters;
    }

    public function hasParameters()
    {
        return isset($this->parameters);
    }

    public function clearParameters()
    {
        unset($this->parameters);
    }

    /**
     * User defined parameters to apply to the memcached process
     * on each node.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MemcacheParameters parameters = 11;</code>
     * @param \Google\Cloud\Memcache\V1beta2\MemcacheParameters $var
     * @return $this
     */
    public function setParameters($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1beta2\MemcacheParameters::class);
        $this->parameters = $var;

        return $this;
    }

    /**
     * Output only. List of Memcached nodes.
     * Refer to [Node][google.cloud.memcache.v1beta2.Instance.Node] message for more details.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMemcacheNodes()
    {
        return $this->memcache_nodes;
    }

    /**
     * Output only. List of Memcached nodes.
     * Refer to [Node][google.cloud.memcache.v1beta2.Instance.Node] message for more details.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Memcache\V1beta2\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMemcacheNodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1beta2\Instance\Node::class);
        $this->memcache_nodes = $arr;

        return $this;
    }

    /**
     * Output only. The time the instance was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 13 [(.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. The time the instance was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 13 [(.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. The time the instance was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 14 [(.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. The time the instance was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 14 [(.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;
    }

    /**
     * Output only. The state of this Memcached instance.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The state of this Memcached instance.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1beta2\Instance\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. The full version of memcached server running on this instance.
     * System automatically determines the full memcached version for an instance
     * based on the input MemcacheVersion.
     * The full version format will be "memcached-1.5.16".
     *
     * Generated from protobuf field <code>string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getMemcacheFullVersion()
    {
        return $this->memcache_full_version;
    }

    /**
     * Output only. The full version of memcached server running on this instance.
     * System automatically determines the full memcached version for an instance
     * based on the input MemcacheVersion.
     * The full version format will be "memcached-1.5.16".
     *
     * Generated from protobuf field <code>string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setMemcacheFullVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->memcache_full_version = $var;

        return $this;
    }

    /**
     * List of messages that describe the current state of the Memcached instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.InstanceMessage instance_messages = 19;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstanceMessages()
    {
        return $this->instance_messages;
    }

    /**
     * List of messages that describe the current state of the Memcached instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.memcache.v1beta2.Instance.InstanceMessage instance_messages = 19;</code>
     * @param array<\Google\Cloud\Memcache\V1beta2\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstanceMessages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1beta2\Instance\InstanceMessage::class);
        $this->instance_messages = $arr;

        return $this;
    }

    /**
     * Output only. Endpoint for the Discovery API.
     *
     * Generated from protobuf field <code>string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDiscoveryEndpoint()
    {
        return $this->discovery_endpoint;
    }

    /**
     * Output only. Endpoint for the Discovery API.
     *
     * Generated from protobuf field <code>string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDiscoveryEndpoint($var)
    {
        GPBUtil::checkString($var, True);
        $this->discovery_endpoint = $var;

        return $this;
    }

    /**
     * Output only. Returns true if there is an update waiting to be applied
     *
     * Generated from protobuf field <code>bool update_available = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getUpdateAvailable()
    {
        return $this->update_available;
    }

    /**
     * Output only. Returns true if there is an update waiting to be applied
     *
     * Generated from protobuf field <code>bool update_available = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setUpdateAvailable($var)
    {
        GPBUtil::checkBool($var);
        $this->update_available = $var;

        return $this;
    }

    /**
     * The maintenance policy for the instance. If not provided,
     * the maintenance event will be performed based on Memorystore
     * internal rollout schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenancePolicy maintenance_policy = 22;</code>
     * @return \Google\Cloud\Memcache\V1beta2\MaintenancePolicy|null
     */
    public function getMaintenancePolicy()
    {
        return $this->maintenance_policy;
    }

    public function hasMaintenancePolicy()
    {
        return isset($this->maintenance_policy);
    }

    public function clearMaintenancePolicy()
    {
        unset($this->maintenance_policy);
    }

    /**
     * The maintenance policy for the instance. If not provided,
     * the maintenance event will be performed based on Memorystore
     * internal rollout schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenancePolicy maintenance_policy = 22;</code>
     * @param \Google\Cloud\Memcache\V1beta2\MaintenancePolicy $var
     * @return $this
     */
    public function setMaintenancePolicy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1beta2\MaintenancePolicy::class);
        $this->maintenance_policy = $var;

        return $this;
    }

    /**
     * Output only. Published maintenance schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenanceSchedule maintenance_schedule = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Memcache\V1beta2\MaintenanceSchedule|null
     */
    public function getMaintenanceSchedule()
    {
        return $this->maintenance_schedule;
    }

    public function hasMaintenanceSchedule()
    {
        return isset($this->maintenance_schedule);
    }

    public function clearMaintenanceSchedule()
    {
        unset($this->maintenance_schedule);
    }

    /**
     * Output only. Published maintenance schedule.
     *
     * Generated from protobuf field <code>.google.cloud.memcache.v1beta2.MaintenanceSchedule maintenance_schedule = 23 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Memcache\V1beta2\MaintenanceSchedule $var
     * @return $this
     */
    public function setMaintenanceSchedule($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1beta2\MaintenanceSchedule::class);
        $this->maintenance_schedule = $var;

        return $this;
    }

}

