// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.automation;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.automation.JobScheduleArgs;
import com.pulumi.azure.automation.inputs.JobScheduleState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Links an Automation Runbook and Schedule.
 * 
 * ## Example Usage
 * 
 * This is an example of just the Job Schedule.
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.automation.JobSchedule;
 * import com.pulumi.azure.automation.JobScheduleArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new JobSchedule(&#34;example&#34;, JobScheduleArgs.builder()        
 *             .automationAccountName(&#34;tf-automation-account&#34;)
 *             .parameters(Map.ofEntries(
 *                 Map.entry(&#34;resourcegroup&#34;, &#34;tf-rgr-vm&#34;),
 *                 Map.entry(&#34;vmname&#34;, &#34;TF-VM-01&#34;)
 *             ))
 *             .resourceGroupName(&#34;tf-rgr-automation&#34;)
 *             .runbookName(&#34;Get-VirtualMachine&#34;)
 *             .scheduleName(&#34;hour&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Automation Job Schedules can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:automation/jobSchedule:JobSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/jobSchedules/10000000-1001-1001-1001-000000000001
 * ```
 * 
 */
@ResourceType(type="azure:automation/jobSchedule:JobSchedule")
public class JobSchedule extends com.pulumi.resources.CustomResource {
    /**
     * The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="automationAccountName", refs={String.class}, tree="[0]")
    private Output<String> automationAccountName;

    /**
     * @return The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> automationAccountName() {
        return this.automationAccountName;
    }
    /**
     * (Optional) The UUID identifying the Automation Job Schedule.
     * 
     */
    @Export(name="jobScheduleId", refs={String.class}, tree="[0]")
    private Output<String> jobScheduleId;

    /**
     * @return (Optional) The UUID identifying the Automation Job Schedule.
     * 
     */
    public Output<String> jobScheduleId() {
        return this.jobScheduleId;
    }
    /**
     * A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don&#39;t have this limitation.
     * 
     */
    @Export(name="parameters", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> parameters;

    /**
     * @return A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don&#39;t have this limitation.
     * 
     */
    public Output<Optional<Map<String,String>>> parameters() {
        return Codegen.optional(this.parameters);
    }
    /**
     * The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="runOn", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> runOn;

    /**
     * @return Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> runOn() {
        return Codegen.optional(this.runOn);
    }
    /**
     * The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="runbookName", refs={String.class}, tree="[0]")
    private Output<String> runbookName;

    /**
     * @return The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> runbookName() {
        return this.runbookName;
    }
    /**
     * The name of the Schedule. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="scheduleName", refs={String.class}, tree="[0]")
    private Output<String> scheduleName;

    /**
     * @return The name of the Schedule. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> scheduleName() {
        return this.scheduleName;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public JobSchedule(String name) {
        this(name, JobScheduleArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public JobSchedule(String name, JobScheduleArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public JobSchedule(String name, JobScheduleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:automation/jobSchedule:JobSchedule", name, args == null ? JobScheduleArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private JobSchedule(String name, Output<String> id, @Nullable JobScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:automation/jobSchedule:JobSchedule", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host 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
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static JobSchedule get(String name, Output<String> id, @Nullable JobScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new JobSchedule(name, id, state, options);
    }
}
