<filename>sdk/dotnet/Provider.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>
    /// The provider type for the fortios package. By default, resources use package-wide configuration
    /// settings, however an explicit `Provider` instance may be created and passed during resource
    /// construction to achieve fine-grained programmatic control over provider settings. See the
    /// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
    /// </summary>
    [FortiosResourceType("pulumi:providers:fortios")]
    public partial class Provider : global::Pulumi.ProviderResource
    {
        /// <summary>
        /// CA Bundle file content
        /// </summary>
        [Output("cabundlecontent")]
        public Output<string?> Cabundlecontent { get; private set; } = null!;

        /// <summary>
        /// CA Bundle file
        /// </summary>
        [Output("cabundlefile")]
        public Output<string?> Cabundlefile { get; private set; } = null!;

        /// <summary>
        /// CA certtificate(Optional)
        /// </summary>
        [Output("cacert")]
        public Output<string?> Cacert { get; private set; } = null!;

        /// <summary>
        /// User certificate
        /// </summary>
        [Output("clientcert")]
        public Output<string?> Clientcert { get; private set; } = null!;

        /// <summary>
        /// User private key
        /// </summary>
        [Output("clientkey")]
        public Output<string?> Clientkey { get; private set; } = null!;

        /// <summary>
        /// CA Bundle file
        /// </summary>
        [Output("fmgCabundlefile")]
        public Output<string?> FmgCabundlefile { get; private set; } = null!;

        /// <summary>
        /// Hostname/IP address of the FortiManager to connect to
        /// </summary>
        [Output("fmgHostname")]
        public Output<string?> FmgHostname { get; private set; } = null!;

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

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

        /// <summary>
        /// The hostname/IP address of the FortiOS to be connected
        /// </summary>
        [Output("hostname")]
        public Output<string?> Hostname { get; private set; } = null!;

        /// <summary>
        /// HTTP proxy address
        /// </summary>
        [Output("httpProxy")]
        public Output<string?> HttpProxy { get; private set; } = null!;

        /// <summary>
        /// Enable/disable peer authentication, can be 'enable' or 'disable'
        /// </summary>
        [Output("peerauth")]
        public Output<string?> Peerauth { get; private set; } = null!;

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

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


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

        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 =
                {
                    "clientkey",
                    "fmgPasswd",
                    "token",
                },
            };
            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;
        }
    }

    public sealed class ProviderArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// CA Bundle file content
        /// </summary>
        [Input("cabundlecontent")]
        public Input<string>? Cabundlecontent { get; set; }

        /// <summary>
        /// CA Bundle file
        /// </summary>
        [Input("cabundlefile")]
        public Input<string>? Cabundlefile { get; set; }

        /// <summary>
        /// CA certtificate(Optional)
        /// </summary>
        [Input("cacert")]
        public Input<string>? Cacert { get; set; }

        /// <summary>
        /// User certificate
        /// </summary>
        [Input("clientcert")]
        public Input<string>? Clientcert { get; set; }

        [Input("clientkey")]
        private Input<string>? _clientkey;

        /// <summary>
        /// User private key
        /// </summary>
        public Input<string>? Clientkey
        {
            get => _clientkey;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _clientkey = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

        /// <summary>
        /// CA Bundle file
        /// </summary>
        [Input("fmgCabundlefile")]
        public Input<string>? FmgCabundlefile { get; set; }

        /// <summary>
        /// Hostname/IP address of the FortiManager to connect to
        /// </summary>
        [Input("fmgHostname")]
        public Input<string>? FmgHostname { get; set; }

        [Input("fmgInsecure", json: true)]
        public Input<bool>? FmgInsecure { get; set; }

        [Input("fmgPasswd")]
        private Input<string>? _fmgPasswd;
        public Input<string>? FmgPasswd
        {
            get => _fmgPasswd;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _fmgPasswd = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

        /// <summary>
        /// The hostname/IP address of the FortiOS to be connected
        /// </summary>
        [Input("hostname")]
        public Input<string>? Hostname { get; set; }

        /// <summary>
        /// HTTP proxy address
        /// </summary>
        [Input("httpProxy")]
        public Input<string>? HttpProxy { get; set; }

        [Input("insecure", json: true)]
        public Input<bool>? Insecure { get; set; }

        /// <summary>
        /// Enable/disable peer authentication, can be 'enable' or 'disable'
        /// </summary>
        [Input("peerauth")]
        public Input<string>? Peerauth { get; set; }

        [Input("token")]
        private Input<string>? _token;
        public Input<string>? Token
        {
            get => _token;
            set
            {
                var emptySecret = Output.CreateSecret(0);
                _token = Output.Tuple<Input<string>?, int>(value, emptySecret).Apply(t => t.Item1);
            }
        }

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

        public ProviderArgs()
        {
            Cabundlecontent = Utilities.GetEnv("FORTIOS_CA_CABUNDLECONTENT");
            Cabundlefile = Utilities.GetEnv("FORTIOS_CA_CABUNDLE");
            Cacert = Utilities.GetEnv("FORTIOS_CA_CACERT");
            Clientcert = Utilities.GetEnv("FORTIOS_CA_CLIENTCERT");
            Clientkey = Utilities.GetEnv("FORTIOS_CA_CLIENTKEY");
            FmgCabundlefile = Utilities.GetEnv("FORTIOS_FMG_CABUNDLE");
            FmgHostname = Utilities.GetEnv("FORTIOS_FMG_HOSTNAME");
            FmgInsecure = Utilities.GetEnvBoolean("FORTIOS_FMG_INSECURE");
            FmgPasswd = Utilities.GetEnv("FORTIOS_FMG_PASSWORD");
            FmgUsername = Utilities.GetEnv("FORTIOS_FMG_USERNAME");
            Hostname = Utilities.GetEnv("FORTIOS_ACCESS_HOSTNAME");
            HttpProxy = Utilities.GetEnv("FORTIOS_HTTP_PROXY");
            Insecure = Utilities.GetEnvBoolean("FORTIOS_INSECURE");
            Peerauth = Utilities.GetEnv("FORTIOS_CA_PEERAUTH");
            Token = Utilities.GetEnv("FORTIOS_ACCESS_TOKEN");
            Vdom = Utilities.GetEnv("FORTIOS_VDOM");
        }
        public static new ProviderArgs Empty => new ProviderArgs();
    }
}
