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

namespace Google\Cloud\LifeSciences\V2beta;

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

/**
 * Carries information about a disk that can be attached to a VM.
 * See https://cloud.google.com/compute/docs/disks/performance for more
 * information about disk type, size, and performance considerations.
 * Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or
 * [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both.
 *
 * Generated from protobuf message <code>google.cloud.lifesciences.v2beta.Disk</code>
 */
class Disk extends \Google\Protobuf\Internal\Message
{
    /**
     * A user-supplied name for the disk. Used when mounting the disk into
     * actions. The name must contain only upper and lowercase alphanumeric
     * characters and hyphens and cannot start with a hyphen.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * The size, in GB, of the disk to attach. If the size is not
     * specified, a default is chosen to ensure reasonable I/O performance.
     * If the disk type is specified as `local-ssd`, multiple local drives are
     * automatically combined to provide the requested size. Note, however, that
     * each physical SSD is 375GB in size, and no more than 8 drives can be
     * attached to a single instance.
     *
     * Generated from protobuf field <code>int32 size_gb = 2;</code>
     */
    protected $size_gb = 0;
    /**
     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     */
    protected $type = '';
    /**
     * An optional image to put on the disk before attaching it to the VM.
     *
     * Generated from protobuf field <code>string source_image = 4;</code>
     */
    protected $source_image = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           A user-supplied name for the disk. Used when mounting the disk into
     *           actions. The name must contain only upper and lowercase alphanumeric
     *           characters and hyphens and cannot start with a hyphen.
     *     @type int $size_gb
     *           The size, in GB, of the disk to attach. If the size is not
     *           specified, a default is chosen to ensure reasonable I/O performance.
     *           If the disk type is specified as `local-ssd`, multiple local drives are
     *           automatically combined to provide the requested size. Note, however, that
     *           each physical SSD is 375GB in size, and no more than 8 drives can be
     *           attached to a single instance.
     *     @type string $type
     *           The Compute Engine disk type. If unspecified, `pd-standard` is used.
     *     @type string $source_image
     *           An optional image to put on the disk before attaching it to the VM.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Lifesciences\V2Beta\Workflows::initOnce();
        parent::__construct($data);
    }

    /**
     * A user-supplied name for the disk. Used when mounting the disk into
     * actions. The name must contain only upper and lowercase alphanumeric
     * characters and hyphens and cannot start with a hyphen.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * A user-supplied name for the disk. Used when mounting the disk into
     * actions. The name must contain only upper and lowercase alphanumeric
     * characters and hyphens and cannot start with a hyphen.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The size, in GB, of the disk to attach. If the size is not
     * specified, a default is chosen to ensure reasonable I/O performance.
     * If the disk type is specified as `local-ssd`, multiple local drives are
     * automatically combined to provide the requested size. Note, however, that
     * each physical SSD is 375GB in size, and no more than 8 drives can be
     * attached to a single instance.
     *
     * Generated from protobuf field <code>int32 size_gb = 2;</code>
     * @return int
     */
    public function getSizeGb()
    {
        return $this->size_gb;
    }

    /**
     * The size, in GB, of the disk to attach. If the size is not
     * specified, a default is chosen to ensure reasonable I/O performance.
     * If the disk type is specified as `local-ssd`, multiple local drives are
     * automatically combined to provide the requested size. Note, however, that
     * each physical SSD is 375GB in size, and no more than 8 drives can be
     * attached to a single instance.
     *
     * Generated from protobuf field <code>int32 size_gb = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSizeGb($var)
    {
        GPBUtil::checkInt32($var);
        $this->size_gb = $var;

        return $this;
    }

    /**
     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The Compute Engine disk type. If unspecified, `pd-standard` is used.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * An optional image to put on the disk before attaching it to the VM.
     *
     * Generated from protobuf field <code>string source_image = 4;</code>
     * @return string
     */
    public function getSourceImage()
    {
        return $this->source_image;
    }

    /**
     * An optional image to put on the disk before attaching it to the VM.
     *
     * Generated from protobuf field <code>string source_image = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceImage($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_image = $var;

        return $this;
    }

}

