"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.TaskSchedule = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Task Schedule resource in Oracle Cloud Infrastructure Jms service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/jms/latest/TaskSchedule
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/jms
 *
 * Create a task schedule using the information provided.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testTaskSchedule = new oci.jms.TaskSchedule("test_task_schedule", {
 *     fleetId: fleetOcid,
 *     executionRecurrences: "DTSTART=20240805T090000Z;RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=20240805T170000Z",
 *     taskDetails: {
 *         taskType: "ADD_INSTALLATION_SITE",
 *         addInstallationSiteTaskRequest: {
 *             installationSites: [{
 *                 artifactContentType: "JDK",
 *                 forceInstall: false,
 *                 headlessMode: false,
 *                 installationPath: "/example/install/path",
 *                 managedInstanceId: "example-managed-instance-ocid",
 *                 releaseVersion: "17.0.0",
 *             }],
 *             postInstallationActions: [],
 *         },
 *         cryptoTaskRequest: {
 *             recordingDurationInMinutes: 10,
 *             targets: [{
 *                 applicationInstallationKey: "example-application-installation-key",
 *                 applicationKey: "example-application-key",
 *                 containerKey: "example-container-key",
 *                 jreKey: "example-jre-key",
 *                 managedInstanceId: "example-managed-instance-ocid",
 *             }],
 *             waitingPeriodInMinutes: 10,
 *         },
 *         deployedApplicationMigrationTaskRequest: {
 *             targets: [{
 *                 deployedApplicationInstallationKey: "example-application-installation-key",
 *                 excludePackagePrefixes: [],
 *                 includePackagePrefixes: [],
 *                 managedInstanceId: "example-managed-instance-ocid",
 *                 sourceJdkVersion: "11",
 *                 targetJdkVersion: "21",
 *             }],
 *         },
 *         javaMigrationTaskRequest: {
 *             targets: [{
 *                 applicationInstallationKey: "example-application-installation-key",
 *                 excludePackagePrefixes: [],
 *                 includePackagePrefixes: [],
 *                 managedInstanceId: "example-managed-instance-ocid",
 *                 sourceJdkVersion: "11",
 *                 targetJdkVersion: "21",
 *             }],
 *         },
 *         jfrTaskRequest: {
 *             jfcProfileName: "jfcV1",
 *             jfcV1: "jfcV1",
 *             jfcV2: "jfvV2",
 *             recordingDurationInMinutes: 10,
 *             recordingSizeInMb: 10,
 *             targets: [{
 *                 applicationInstallationKey: "example-application-installation-key",
 *                 applicationKey: "example-application-key",
 *                 containerKey: "example-container-key",
 *                 jreKey: "example-jre-key",
 *                 managedInstanceId: "example-managed-instance-ocid",
 *             }],
 *             waitingPeriodInMinutes: 10,
 *         },
 *         performanceTuningTaskRequest: {
 *             recordingDurationInMinutes: 10,
 *             targets: [{
 *                 applicationInstallationKey: "example-application-installation-key",
 *                 applicationKey: "example-application-key",
 *                 containerKey: "example-container-key",
 *                 jreKey: "example-jre-key",
 *                 managedInstanceId: "example-managed-instance-ocid",
 *             }],
 *             waitingPeriodInMinutes: 10,
 *         },
 *         removeInstallationSiteTaskRequest: {
 *             installationSites: [{
 *                 installationKey: "example-jvm-installation-key",
 *                 managedInstanceId: "example-managed-instance-ocid",
 *             }],
 *         },
 *         scanJavaServerTaskRequest: {
 *             managedInstanceIds: [],
 *         },
 *         scanLibraryTaskRequest: {
 *             dynamicScanDurationInMinutes: 10,
 *             isDynamicScan: false,
 *             managedInstanceIds: [],
 *         },
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * TaskSchedules can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Jms/taskSchedule:TaskSchedule test_task_schedule "id"
 * ```
 */
class TaskSchedule extends pulumi.CustomResource {
    /**
     * Get an existing TaskSchedule 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 TaskSchedule(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Jms/taskSchedule:TaskSchedule';
    /**
     * Returns true if the given object is an instance of TaskSchedule.  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'] === TaskSchedule.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["executionRecurrences"] = state?.executionRecurrences;
            resourceInputs["fleetId"] = state?.fleetId;
            resourceInputs["name"] = state?.name;
            resourceInputs["state"] = state?.state;
            resourceInputs["taskDetails"] = state?.taskDetails;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeLastRun"] = state?.timeLastRun;
            resourceInputs["timeLastUpdated"] = state?.timeLastUpdated;
            resourceInputs["timeNextRun"] = state?.timeNextRun;
        }
        else {
            const args = argsOrState;
            if (args?.executionRecurrences === undefined && !opts.urn) {
                throw new Error("Missing required property 'executionRecurrences'");
            }
            if (args?.fleetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'fleetId'");
            }
            if (args?.taskDetails === undefined && !opts.urn) {
                throw new Error("Missing required property 'taskDetails'");
            }
            resourceInputs["executionRecurrences"] = args?.executionRecurrences;
            resourceInputs["fleetId"] = args?.fleetId;
            resourceInputs["taskDetails"] = args?.taskDetails;
            resourceInputs["createdBy"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeLastRun"] = undefined /*out*/;
            resourceInputs["timeLastUpdated"] = undefined /*out*/;
            resourceInputs["timeNextRun"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(TaskSchedule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.TaskSchedule = TaskSchedule;
//# sourceMappingURL=taskSchedule.js.map