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

namespace Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation;

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

/**
 * Properties of the SKU instances being reserved.
 *
 * Generated from protobuf message <code>google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties</code>
 */
class AllocatedInstanceProperties extends \Google\Protobuf\Internal\Message
{
    /**
     * 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 = 1;</code>
     */
    protected $machine_type = '';
    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig guest_accelerator = 2;</code>
     */
    private $guest_accelerator;
    /**
     * Minimum cpu platform the reservation.
     *
     * Generated from protobuf field <code>string min_cpu_platform = 3;</code>
     */
    protected $min_cpu_platform = '';
    /**
     * 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.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk local_ssd = 4;</code>
     */
    private $local_ssd;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @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 array<\Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $guest_accelerator
     *           Specifies accelerator type and count.
     *     @type string $min_cpu_platform
     *           Minimum cpu platform the reservation.
     *     @type array<\Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AllocatedDisk>|\Google\Protobuf\Internal\RepeatedField $local_ssd
     *           Specifies amount of local ssd to reserve with each instance. The type
     *           of disk is local-ssd.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Capacityplanner\V1Beta\Allocation::initOnce();
        parent::__construct($data);
    }

    /**
     * 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 = 1;</code>
     * @return string
     */
    public function getMachineType()
    {
        return $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 = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMachineType($var)
    {
        GPBUtil::checkString($var, True);
        $this->machine_type = $var;

        return $this;
    }

    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig guest_accelerator = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGuestAccelerator()
    {
        return $this->guest_accelerator;
    }

    /**
     * Specifies accelerator type and count.
     *
     * Generated from protobuf field <code>repeated .google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig guest_accelerator = 2;</code>
     * @param array<\Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGuestAccelerator($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AcceleratorConfig::class);
        $this->guest_accelerator = $arr;

        return $this;
    }

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

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

        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.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk local_ssd = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLocalSsd()
    {
        return $this->local_ssd;
    }

    /**
     * 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.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk local_ssd = 4;</code>
     * @param array<\Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AllocatedDisk>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLocalSsd($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties\AllocatedDisk::class);
        $this->local_ssd = $arr;

        return $this;
    }

}


