// *** 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.datafactory;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.datafactory.TriggerScheduleArgs;
import com.pulumi.azure.datafactory.inputs.TriggerScheduleState;
import com.pulumi.azure.datafactory.outputs.TriggerSchedulePipeline;
import com.pulumi.azure.datafactory.outputs.TriggerScheduleSchedule;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Trigger Schedule inside a Azure Data Factory.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.datafactory.Factory;
 * import com.pulumi.azure.datafactory.FactoryArgs;
 * import com.pulumi.azure.datafactory.Pipeline;
 * import com.pulumi.azure.datafactory.PipelineArgs;
 * import com.pulumi.azure.datafactory.TriggerSchedule;
 * import com.pulumi.azure.datafactory.TriggerScheduleArgs;
 * 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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleFactory = new Factory(&#34;exampleFactory&#34;, FactoryArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *         var examplePipeline = new Pipeline(&#34;examplePipeline&#34;, PipelineArgs.builder()        
 *             .dataFactoryId(exampleFactory.id())
 *             .build());
 * 
 *         var exampleTriggerSchedule = new TriggerSchedule(&#34;exampleTriggerSchedule&#34;, TriggerScheduleArgs.builder()        
 *             .dataFactoryId(exampleFactory.id())
 *             .pipelineName(examplePipeline.name())
 *             .interval(5)
 *             .frequency(&#34;Day&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Data Factory Schedule Trigger can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:datafactory/triggerSchedule:TriggerSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/triggers/example
 * ```
 * 
 */
@ResourceType(type="azure:datafactory/triggerSchedule:TriggerSchedule")
public class TriggerSchedule extends com.pulumi.resources.CustomResource {
    /**
     * Specifies if the Data Factory Schedule Trigger is activated. Defaults to `true`.
     * 
     */
    @Export(name="activated", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> activated;

    /**
     * @return Specifies if the Data Factory Schedule Trigger is activated. Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> activated() {
        return Codegen.optional(this.activated);
    }
    /**
     * List of tags that can be used for describing the Data Factory Schedule Trigger.
     * 
     */
    @Export(name="annotations", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> annotations;

    /**
     * @return List of tags that can be used for describing the Data Factory Schedule Trigger.
     * 
     */
    public Output<Optional<List<String>>> annotations() {
        return Codegen.optional(this.annotations);
    }
    /**
     * The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
     * 
     */
    @Export(name="dataFactoryId", refs={String.class}, tree="[0]")
    private Output<String> dataFactoryId;

    /**
     * @return The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
     * 
     */
    public Output<String> dataFactoryId() {
        return this.dataFactoryId;
    }
    /**
     * The Schedule Trigger&#39;s description.
     * 
     */
    @Export(name="description", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> description;

    /**
     * @return The Schedule Trigger&#39;s description.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * The time the Schedule Trigger should end. The time will be represented in UTC.
     * 
     */
    @Export(name="endTime", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> endTime;

    /**
     * @return The time the Schedule Trigger should end. The time will be represented in UTC.
     * 
     */
    public Output<Optional<String>> endTime() {
        return Codegen.optional(this.endTime);
    }
    /**
     * The trigger frequency. Valid values include `Minute`, `Hour`, `Day`, `Week`, `Month`. Defaults to `Minute`.
     * 
     */
    @Export(name="frequency", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> frequency;

    /**
     * @return The trigger frequency. Valid values include `Minute`, `Hour`, `Day`, `Week`, `Month`. Defaults to `Minute`.
     * 
     */
    public Output<Optional<String>> frequency() {
        return Codegen.optional(this.frequency);
    }
    /**
     * The interval for how often the trigger occurs. This defaults to `1`.
     * 
     */
    @Export(name="interval", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> interval;

    /**
     * @return The interval for how often the trigger occurs. This defaults to `1`.
     * 
     */
    public Output<Optional<Integer>> interval() {
        return Codegen.optional(this.interval);
    }
    /**
     * Specifies the name of the Data Factory Schedule Trigger. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name of the Data Factory Schedule Trigger. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The Data Factory Pipeline name that the trigger will act on.
     * 
     */
    @Export(name="pipelineName", refs={String.class}, tree="[0]")
    private Output<String> pipelineName;

    /**
     * @return The Data Factory Pipeline name that the trigger will act on.
     * 
     */
    public Output<String> pipelineName() {
        return this.pipelineName;
    }
    /**
     * The pipeline parameters that the trigger will act upon.
     * 
     */
    @Export(name="pipelineParameters", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output<Map<String,String>> pipelineParameters;

    /**
     * @return The pipeline parameters that the trigger will act upon.
     * 
     */
    public Output<Map<String,String>> pipelineParameters() {
        return this.pipelineParameters;
    }
    /**
     * block as defined below.
     * 
     */
    @Export(name="pipelines", refs={List.class,TriggerSchedulePipeline.class}, tree="[0,1]")
    private Output<List<TriggerSchedulePipeline>> pipelines;

    /**
     * @return block as defined below.
     * 
     */
    public Output<List<TriggerSchedulePipeline>> pipelines() {
        return this.pipelines;
    }
    /**
     * A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
     * 
     */
    @Export(name="schedule", refs={TriggerScheduleSchedule.class}, tree="[0]")
    private Output</* @Nullable */ TriggerScheduleSchedule> schedule;

    /**
     * @return A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
     * 
     */
    public Output<Optional<TriggerScheduleSchedule>> schedule() {
        return Codegen.optional(this.schedule);
    }
    /**
     * The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC.
     * 
     */
    @Export(name="startTime", refs={String.class}, tree="[0]")
    private Output<String> startTime;

    /**
     * @return The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC.
     * 
     */
    public Output<String> startTime() {
        return this.startTime;
    }
    /**
     * The timezone of the start/end time.
     * 
     */
    @Export(name="timeZone", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> timeZone;

    /**
     * @return The timezone of the start/end time.
     * 
     */
    public Output<Optional<String>> timeZone() {
        return Codegen.optional(this.timeZone);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public TriggerSchedule(String name) {
        this(name, TriggerScheduleArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public TriggerSchedule(String name, TriggerScheduleArgs 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 TriggerSchedule(String name, TriggerScheduleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:datafactory/triggerSchedule:TriggerSchedule", name, args == null ? TriggerScheduleArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private TriggerSchedule(String name, Output<String> id, @Nullable TriggerScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:datafactory/triggerSchedule:TriggerSchedule", 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 TriggerSchedule get(String name, Output<String> id, @Nullable TriggerScheduleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new TriggerSchedule(name, id, state, options);
    }
}
