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

namespace Google\Cloud\Filestore\V1;

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

/**
 * A Cloud Filestore instance.
 *
 * Generated from protobuf message <code>google.cloud.filestore.v1.Instance</code>
 */
class Instance extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the instance, in the format
     * `projects/{project}/locations/{location}/instances/{instance}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * The description of the instance (2048 characters or less).
     *
     * Generated from protobuf field <code>string description = 2;</code>
     */
    private $description = '';
    /**
     * Output only. The instance state.
     *
     * Generated from protobuf field <code>.google.cloud.filestore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Output only. Additional information about the instance state, if available.
     *
     * Generated from protobuf field <code>string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $status_message = '';
    /**
     * Output only. The time when the instance was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * The service tier of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.filestore.v1.Instance.Tier tier = 8;</code>
     */
    private $tier = 0;
    /**
     * Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 9;</code>
     */
    private $labels;
    /**
     * File system shares on the instance.
     * For this version, only a single file share is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10;</code>
     */
    private $file_shares;
    /**
     * VPC networks to which the instance is connected.
     * For this version, only a single network is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.NetworkConfig networks = 11;</code>
     */
    private $networks;
    /**
     * Server-specified ETag for the instance resource to prevent simultaneous
     * updates from overwriting each other.
     *
     * Generated from protobuf field <code>string etag = 12;</code>
     */
    private $etag = '';
    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $satisfies_pzs = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The resource name of the instance, in the format
     *           `projects/{project}/locations/{location}/instances/{instance}`.
     *     @type string $description
     *           The description of the instance (2048 characters or less).
     *     @type int $state
     *           Output only. The instance state.
     *     @type string $status_message
     *           Output only. Additional information about the instance state, if available.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time when the instance was created.
     *     @type int $tier
     *           The service tier of the instance.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Resource labels to represent user provided metadata.
     *     @type array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $file_shares
     *           File system shares on the instance.
     *           For this version, only a single file share is supported.
     *     @type array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $networks
     *           VPC networks to which the instance is connected.
     *           For this version, only a single network is supported.
     *     @type string $etag
     *           Server-specified ETag for the instance resource to prevent simultaneous
     *           updates from overwriting each other.
     *     @type \Google\Protobuf\BoolValue $satisfies_pzs
     *           Output only. Reserved for future use.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Filestore\V1\CloudFilestoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the instance, in the format
     * `projects/{project}/locations/{location}/instances/{instance}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The resource name of the instance, in the format
     * `projects/{project}/locations/{location}/instances/{instance}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The description of the instance (2048 characters or less).
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * The description of the instance (2048 characters or less).
     *
     * Generated from protobuf field <code>string description = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

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

    /**
     * Output only. The instance state.
     *
     * Generated from protobuf field <code>.google.cloud.filestore.v1.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\Filestore\V1\Instance\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. Additional information about the instance state, if available.
     *
     * Generated from protobuf field <code>string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getStatusMessage()
    {
        return $this->status_message;
    }

    /**
     * Output only. Additional information about the instance state, if available.
     *
     * Generated from protobuf field <code>string status_message = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setStatusMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->status_message = $var;

        return $this;
    }

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

    /**
     * The service tier of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.filestore.v1.Instance.Tier tier = 8;</code>
     * @return int
     */
    public function getTier()
    {
        return $this->tier;
    }

    /**
     * The service tier of the instance.
     *
     * Generated from protobuf field <code>.google.cloud.filestore.v1.Instance.Tier tier = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setTier($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Filestore\V1\Instance\Tier::class);
        $this->tier = $var;

        return $this;
    }

    /**
     * Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 9;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 9;</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;
    }

    /**
     * File system shares on the instance.
     * For this version, only a single file share is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFileShares()
    {
        return $this->file_shares;
    }

    /**
     * File system shares on the instance.
     * For this version, only a single file share is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.FileShareConfig file_shares = 10;</code>
     * @param array<\Google\Cloud\Filestore\V1\FileShareConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFileShares($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\FileShareConfig::class);
        $this->file_shares = $arr;

        return $this;
    }

    /**
     * VPC networks to which the instance is connected.
     * For this version, only a single network is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.NetworkConfig networks = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNetworks()
    {
        return $this->networks;
    }

    /**
     * VPC networks to which the instance is connected.
     * For this version, only a single network is supported.
     *
     * Generated from protobuf field <code>repeated .google.cloud.filestore.v1.NetworkConfig networks = 11;</code>
     * @param array<\Google\Cloud\Filestore\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNetworks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Filestore\V1\NetworkConfig::class);
        $this->networks = $arr;

        return $this;
    }

    /**
     * Server-specified ETag for the instance resource to prevent simultaneous
     * updates from overwriting each other.
     *
     * Generated from protobuf field <code>string etag = 12;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Server-specified ETag for the instance resource to prevent simultaneous
     * updates from overwriting each other.
     *
     * Generated from protobuf field <code>string etag = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\BoolValue|null
     */
    public function getSatisfiesPzs()
    {
        return $this->satisfies_pzs;
    }

    public function hasSatisfiesPzs()
    {
        return isset($this->satisfies_pzs);
    }

    public function clearSatisfiesPzs()
    {
        unset($this->satisfies_pzs);
    }

    /**
     * Returns the unboxed value from <code>getSatisfiesPzs()</code>

     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool|null
     */
    public function getSatisfiesPzsValue()
    {
        return $this->readWrapperValue("satisfies_pzs");
    }

    /**
     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setSatisfiesPzs($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->satisfies_pzs = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.

     * Output only. Reserved for future use.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue satisfies_pzs = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool|null $var
     * @return $this
     */
    public function setSatisfiesPzsValue($var)
    {
        $this->writeWrapperValue("satisfies_pzs", $var);
        return $this;}

}

