"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.AppVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Description
 *
 * ## Example Usage
 *
 * ### Ces App Version Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const my_app = new gcp.ces.App("my-app", {
 *     location: "us",
 *     displayName: "my-app",
 *     appId: "app-id",
 *     timeZoneSettings: {
 *         timeZone: "America/Los_Angeles",
 *     },
 * });
 * const my_app_version = new gcp.ces.AppVersion("my-app-version", {
 *     location: "us",
 *     displayName: "my-app-version",
 *     app: my_app.name,
 *     appVersionId: "app-version-id",
 *     description: "example-app-version",
 * });
 * ```
 *
 * ## Import
 *
 * AppVersion can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/apps/{{app}}/versions/{{name}}`
 *
 * * `{{project}}/{{location}}/{{app}}/{{name}}`
 *
 * * `{{location}}/{{app}}/{{name}}`
 *
 * When using the `pulumi import` command, AppVersion can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:ces/appVersion:AppVersion default projects/{{project}}/locations/{{location}}/apps/{{app}}/versions/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:ces/appVersion:AppVersion default {{project}}/{{location}}/{{app}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:ces/appVersion:AppVersion default {{location}}/{{app}}/{{name}}
 * ```
 */
class AppVersion extends pulumi.CustomResource {
    /**
     * Get an existing AppVersion 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 AppVersion(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AppVersion.  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'] === AppVersion.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["app"] = state?.app;
            resourceInputs["appVersionId"] = state?.appVersionId;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["creator"] = state?.creator;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["snapshots"] = state?.snapshots;
        }
        else {
            const args = argsOrState;
            if (args?.app === undefined && !opts.urn) {
                throw new Error("Missing required property 'app'");
            }
            if (args?.appVersionId === undefined && !opts.urn) {
                throw new Error("Missing required property 'appVersionId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["app"] = args?.app;
            resourceInputs["appVersionId"] = args?.appVersionId;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["creator"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["snapshots"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AppVersion.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppVersion = AppVersion;
/** @internal */
AppVersion.__pulumiType = 'gcp:ces/appVersion:AppVersion';
//# sourceMappingURL=appVersion.js.map