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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.LocalDisk</code>
 */
class LocalDisk extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies the number of such disks.
     *
     * Generated from protobuf field <code>optional int32 disk_count = 182933485;</code>
     */
    private $disk_count = null;
    /**
     * Specifies the size of the disk in base-2 GB.
     *
     * Generated from protobuf field <code>optional int32 disk_size_gb = 316263735;</code>
     */
    private $disk_size_gb = null;
    /**
     * Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
     *
     * Generated from protobuf field <code>optional string disk_type = 93009052;</code>
     */
    private $disk_type = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $disk_count
     *           Specifies the number of such disks.
     *     @type int $disk_size_gb
     *           Specifies the size of the disk in base-2 GB.
     *     @type string $disk_type
     *           Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the number of such disks.
     *
     * Generated from protobuf field <code>optional int32 disk_count = 182933485;</code>
     * @return int
     */
    public function getDiskCount()
    {
        return isset($this->disk_count) ? $this->disk_count : 0;
    }

    public function hasDiskCount()
    {
        return isset($this->disk_count);
    }

    public function clearDiskCount()
    {
        unset($this->disk_count);
    }

    /**
     * Specifies the number of such disks.
     *
     * Generated from protobuf field <code>optional int32 disk_count = 182933485;</code>
     * @param int $var
     * @return $this
     */
    public function setDiskCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->disk_count = $var;

        return $this;
    }

    /**
     * Specifies the size of the disk in base-2 GB.
     *
     * Generated from protobuf field <code>optional int32 disk_size_gb = 316263735;</code>
     * @return int
     */
    public function getDiskSizeGb()
    {
        return isset($this->disk_size_gb) ? $this->disk_size_gb : 0;
    }

    public function hasDiskSizeGb()
    {
        return isset($this->disk_size_gb);
    }

    public function clearDiskSizeGb()
    {
        unset($this->disk_size_gb);
    }

    /**
     * Specifies the size of the disk in base-2 GB.
     *
     * Generated from protobuf field <code>optional int32 disk_size_gb = 316263735;</code>
     * @param int $var
     * @return $this
     */
    public function setDiskSizeGb($var)
    {
        GPBUtil::checkInt32($var);
        $this->disk_size_gb = $var;

        return $this;
    }

    /**
     * Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
     *
     * Generated from protobuf field <code>optional string disk_type = 93009052;</code>
     * @return string
     */
    public function getDiskType()
    {
        return isset($this->disk_type) ? $this->disk_type : '';
    }

    public function hasDiskType()
    {
        return isset($this->disk_type);
    }

    public function clearDiskType()
    {
        unset($this->disk_type);
    }

    /**
     * Specifies the desired disk type on the node. This disk type must be a local storage type (e.g.: local-ssd). Note that for nodeTemplates, this should be the name of the disk type and not its URL.
     *
     * Generated from protobuf field <code>optional string disk_type = 93009052;</code>
     * @param string $var
     * @return $this
     */
    public function setDiskType($var)
    {
        GPBUtil::checkString($var, True);
        $this->disk_type = $var;

        return $this;
    }

}

