"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.BuildPipelineStage = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Build Pipeline Stage resource in Oracle Cloud Infrastructure Devops service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/devops/latest/BuildPipelineStage
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/devops
 *
 * Creates a new stage.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testBuildPipelineStage = new oci.devops.BuildPipelineStage("test_build_pipeline_stage", {
 *     buildPipelineId: testBuildPipeline.id,
 *     buildPipelineStagePredecessorCollection: {
 *         items: [{
 *             id: buildPipelineStageBuildPipelineStagePredecessorCollectionItemsId,
 *         }],
 *     },
 *     buildPipelineStageType: buildPipelineStageBuildPipelineStageType,
 *     buildRunnerShapeConfig: {
 *         buildRunnerType: buildPipelineStageBuildRunnerShapeConfigBuildRunnerType,
 *         memoryInGbs: Number(buildPipelineStageBuildRunnerShapeConfigMemoryInGbs),
 *         ocpus: Number(buildPipelineStageBuildRunnerShapeConfigOcpus),
 *     },
 *     buildSourceCollection: {
 *         items: [{
 *             connectionType: buildPipelineStageBuildSourceCollectionItemsConnectionType,
 *             branch: buildPipelineStageBuildSourceCollectionItemsBranch,
 *             connectionId: testConnection.id,
 *             name: buildPipelineStageBuildSourceCollectionItemsName,
 *             repositoryId: testRepository.id,
 *             repositoryUrl: buildPipelineStageBuildSourceCollectionItemsRepositoryUrl,
 *         }],
 *     },
 *     buildSpecFile: buildPipelineStageBuildSpecFile,
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     deliverArtifactCollection: {
 *         items: [{
 *             artifactId: testArtifact.id,
 *             artifactName: buildPipelineStageDeliverArtifactCollectionItemsArtifactName,
 *         }],
 *     },
 *     deployPipelineId: testDeployPipeline.id,
 *     description: buildPipelineStageDescription,
 *     displayName: buildPipelineStageDisplayName,
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     image: buildPipelineStageImage,
 *     isPassAllParametersEnabled: buildPipelineStageIsPassAllParametersEnabled === "true",
 *     primaryBuildSource: buildPipelineStagePrimaryBuildSource,
 *     privateAccessConfig: {
 *         networkChannelType: buildPipelineStagePrivateAccessConfigNetworkChannelType,
 *         subnetId: testSubnet.id,
 *         nsgIds: buildPipelineStagePrivateAccessConfigNsgIds,
 *     },
 *     stageExecutionTimeoutInSeconds: Number(buildPipelineStageStageExecutionTimeoutInSeconds),
 *     waitCriteria: {
 *         waitDuration: buildPipelineStageWaitCriteriaWaitDuration,
 *         waitType: buildPipelineStageWaitCriteriaWaitType,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * BuildPipelineStages can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:DevOps/buildPipelineStage:BuildPipelineStage test_build_pipeline_stage "id"
 * ```
 */
class BuildPipelineStage extends pulumi.CustomResource {
    /**
     * Get an existing BuildPipelineStage 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 BuildPipelineStage(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:DevOps/buildPipelineStage:BuildPipelineStage';
    /**
     * Returns true if the given object is an instance of BuildPipelineStage.  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'] === BuildPipelineStage.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["buildPipelineId"] = state?.buildPipelineId;
            resourceInputs["buildPipelineStagePredecessorCollection"] = state?.buildPipelineStagePredecessorCollection;
            resourceInputs["buildPipelineStageType"] = state?.buildPipelineStageType;
            resourceInputs["buildRunnerShapeConfig"] = state?.buildRunnerShapeConfig;
            resourceInputs["buildSourceCollection"] = state?.buildSourceCollection;
            resourceInputs["buildSpecFile"] = state?.buildSpecFile;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["deliverArtifactCollection"] = state?.deliverArtifactCollection;
            resourceInputs["deployPipelineId"] = state?.deployPipelineId;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["image"] = state?.image;
            resourceInputs["isPassAllParametersEnabled"] = state?.isPassAllParametersEnabled;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["primaryBuildSource"] = state?.primaryBuildSource;
            resourceInputs["privateAccessConfig"] = state?.privateAccessConfig;
            resourceInputs["projectId"] = state?.projectId;
            resourceInputs["stageExecutionTimeoutInSeconds"] = state?.stageExecutionTimeoutInSeconds;
            resourceInputs["state"] = state?.state;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["waitCriteria"] = state?.waitCriteria;
        }
        else {
            const args = argsOrState;
            if (args?.buildPipelineId === undefined && !opts.urn) {
                throw new Error("Missing required property 'buildPipelineId'");
            }
            if (args?.buildPipelineStagePredecessorCollection === undefined && !opts.urn) {
                throw new Error("Missing required property 'buildPipelineStagePredecessorCollection'");
            }
            if (args?.buildPipelineStageType === undefined && !opts.urn) {
                throw new Error("Missing required property 'buildPipelineStageType'");
            }
            resourceInputs["buildPipelineId"] = args?.buildPipelineId;
            resourceInputs["buildPipelineStagePredecessorCollection"] = args?.buildPipelineStagePredecessorCollection;
            resourceInputs["buildPipelineStageType"] = args?.buildPipelineStageType;
            resourceInputs["buildRunnerShapeConfig"] = args?.buildRunnerShapeConfig;
            resourceInputs["buildSourceCollection"] = args?.buildSourceCollection;
            resourceInputs["buildSpecFile"] = args?.buildSpecFile;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["deliverArtifactCollection"] = args?.deliverArtifactCollection;
            resourceInputs["deployPipelineId"] = args?.deployPipelineId;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["image"] = args?.image;
            resourceInputs["isPassAllParametersEnabled"] = args?.isPassAllParametersEnabled;
            resourceInputs["primaryBuildSource"] = args?.primaryBuildSource;
            resourceInputs["privateAccessConfig"] = args?.privateAccessConfig;
            resourceInputs["stageExecutionTimeoutInSeconds"] = args?.stageExecutionTimeoutInSeconds;
            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(BuildPipelineStage.__pulumiType, name, resourceInputs, opts);
    }
}
exports.BuildPipelineStage = BuildPipelineStage;
//# sourceMappingURL=buildPipelineStage.js.map