<filename>sdk/dotnet/WanoptCacheservice.cs// *** 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>
    /// Designate cache-service for wan-optimization and webcache.
    /// 
    /// ## 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.WanoptCacheservice("trname", new()
    ///     {
    ///         AcceptableConnections = "any",
    ///         Collaboration = "disable",
    ///         DeviceId = "default_dev_id",
    ///         PreferScenario = "balance",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Wanopt CacheService can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptCacheservice:WanoptCacheservice labelname WanoptCacheService
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/wanoptCacheservice:WanoptCacheservice labelname WanoptCacheService
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/wanoptCacheservice:WanoptCacheservice")]
    public partial class WanoptCacheservice : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Set strategy when accepting cache collaboration connection. Valid values: `any`, `peers`.
        /// </summary>
        [Output("acceptableConnections")]
        public Output<string> AcceptableConnections { get; private set; } = null!;

        /// <summary>
        /// Enable/disable cache-collaboration between cache-service clusters. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("collaboration")]
        public Output<string> Collaboration { get; private set; } = null!;

        /// <summary>
        /// Set identifier for this cache device.
        /// </summary>
        [Output("deviceId")]
        public Output<string> DeviceId { get; private set; } = null!;

        /// <summary>
        /// Modify cache-service destination peer list. The structure of `dst_peer` block is documented below.
        /// </summary>
        [Output("dstPeers")]
        public Output<ImmutableArray<Outputs.WanoptCacheserviceDstPeer>> DstPeers { 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>
        /// Set the preferred cache behavior towards the balance between latency and hit-ratio. Valid values: `balance`, `prefer-speed`, `prefer-cache`.
        /// </summary>
        [Output("preferScenario")]
        public Output<string> PreferScenario { get; private set; } = null!;

        /// <summary>
        /// Modify cache-service source peer list. The structure of `src_peer` block is documented below.
        /// </summary>
        [Output("srcPeers")]
        public Output<ImmutableArray<Outputs.WanoptCacheserviceSrcPeer>> SrcPeers { 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 WanoptCacheservice 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 WanoptCacheservice(string name, WanoptCacheserviceArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/wanoptCacheservice:WanoptCacheservice", name, args ?? new WanoptCacheserviceArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class WanoptCacheserviceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Set strategy when accepting cache collaboration connection. Valid values: `any`, `peers`.
        /// </summary>
        [Input("acceptableConnections")]
        public Input<string>? AcceptableConnections { get; set; }

        /// <summary>
        /// Enable/disable cache-collaboration between cache-service clusters. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("collaboration")]
        public Input<string>? Collaboration { get; set; }

        /// <summary>
        /// Set identifier for this cache device.
        /// </summary>
        [Input("deviceId")]
        public Input<string>? DeviceId { get; set; }

        [Input("dstPeers")]
        private InputList<Inputs.WanoptCacheserviceDstPeerArgs>? _dstPeers;

        /// <summary>
        /// Modify cache-service destination peer list. The structure of `dst_peer` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptCacheserviceDstPeerArgs> DstPeers
        {
            get => _dstPeers ?? (_dstPeers = new InputList<Inputs.WanoptCacheserviceDstPeerArgs>());
            set => _dstPeers = value;
        }

        /// <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>
        /// Set the preferred cache behavior towards the balance between latency and hit-ratio. Valid values: `balance`, `prefer-speed`, `prefer-cache`.
        /// </summary>
        [Input("preferScenario")]
        public Input<string>? PreferScenario { get; set; }

        [Input("srcPeers")]
        private InputList<Inputs.WanoptCacheserviceSrcPeerArgs>? _srcPeers;

        /// <summary>
        /// Modify cache-service source peer list. The structure of `src_peer` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptCacheserviceSrcPeerArgs> SrcPeers
        {
            get => _srcPeers ?? (_srcPeers = new InputList<Inputs.WanoptCacheserviceSrcPeerArgs>());
            set => _srcPeers = value;
        }

        /// <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 WanoptCacheserviceArgs()
        {
        }
        public static new WanoptCacheserviceArgs Empty => new WanoptCacheserviceArgs();
    }

    public sealed class WanoptCacheserviceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Set strategy when accepting cache collaboration connection. Valid values: `any`, `peers`.
        /// </summary>
        [Input("acceptableConnections")]
        public Input<string>? AcceptableConnections { get; set; }

        /// <summary>
        /// Enable/disable cache-collaboration between cache-service clusters. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("collaboration")]
        public Input<string>? Collaboration { get; set; }

        /// <summary>
        /// Set identifier for this cache device.
        /// </summary>
        [Input("deviceId")]
        public Input<string>? DeviceId { get; set; }

        [Input("dstPeers")]
        private InputList<Inputs.WanoptCacheserviceDstPeerGetArgs>? _dstPeers;

        /// <summary>
        /// Modify cache-service destination peer list. The structure of `dst_peer` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptCacheserviceDstPeerGetArgs> DstPeers
        {
            get => _dstPeers ?? (_dstPeers = new InputList<Inputs.WanoptCacheserviceDstPeerGetArgs>());
            set => _dstPeers = value;
        }

        /// <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>
        /// Set the preferred cache behavior towards the balance between latency and hit-ratio. Valid values: `balance`, `prefer-speed`, `prefer-cache`.
        /// </summary>
        [Input("preferScenario")]
        public Input<string>? PreferScenario { get; set; }

        [Input("srcPeers")]
        private InputList<Inputs.WanoptCacheserviceSrcPeerGetArgs>? _srcPeers;

        /// <summary>
        /// Modify cache-service source peer list. The structure of `src_peer` block is documented below.
        /// </summary>
        public InputList<Inputs.WanoptCacheserviceSrcPeerGetArgs> SrcPeers
        {
            get => _srcPeers ?? (_srcPeers = new InputList<Inputs.WanoptCacheserviceSrcPeerGetArgs>());
            set => _srcPeers = value;
        }

        /// <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 WanoptCacheserviceState()
        {
        }
        public static new WanoptCacheserviceState Empty => new WanoptCacheserviceState();
    }
}
