"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.EnvironmentApiRevisionDeployment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Deploys a specific Apigee API Proxy revision to a given Apigee environment.
 *
 * To get more information about EnvironmentApiRevisionDeployment, see:
 *
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.apis.revisions.deployments/deploy)
 * * How-to Guides
 *     * [Deploying an API proxy](https://cloud.google.com/apigee/docs/api-platform/deploy/ui-deploy-new#apigee-api)
 *
 * ## Example Usage
 *
 * ### Apigee Environment Api Revision Deployment Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const proxyDeploymentBasic = new gcp.apigee.EnvironmentApiRevisionDeployment("proxy_deployment_basic", {
 *     orgId: "my-org",
 *     environment: "dev",
 *     api: "hello-proxy",
 *     revision: 1,
 *     override: true,
 *     sequencedRollout: true,
 * });
 * ```
 *
 * ## Import
 *
 * EnvironmentApiRevisionDeployment can be imported using any of these accepted formats:
 *
 * * `organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}`
 *
 * * `{{org_id}}/{{environment}}/{{api}}/{{revision}}`
 *
 * * `{{id}}`
 *
 * When using the `pulumi import` command, EnvironmentApiRevisionDeployment can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:apigee/environmentApiRevisionDeployment:EnvironmentApiRevisionDeployment default organizations/{{org_id}}/environments/{{environment}}/apis/{{api}}/revisions/{{revision}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/environmentApiRevisionDeployment:EnvironmentApiRevisionDeployment default {{org_id}}/{{environment}}/{{api}}/{{revision}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:apigee/environmentApiRevisionDeployment:EnvironmentApiRevisionDeployment default {{id}}
 * ```
 */
class EnvironmentApiRevisionDeployment extends pulumi.CustomResource {
    /**
     * Get an existing EnvironmentApiRevisionDeployment 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 EnvironmentApiRevisionDeployment(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of EnvironmentApiRevisionDeployment.  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'] === EnvironmentApiRevisionDeployment.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["api"] = state?.api;
            resourceInputs["basepaths"] = state?.basepaths;
            resourceInputs["deployStartTime"] = state?.deployStartTime;
            resourceInputs["environment"] = state?.environment;
            resourceInputs["orgId"] = state?.orgId;
            resourceInputs["override"] = state?.override;
            resourceInputs["revision"] = state?.revision;
            resourceInputs["sequencedRollout"] = state?.sequencedRollout;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
            resourceInputs["state"] = state?.state;
        }
        else {
            const args = argsOrState;
            if (args?.api === undefined && !opts.urn) {
                throw new Error("Missing required property 'api'");
            }
            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?.revision === undefined && !opts.urn) {
                throw new Error("Missing required property 'revision'");
            }
            resourceInputs["api"] = args?.api;
            resourceInputs["environment"] = args?.environment;
            resourceInputs["orgId"] = args?.orgId;
            resourceInputs["override"] = args?.override;
            resourceInputs["revision"] = args?.revision;
            resourceInputs["sequencedRollout"] = args?.sequencedRollout;
            resourceInputs["serviceAccount"] = args?.serviceAccount;
            resourceInputs["basepaths"] = undefined /*out*/;
            resourceInputs["deployStartTime"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(EnvironmentApiRevisionDeployment.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EnvironmentApiRevisionDeployment = EnvironmentApiRevisionDeployment;
/** @internal */
EnvironmentApiRevisionDeployment.__pulumiType = 'gcp:apigee/environmentApiRevisionDeployment:EnvironmentApiRevisionDeployment';
//# sourceMappingURL=environmentApiRevisionDeployment.js.map