"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.TagValue = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A TagValue is a child of a particular TagKey. TagValues are used to group cloud resources for the purpose of controlling them using policies.
 *
 * To get more information about TagValue, see:
 *
 * * [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagValues)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing)
 *
 * ## Example Usage
 *
 * ### Tag Value Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const key = new gcp.tags.TagKey("key", {
 *     parent: "organizations/123456789",
 *     shortName: "keyname",
 *     description: "For keyname resources.",
 * });
 * const value = new gcp.tags.TagValue("value", {
 *     parent: key.id,
 *     shortName: "valuename",
 *     description: "For valuename resources.",
 * });
 * ```
 *
 * ## Import
 *
 * TagValue can be imported using any of these accepted formats:
 *
 * * `tagValues/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, TagValue can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:tags/tagValue:TagValue default tagValues/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:tags/tagValue:TagValue default {{name}}
 * ```
 */
class TagValue extends pulumi.CustomResource {
    /**
     * Get an existing TagValue resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new TagValue(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of TagValue.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === TagValue.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["name"] = state?.name;
            resourceInputs["namespacedName"] = state?.namespacedName;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["shortName"] = state?.shortName;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.parent === undefined && !opts.urn) {
                throw new Error("Missing required property 'parent'");
            }
            if (args?.shortName === undefined && !opts.urn) {
                throw new Error("Missing required property 'shortName'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["shortName"] = args?.shortName;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["namespacedName"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(TagValue.__pulumiType, name, resourceInputs, opts);
    }
}
exports.TagValue = TagValue;
/** @internal */
TagValue.__pulumiType = 'gcp:tags/tagValue:TagValue';
//# sourceMappingURL=tagValue.js.map