<reponame>mrhamburg/pulumi-provider-routeros// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Routeros.System
{
    /// <summary>
    /// ## # routeros.System.Scheduler (Resource)
    /// 
    /// ***
    /// 
    /// #### This is an alias for backwards compatibility between plugin versions.
    /// Please see documentation for routeros.System.SystemScheduler
    /// </summary>
    [RouterosResourceType("routeros:System/scheduler:Scheduler")]
    public partial class Scheduler : global::Pulumi.CustomResource
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___id_")]
        public Output<int?> ___id_ { get; private set; } = null!;

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Output("___path_")]
        public Output<string?> ___path_ { get; private set; } = null!;

        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        [Output("disabled")]
        public Output<bool?> Disabled { get; private set; } = null!;

        /// <summary>
        /// Interval between two script executions, if time interval is set to zero, the script is only executed at its start time,
        /// otherwise it is executed repeatedly at the time interval is specified.
        /// </summary>
        [Output("interval")]
        public Output<string> Interval { get; private set; } = null!;

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        [Output("nextRun")]
        public Output<string> NextRun { get; private set; } = null!;

        /// <summary>
        /// Name of the script to execute. It must be presented at /system script.
        /// </summary>
        [Output("onEvent")]
        public Output<string> OnEvent { get; private set; } = null!;

        [Output("owner")]
        public Output<string> Owner { get; private set; } = null!;

        /// <summary>
        /// List of applicable policies: * dude - Policy that grants rights to log in to dude server. * ftp - Policy that grants
        /// full rights to log in remotely via FTP, to read/write/erase files and to transfer files from/to the router. Should be
        /// used together with read/write policies. * password - Policy that grants rights to change the password. * policy - Policy
        /// that grants user management rights. Should be used together with the write policy. Allows also to see global variables
        /// created by other users (requires also 'test' policy). * read - Policy that grants read access to the router's
        /// configuration. All console commands that do not alter router's configuration are allowed. Doesn't affect FTP. * reboot -
        /// Policy that allows rebooting the router. * romon - Policy that grants rights to connect to RoMon server. * sensitive -
        /// Policy that grants rights to change "hide sensitive" option, if this policy is disabled sensitive information is not
        /// displayed. * sniff - Policy that grants rights to use packet sniffer tool. * test - Policy that grants rights to run
        /// ping, traceroute, bandwidth-test, wireless scan, snooper, and other test commands. * write - Policy that grants write
        /// access to the router's configuration, except for user management. This policy does not allow to read the configuration,
        /// so make sure to enable read policy as well. policy = ["ftp", "read", "write"]
        /// </summary>
        [Output("policies")]
        public Output<ImmutableArray<string>> Policies { get; private set; } = null!;

        /// <summary>
        /// This counter is incremented each time the script is executed.
        /// </summary>
        [Output("runCount")]
        public Output<string> RunCount { get; private set; } = null!;

        /// <summary>
        /// Date of the first script execution.
        /// </summary>
        [Output("startDate")]
        public Output<string> StartDate { get; private set; } = null!;

        /// <summary>
        /// Time of the first script execution. If scheduler item has start-time set to startup, it behaves as if start-time and
        /// start-date were set to time 3 seconds after console starts up. It means that all scripts having start-time is startup
        /// and interval is 0 will be executed once each time router boots. If the interval is set to value other than 0 scheduler
        /// will not run at startup.
        /// </summary>
        [Output("startTime")]
        public Output<string> StartTime { get; private set; } = null!;


        /// <summary>
        /// Create a Scheduler resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Scheduler(string name, SchedulerArgs args, CustomResourceOptions? options = null)
            : base("routeros:System/scheduler:Scheduler", name, args ?? new SchedulerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Scheduler(string name, Input<string> id, SchedulerState? state = null, CustomResourceOptions? options = null)
            : base("routeros:System/scheduler:Scheduler", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Scheduler resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Scheduler Get(string name, Input<string> id, SchedulerState? state = null, CustomResourceOptions? options = null)
        {
            return new Scheduler(name, id, state, options);
        }
    }

    public sealed class SchedulerArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        /// <summary>
        /// Interval between two script executions, if time interval is set to zero, the script is only executed at its start time,
        /// otherwise it is executed repeatedly at the time interval is specified.
        /// </summary>
        [Input("interval")]
        public Input<string>? Interval { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Name of the script to execute. It must be presented at /system script.
        /// </summary>
        [Input("onEvent", required: true)]
        public Input<string> OnEvent { get; set; } = null!;

        [Input("policies")]
        private InputList<string>? _policies;

        /// <summary>
        /// List of applicable policies: * dude - Policy that grants rights to log in to dude server. * ftp - Policy that grants
        /// full rights to log in remotely via FTP, to read/write/erase files and to transfer files from/to the router. Should be
        /// used together with read/write policies. * password - Policy that grants rights to change the password. * policy - Policy
        /// that grants user management rights. Should be used together with the write policy. Allows also to see global variables
        /// created by other users (requires also 'test' policy). * read - Policy that grants read access to the router's
        /// configuration. All console commands that do not alter router's configuration are allowed. Doesn't affect FTP. * reboot -
        /// Policy that allows rebooting the router. * romon - Policy that grants rights to connect to RoMon server. * sensitive -
        /// Policy that grants rights to change "hide sensitive" option, if this policy is disabled sensitive information is not
        /// displayed. * sniff - Policy that grants rights to use packet sniffer tool. * test - Policy that grants rights to run
        /// ping, traceroute, bandwidth-test, wireless scan, snooper, and other test commands. * write - Policy that grants write
        /// access to the router's configuration, except for user management. This policy does not allow to read the configuration,
        /// so make sure to enable read policy as well. policy = ["ftp", "read", "write"]
        /// </summary>
        public InputList<string> Policies
        {
            get => _policies ?? (_policies = new InputList<string>());
            set => _policies = value;
        }

        /// <summary>
        /// Date of the first script execution.
        /// </summary>
        [Input("startDate")]
        public Input<string>? StartDate { get; set; }

        /// <summary>
        /// Time of the first script execution. If scheduler item has start-time set to startup, it behaves as if start-time and
        /// start-date were set to time 3 seconds after console starts up. It means that all scripts having start-time is startup
        /// and interval is 0 will be executed once each time router boots. If the interval is set to value other than 0 scheduler
        /// will not run at startup.
        /// </summary>
        [Input("startTime")]
        public Input<string>? StartTime { get; set; }

        public SchedulerArgs()
        {
        }
        public static new SchedulerArgs Empty => new SchedulerArgs();
    }

    public sealed class SchedulerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// &lt;em&gt;Resource ID type (.id / name). This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___id_")]
        public Input<int>? ___id_ { get; set; }

        /// <summary>
        /// &lt;em&gt;Resource path for CRUD operations. This is an internal service field, setting a value is not required.&lt;/em&gt;
        /// </summary>
        [Input("___path_")]
        public Input<string>? ___path_ { get; set; }

        [Input("comment")]
        public Input<string>? Comment { get; set; }

        [Input("disabled")]
        public Input<bool>? Disabled { get; set; }

        /// <summary>
        /// Interval between two script executions, if time interval is set to zero, the script is only executed at its start time,
        /// otherwise it is executed repeatedly at the time interval is specified.
        /// </summary>
        [Input("interval")]
        public Input<string>? Interval { get; set; }

        /// <summary>
        /// Changing the name of this resource will force it to be recreated. &gt; The links of other configuration properties to this
        /// resource may be lost! &gt; Changing the name of the resource outside of a Terraform will result in a loss of control
        /// integrity for that resource!
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("nextRun")]
        public Input<string>? NextRun { get; set; }

        /// <summary>
        /// Name of the script to execute. It must be presented at /system script.
        /// </summary>
        [Input("onEvent")]
        public Input<string>? OnEvent { get; set; }

        [Input("owner")]
        public Input<string>? Owner { get; set; }

        [Input("policies")]
        private InputList<string>? _policies;

        /// <summary>
        /// List of applicable policies: * dude - Policy that grants rights to log in to dude server. * ftp - Policy that grants
        /// full rights to log in remotely via FTP, to read/write/erase files and to transfer files from/to the router. Should be
        /// used together with read/write policies. * password - Policy that grants rights to change the password. * policy - Policy
        /// that grants user management rights. Should be used together with the write policy. Allows also to see global variables
        /// created by other users (requires also 'test' policy). * read - Policy that grants read access to the router's
        /// configuration. All console commands that do not alter router's configuration are allowed. Doesn't affect FTP. * reboot -
        /// Policy that allows rebooting the router. * romon - Policy that grants rights to connect to RoMon server. * sensitive -
        /// Policy that grants rights to change "hide sensitive" option, if this policy is disabled sensitive information is not
        /// displayed. * sniff - Policy that grants rights to use packet sniffer tool. * test - Policy that grants rights to run
        /// ping, traceroute, bandwidth-test, wireless scan, snooper, and other test commands. * write - Policy that grants write
        /// access to the router's configuration, except for user management. This policy does not allow to read the configuration,
        /// so make sure to enable read policy as well. policy = ["ftp", "read", "write"]
        /// </summary>
        public InputList<string> Policies
        {
            get => _policies ?? (_policies = new InputList<string>());
            set => _policies = value;
        }

        /// <summary>
        /// This counter is incremented each time the script is executed.
        /// </summary>
        [Input("runCount")]
        public Input<string>? RunCount { get; set; }

        /// <summary>
        /// Date of the first script execution.
        /// </summary>
        [Input("startDate")]
        public Input<string>? StartDate { get; set; }

        /// <summary>
        /// Time of the first script execution. If scheduler item has start-time set to startup, it behaves as if start-time and
        /// start-date were set to time 3 seconds after console starts up. It means that all scripts having start-time is startup
        /// and interval is 0 will be executed once each time router boots. If the interval is set to value other than 0 scheduler
        /// will not run at startup.
        /// </summary>
        [Input("startTime")]
        public Input<string>? StartTime { get; set; }

        public SchedulerState()
        {
        }
        public static new SchedulerState Empty => new SchedulerState();
    }
}
