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

/**
 * Contains Properties set for the reservation.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.AllocationResourceStatusSpecificSKUAllocation</code>
 */
class AllocationResourceStatusSpecificSKUAllocation extends \Google\Protobuf\Internal\Message
{
    /**
     * ID of the instance template used to populate reservation properties.
     *
     * Generated from protobuf field <code>optional string source_instance_template_id = 111196154;</code>
     */
    protected $source_instance_template_id = null;
    /**
     * Per service utilization breakdown. The Key is the Google Cloud managed
     * service name.
     *
     * Generated from protobuf field <code>map<string, int64> utilizations = 402495121;</code>
     */
    private $utilizations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $source_instance_template_id
     *           ID of the instance template used to populate reservation properties.
     *     @type array|\Google\Protobuf\Internal\MapField $utilizations
     *           Per service utilization breakdown. The Key is the Google Cloud managed
     *           service name.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * ID of the instance template used to populate reservation properties.
     *
     * Generated from protobuf field <code>optional string source_instance_template_id = 111196154;</code>
     * @return string
     */
    public function getSourceInstanceTemplateId()
    {
        return isset($this->source_instance_template_id) ? $this->source_instance_template_id : '';
    }

    public function hasSourceInstanceTemplateId()
    {
        return isset($this->source_instance_template_id);
    }

    public function clearSourceInstanceTemplateId()
    {
        unset($this->source_instance_template_id);
    }

    /**
     * ID of the instance template used to populate reservation properties.
     *
     * Generated from protobuf field <code>optional string source_instance_template_id = 111196154;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceInstanceTemplateId($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_instance_template_id = $var;

        return $this;
    }

    /**
     * Per service utilization breakdown. The Key is the Google Cloud managed
     * service name.
     *
     * Generated from protobuf field <code>map<string, int64> utilizations = 402495121;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getUtilizations()
    {
        return $this->utilizations;
    }

    /**
     * Per service utilization breakdown. The Key is the Google Cloud managed
     * service name.
     *
     * Generated from protobuf field <code>map<string, int64> utilizations = 402495121;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setUtilizations($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64);
        $this->utilizations = $arr;

        return $this;
    }

}

