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

namespace Google\Cloud\LicenseManager\V1;

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

/**
 * Message describing Instance object
 *
 * Generated from protobuf message <code>google.cloud.licensemanager.v1.Instance</code>
 */
class Instance extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. name of resource
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. Labels as key value pairs
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Output only. The state of the VM.
     *
     * Generated from protobuf field <code>.google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Output only. The location of the VM.
     *
     * Generated from protobuf field <code>string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $region = '';
    /**
     * Output only. Map with Product_Name and Activation State of the VM.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $product_activation;
    /**
     * Output only. license version id.
     *
     * Generated from protobuf field <code>string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $license_version_id = '';
    /**
     * Required. Compute Instance resource name, i.e.
     * projects/{project}/zones/{zone}/instances/{instance}
     *
     * Generated from protobuf field <code>string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $compute_instance = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. name of resource
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. [Output only] Create time stamp
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. [Output only] Update time stamp
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. Labels as key value pairs
     *     @type int $state
     *           Output only. The state of the VM.
     *     @type string $region
     *           Output only. The location of the VM.
     *     @type array|\Google\Protobuf\Internal\MapField $product_activation
     *           Output only. Map with Product_Name and Activation State of the VM.
     *     @type string $license_version_id
     *           Output only. license version id.
     *     @type string $compute_instance
     *           Required. Compute Instance resource name, i.e.
     *           projects/{project}/zones/{zone}/instances/{instance}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Licensemanager\V1\ApiEntities::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. name of resource
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. name of resource
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. [Output only] Create time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. [Output only] Update time stamp
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional. Labels as key value pairs
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. Labels as key value pairs
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Output only. The state of the VM.
     *
     * Generated from protobuf field <code>.google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The state of the VM.
     *
     * Generated from protobuf field <code>.google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\LicenseManager\V1\Instance\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. The location of the VM.
     *
     * Generated from protobuf field <code>string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * Output only. The location of the VM.
     *
     * Generated from protobuf field <code>string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * Output only. Map with Product_Name and Activation State of the VM.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getProductActivation()
    {
        return $this->product_activation;
    }

    /**
     * Output only. Map with Product_Name and Activation State of the VM.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setProductActivation($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\LicenseManager\V1\ActivationState::class);
        $this->product_activation = $arr;

        return $this;
    }

    /**
     * Output only. license version id.
     *
     * Generated from protobuf field <code>string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLicenseVersionId()
    {
        return $this->license_version_id;
    }

    /**
     * Output only. license version id.
     *
     * Generated from protobuf field <code>string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLicenseVersionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->license_version_id = $var;

        return $this;
    }

    /**
     * Required. Compute Instance resource name, i.e.
     * projects/{project}/zones/{zone}/instances/{instance}
     *
     * Generated from protobuf field <code>string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getComputeInstance()
    {
        return $this->compute_instance;
    }

    /**
     * Required. Compute Instance resource name, i.e.
     * projects/{project}/zones/{zone}/instances/{instance}
     *
     * Generated from protobuf field <code>string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setComputeInstance($var)
    {
        GPBUtil::checkString($var, True);
        $this->compute_instance = $var;

        return $this;
    }

}

