"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.ApiDeployment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Manages a deployment of an API proxy.
 *
 * To get more information about ApiDeployment, see:
 *
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.apis.revisions.deployments)
 * * How-to Guides
 *     * [QUICKSTART_TITLE](https://cloud.google.com/apigee/docs/api-platform/deploy/ui-deploy-overview)
 *
 * ## Example Usage
 *
 * ## Import
 *
 * ApiDeployment can be imported using any of these accepted formats:
 *
 * * `organizations/{{org_id}}/environments/{{environment}}/apis/{{proxy_id}}/revisions/{{revision}}/deployments`
 *
 * * `organizations/{{org_id}}/environments/{{environment}}/apis/{{proxy_id}}/revisions/{{revision}}`
 *
 * * `{{org_id}}/{{environment}}/{{proxy_id}}/{{revision}}/deployments`
 *
 * * `{{org_id}}/{{environment}}/{{proxy_id}}/{{revision}}`
 *
 * When using the `pulumi import` command, ApiDeployment can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apigee/apiDeployment:ApiDeployment default organizations/{{org_id}}/environments/{{environment}}/apis/{{proxy_id}}/revisions/{{revision}}/deployments
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/apiDeployment:ApiDeployment default organizations/{{org_id}}/environments/{{environment}}/apis/{{proxy_id}}/revisions/{{revision}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/apiDeployment:ApiDeployment default {{org_id}}/{{environment}}/{{proxy_id}}/{{revision}}/deployments
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/apiDeployment:ApiDeployment default {{org_id}}/{{environment}}/{{proxy_id}}/{{revision}}
 * ```
 */
class ApiDeployment extends pulumi.CustomResource {
    /**
     * Get an existing ApiDeployment 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 ApiDeployment(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of ApiDeployment.  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'] === ApiDeployment.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["environment"] = state?.environment;
            resourceInputs["orgId"] = state?.orgId;
            resourceInputs["proxyId"] = state?.proxyId;
            resourceInputs["revision"] = state?.revision;
        }
        else {
            const args = argsOrState;
            if (args?.environment === undefined && !opts.urn) {
                throw new Error("Missing required property 'environment'");
            }
            if (args?.orgId === undefined && !opts.urn) {
                throw new Error("Missing required property 'orgId'");
            }
            if (args?.proxyId === undefined && !opts.urn) {
                throw new Error("Missing required property 'proxyId'");
            }
            if (args?.revision === undefined && !opts.urn) {
                throw new Error("Missing required property 'revision'");
            }
            resourceInputs["environment"] = args?.environment;
            resourceInputs["orgId"] = args?.orgId;
            resourceInputs["proxyId"] = args?.proxyId;
            resourceInputs["revision"] = args?.revision;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ApiDeployment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ApiDeployment = ApiDeployment;
/** @internal */
ApiDeployment.__pulumiType = 'gcp:apigee/apiDeployment:ApiDeployment';
//# sourceMappingURL=apiDeployment.js.map