"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.ExecutionWindow = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Execution Window resource in Oracle Cloud Infrastructure Database service.
 *
 * Creates an execution window resource.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testExecutionWindow = new oci.database.ExecutionWindow("test_execution_window", {
 *     compartmentId: compartmentId,
 *     executionResourceId: testResource.id,
 *     timeScheduled: executionWindowTimeScheduled,
 *     windowDurationInMins: Number(executionWindowWindowDurationInMins),
 *     definedTags: executionWindowDefinedTags,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     isEnforcedDuration: executionWindowIsEnforcedDuration === "true",
 * });
 * ```
 *
 * ## Import
 *
 * ExecutionWindows can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Database/executionWindow:ExecutionWindow test_execution_window "id"
 * ```
 */
class ExecutionWindow extends pulumi.CustomResource {
    /**
     * Get an existing ExecutionWindow 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 ExecutionWindow(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Database/executionWindow:ExecutionWindow';
    /**
     * Returns true if the given object is an instance of ExecutionWindow.  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'] === ExecutionWindow.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["estimatedTimeInMins"] = state?.estimatedTimeInMins;
            resourceInputs["executionResourceId"] = state?.executionResourceId;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isEnforcedDuration"] = state?.isEnforcedDuration;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["lifecycleSubstate"] = state?.lifecycleSubstate;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeEnded"] = state?.timeEnded;
            resourceInputs["timeScheduled"] = state?.timeScheduled;
            resourceInputs["timeStarted"] = state?.timeStarted;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["totalTimeTakenInMins"] = state?.totalTimeTakenInMins;
            resourceInputs["windowDurationInMins"] = state?.windowDurationInMins;
            resourceInputs["windowType"] = state?.windowType;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.executionResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'executionResourceId'");
            }
            if (args?.timeScheduled === undefined && !opts.urn) {
                throw new Error("Missing required property 'timeScheduled'");
            }
            if (args?.windowDurationInMins === undefined && !opts.urn) {
                throw new Error("Missing required property 'windowDurationInMins'");
            }
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["executionResourceId"] = args?.executionResourceId;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isEnforcedDuration"] = args?.isEnforcedDuration;
            resourceInputs["timeScheduled"] = args?.timeScheduled;
            resourceInputs["windowDurationInMins"] = args?.windowDurationInMins;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["displayName"] = undefined /*out*/;
            resourceInputs["estimatedTimeInMins"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["lifecycleSubstate"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeEnded"] = undefined /*out*/;
            resourceInputs["timeStarted"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
            resourceInputs["totalTimeTakenInMins"] = undefined /*out*/;
            resourceInputs["windowType"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ExecutionWindow.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ExecutionWindow = ExecutionWindow;
//# sourceMappingURL=executionWindow.js.map