// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.tags;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.gcp.Utilities;
import com.pulumi.gcp.tags.TagKeyArgs;
import com.pulumi.gcp.tags.inputs.TagKeyState;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * A TagKey, used to group a set of TagValues.
 * 
 * To get more information about TagKey, see:
 * 
 * * [API documentation](https://cloud.google.com/resource-manager/reference/rest/v3/tagKeys)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing)
 * 
 * ## Example Usage
 * ### Tag Key Basic
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.tags.TagKey;
 * import com.pulumi.gcp.tags.TagKeyArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var key = new TagKey(&#34;key&#34;, TagKeyArgs.builder()        
 *             .description(&#34;For keyname resources.&#34;)
 *             .parent(&#34;organizations/123456789&#34;)
 *             .shortName(&#34;keyname&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * TagKey can be imported using any of these accepted formats
 * 
 * ```sh
 *  $ pulumi import gcp:tags/tagKey:TagKey default tagKeys/{{name}}
 * ```
 * 
 * ```sh
 *  $ pulumi import gcp:tags/tagKey:TagKey default {{name}}
 * ```
 * 
 */
@ResourceType(type="gcp:tags/tagKey:TagKey")
public class TagKey extends com.pulumi.resources.CustomResource {
    /**
     * Output only. Creation time.
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    @Export(name="createTime", type=String.class, parameters={})
    private Output<String> createTime;

    /**
     * @return Output only. Creation time.
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    public Output<String> createTime() {
        return this.createTime;
    }
    /**
     * User-assigned description of the TagKey. Must not exceed 256 characters.
     * 
     */
    @Export(name="description", type=String.class, parameters={})
    private Output</* @Nullable */ String> description;

    /**
     * @return User-assigned description of the TagKey. Must not exceed 256 characters.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * The generated numeric id for the TagKey.
     * 
     */
    @Export(name="name", type=String.class, parameters={})
    private Output<String> name;

    /**
     * @return The generated numeric id for the TagKey.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Output only. Namespaced name of the TagKey.
     * 
     */
    @Export(name="namespacedName", type=String.class, parameters={})
    private Output<String> namespacedName;

    /**
     * @return Output only. Namespaced name of the TagKey.
     * 
     */
    public Output<String> namespacedName() {
        return this.namespacedName;
    }
    /**
     * Input only. The resource name of the new TagKey&#39;s parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
     * 
     */
    @Export(name="parent", type=String.class, parameters={})
    private Output<String> parent;

    /**
     * @return Input only. The resource name of the new TagKey&#39;s parent. Must be of the form organizations/{org_id} or projects/{project_id_or_number}.
     * 
     */
    public Output<String> parent() {
        return this.parent;
    }
    /**
     * Optional. A purpose cannot be changed once set.
     * A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
     * Possible values are: `GCE_FIREWALL`.
     * 
     */
    @Export(name="purpose", type=String.class, parameters={})
    private Output</* @Nullable */ String> purpose;

    /**
     * @return Optional. A purpose cannot be changed once set.
     * A purpose denotes that this Tag is intended for use in policies of a specific policy engine, and will involve that policy engine in management operations involving this Tag.
     * Possible values are: `GCE_FIREWALL`.
     * 
     */
    public Output<Optional<String>> purpose() {
        return Codegen.optional(this.purpose);
    }
    /**
     * Optional. Purpose data cannot be changed once set.
     * Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = &#34;&lt;project-name&gt;/&lt;vpc-name&gt;&#34;`.
     * 
     */
    @Export(name="purposeData", type=Map.class, parameters={String.class, String.class})
    private Output</* @Nullable */ Map<String,String>> purposeData;

    /**
     * @return Optional. Purpose data cannot be changed once set.
     * Purpose data corresponds to the policy system that the tag is intended for. For example, the GCE_FIREWALL purpose expects data in the following format: `network = &#34;&lt;project-name&gt;/&lt;vpc-name&gt;&#34;`.
     * 
     */
    public Output<Optional<Map<String,String>>> purposeData() {
        return Codegen.optional(this.purposeData);
    }
    /**
     * Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
     * The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
     * 
     * ***
     * 
     */
    @Export(name="shortName", type=String.class, parameters={})
    private Output<String> shortName;

    /**
     * @return Input only. The user friendly name for a TagKey. The short name should be unique for TagKeys within the same tag namespace.
     * The short name must be 1-63 characters, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
     * 
     * ***
     * 
     */
    public Output<String> shortName() {
        return this.shortName;
    }
    /**
     * Output only. Update time.
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    @Export(name="updateTime", type=String.class, parameters={})
    private Output<String> updateTime;

    /**
     * @return Output only. Update time.
     * A timestamp in RFC3339 UTC &#34;Zulu&#34; format, with nanosecond resolution and up to nine fractional digits. Examples: &#34;2014-10-02T15:01:23Z&#34; and &#34;2014-10-02T15:01:23.045123456Z&#34;.
     * 
     */
    public Output<String> updateTime() {
        return this.updateTime;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public TagKey(String name) {
        this(name, TagKeyArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public TagKey(String name, TagKeyArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public TagKey(String name, TagKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:tags/tagKey:TagKey", name, args == null ? TagKeyArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private TagKey(String name, Output<String> id, @Nullable TagKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("gcp:tags/tagKey:TagKey", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static TagKey get(String name, Output<String> id, @Nullable TagKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new TagKey(name, id, state, options);
    }
}
