"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.RunBook = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Automation Runbook.
 *
 * ## 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.automation.Account("example", {
 *     name: "account1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "Basic",
 * });
 * const exampleRunBook = new azure.automation.RunBook("example", {
 *     name: "Get-AzureVMTutorial",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     automationAccountName: exampleAccount.name,
 *     logVerbose: true,
 *     logProgress: true,
 *     description: "This is an example runbook",
 *     runbookType: "PowerShellWorkflow",
 *     publishContentLink: {
 *         uri: "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Automation Runbooks can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:automation/runBook:RunBook Get-AzureVMTutorial /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/Get-AzureVMTutorial
 * ```
 */
class RunBook extends pulumi.CustomResource {
    /**
     * Get an existing RunBook 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 RunBook(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:automation/runBook:RunBook';
    /**
     * Returns true if the given object is an instance of RunBook.  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'] === RunBook.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["automationAccountName"] = state?.automationAccountName;
            resourceInputs["content"] = state?.content;
            resourceInputs["description"] = state?.description;
            resourceInputs["draft"] = state?.draft;
            resourceInputs["jobSchedules"] = state?.jobSchedules;
            resourceInputs["location"] = state?.location;
            resourceInputs["logActivityTraceLevel"] = state?.logActivityTraceLevel;
            resourceInputs["logProgress"] = state?.logProgress;
            resourceInputs["logVerbose"] = state?.logVerbose;
            resourceInputs["name"] = state?.name;
            resourceInputs["publishContentLink"] = state?.publishContentLink;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["runbookType"] = state?.runbookType;
            resourceInputs["runtimeEnvironmentName"] = state?.runtimeEnvironmentName;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.automationAccountName === undefined && !opts.urn) {
                throw new Error("Missing required property 'automationAccountName'");
            }
            if (args?.logProgress === undefined && !opts.urn) {
                throw new Error("Missing required property 'logProgress'");
            }
            if (args?.logVerbose === undefined && !opts.urn) {
                throw new Error("Missing required property 'logVerbose'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.runbookType === undefined && !opts.urn) {
                throw new Error("Missing required property 'runbookType'");
            }
            resourceInputs["automationAccountName"] = args?.automationAccountName;
            resourceInputs["content"] = args?.content;
            resourceInputs["description"] = args?.description;
            resourceInputs["draft"] = args?.draft;
            resourceInputs["jobSchedules"] = args?.jobSchedules;
            resourceInputs["location"] = args?.location;
            resourceInputs["logActivityTraceLevel"] = args?.logActivityTraceLevel;
            resourceInputs["logProgress"] = args?.logProgress;
            resourceInputs["logVerbose"] = args?.logVerbose;
            resourceInputs["name"] = args?.name;
            resourceInputs["publishContentLink"] = args?.publishContentLink;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["runbookType"] = args?.runbookType;
            resourceInputs["runtimeEnvironmentName"] = args?.runtimeEnvironmentName;
            resourceInputs["tags"] = args?.tags;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RunBook.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RunBook = RunBook;
//# sourceMappingURL=runBook.js.map