"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.JobSchedule = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Stream Analytics Job Schedule.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleContainer = new azure.storage.Container("example", {
 *     name: "example",
 *     storageAccountName: exampleAccount.name,
 *     containerAccessType: "private",
 * });
 * const exampleBlob = new azure.storage.Blob("example", {
 *     name: "example",
 *     storageAccountName: exampleAccount.name,
 *     storageContainerName: exampleContainer.name,
 *     type: "Block",
 *     source: new pulumi.asset.FileAsset("example.csv"),
 * });
 * const exampleJob = new azure.streamanalytics.Job("example", {
 *     name: "example-job",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     compatibilityLevel: "1.2",
 *     dataLocale: "en-GB",
 *     eventsLateArrivalMaxDelayInSeconds: 60,
 *     eventsOutOfOrderMaxDelayInSeconds: 50,
 *     eventsOutOfOrderPolicy: "Adjust",
 *     outputErrorPolicy: "Drop",
 *     streamingUnits: 3,
 *     tags: {
 *         environment: "Example",
 *     },
 *     transformationQuery: `    SELECT *
 *     INTO [exampleoutput]
 *     FROM [exampleinput]
 * `,
 * });
 * const exampleStreamInputBlob = new azure.streamanalytics.StreamInputBlob("example", {
 *     name: "exampleinput",
 *     streamAnalyticsJobName: exampleJob.name,
 *     resourceGroupName: exampleJob.resourceGroupName,
 *     storageAccountName: exampleAccount.name,
 *     storageAccountKey: exampleAccount.primaryAccessKey,
 *     storageContainerName: exampleContainer.name,
 *     pathPattern: "",
 *     dateFormat: "yyyy/MM/dd",
 *     timeFormat: "HH",
 *     serialization: {
 *         type: "Csv",
 *         encoding: "UTF8",
 *         fieldDelimiter: ",",
 *     },
 * });
 * const exampleOutputBlob = new azure.streamanalytics.OutputBlob("example", {
 *     name: "exampleoutput",
 *     streamAnalyticsJobName: exampleJob.name,
 *     resourceGroupName: exampleJob.resourceGroupName,
 *     storageAccountName: exampleAccount.name,
 *     storageAccountKey: exampleAccount.primaryAccessKey,
 *     storageContainerName: exampleContainer.name,
 *     pathPattern: "example-{date}-{time}",
 *     dateFormat: "yyyy-MM-dd",
 *     timeFormat: "HH",
 *     serialization: {
 *         type: "Avro",
 *     },
 * });
 * const exampleJobSchedule = new azure.streamanalytics.JobSchedule("example", {
 *     streamAnalyticsJobId: exampleJob.id,
 *     startMode: "CustomTime",
 *     startTime: "2022-09-21T00:00:00Z",
 * }, {
 *     dependsOn: [
 *         exampleJob,
 *         exampleStreamInputBlob,
 *         exampleOutputBlob,
 *     ],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.StreamAnalytics` - 2021-10-01-preview
 *
 * ## Import
 *
 * Stream Analytics Job's can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:streamanalytics/jobSchedule:JobSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/schedule/default
 * ```
 */
class JobSchedule extends pulumi.CustomResource {
    /**
     * Get an existing JobSchedule 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 JobSchedule(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:streamanalytics/jobSchedule:JobSchedule';
    /**
     * Returns true if the given object is an instance of JobSchedule.  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'] === JobSchedule.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["lastOutputTime"] = state?.lastOutputTime;
            resourceInputs["startMode"] = state?.startMode;
            resourceInputs["startTime"] = state?.startTime;
            resourceInputs["streamAnalyticsJobId"] = state?.streamAnalyticsJobId;
        }
        else {
            const args = argsOrState;
            if (args?.startMode === undefined && !opts.urn) {
                throw new Error("Missing required property 'startMode'");
            }
            if (args?.streamAnalyticsJobId === undefined && !opts.urn) {
                throw new Error("Missing required property 'streamAnalyticsJobId'");
            }
            resourceInputs["startMode"] = args?.startMode;
            resourceInputs["startTime"] = args?.startTime;
            resourceInputs["streamAnalyticsJobId"] = args?.streamAnalyticsJobId;
            resourceInputs["lastOutputTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(JobSchedule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.JobSchedule = JobSchedule;
//# sourceMappingURL=jobSchedule.js.map