// <auto-generated/>

#nullable disable

using System;
using System.ClientModel.Primitives;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Configuration;

namespace Sample
{
    public partial class TestClientOptions : global::System.ClientModel.Primitives.ClientPipelineOptions
    {
        private const global::Sample.TestClientOptions.ComputeServiceVersion LatestComputeVersion = global::Sample.TestClientOptions.ComputeServiceVersion.V2024_07_01;
        private const global::Sample.TestClientOptions.KeyVaultServiceVersion LatestKeyVaultVersion = global::Sample.TestClientOptions.KeyVaultServiceVersion.V7_5;
        private const global::Sample.TestClientOptions.StorageServiceVersion LatestStorageVersion = global::Sample.TestClientOptions.StorageServiceVersion.V2024_01_01;

        public TestClientOptions(global::Sample.TestClientOptions.KeyVaultServiceVersion keyVaultServiceVersion = LatestKeyVaultVersion, global::Sample.TestClientOptions.StorageServiceVersion storageServiceVersion = LatestStorageVersion, global::Sample.TestClientOptions.ComputeServiceVersion computeServiceVersion = LatestComputeVersion)
        {
            KeyVaultApiVersion = keyVaultServiceVersion switch
            {
                global::Sample.TestClientOptions.KeyVaultServiceVersion.V7_4 => "7.4",
                global::Sample.TestClientOptions.KeyVaultServiceVersion.V7_5 => "7.5",
                _ => throw new global::System.NotSupportedException()
            };
            StorageApiVersion = storageServiceVersion switch
            {
                global::Sample.TestClientOptions.StorageServiceVersion.V2023_01_01 => "2023-01-01",
                global::Sample.TestClientOptions.StorageServiceVersion.V2024_01_01 => "2024-01-01",
                _ => throw new global::System.NotSupportedException()
            };
            ComputeApiVersion = computeServiceVersion switch
            {
                global::Sample.TestClientOptions.ComputeServiceVersion.V2023_07_01 => "2023-07-01",
                global::Sample.TestClientOptions.ComputeServiceVersion.V2024_03_01 => "2024-03-01",
                global::Sample.TestClientOptions.ComputeServiceVersion.V2024_07_01 => "2024-07-01",
                _ => throw new global::System.NotSupportedException()
            };
        }

        [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0002")]
        internal TestClientOptions(global::Microsoft.Extensions.Configuration.IConfigurationSection section) : base(section)
        {
            ComputeApiVersion = "2024-07-01";
            KeyVaultApiVersion = "7.5";
            StorageApiVersion = "2024-01-01";
            if (((section is null) || !section.Exists()))
            {
                return;
            }
            if ((section["ComputeApiVersion"] is string computeApiVersion))
            {
                this.ComputeApiVersion = computeApiVersion;
            }
            if ((section["KeyVaultApiVersion"] is string keyVaultApiVersion))
            {
                this.KeyVaultApiVersion = keyVaultApiVersion;
            }
            if ((section["StorageApiVersion"] is string storageApiVersion))
            {
                this.StorageApiVersion = storageApiVersion;
            }
        }

        internal string ComputeApiVersion { get; }

        internal string KeyVaultApiVersion { get; }

        internal string StorageApiVersion { get; }

        public enum ComputeServiceVersion
        {
            V2023_07_01 = 1,
            V2024_03_01 = 2,
            V2024_07_01 = 3
        }

        public enum KeyVaultServiceVersion
        {
            V7_4 = 1,
            V7_5 = 2
        }

        public enum StorageServiceVersion
        {
            V2023_01_01 = 1,
            V2024_01_01 = 2
        }
    }
}
