"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeployStage = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Deploy Stage resource in Oracle Cloud Infrastructure Devops service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/devops/latest/DeployStage
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/devops
 *
 * Creates a new deployment stage.
 *
 * ## Import
 *
 * DeployStages can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:DevOps/deployStage:DeployStage test_deploy_stage "id"
 * ```
 */
class DeployStage extends pulumi.CustomResource {
    /**
     * Get an existing DeployStage 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 DeployStage(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:DevOps/deployStage:DeployStage';
    /**
     * Returns true if the given object is an instance of DeployStage.  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'] === DeployStage.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["approvalPolicy"] = state?.approvalPolicy;
            resourceInputs["areHooksEnabled"] = state?.areHooksEnabled;
            resourceInputs["blueBackendIps"] = state?.blueBackendIps;
            resourceInputs["blueGreenStrategy"] = state?.blueGreenStrategy;
            resourceInputs["canaryStrategy"] = state?.canaryStrategy;
            resourceInputs["commandSpecDeployArtifactId"] = state?.commandSpecDeployArtifactId;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["computeInstanceGroupBlueGreenDeploymentDeployStageId"] = state?.computeInstanceGroupBlueGreenDeploymentDeployStageId;
            resourceInputs["computeInstanceGroupCanaryDeployStageId"] = state?.computeInstanceGroupCanaryDeployStageId;
            resourceInputs["computeInstanceGroupCanaryTrafficShiftDeployStageId"] = state?.computeInstanceGroupCanaryTrafficShiftDeployStageId;
            resourceInputs["computeInstanceGroupDeployEnvironmentId"] = state?.computeInstanceGroupDeployEnvironmentId;
            resourceInputs["config"] = state?.config;
            resourceInputs["containerConfig"] = state?.containerConfig;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["deployArtifactId"] = state?.deployArtifactId;
            resourceInputs["deployArtifactIds"] = state?.deployArtifactIds;
            resourceInputs["deployEnvironmentIdA"] = state?.deployEnvironmentIdA;
            resourceInputs["deployEnvironmentIdB"] = state?.deployEnvironmentIdB;
            resourceInputs["deployPipelineId"] = state?.deployPipelineId;
            resourceInputs["deployStagePredecessorCollection"] = state?.deployStagePredecessorCollection;
            resourceInputs["deployStageType"] = state?.deployStageType;
            resourceInputs["deploymentSpecDeployArtifactId"] = state?.deploymentSpecDeployArtifactId;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["dockerImageDeployArtifactId"] = state?.dockerImageDeployArtifactId;
            resourceInputs["failurePolicy"] = state?.failurePolicy;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["functionDeployEnvironmentId"] = state?.functionDeployEnvironmentId;
            resourceInputs["functionTimeoutInSeconds"] = state?.functionTimeoutInSeconds;
            resourceInputs["greenBackendIps"] = state?.greenBackendIps;
            resourceInputs["helmChartDeployArtifactId"] = state?.helmChartDeployArtifactId;
            resourceInputs["helmCommandArtifactIds"] = state?.helmCommandArtifactIds;
            resourceInputs["isAsync"] = state?.isAsync;
            resourceInputs["isDebugEnabled"] = state?.isDebugEnabled;
            resourceInputs["isForceEnabled"] = state?.isForceEnabled;
            resourceInputs["isUninstallOnStageDelete"] = state?.isUninstallOnStageDelete;
            resourceInputs["isValidationEnabled"] = state?.isValidationEnabled;
            resourceInputs["kubernetesManifestDeployArtifactIds"] = state?.kubernetesManifestDeployArtifactIds;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["loadBalancerConfig"] = state?.loadBalancerConfig;
            resourceInputs["maxHistory"] = state?.maxHistory;
            resourceInputs["maxMemoryInMbs"] = state?.maxMemoryInMbs;
            resourceInputs["namespace"] = state?.namespace;
            resourceInputs["okeBlueGreenDeployStageId"] = state?.okeBlueGreenDeployStageId;
            resourceInputs["okeCanaryDeployStageId"] = state?.okeCanaryDeployStageId;
            resourceInputs["okeCanaryTrafficShiftDeployStageId"] = state?.okeCanaryTrafficShiftDeployStageId;
            resourceInputs["okeClusterDeployEnvironmentId"] = state?.okeClusterDeployEnvironmentId;
            resourceInputs["productionLoadBalancerConfig"] = state?.productionLoadBalancerConfig;
            resourceInputs["projectId"] = state?.projectId;
            resourceInputs["purpose"] = state?.purpose;
            resourceInputs["releaseName"] = state?.releaseName;
            resourceInputs["rollbackPolicy"] = state?.rollbackPolicy;
            resourceInputs["rolloutPolicy"] = state?.rolloutPolicy;
            resourceInputs["setString"] = state?.setString;
            resourceInputs["setValues"] = state?.setValues;
            resourceInputs["shouldCleanupOnFail"] = state?.shouldCleanupOnFail;
            resourceInputs["shouldNotWait"] = state?.shouldNotWait;
            resourceInputs["shouldResetValues"] = state?.shouldResetValues;
            resourceInputs["shouldReuseValues"] = state?.shouldReuseValues;
            resourceInputs["shouldSkipCrds"] = state?.shouldSkipCrds;
            resourceInputs["shouldSkipRenderSubchartNotes"] = state?.shouldSkipRenderSubchartNotes;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["testLoadBalancerConfig"] = state?.testLoadBalancerConfig;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["timeoutInSeconds"] = state?.timeoutInSeconds;
            resourceInputs["trafficShiftTarget"] = state?.trafficShiftTarget;
            resourceInputs["valuesArtifactIds"] = state?.valuesArtifactIds;
            resourceInputs["waitCriteria"] = state?.waitCriteria;
        }
        else {
            const args = argsOrState;
            if (args?.deployPipelineId === undefined && !opts.urn) {
                throw new Error("Missing required property 'deployPipelineId'");
            }
            if (args?.deployStagePredecessorCollection === undefined && !opts.urn) {
                throw new Error("Missing required property 'deployStagePredecessorCollection'");
            }
            if (args?.deployStageType === undefined && !opts.urn) {
                throw new Error("Missing required property 'deployStageType'");
            }
            resourceInputs["approvalPolicy"] = args?.approvalPolicy;
            resourceInputs["areHooksEnabled"] = args?.areHooksEnabled;
            resourceInputs["blueBackendIps"] = args?.blueBackendIps;
            resourceInputs["blueGreenStrategy"] = args?.blueGreenStrategy;
            resourceInputs["canaryStrategy"] = args?.canaryStrategy;
            resourceInputs["commandSpecDeployArtifactId"] = args?.commandSpecDeployArtifactId;
            resourceInputs["computeInstanceGroupBlueGreenDeploymentDeployStageId"] = args?.computeInstanceGroupBlueGreenDeploymentDeployStageId;
            resourceInputs["computeInstanceGroupCanaryDeployStageId"] = args?.computeInstanceGroupCanaryDeployStageId;
            resourceInputs["computeInstanceGroupCanaryTrafficShiftDeployStageId"] = args?.computeInstanceGroupCanaryTrafficShiftDeployStageId;
            resourceInputs["computeInstanceGroupDeployEnvironmentId"] = args?.computeInstanceGroupDeployEnvironmentId;
            resourceInputs["config"] = args?.config;
            resourceInputs["containerConfig"] = args?.containerConfig;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["deployArtifactId"] = args?.deployArtifactId;
            resourceInputs["deployArtifactIds"] = args?.deployArtifactIds;
            resourceInputs["deployEnvironmentIdA"] = args?.deployEnvironmentIdA;
            resourceInputs["deployEnvironmentIdB"] = args?.deployEnvironmentIdB;
            resourceInputs["deployPipelineId"] = args?.deployPipelineId;
            resourceInputs["deployStagePredecessorCollection"] = args?.deployStagePredecessorCollection;
            resourceInputs["deployStageType"] = args?.deployStageType;
            resourceInputs["deploymentSpecDeployArtifactId"] = args?.deploymentSpecDeployArtifactId;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["dockerImageDeployArtifactId"] = args?.dockerImageDeployArtifactId;
            resourceInputs["failurePolicy"] = args?.failurePolicy;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["functionDeployEnvironmentId"] = args?.functionDeployEnvironmentId;
            resourceInputs["functionTimeoutInSeconds"] = args?.functionTimeoutInSeconds;
            resourceInputs["greenBackendIps"] = args?.greenBackendIps;
            resourceInputs["helmChartDeployArtifactId"] = args?.helmChartDeployArtifactId;
            resourceInputs["helmCommandArtifactIds"] = args?.helmCommandArtifactIds;
            resourceInputs["isAsync"] = args?.isAsync;
            resourceInputs["isDebugEnabled"] = args?.isDebugEnabled;
            resourceInputs["isForceEnabled"] = args?.isForceEnabled;
            resourceInputs["isUninstallOnStageDelete"] = args?.isUninstallOnStageDelete;
            resourceInputs["isValidationEnabled"] = args?.isValidationEnabled;
            resourceInputs["kubernetesManifestDeployArtifactIds"] = args?.kubernetesManifestDeployArtifactIds;
            resourceInputs["loadBalancerConfig"] = args?.loadBalancerConfig;
            resourceInputs["maxHistory"] = args?.maxHistory;
            resourceInputs["maxMemoryInMbs"] = args?.maxMemoryInMbs;
            resourceInputs["namespace"] = args?.namespace;
            resourceInputs["okeBlueGreenDeployStageId"] = args?.okeBlueGreenDeployStageId;
            resourceInputs["okeCanaryDeployStageId"] = args?.okeCanaryDeployStageId;
            resourceInputs["okeCanaryTrafficShiftDeployStageId"] = args?.okeCanaryTrafficShiftDeployStageId;
            resourceInputs["okeClusterDeployEnvironmentId"] = args?.okeClusterDeployEnvironmentId;
            resourceInputs["productionLoadBalancerConfig"] = args?.productionLoadBalancerConfig;
            resourceInputs["purpose"] = args?.purpose;
            resourceInputs["releaseName"] = args?.releaseName;
            resourceInputs["rollbackPolicy"] = args?.rollbackPolicy;
            resourceInputs["rolloutPolicy"] = args?.rolloutPolicy;
            resourceInputs["setString"] = args?.setString;
            resourceInputs["setValues"] = args?.setValues;
            resourceInputs["shouldCleanupOnFail"] = args?.shouldCleanupOnFail;
            resourceInputs["shouldNotWait"] = args?.shouldNotWait;
            resourceInputs["shouldResetValues"] = args?.shouldResetValues;
            resourceInputs["shouldReuseValues"] = args?.shouldReuseValues;
            resourceInputs["shouldSkipCrds"] = args?.shouldSkipCrds;
            resourceInputs["shouldSkipRenderSubchartNotes"] = args?.shouldSkipRenderSubchartNotes;
            resourceInputs["testLoadBalancerConfig"] = args?.testLoadBalancerConfig;
            resourceInputs["timeoutInSeconds"] = args?.timeoutInSeconds;
            resourceInputs["trafficShiftTarget"] = args?.trafficShiftTarget;
            resourceInputs["valuesArtifactIds"] = args?.valuesArtifactIds;
            resourceInputs["waitCriteria"] = args?.waitCriteria;
            resourceInputs["compartmentId"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["projectId"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(DeployStage.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DeployStage = DeployStage;
//# sourceMappingURL=deployStage.js.map