"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.Version = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * You can create multiple versions of your agent and publish them to separate environments.
 *
 * To get more information about Version, see:
 *
 * * [API documentation](https://docs.cloud.google.com/dialogflow/es/docs/reference/rest/v2/projects.agent.versions)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/docs/)
 *
 * ## Example Usage
 *
 * ### Dialogflow Version Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumiverse/time";
 *
 * const project = new gcp.organizations.Project("project", {
 *     projectId: "my-proj",
 *     name: "my-proj",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const dialogflow = new gcp.projects.Service("dialogflow", {
 *     project: project.projectId,
 *     service: "dialogflow.googleapis.com",
 * });
 * const waitEnableServiceApi = new time.Sleep("wait_enable_service_api", {createDuration: "30s"}, {
 *     dependsOn: [dialogflow],
 * });
 * const gcpSa = new gcp.projects.ServiceIdentity("gcp_sa", {
 *     service: "dialogflow.googleapis.com",
 *     project: project.projectId,
 * }, {
 *     dependsOn: [waitEnableServiceApi],
 * });
 * const basicAgent = new gcp.diagflow.Agent("basic_agent", {
 *     displayName: "example_agent",
 *     defaultLanguageCode: "en",
 *     timeZone: "America/New_York",
 *     project: project.projectId,
 * }, {
 *     dependsOn: [waitEnableServiceApi],
 * });
 * const fullVersion = new gcp.diagflow.Version("full_version", {
 *     description: "Dialogflow Version",
 *     parent: pulumi.interpolate`projects/${project.projectId}/agent`,
 * }, {
 *     dependsOn: [basicAgent],
 * });
 * ```
 *
 * ## Import
 *
 * Version can be imported using any of these accepted formats:
 *
 * * `{{parent}}/versions/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, Version can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/version:Version default {{parent}}/versions/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:diagflow/version:Version default {{parent}}/{{name}}
 * ```
 */
class Version extends pulumi.CustomResource {
    /**
     * Get an existing Version 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 Version(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Version.  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'] === Version.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["name"] = state?.name;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["status"] = state?.status;
            resourceInputs["versionNumber"] = state?.versionNumber;
        }
        else {
            const args = argsOrState;
            resourceInputs["description"] = args?.description;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["versionNumber"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Version.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Version = Version;
/** @internal */
Version.__pulumiType = 'gcp:diagflow/version:Version';
//# sourceMappingURL=version.js.map