// *** 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>
    /// Configure WAN optimization content delivery network rules.
    /// 
    /// ## 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.WanoptContentdeliverynetworkrule("trname", new()
    ///     {
    ///         Category = "vcache",
    ///         HostDomainNameSuffixes = new[]
    ///         {
    ///             new Fortios.Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixArgs
    ///             {
    ///                 Name = "kaf.com",
    ///             },
    ///         },
    ///         RequestCacheControl = "disable",
    ///         ResponseCacheControl = "disable",
    ///         ResponseExpires = "enable",
    ///         Status = "enable",
    ///         TextResponseVcache = "enable",
    ///         Updateserver = "disable",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Wanopt ContentDeliveryNetworkRule can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptContentdeliverynetworkrule:WanoptContentdeliverynetworkrule labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptContentdeliverynetworkrule:WanoptContentdeliverynetworkrule labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/wanoptContentdeliverynetworkrule:WanoptContentdeliverynetworkrule")]
    public partial class WanoptContentdeliverynetworkrule : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Content delivery network rule category. Valid values: `vcache`, `youtube`.
        /// </summary>
        [Output("category")]
        public Output<string> Category { get; private set; } = null!;

        /// <summary>
        /// Comment about this CDN-rule.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { 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>
        /// Suffix portion of the fully qualified domain name (eg. fortinet.com in "www.fortinet.com"). The structure of `host_domain_name_suffix` block is documented below.
        /// </summary>
        [Output("hostDomainNameSuffixes")]
        public Output<ImmutableArray<Outputs.WanoptContentdeliverynetworkruleHostDomainNameSuffix>> HostDomainNameSuffixes { get; private set; } = null!;

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

        /// <summary>
        /// Enable/disable HTTP request cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("requestCacheControl")]
        public Output<string> RequestCacheControl { get; private set; } = null!;

        /// <summary>
        /// Enable/disable HTTP response cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("responseCacheControl")]
        public Output<string> ResponseCacheControl { get; private set; } = null!;

        /// <summary>
        /// Enable/disable HTTP response cache expires. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("responseExpires")]
        public Output<string> ResponseExpires { get; private set; } = null!;

        /// <summary>
        /// WAN optimization content delivery network rule entries. The structure of `rules` block is documented below.
        /// </summary>
        [Output("rules")]
        public Output<ImmutableArray<Outputs.WanoptContentdeliverynetworkruleRule>> Rules { get; private set; } = null!;

        /// <summary>
        /// Enable/disable WAN optimization content delivery network rules. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// Enable/disable caching of text responses. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("textResponseVcache")]
        public Output<string> TextResponseVcache { get; private set; } = null!;

        /// <summary>
        /// Enable/disable update server. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("updateserver")]
        public Output<string> Updateserver { 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>
        /// Create a WanoptContentdeliverynetworkrule 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 WanoptContentdeliverynetworkrule(string name, WanoptContentdeliverynetworkruleArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/wanoptContentdeliverynetworkrule:WanoptContentdeliverynetworkrule", name, args ?? new WanoptContentdeliverynetworkruleArgs(), MakeResourceOptions(options, ""))
        {
        }

        private WanoptContentdeliverynetworkrule(string name, Input<string> id, WanoptContentdeliverynetworkruleState? state = null, CustomResourceOptions? options = null)
            : base("fortios:index/wanoptContentdeliverynetworkrule:WanoptContentdeliverynetworkrule", 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 WanoptContentdeliverynetworkrule 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 WanoptContentdeliverynetworkrule Get(string name, Input<string> id, WanoptContentdeliverynetworkruleState? state = null, CustomResourceOptions? options = null)
        {
            return new WanoptContentdeliverynetworkrule(name, id, state, options);
        }
    }

    public sealed class WanoptContentdeliverynetworkruleArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Content delivery network rule category. Valid values: `vcache`, `youtube`.
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// Comment about this CDN-rule.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { 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; }

        [Input("hostDomainNameSuffixes")]
        private InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixArgs>? _hostDomainNameSuffixes;

        /// <summary>
        /// Suffix portion of the fully qualified domain name (eg. fortinet.com in "www.fortinet.com"). The structure of `host_domain_name_suffix` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixArgs> HostDomainNameSuffixes
        {
            get => _hostDomainNameSuffixes ?? (_hostDomainNameSuffixes = new InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixArgs>());
            set => _hostDomainNameSuffixes = value;
        }

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

        /// <summary>
        /// Enable/disable HTTP request cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("requestCacheControl")]
        public Input<string>? RequestCacheControl { get; set; }

        /// <summary>
        /// Enable/disable HTTP response cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("responseCacheControl")]
        public Input<string>? ResponseCacheControl { get; set; }

        /// <summary>
        /// Enable/disable HTTP response cache expires. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("responseExpires")]
        public Input<string>? ResponseExpires { get; set; }

        [Input("rules")]
        private InputList<Inputs.WanoptContentdeliverynetworkruleRuleArgs>? _rules;

        /// <summary>
        /// WAN optimization content delivery network rule entries. The structure of `rules` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptContentdeliverynetworkruleRuleArgs> Rules
        {
            get => _rules ?? (_rules = new InputList<Inputs.WanoptContentdeliverynetworkruleRuleArgs>());
            set => _rules = value;
        }

        /// <summary>
        /// Enable/disable WAN optimization content delivery network rules. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Enable/disable caching of text responses. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("textResponseVcache")]
        public Input<string>? TextResponseVcache { get; set; }

        /// <summary>
        /// Enable/disable update server. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("updateserver")]
        public Input<string>? Updateserver { 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; }

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

    public sealed class WanoptContentdeliverynetworkruleState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Content delivery network rule category. Valid values: `vcache`, `youtube`.
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// Comment about this CDN-rule.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { 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; }

        [Input("hostDomainNameSuffixes")]
        private InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixGetArgs>? _hostDomainNameSuffixes;

        /// <summary>
        /// Suffix portion of the fully qualified domain name (eg. fortinet.com in "www.fortinet.com"). The structure of `host_domain_name_suffix` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixGetArgs> HostDomainNameSuffixes
        {
            get => _hostDomainNameSuffixes ?? (_hostDomainNameSuffixes = new InputList<Inputs.WanoptContentdeliverynetworkruleHostDomainNameSuffixGetArgs>());
            set => _hostDomainNameSuffixes = value;
        }

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

        /// <summary>
        /// Enable/disable HTTP request cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("requestCacheControl")]
        public Input<string>? RequestCacheControl { get; set; }

        /// <summary>
        /// Enable/disable HTTP response cache control. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("responseCacheControl")]
        public Input<string>? ResponseCacheControl { get; set; }

        /// <summary>
        /// Enable/disable HTTP response cache expires. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("responseExpires")]
        public Input<string>? ResponseExpires { get; set; }

        [Input("rules")]
        private InputList<Inputs.WanoptContentdeliverynetworkruleRuleGetArgs>? _rules;

        /// <summary>
        /// WAN optimization content delivery network rule entries. The structure of `rules` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptContentdeliverynetworkruleRuleGetArgs> Rules
        {
            get => _rules ?? (_rules = new InputList<Inputs.WanoptContentdeliverynetworkruleRuleGetArgs>());
            set => _rules = value;
        }

        /// <summary>
        /// Enable/disable WAN optimization content delivery network rules. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Enable/disable caching of text responses. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("textResponseVcache")]
        public Input<string>? TextResponseVcache { get; set; }

        /// <summary>
        /// Enable/disable update server. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("updateserver")]
        public Input<string>? Updateserver { 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; }

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