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

namespace Google\Cloud\CapacityPlanner\V1beta\Allocation;

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

/**
 * This reservation type allows to pre allocate specific instance
 * configuration.
 *
 * Generated from protobuf message <code>google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation</code>
 */
class SpecificSKUAllocation extends \Google\Protobuf\Internal\Message
{
    /**
     * The instance properties for the reservation.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties instance_properties = 1;</code>
     */
    protected $instance_properties = null;
    /**
     * Specifies the number of resources that are allocated.
     *
     * Generated from protobuf field <code>int64 count = 2;</code>
     */
    protected $count = 0;
    /**
     * Indicates how many instances are in use.
     *
     * Generated from protobuf field <code>int64 used_count = 3;</code>
     */
    protected $used_count = 0;
    /**
     * Indicates how many instances are actually usable currently.
     *
     * Generated from protobuf field <code>int64 assured_count = 4;</code>
     */
    protected $assured_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties $instance_properties
     *           The instance properties for the reservation.
     *     @type int|string $count
     *           Specifies the number of resources that are allocated.
     *     @type int|string $used_count
     *           Indicates how many instances are in use.
     *     @type int|string $assured_count
     *           Indicates how many instances are actually usable currently.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Capacityplanner\V1Beta\Allocation::initOnce();
        parent::__construct($data);
    }

    /**
     * The instance properties for the reservation.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties instance_properties = 1;</code>
     * @return \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties|null
     */
    public function getInstanceProperties()
    {
        return $this->instance_properties;
    }

    public function hasInstanceProperties()
    {
        return isset($this->instance_properties);
    }

    public function clearInstanceProperties()
    {
        unset($this->instance_properties);
    }

    /**
     * The instance properties for the reservation.
     *
     * Generated from protobuf field <code>.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties instance_properties = 1;</code>
     * @param \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties $var
     * @return $this
     */
    public function setInstanceProperties($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\CapacityPlanner\V1beta\Allocation\SpecificSKUAllocation\AllocatedInstanceProperties::class);
        $this->instance_properties = $var;

        return $this;
    }

    /**
     * Specifies the number of resources that are allocated.
     *
     * Generated from protobuf field <code>int64 count = 2;</code>
     * @return int|string
     */
    public function getCount()
    {
        return $this->count;
    }

    /**
     * Specifies the number of resources that are allocated.
     *
     * Generated from protobuf field <code>int64 count = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->count = $var;

        return $this;
    }

    /**
     * Indicates how many instances are in use.
     *
     * Generated from protobuf field <code>int64 used_count = 3;</code>
     * @return int|string
     */
    public function getUsedCount()
    {
        return $this->used_count;
    }

    /**
     * Indicates how many instances are in use.
     *
     * Generated from protobuf field <code>int64 used_count = 3;</code>
     * @param int|string $var
     * @return $this
     */
    public function setUsedCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->used_count = $var;

        return $this;
    }

    /**
     * Indicates how many instances are actually usable currently.
     *
     * Generated from protobuf field <code>int64 assured_count = 4;</code>
     * @return int|string
     */
    public function getAssuredCount()
    {
        return $this->assured_count;
    }

    /**
     * Indicates how many instances are actually usable currently.
     *
     * Generated from protobuf field <code>int64 assured_count = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAssuredCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->assured_count = $var;

        return $this;
    }

}

