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