<reponame>lbrlabs/pulumi-ovh<filename>sdk/dotnet/Config/Config.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.Immutable;

namespace Lbrlabs.PulumiPackage.Ovh
{
    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("ovh");

        private static readonly __Value<string?> _applicationKey = new __Value<string?>(() => __config.Get("applicationKey") ?? Utilities.GetEnv("OVH_APPLICATION_KEY"));
        /// <summary>
        /// The OVH API Application Key.
        /// </summary>
        public static string? ApplicationKey
        {
            get => _applicationKey.Get();
            set => _applicationKey.Set(value);
        }

        private static readonly __Value<string?> _applicationSecret = new __Value<string?>(() => __config.Get("applicationSecret") ?? Utilities.GetEnv("OVH_APPLICATION_SECRET"));
        /// <summary>
        /// The OVH API Application Secret.
        /// </summary>
        public static string? ApplicationSecret
        {
            get => _applicationSecret.Get();
            set => _applicationSecret.Set(value);
        }

        private static readonly __Value<string?> _consumerKey = new __Value<string?>(() => __config.Get("consumerKey") ?? Utilities.GetEnv("OVH_CONSUMER_KEY"));
        /// <summary>
        /// The OVH API Consumer key.
        /// </summary>
        public static string? ConsumerKey
        {
            get => _consumerKey.Get();
            set => _consumerKey.Set(value);
        }

        private static readonly __Value<string?> _endpoint = new __Value<string?>(() => __config.Get("endpoint") ?? Utilities.GetEnv("OVH_ENDPOINT"));
        /// <summary>
        /// The OVH API endpoint to target (ex: "ovh-eu").
        /// </summary>
        public static string? Endpoint
        {
            get => _endpoint.Get();
            set => _endpoint.Set(value);
        }

    }
}
