// *** 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 MS Exchange server entries. Applies to FortiOS Version `&gt;= 6.2.4`.
    /// 
    /// ## Import
    /// 
    /// User Exchange can be imported using any of these accepted formats
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/userExchange:UserExchange labelname {{name}}
    /// ```
    /// 
    ///  If you do not want to import arguments of block$ export "FORTIOS_IMPORT_TABLE"="false"
    /// 
    /// ```sh
    ///  $ pulumi import fortios:index/userExchange:UserExchange labelname {{name}}
    /// ```
    /// 
    ///  $ unset "FORTIOS_IMPORT_TABLE"
    /// </summary>
    [FortiosResourceType("fortios:index/userExchange:UserExchange")]
    public partial class UserExchange : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Authentication security level used for the RPC protocol layer. Valid values: `connect`, `call`, `packet`, `integrity`, `privacy`.
        /// </summary>
        [Output("authLevel")]
        public Output<string> AuthLevel { get; private set; } = null!;

        /// <summary>
        /// Authentication security type used for the RPC protocol layer. Valid values: `spnego`, `ntlm`, `kerberos`.
        /// </summary>
        [Output("authType")]
        public Output<string> AuthType { get; private set; } = null!;

        /// <summary>
        /// Enable/disable automatic discovery of KDC IP addresses. Valid values: `enable`, `disable`.
        /// </summary>
        [Output("autoDiscoverKdc")]
        public Output<string> AutoDiscoverKdc { get; private set; } = null!;

        /// <summary>
        /// Connection protocol used to connect to MS Exchange service. Valid values: `rpc-over-tcp`, `rpc-over-http`, `rpc-over-https`.
        /// </summary>
        [Output("connectProtocol")]
        public Output<string> ConnectProtocol { get; private set; } = null!;

        /// <summary>
        /// MS Exchange server fully qualified domain name.
        /// </summary>
        [Output("domainName")]
        public Output<string> DomainName { 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>
        /// Authentication security type used for the HTTP transport. Valid values: `basic`, `ntlm`.
        /// </summary>
        [Output("httpAuthType")]
        public Output<string> HttpAuthType { get; private set; } = null!;

        /// <summary>
        /// Server IPv4 address.
        /// </summary>
        [Output("ip")]
        public Output<string> Ip { get; private set; } = null!;

        /// <summary>
        /// KDC IPv4 addresses for Kerberos authentication. The structure of `kdc_ip` block is documented below.
        /// </summary>
        [Output("kdcIps")]
        public Output<ImmutableArray<Outputs.UserExchangeKdcIp>> KdcIps { get; private set; } = null!;

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

        /// <summary>
        /// Password for the specified username.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

        /// <summary>
        /// MS Exchange server hostname.
        /// </summary>
        [Output("serverName")]
        public Output<string> ServerName { get; private set; } = null!;

        /// <summary>
        /// Minimum SSL/TLS protocol version for HTTPS transport (default is to follow system global setting). Valid values: `default`, `SSLv3`, `TLSv1`, `TLSv1-1`, `TLSv1-2`.
        /// </summary>
        [Output("sslMinProtoVersion")]
        public Output<string> SslMinProtoVersion { get; private set; } = null!;

        /// <summary>
        /// User name used to sign in to the server. Must have proper permissions for service.
        /// </summary>
        [Output("username")]
        public Output<string> Username { 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 UserExchange 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 UserExchange(string name, UserExchangeArgs? args = null, CustomResourceOptions? options = null)
            : base("fortios:index/userExchange:UserExchange", name, args ?? new UserExchangeArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class UserExchangeArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Authentication security level used for the RPC protocol layer. Valid values: `connect`, `call`, `packet`, `integrity`, `privacy`.
        /// </summary>
        [Input("authLevel")]
        public Input<string>? AuthLevel { get; set; }

        /// <summary>
        /// Authentication security type used for the RPC protocol layer. Valid values: `spnego`, `ntlm`, `kerberos`.
        /// </summary>
        [Input("authType")]
        public Input<string>? AuthType { get; set; }

        /// <summary>
        /// Enable/disable automatic discovery of KDC IP addresses. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("autoDiscoverKdc")]
        public Input<string>? AutoDiscoverKdc { get; set; }

        /// <summary>
        /// Connection protocol used to connect to MS Exchange service. Valid values: `rpc-over-tcp`, `rpc-over-http`, `rpc-over-https`.
        /// </summary>
        [Input("connectProtocol")]
        public Input<string>? ConnectProtocol { get; set; }

        /// <summary>
        /// MS Exchange server fully qualified domain name.
        /// </summary>
        [Input("domainName")]
        public Input<string>? DomainName { 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>
        /// Authentication security type used for the HTTP transport. Valid values: `basic`, `ntlm`.
        /// </summary>
        [Input("httpAuthType")]
        public Input<string>? HttpAuthType { get; set; }

        /// <summary>
        /// Server IPv4 address.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        [Input("kdcIps")]
        private InputList<Inputs.UserExchangeKdcIpArgs>? _kdcIps;

        /// <summary>
        /// KDC IPv4 addresses for Kerberos authentication. The structure of `kdc_ip` block is documented below.
        /// </summary>
        public InputList<Inputs.UserExchangeKdcIpArgs> KdcIps
        {
            get => _kdcIps ?? (_kdcIps = new InputList<Inputs.UserExchangeKdcIpArgs>());
            set => _kdcIps = value;
        }

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

        [Input("password")]
        private Input<string>? _password;

        /// <summary>
        /// Password for the specified username.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// MS Exchange server hostname.
        /// </summary>
        [Input("serverName")]
        public Input<string>? ServerName { get; set; }

        /// <summary>
        /// Minimum SSL/TLS protocol version for HTTPS transport (default is to follow system global setting). Valid values: `default`, `SSLv3`, `TLSv1`, `TLSv1-1`, `TLSv1-2`.
        /// </summary>
        [Input("sslMinProtoVersion")]
        public Input<string>? SslMinProtoVersion { get; set; }

        /// <summary>
        /// User name used to sign in to the server. Must have proper permissions for service.
        /// </summary>
        [Input("username")]
        public Input<string>? Username { 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 UserExchangeArgs()
        {
        }
        public static new UserExchangeArgs Empty => new UserExchangeArgs();
    }

    public sealed class UserExchangeState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Authentication security level used for the RPC protocol layer. Valid values: `connect`, `call`, `packet`, `integrity`, `privacy`.
        /// </summary>
        [Input("authLevel")]
        public Input<string>? AuthLevel { get; set; }

        /// <summary>
        /// Authentication security type used for the RPC protocol layer. Valid values: `spnego`, `ntlm`, `kerberos`.
        /// </summary>
        [Input("authType")]
        public Input<string>? AuthType { get; set; }

        /// <summary>
        /// Enable/disable automatic discovery of KDC IP addresses. Valid values: `enable`, `disable`.
        /// </summary>
        [Input("autoDiscoverKdc")]
        public Input<string>? AutoDiscoverKdc { get; set; }

        /// <summary>
        /// Connection protocol used to connect to MS Exchange service. Valid values: `rpc-over-tcp`, `rpc-over-http`, `rpc-over-https`.
        /// </summary>
        [Input("connectProtocol")]
        public Input<string>? ConnectProtocol { get; set; }

        /// <summary>
        /// MS Exchange server fully qualified domain name.
        /// </summary>
        [Input("domainName")]
        public Input<string>? DomainName { 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>
        /// Authentication security type used for the HTTP transport. Valid values: `basic`, `ntlm`.
        /// </summary>
        [Input("httpAuthType")]
        public Input<string>? HttpAuthType { get; set; }

        /// <summary>
        /// Server IPv4 address.
        /// </summary>
        [Input("ip")]
        public Input<string>? Ip { get; set; }

        [Input("kdcIps")]
        private InputList<Inputs.UserExchangeKdcIpGetArgs>? _kdcIps;

        /// <summary>
        /// KDC IPv4 addresses for Kerberos authentication. The structure of `kdc_ip` block is documented below.
        /// </summary>
        public InputList<Inputs.UserExchangeKdcIpGetArgs> KdcIps
        {
            get => _kdcIps ?? (_kdcIps = new InputList<Inputs.UserExchangeKdcIpGetArgs>());
            set => _kdcIps = value;
        }

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

        [Input("password")]
        private Input<string>? _password;

        /// <summary>
        /// Password for the specified username.
        /// </summary>
        public Input<string>? Password
        {
            get => _password;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _password = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// MS Exchange server hostname.
        /// </summary>
        [Input("serverName")]
        public Input<string>? ServerName { get; set; }

        /// <summary>
        /// Minimum SSL/TLS protocol version for HTTPS transport (default is to follow system global setting). Valid values: `default`, `SSLv3`, `TLSv1`, `TLSv1-1`, `TLSv1-2`.
        /// </summary>
        [Input("sslMinProtoVersion")]
        public Input<string>? SslMinProtoVersion { get; set; }

        /// <summary>
        /// User name used to sign in to the server. Must have proper permissions for service.
        /// </summary>
        [Input("username")]
        public Input<string>? Username { 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 UserExchangeState()
        {
        }
        public static new UserExchangeState Empty => new UserExchangeState();
    }
}
