// *** 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.Immutable;

namespace Pulumi.Routeros
{
    public static class Config
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "IDE1006", Justification = 
        "Double underscore prefix used to avoid conflicts with variable names.")]
        private sealed class __Value<T>
        {
            private readonly Func<T> _getter;
            private T _value = default!;
            private bool _set;

            public __Value(Func<T> getter)
            {
                _getter = getter;
            }

            public T Get() => _set ? _value : _getter();

            public void Set(T value)
            {
                _value = value;
                _set = true;
            }
        }

        private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("routeros");

        private static readonly __Value<string?> _caCertificate = new __Value<string?>(() => __config.Get("caCertificate") ?? Utilities.GetEnv("ROS_CA_CERTIFICATE"));
        /// <summary>
        /// Path to MikroTik's certificate authority file.
        /// </summary>
        public static string? CaCertificate
        {
            get => _caCertificate.Get();
            set => _caCertificate.Set(value);
        }

        private static readonly __Value<string?> _hosturl = new __Value<string?>(() => __config.Get("hosturl") ?? Utilities.GetEnv("ROS_HOSTURL"));
        /// <summary>
        /// URL of the MikroTik router, default is TLS connection to REST. * API: api[s]://host[:port] * api://router.local *
        /// apis://router.local:8729 * REST: https://host * https://router.local * router.local * 127.0.0.1 export
        /// ROS_HOSTURL=router.local or export MIKROTIK_HOST=router.local
        /// </summary>
        public static string? Hosturl
        {
            get => _hosturl.Get();
            set => _hosturl.Set(value);
        }

        private static readonly __Value<bool?> _insecure = new __Value<bool?>(() => __config.GetBoolean("insecure") ?? Utilities.GetEnvBoolean("ROS_INSECURE"));
        /// <summary>
        /// Whether to verify the SSL certificate or not.
        /// </summary>
        public static bool? Insecure
        {
            get => _insecure.Get();
            set => _insecure.Set(value);
        }

        private static readonly __Value<string?> _password = new __Value<string?>(() => __config.Get("password") ?? Utilities.GetEnv("ROS_PASSWORD"));
        /// <summary>
        /// Password for the MikroTik user.
        /// </summary>
        public static string? Password
        {
            get => _password.Get();
            set => _password.Set(value);
        }

        private static readonly __Value<string?> _username = new __Value<string?>(() => __config.Get("username") ?? Utilities.GetEnv("ROS_USERNAME"));
        /// <summary>
        /// Username for the MikroTik WEB/Winbox. export ROS_USERNAME=admin or export MIKROTIK_USER=admin
        /// </summary>
        public static string? Username
        {
            get => _username.Get();
            set => _username.Set(value);
        }

    }
}
