<?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;

/**
 * Properties of the SKU instances being reserved. Next ID: 9
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstanceProperties</code>
 */
class AllocationSpecificSKUAllocationReservedInstanceProperties extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;</code>
     */
    private $guest_accelerators;
    /**
     * Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk local_ssds = 229951299;</code>
     */
    private $local_ssds;
    /**
     * Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
     *
     * Generated from protobuf field <code>string machine_type = 227711026;</code>
     */
    private $machine_type = null;
    /**
     * Minimum cpu platform the reservation.
     *
     * Generated from protobuf field <code>string min_cpu_platform = 242912759;</code>
     */
    private $min_cpu_platform = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\AcceleratorConfig[]|\Google\Protobuf\Internal\RepeatedField $guest_accelerators
     *           Specifies accelerator type and count.
     *     @type \Google\Cloud\Compute\V1\AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk[]|\Google\Protobuf\Internal\RepeatedField $local_ssds
     *           Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
     *     @type string $machine_type
     *           Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
     *     @type string $min_cpu_platform
     *           Minimum cpu platform the reservation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGuestAccelerators()
    {
        return $this->guest_accelerators;
    }

    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;</code>
     * @param \Google\Cloud\Compute\V1\AcceleratorConfig[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGuestAccelerators($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\AcceleratorConfig::class);
        $this->guest_accelerators = $arr;

        return $this;
    }

    /**
     * Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk local_ssds = 229951299;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLocalSsds()
    {
        return $this->local_ssds;
    }

    /**
     * Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk local_ssds = 229951299;</code>
     * @param \Google\Cloud\Compute\V1\AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocalSsds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk::class);
        $this->local_ssds = $arr;

        return $this;
    }

    /**
     * Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
     *
     * Generated from protobuf field <code>string machine_type = 227711026;</code>
     * @return string
     */
    public function getMachineType()
    {
        return isset($this->machine_type) ? $this->machine_type : '';
    }

    public function hasMachineType()
    {
        return isset($this->machine_type);
    }

    public function clearMachineType()
    {
        unset($this->machine_type);
    }

    /**
     * Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
     *
     * Generated from protobuf field <code>string machine_type = 227711026;</code>
     * @param string $var
     * @return $this
     */
    public function setMachineType($var)
    {
        GPBUtil::checkString($var, True);
        $this->machine_type = $var;

        return $this;
    }

    /**
     * Minimum cpu platform the reservation.
     *
     * Generated from protobuf field <code>string min_cpu_platform = 242912759;</code>
     * @return string
     */
    public function getMinCpuPlatform()
    {
        return isset($this->min_cpu_platform) ? $this->min_cpu_platform : '';
    }

    public function hasMinCpuPlatform()
    {
        return isset($this->min_cpu_platform);
    }

    public function clearMinCpuPlatform()
    {
        unset($this->min_cpu_platform);
    }

    /**
     * Minimum cpu platform the reservation.
     *
     * Generated from protobuf field <code>string min_cpu_platform = 242912759;</code>
     * @param string $var
     * @return $this
     */
    public function setMinCpuPlatform($var)
    {
        GPBUtil::checkString($var, True);
        $this->min_cpu_platform = $var;

        return $this;
    }

}

