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

namespace Google\Cloud\Asset\V1;

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

/**
 * The key and value for a
 * [tag](https://cloud.google.com/resource-manager/docs/tags/tags-overview).
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.Tag</code>
 */
class Tag extends \Google\Protobuf\Internal\Message
{
    /**
     * TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_key = 1;</code>
     */
    private $tag_key = null;
    /**
     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
     *
     * Generated from protobuf field <code>optional string tag_key_id = 2;</code>
     */
    private $tag_key_id = null;
    /**
     * TagValue namespaced name, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_value = 3;</code>
     */
    private $tag_value = null;
    /**
     * TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.
     *
     * Generated from protobuf field <code>optional string tag_value_id = 4;</code>
     */
    private $tag_value_id = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $tag_key
     *           TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     *     @type string $tag_key_id
     *           TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
     *     @type string $tag_value
     *           TagValue namespaced name, in the format of
     *           {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     *     @type string $tag_value_id
     *           TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\Assets::initOnce();
        parent::__construct($data);
    }

    /**
     * TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_key = 1;</code>
     * @return string
     */
    public function getTagKey()
    {
        return isset($this->tag_key) ? $this->tag_key : '';
    }

    public function hasTagKey()
    {
        return isset($this->tag_key);
    }

    public function clearTagKey()
    {
        unset($this->tag_key);
    }

    /**
     * TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTagKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->tag_key = $var;

        return $this;
    }

    /**
     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
     *
     * Generated from protobuf field <code>optional string tag_key_id = 2;</code>
     * @return string
     */
    public function getTagKeyId()
    {
        return isset($this->tag_key_id) ? $this->tag_key_id : '';
    }

    public function hasTagKeyId()
    {
        return isset($this->tag_key_id);
    }

    public function clearTagKeyId()
    {
        unset($this->tag_key_id);
    }

    /**
     * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}.
     *
     * Generated from protobuf field <code>optional string tag_key_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTagKeyId($var)
    {
        GPBUtil::checkString($var, True);
        $this->tag_key_id = $var;

        return $this;
    }

    /**
     * TagValue namespaced name, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_value = 3;</code>
     * @return string
     */
    public function getTagValue()
    {
        return isset($this->tag_value) ? $this->tag_value : '';
    }

    public function hasTagValue()
    {
        return isset($this->tag_value);
    }

    public function clearTagValue()
    {
        unset($this->tag_value);
    }

    /**
     * TagValue namespaced name, in the format of
     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
     *
     * Generated from protobuf field <code>optional string tag_value = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTagValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->tag_value = $var;

        return $this;
    }

    /**
     * TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.
     *
     * Generated from protobuf field <code>optional string tag_value_id = 4;</code>
     * @return string
     */
    public function getTagValueId()
    {
        return isset($this->tag_value_id) ? $this->tag_value_id : '';
    }

    public function hasTagValueId()
    {
        return isset($this->tag_value_id);
    }

    public function clearTagValueId()
    {
        unset($this->tag_value_id);
    }

    /**
     * TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.
     *
     * Generated from protobuf field <code>optional string tag_value_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setTagValueId($var)
    {
        GPBUtil::checkString($var, True);
        $this->tag_value_id = $var;

        return $this;
    }

}

