"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.Job = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Job resource in Oracle Cloud Infrastructure Data Science service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-science/latest/Job
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/datascience
 *
 * Creates a job.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testJob = new oci.datascience.Job("test_job", {
 *     compartmentId: compartmentId,
 *     projectId: testProject.id,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     description: jobDescription,
 *     displayName: jobDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     jobConfigurationDetails: {
 *         jobType: jobJobConfigurationDetailsJobType,
 *         commandLineArguments: jobJobConfigurationDetailsCommandLineArguments,
 *         environmentVariables: jobJobConfigurationDetailsEnvironmentVariables,
 *         maximumRuntimeInMinutes: jobJobConfigurationDetailsMaximumRuntimeInMinutes,
 *         startupProbeDetails: {
 *             commands: jobJobConfigurationDetailsStartupProbeDetailsCommand,
 *             jobProbeCheckType: jobJobConfigurationDetailsStartupProbeDetailsJobProbeCheckType,
 *             cpuBaseline: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsCpuBaseline,
 *             failureThreshold: Number(jobJobConfigurationDetailsStartupProbeDetailsFailureThreshold),
 *             initialDelayInSeconds: Number(jobJobConfigurationDetailsStartupProbeDetailsInitialDelayInSeconds),
 *             memoryInGbs: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs,
 *             ocpus: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus,
 *             periodInSeconds: Number(jobJobConfigurationDetailsStartupProbeDetailsPeriodInSeconds),
 *         },
 *     },
 *     jobEnvironmentConfigurationDetails: {
 *         image: jobJobEnvironmentConfigurationDetailsImage,
 *         jobEnvironmentType: jobJobEnvironmentConfigurationDetailsJobEnvironmentType,
 *         cmds: jobJobEnvironmentConfigurationDetailsCmd,
 *         entrypoints: jobJobEnvironmentConfigurationDetailsEntrypoint,
 *         imageDigest: jobJobEnvironmentConfigurationDetailsImageDigest,
 *         imageSignatureId: testImageSignature.id,
 *     },
 *     jobInfrastructureConfigurationDetails: {
 *         jobInfrastructureType: jobJobInfrastructureConfigurationDetailsJobInfrastructureType,
 *         blockStorageSizeInGbs: Number(jobJobInfrastructureConfigurationDetailsBlockStorageSizeInGbs),
 *         jobShapeConfigDetails: {
 *             memoryInGbs: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs,
 *             ocpus: jobJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus,
 *         },
 *         shapeName: testShape.name,
 *         subnetId: testSubnet.id,
 *     },
 *     jobLogConfigurationDetails: {
 *         enableAutoLogCreation: jobJobLogConfigurationDetailsEnableAutoLogCreation === "true",
 *         enableLogging: jobJobLogConfigurationDetailsEnableLogging === "true",
 *         logGroupId: testLogGroup.id,
 *         logId: testLog.id,
 *     },
 *     jobNodeConfigurationDetails: {
 *         jobNodeType: jobJobNodeConfigurationDetailsJobNodeType,
 *         jobNetworkConfiguration: {
 *             jobNetworkType: jobJobNodeConfigurationDetailsJobNetworkConfigurationJobNetworkType,
 *             subnetId: testSubnet.id,
 *         },
 *         jobNodeGroupConfigurationDetailsLists: [{
 *             name: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListName,
 *             jobConfigurationDetails: {
 *                 jobType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsJobType,
 *                 commandLineArguments: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsCommandLineArguments,
 *                 environmentVariables: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsEnvironmentVariables,
 *                 maximumRuntimeInMinutes: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsMaximumRuntimeInMinutes,
 *                 startupProbeDetails: {
 *                     commands: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsCommand,
 *                     jobProbeCheckType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsJobProbeCheckType,
 *                     failureThreshold: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsFailureThreshold),
 *                     initialDelayInSeconds: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsInitialDelayInSeconds),
 *                     periodInSeconds: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobConfigurationDetailsStartupProbeDetailsPeriodInSeconds),
 *                 },
 *             },
 *             jobEnvironmentConfigurationDetails: {
 *                 image: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsImage,
 *                 jobEnvironmentType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsJobEnvironmentType,
 *                 cmds: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsCmd,
 *                 entrypoints: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsEntrypoint,
 *                 imageDigest: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobEnvironmentConfigurationDetailsImageDigest,
 *                 imageSignatureId: testImageSignature.id,
 *             },
 *             jobInfrastructureConfigurationDetails: {
 *                 jobInfrastructureType: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobInfrastructureType,
 *                 blockStorageSizeInGbs: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsBlockStorageSizeInGbs),
 *                 jobShapeConfigDetails: {
 *                     memoryInGbs: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobShapeConfigDetailsMemoryInGbs,
 *                     ocpus: jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListJobInfrastructureConfigurationDetailsJobShapeConfigDetailsOcpus,
 *                 },
 *                 shapeName: testShape.name,
 *                 subnetId: testSubnet.id,
 *             },
 *             minimumSuccessReplicas: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListMinimumSuccessReplicas),
 *             replicas: Number(jobJobNodeConfigurationDetailsJobNodeGroupConfigurationDetailsListReplicas),
 *         }],
 *         maximumRuntimeInMinutes: jobJobNodeConfigurationDetailsMaximumRuntimeInMinutes,
 *         startupOrder: jobJobNodeConfigurationDetailsStartupOrder,
 *     },
 *     jobStorageMountConfigurationDetailsLists: [{
 *         destinationDirectoryName: jobJobStorageMountConfigurationDetailsListDestinationDirectoryName,
 *         storageType: jobJobStorageMountConfigurationDetailsListStorageType,
 *         bucket: jobJobStorageMountConfigurationDetailsListBucket,
 *         destinationPath: jobJobStorageMountConfigurationDetailsListDestinationPath,
 *         exportId: testExport.id,
 *         mountTargetId: testMountTarget.id,
 *         namespace: jobJobStorageMountConfigurationDetailsListNamespace,
 *         prefix: jobJobStorageMountConfigurationDetailsListPrefix,
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * Jobs can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:DataScience/job:Job test_job "id"
 * ```
 */
class Job extends pulumi.CustomResource {
    /**
     * Get an existing Job 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 Job(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:DataScience/job:Job';
    /**
     * Returns true if the given object is an instance of Job.  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'] === Job.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["artifactContentDisposition"] = state?.artifactContentDisposition;
            resourceInputs["artifactContentLength"] = state?.artifactContentLength;
            resourceInputs["artifactContentMd5"] = state?.artifactContentMd5;
            resourceInputs["artifactLastModified"] = state?.artifactLastModified;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["deleteRelatedJobRuns"] = state?.deleteRelatedJobRuns;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["emptyArtifact"] = state?.emptyArtifact;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["jobArtifact"] = state?.jobArtifact;
            resourceInputs["jobConfigurationDetails"] = state?.jobConfigurationDetails;
            resourceInputs["jobEnvironmentConfigurationDetails"] = state?.jobEnvironmentConfigurationDetails;
            resourceInputs["jobInfrastructureConfigurationDetails"] = state?.jobInfrastructureConfigurationDetails;
            resourceInputs["jobLogConfigurationDetails"] = state?.jobLogConfigurationDetails;
            resourceInputs["jobNodeConfigurationDetails"] = state?.jobNodeConfigurationDetails;
            resourceInputs["jobStorageMountConfigurationDetailsLists"] = state?.jobStorageMountConfigurationDetailsLists;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["projectId"] = state?.projectId;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.projectId === undefined && !opts.urn) {
                throw new Error("Missing required property 'projectId'");
            }
            resourceInputs["artifactContentDisposition"] = args?.artifactContentDisposition;
            resourceInputs["artifactContentLength"] = args?.artifactContentLength;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["deleteRelatedJobRuns"] = args?.deleteRelatedJobRuns;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["jobArtifact"] = args?.jobArtifact;
            resourceInputs["jobConfigurationDetails"] = args?.jobConfigurationDetails;
            resourceInputs["jobEnvironmentConfigurationDetails"] = args?.jobEnvironmentConfigurationDetails;
            resourceInputs["jobInfrastructureConfigurationDetails"] = args?.jobInfrastructureConfigurationDetails;
            resourceInputs["jobLogConfigurationDetails"] = args?.jobLogConfigurationDetails;
            resourceInputs["jobNodeConfigurationDetails"] = args?.jobNodeConfigurationDetails;
            resourceInputs["jobStorageMountConfigurationDetailsLists"] = args?.jobStorageMountConfigurationDetailsLists;
            resourceInputs["projectId"] = args?.projectId;
            resourceInputs["artifactContentMd5"] = undefined /*out*/;
            resourceInputs["artifactLastModified"] = undefined /*out*/;
            resourceInputs["createdBy"] = undefined /*out*/;
            resourceInputs["emptyArtifact"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Job.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Job = Job;
//# sourceMappingURL=job.js.map