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

namespace Google\Cloud\BareMetalSolution\V2;

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

/**
 * Configuration parameters for a new volume.
 *
 * Generated from protobuf message <code>google.cloud.baremetalsolution.v2.VolumeConfig</code>
 */
class VolumeConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The name of the volume config.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $name = '';
    /**
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     */
    protected $id = '';
    /**
     * Whether snapshots should be enabled.
     *
     * Generated from protobuf field <code>bool snapshots_enabled = 3;</code>
     */
    protected $snapshots_enabled = false;
    /**
     * The type of this Volume.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4;</code>
     */
    protected $type = 0;
    /**
     * Volume protocol.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5;</code>
     */
    protected $protocol = 0;
    /**
     * The requested size of this volume, in GB.
     *
     * Generated from protobuf field <code>int32 size_gb = 6;</code>
     */
    protected $size_gb = 0;
    /**
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7;</code>
     */
    private $lun_ranges;
    /**
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated string machine_ids = 8;</code>
     */
    private $machine_ids;
    /**
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9;</code>
     */
    private $nfs_exports;
    /**
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     *
     * Generated from protobuf field <code>string user_note = 10;</code>
     */
    protected $user_note = '';
    /**
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     *
     * Generated from protobuf field <code>string gcp_service = 11;</code>
     */
    protected $gcp_service = '';
    /**
     * Performance tier of the Volume.
     * Default is SHARED.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12;</code>
     */
    protected $performance_tier = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The name of the volume config.
     *     @type string $id
     *           A transient unique identifier to identify a volume within an
     *           ProvisioningConfig request.
     *     @type bool $snapshots_enabled
     *           Whether snapshots should be enabled.
     *     @type int $type
     *           The type of this Volume.
     *     @type int $protocol
     *           Volume protocol.
     *     @type int $size_gb
     *           The requested size of this volume, in GB.
     *     @type \Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange[] $lun_ranges
     *           LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     *     @type string[] $machine_ids
     *           Machine ids connected to this volume. Set only when protocol is
     *           PROTOCOL_FC.
     *     @type \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport[] $nfs_exports
     *           NFS exports. Set only when protocol is PROTOCOL_NFS.
     *     @type string $user_note
     *           User note field, it can be used by customers to add additional information
     *           for the BMS Ops team .
     *     @type string $gcp_service
     *           The GCP service of the storage volume. Available gcp_service are in
     *           https://cloud.google.com/bare-metal/docs/bms-planning.
     *     @type int $performance_tier
     *           Performance tier of the Volume.
     *           Default is SHARED.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Baremetalsolution\V2\Provisioning::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The name of the volume config.
     *
     * 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 name of the volume config.
     *
     * 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;
    }

    /**
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * A transient unique identifier to identify a volume within an
     * ProvisioningConfig request.
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Whether snapshots should be enabled.
     *
     * Generated from protobuf field <code>bool snapshots_enabled = 3;</code>
     * @return bool
     */
    public function getSnapshotsEnabled()
    {
        return $this->snapshots_enabled;
    }

    /**
     * Whether snapshots should be enabled.
     *
     * Generated from protobuf field <code>bool snapshots_enabled = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setSnapshotsEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->snapshots_enabled = $var;

        return $this;
    }

    /**
     * The type of this Volume.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of this Volume.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Type type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Volume protocol.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5;</code>
     * @return int
     */
    public function getProtocol()
    {
        return $this->protocol;
    }

    /**
     * Volume protocol.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumeConfig.Protocol protocol = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setProtocol($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\Protocol::class);
        $this->protocol = $var;

        return $this;
    }

    /**
     * The requested size of this volume, in GB.
     *
     * Generated from protobuf field <code>int32 size_gb = 6;</code>
     * @return int
     */
    public function getSizeGb()
    {
        return $this->size_gb;
    }

    /**
     * The requested size of this volume, in GB.
     *
     * Generated from protobuf field <code>int32 size_gb = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setSizeGb($var)
    {
        GPBUtil::checkInt32($var);
        $this->size_gb = $var;

        return $this;
    }

    /**
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7;</code>
     * @return RepeatedField<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange>
     */
    public function getLunRanges()
    {
        return $this->lun_ranges;
    }

    /**
     * LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.LunRange lun_ranges = 7;</code>
     * @param \Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange[] $var
     * @return $this
     */
    public function setLunRanges($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\LunRange::class);
        $this->lun_ranges = $arr;

        return $this;
    }

    /**
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated string machine_ids = 8;</code>
     * @return RepeatedField<string>
     */
    public function getMachineIds()
    {
        return $this->machine_ids;
    }

    /**
     * Machine ids connected to this volume. Set only when protocol is
     * PROTOCOL_FC.
     *
     * Generated from protobuf field <code>repeated string machine_ids = 8;</code>
     * @param string[] $var
     * @return $this
     */
    public function setMachineIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->machine_ids = $arr;

        return $this;
    }

    /**
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9;</code>
     * @return RepeatedField<\Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport>
     */
    public function getNfsExports()
    {
        return $this->nfs_exports;
    }

    /**
     * NFS exports. Set only when protocol is PROTOCOL_NFS.
     *
     * Generated from protobuf field <code>repeated .google.cloud.baremetalsolution.v2.VolumeConfig.NfsExport nfs_exports = 9;</code>
     * @param \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport[] $var
     * @return $this
     */
    public function setNfsExports($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BareMetalSolution\V2\VolumeConfig\NfsExport::class);
        $this->nfs_exports = $arr;

        return $this;
    }

    /**
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     *
     * Generated from protobuf field <code>string user_note = 10;</code>
     * @return string
     */
    public function getUserNote()
    {
        return $this->user_note;
    }

    /**
     * User note field, it can be used by customers to add additional information
     * for the BMS Ops team .
     *
     * Generated from protobuf field <code>string user_note = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setUserNote($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_note = $var;

        return $this;
    }

    /**
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     *
     * Generated from protobuf field <code>string gcp_service = 11;</code>
     * @return string
     */
    public function getGcpService()
    {
        return $this->gcp_service;
    }

    /**
     * The GCP service of the storage volume. Available gcp_service are in
     * https://cloud.google.com/bare-metal/docs/bms-planning.
     *
     * Generated from protobuf field <code>string gcp_service = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setGcpService($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcp_service = $var;

        return $this;
    }

    /**
     * Performance tier of the Volume.
     * Default is SHARED.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12;</code>
     * @return int
     */
    public function getPerformanceTier()
    {
        return $this->performance_tier;
    }

    /**
     * Performance tier of the Volume.
     * Default is SHARED.
     *
     * Generated from protobuf field <code>.google.cloud.baremetalsolution.v2.VolumePerformanceTier performance_tier = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setPerformanceTier($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BareMetalSolution\V2\VolumePerformanceTier::class);
        $this->performance_tier = $var;

        return $this;
    }

}

