<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/resourcemanager/v3/tag_keys.proto

namespace Google\Cloud\ResourceManager\V3;

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

/**
 * The request message for creating a TagKey.
 *
 * Generated from protobuf message <code>google.cloud.resourcemanager.v3.CreateTagKeyRequest</code>
 */
class CreateTagKeyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The TagKey to be created. Only fields `short_name`, `description`,
     * and `parent` are considered during the creation request.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.TagKey tag_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $tag_key = null;
    /**
     * Optional. Set to true to perform validations necessary for creating the resource, but
     * not actually perform the action.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $validate_only = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ResourceManager\V3\TagKey $tag_key
     *           Required. The TagKey to be created. Only fields `short_name`, `description`,
     *           and `parent` are considered during the creation request.
     *     @type bool $validate_only
     *           Optional. Set to true to perform validations necessary for creating the resource, but
     *           not actually perform the action.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Resourcemanager\V3\TagKeys::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The TagKey to be created. Only fields `short_name`, `description`,
     * and `parent` are considered during the creation request.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.TagKey tag_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ResourceManager\V3\TagKey|null
     */
    public function getTagKey()
    {
        return $this->tag_key;
    }

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

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

    /**
     * Required. The TagKey to be created. Only fields `short_name`, `description`,
     * and `parent` are considered during the creation request.
     *
     * Generated from protobuf field <code>.google.cloud.resourcemanager.v3.TagKey tag_key = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ResourceManager\V3\TagKey $var
     * @return $this
     */
    public function setTagKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ResourceManager\V3\TagKey::class);
        $this->tag_key = $var;

        return $this;
    }

    /**
     * Optional. Set to true to perform validations necessary for creating the resource, but
     * not actually perform the action.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * Optional. Set to true to perform validations necessary for creating the resource, but
     * not actually perform the action.
     *
     * Generated from protobuf field <code>bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

