// *** 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;
using Pulumi;

namespace Pulumiverse.Fortios
{
    /// <summary>
    /// Trigger for automation stitches.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Fortios = Pulumiverse.Fortios;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var trname = new Fortios.SystemAutomationtrigger("trname", new()
    ///     {
    ///         EventType = "event-log",
    ///         IocLevel = "high",
    ///         LicenseType = "forticare-support",
    ///         Logid = 32002,
    ///         TriggerFrequency = "daily",
    ///         TriggerMinute = 60,
    ///         TriggerType = "event-based",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// System AutomationTrigger can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemAutomationtrigger:SystemAutomationtrigger labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/systemAutomationtrigger:SystemAutomationtrigger labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/systemAutomationtrigger:SystemAutomationtrigger")]
    public partial class SystemAutomationtrigger : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Description.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Output("dynamicSortSubtable")]
        public Output<string?> DynamicSortSubtable { get; private set; } = null!;

        /// <summary>
        /// Event type.
        /// </summary>
        [Output("eventType")]
        public Output<string> EventType { get; private set; } = null!;

        /// <summary>
        /// Fabric connector event handler name.
        /// </summary>
        [Output("fabricEventName")]
        public Output<string?> FabricEventName { get; private set; } = null!;

        /// <summary>
        /// Fabric connector event severity.
        /// </summary>
        [Output("fabricEventSeverity")]
        public Output<string?> FabricEventSeverity { get; private set; } = null!;

        /// <summary>
        /// FortiAnalyzer event handler name.
        /// </summary>
        [Output("fazEventName")]
        public Output<string?> FazEventName { get; private set; } = null!;

        /// <summary>
        /// FortiAnalyzer event severity.
        /// </summary>
        [Output("fazEventSeverity")]
        public Output<string?> FazEventSeverity { get; private set; } = null!;

        /// <summary>
        /// FortiAnalyzer event tags.
        /// </summary>
        [Output("fazEventTags")]
        public Output<string?> FazEventTags { get; private set; } = null!;

        /// <summary>
        /// Customized trigger field settings. The structure of `fields` block is documented below.
        /// </summary>
        [Output("fields")]
        public Output<ImmutableArray<Outputs.SystemAutomationtriggerField>> Fields { get; private set; } = null!;

        /// <summary>
        /// IOC threat level. Valid values: `medium`, `high`.
        /// </summary>
        [Output("iocLevel")]
        public Output<string> IocLevel { get; private set; } = null!;

        /// <summary>
        /// License type.
        /// </summary>
        [Output("licenseType")]
        public Output<string> LicenseType { get; private set; } = null!;

        /// <summary>
        /// Log ID to trigger event.
        /// </summary>
        [Output("logid")]
        public Output<int> Logid { get; private set; } = null!;

        /// <summary>
        /// Log ID to trigger event. Only applies on FortiOS v7.0.0+. The structure of `logid_block` block is documented below.
        /// </summary>
        [Output("logidBlocks")]
        public Output<ImmutableArray<Outputs.SystemAutomationtriggerLogidBlock>> LogidBlocks { get; private set; } = null!;

        /// <summary>
        /// Name.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Security Rating report.
        /// </summary>
        [Output("reportType")]
        public Output<string> ReportType { get; private set; } = null!;

        /// <summary>
        /// Fabric connector serial number.
        /// </summary>
        [Output("serial")]
        public Output<string?> Serial { get; private set; } = null!;

        /// <summary>
        /// Trigger date and time (YYYY-MM-DD HH:MM:SS).
        /// </summary>
        [Output("triggerDatetime")]
        public Output<string> TriggerDatetime { get; private set; } = null!;

        /// <summary>
        /// Day within a month to trigger.
        /// </summary>
        [Output("triggerDay")]
        public Output<int> TriggerDay { get; private set; } = null!;

        /// <summary>
        /// Scheduled trigger frequency (default = daily).
        /// </summary>
        [Output("triggerFrequency")]
        public Output<string> TriggerFrequency { get; private set; } = null!;

        /// <summary>
        /// Hour of the day on which to trigger (0 - 23, default = 1).
        /// </summary>
        [Output("triggerHour")]
        public Output<int> TriggerHour { get; private set; } = null!;

        /// <summary>
        /// Minute of the hour on which to trigger (0 - 59, 60 to randomize).
        /// </summary>
        [Output("triggerMinute")]
        public Output<int> TriggerMinute { get; private set; } = null!;

        /// <summary>
        /// Trigger type. Valid values: `event-based`, `scheduled`.
        /// </summary>
        [Output("triggerType")]
        public Output<string> TriggerType { get; private set; } = null!;

        /// <summary>
        /// Day of week for trigger. Valid values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`.
        /// </summary>
        [Output("triggerWeekday")]
        public Output<string> TriggerWeekday { get; private set; } = null!;

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Output("vdomparam")]
        public Output<string?> Vdomparam { get; private set; } = null!;

        /// <summary>
        /// Virtual domain(s) that this trigger is valid for. The structure of `vdom` block is documented below.
        /// </summary>
        [Output("vdoms")]
        public Output<ImmutableArray<Outputs.SystemAutomationtriggerVdom>> Vdoms { get; private set; } = null!;


        /// <summary>
        /// Create a SystemAutomationtrigger 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 SystemAutomationtrigger(string name, SystemAutomationtriggerArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/systemAutomationtrigger:SystemAutomationtrigger", name, args ?? new SystemAutomationtriggerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SystemAutomationtrigger(string name, Input<string> id, SystemAutomationtriggerState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/systemAutomationtrigger:SystemAutomationtrigger", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse/pulumi-fortios",
            };
            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 SystemAutomationtrigger 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 SystemAutomationtrigger Get(string name, Input<string> id, SystemAutomationtriggerState? state = null, CustomResourceOptions? options = null)
        {
            return new SystemAutomationtrigger(name, id, state, options);
        }
    }

    public sealed class SystemAutomationtriggerArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        /// <summary>
        /// Event type.
        /// </summary>
        [Input("eventType")]
        public Input<string>? EventType { get; set; }

        /// <summary>
        /// Fabric connector event handler name.
        /// </summary>
        [Input("fabricEventName")]
        public Input<string>? FabricEventName { get; set; }

        /// <summary>
        /// Fabric connector event severity.
        /// </summary>
        [Input("fabricEventSeverity")]
        public Input<string>? FabricEventSeverity { get; set; }

        /// <summary>
        /// FortiAnalyzer event handler name.
        /// </summary>
        [Input("fazEventName")]
        public Input<string>? FazEventName { get; set; }

        /// <summary>
        /// FortiAnalyzer event severity.
        /// </summary>
        [Input("fazEventSeverity")]
        public Input<string>? FazEventSeverity { get; set; }

        /// <summary>
        /// FortiAnalyzer event tags.
        /// </summary>
        [Input("fazEventTags")]
        public Input<string>? FazEventTags { get; set; }

        [Input("fields")]
        private InputList<Inputs.SystemAutomationtriggerFieldArgs>? _fields;

        /// <summary>
        /// Customized trigger field settings. The structure of `fields` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerFieldArgs> Fields
        {
            get => _fields ?? (_fields = new InputList<Inputs.SystemAutomationtriggerFieldArgs>());
            set => _fields = value;
        }

        /// <summary>
        /// IOC threat level. Valid values: `medium`, `high`.
        /// </summary>
        [Input("iocLevel")]
        public Input<string>? IocLevel { get; set; }

        /// <summary>
        /// License type.
        /// </summary>
        [Input("licenseType")]
        public Input<string>? LicenseType { get; set; }

        /// <summary>
        /// Log ID to trigger event.
        /// </summary>
        [Input("logid")]
        public Input<int>? Logid { get; set; }

        [Input("logidBlocks")]
        private InputList<Inputs.SystemAutomationtriggerLogidBlockArgs>? _logidBlocks;

        /// <summary>
        /// Log ID to trigger event. Only applies on FortiOS v7.0.0+. The structure of `logid_block` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerLogidBlockArgs> LogidBlocks
        {
            get => _logidBlocks ?? (_logidBlocks = new InputList<Inputs.SystemAutomationtriggerLogidBlockArgs>());
            set => _logidBlocks = value;
        }

        /// <summary>
        /// Name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Security Rating report.
        /// </summary>
        [Input("reportType")]
        public Input<string>? ReportType { get; set; }

        /// <summary>
        /// Fabric connector serial number.
        /// </summary>
        [Input("serial")]
        public Input<string>? Serial { get; set; }

        /// <summary>
        /// Trigger date and time (YYYY-MM-DD HH:MM:SS).
        /// </summary>
        [Input("triggerDatetime")]
        public Input<string>? TriggerDatetime { get; set; }

        /// <summary>
        /// Day within a month to trigger.
        /// </summary>
        [Input("triggerDay")]
        public Input<int>? TriggerDay { get; set; }

        /// <summary>
        /// Scheduled trigger frequency (default = daily).
        /// </summary>
        [Input("triggerFrequency")]
        public Input<string>? TriggerFrequency { get; set; }

        /// <summary>
        /// Hour of the day on which to trigger (0 - 23, default = 1).
        /// </summary>
        [Input("triggerHour")]
        public Input<int>? TriggerHour { get; set; }

        /// <summary>
        /// Minute of the hour on which to trigger (0 - 59, 60 to randomize).
        /// </summary>
        [Input("triggerMinute")]
        public Input<int>? TriggerMinute { get; set; }

        /// <summary>
        /// Trigger type. Valid values: `event-based`, `scheduled`.
        /// </summary>
        [Input("triggerType")]
        public Input<string>? TriggerType { get; set; }

        /// <summary>
        /// Day of week for trigger. Valid values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`.
        /// </summary>
        [Input("triggerWeekday")]
        public Input<string>? TriggerWeekday { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        [Input("vdoms")]
        private InputList<Inputs.SystemAutomationtriggerVdomArgs>? _vdoms;

        /// <summary>
        /// Virtual domain(s) that this trigger is valid for. The structure of `vdom` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerVdomArgs> Vdoms
        {
            get => _vdoms ?? (_vdoms = new InputList<Inputs.SystemAutomationtriggerVdomArgs>());
            set => _vdoms = value;
        }

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

    public sealed class SystemAutomationtriggerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -&gt; [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -&gt; [ a10, a2 ].
        /// </summary>
        [Input("dynamicSortSubtable")]
        public Input<string>? DynamicSortSubtable { get; set; }

        /// <summary>
        /// Event type.
        /// </summary>
        [Input("eventType")]
        public Input<string>? EventType { get; set; }

        /// <summary>
        /// Fabric connector event handler name.
        /// </summary>
        [Input("fabricEventName")]
        public Input<string>? FabricEventName { get; set; }

        /// <summary>
        /// Fabric connector event severity.
        /// </summary>
        [Input("fabricEventSeverity")]
        public Input<string>? FabricEventSeverity { get; set; }

        /// <summary>
        /// FortiAnalyzer event handler name.
        /// </summary>
        [Input("fazEventName")]
        public Input<string>? FazEventName { get; set; }

        /// <summary>
        /// FortiAnalyzer event severity.
        /// </summary>
        [Input("fazEventSeverity")]
        public Input<string>? FazEventSeverity { get; set; }

        /// <summary>
        /// FortiAnalyzer event tags.
        /// </summary>
        [Input("fazEventTags")]
        public Input<string>? FazEventTags { get; set; }

        [Input("fields")]
        private InputList<Inputs.SystemAutomationtriggerFieldGetArgs>? _fields;

        /// <summary>
        /// Customized trigger field settings. The structure of `fields` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerFieldGetArgs> Fields
        {
            get => _fields ?? (_fields = new InputList<Inputs.SystemAutomationtriggerFieldGetArgs>());
            set => _fields = value;
        }

        /// <summary>
        /// IOC threat level. Valid values: `medium`, `high`.
        /// </summary>
        [Input("iocLevel")]
        public Input<string>? IocLevel { get; set; }

        /// <summary>
        /// License type.
        /// </summary>
        [Input("licenseType")]
        public Input<string>? LicenseType { get; set; }

        /// <summary>
        /// Log ID to trigger event.
        /// </summary>
        [Input("logid")]
        public Input<int>? Logid { get; set; }

        [Input("logidBlocks")]
        private InputList<Inputs.SystemAutomationtriggerLogidBlockGetArgs>? _logidBlocks;

        /// <summary>
        /// Log ID to trigger event. Only applies on FortiOS v7.0.0+. The structure of `logid_block` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerLogidBlockGetArgs> LogidBlocks
        {
            get => _logidBlocks ?? (_logidBlocks = new InputList<Inputs.SystemAutomationtriggerLogidBlockGetArgs>());
            set => _logidBlocks = value;
        }

        /// <summary>
        /// Name.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Security Rating report.
        /// </summary>
        [Input("reportType")]
        public Input<string>? ReportType { get; set; }

        /// <summary>
        /// Fabric connector serial number.
        /// </summary>
        [Input("serial")]
        public Input<string>? Serial { get; set; }

        /// <summary>
        /// Trigger date and time (YYYY-MM-DD HH:MM:SS).
        /// </summary>
        [Input("triggerDatetime")]
        public Input<string>? TriggerDatetime { get; set; }

        /// <summary>
        /// Day within a month to trigger.
        /// </summary>
        [Input("triggerDay")]
        public Input<int>? TriggerDay { get; set; }

        /// <summary>
        /// Scheduled trigger frequency (default = daily).
        /// </summary>
        [Input("triggerFrequency")]
        public Input<string>? TriggerFrequency { get; set; }

        /// <summary>
        /// Hour of the day on which to trigger (0 - 23, default = 1).
        /// </summary>
        [Input("triggerHour")]
        public Input<int>? TriggerHour { get; set; }

        /// <summary>
        /// Minute of the hour on which to trigger (0 - 59, 60 to randomize).
        /// </summary>
        [Input("triggerMinute")]
        public Input<int>? TriggerMinute { get; set; }

        /// <summary>
        /// Trigger type. Valid values: `event-based`, `scheduled`.
        /// </summary>
        [Input("triggerType")]
        public Input<string>? TriggerType { get; set; }

        /// <summary>
        /// Day of week for trigger. Valid values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`.
        /// </summary>
        [Input("triggerWeekday")]
        public Input<string>? TriggerWeekday { get; set; }

        /// <summary>
        /// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
        /// </summary>
        [Input("vdomparam")]
        public Input<string>? Vdomparam { get; set; }

        [Input("vdoms")]
        private InputList<Inputs.SystemAutomationtriggerVdomGetArgs>? _vdoms;

        /// <summary>
        /// Virtual domain(s) that this trigger is valid for. The structure of `vdom` block is documented below.
        /// </summary>
        public InputList<Inputs.SystemAutomationtriggerVdomGetArgs> Vdoms
        {
            get => _vdoms ?? (_vdoms = new InputList<Inputs.SystemAutomationtriggerVdomGetArgs>());
            set => _vdoms = value;
        }

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