// <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.ServiceComputeVersion LatestServiceComputeVersion = global::Sample.TestClientOptions.ServiceComputeVersion.V2024_07_01;
        private const global::Sample.TestClientOptions.ServiceKeyVaultVersion LatestServiceKeyVaultVersion = global::Sample.TestClientOptions.ServiceKeyVaultVersion.V7_5;
        private const global::Sample.TestClientOptions.ServiceStorageVersion LatestServiceStorageVersion = global::Sample.TestClientOptions.ServiceStorageVersion.V2024_01_01;

        public TestClientOptions(global::Sample.TestClientOptions.ServiceKeyVaultVersion serviceKeyVaultVersion = LatestServiceKeyVaultVersion, global::Sample.TestClientOptions.ServiceStorageVersion serviceStorageVersion = LatestServiceStorageVersion, global::Sample.TestClientOptions.ServiceComputeVersion serviceComputeVersion = LatestServiceComputeVersion)
        {
            ServiceKeyVaultApiVersion = serviceKeyVaultVersion switch
            {
                global::Sample.TestClientOptions.ServiceKeyVaultVersion.V7_4 => "7.4",
                global::Sample.TestClientOptions.ServiceKeyVaultVersion.V7_5 => "7.5",
                _ => throw new global::System.NotSupportedException()
            };
            ServiceStorageApiVersion = serviceStorageVersion switch
            {
                global::Sample.TestClientOptions.ServiceStorageVersion.V2023_01_01 => "2023-01-01",
                global::Sample.TestClientOptions.ServiceStorageVersion.V2024_01_01 => "2024-01-01",
                _ => throw new global::System.NotSupportedException()
            };
            ServiceComputeApiVersion = serviceComputeVersion switch
            {
                global::Sample.TestClientOptions.ServiceComputeVersion.V2023_07_01 => "2023-07-01",
                global::Sample.TestClientOptions.ServiceComputeVersion.V2024_03_01 => "2024-03-01",
                global::Sample.TestClientOptions.ServiceComputeVersion.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)
        {
            ServiceComputeApiVersion = "2024-07-01";
            ServiceKeyVaultApiVersion = "7.5";
            ServiceStorageApiVersion = "2024-01-01";
            if (((section is null) || !section.Exists()))
            {
                return;
            }
            if ((section["ServiceComputeApiVersion"] is string serviceComputeApiVersion))
            {
                this.ServiceComputeApiVersion = serviceComputeApiVersion;
            }
            if ((section["ServiceKeyVaultApiVersion"] is string serviceKeyVaultApiVersion))
            {
                this.ServiceKeyVaultApiVersion = serviceKeyVaultApiVersion;
            }
            if ((section["ServiceStorageApiVersion"] is string serviceStorageApiVersion))
            {
                this.ServiceStorageApiVersion = serviceStorageApiVersion;
            }
        }

        internal string ServiceComputeApiVersion { get; }

        internal string ServiceKeyVaultApiVersion { get; }

        internal string ServiceStorageApiVersion { get; }

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

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

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