// <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.ServiceAServiceVersion LatestServiceAVersion = global::Sample.TestClientOptions.ServiceAServiceVersion.V2_0;
        private const global::Sample.TestClientOptions.ServiceBServiceVersion LatestServiceBVersion = global::Sample.TestClientOptions.ServiceBServiceVersion.V4_0;

        public TestClientOptions(global::Sample.TestClientOptions.ServiceAServiceVersion serviceAServiceVersion = LatestServiceAVersion, global::Sample.TestClientOptions.ServiceBServiceVersion serviceBServiceVersion = LatestServiceBVersion)
        {
            ServiceAApiVersion = serviceAServiceVersion switch
            {
                global::Sample.TestClientOptions.ServiceAServiceVersion.V1_0 => "1.0",
                global::Sample.TestClientOptions.ServiceAServiceVersion.V2_0 => "2.0",
                _ => throw new global::System.NotSupportedException()
            };
            ServiceBApiVersion = serviceBServiceVersion switch
            {
                global::Sample.TestClientOptions.ServiceBServiceVersion.V3_0 => "3.0",
                global::Sample.TestClientOptions.ServiceBServiceVersion.V4_0 => "4.0",
                _ => throw new global::System.NotSupportedException()
            };
        }

        [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0002")]
        internal TestClientOptions(global::Microsoft.Extensions.Configuration.IConfigurationSection section) : base(section)
        {
            ServiceAApiVersion = "2.0";
            ServiceBApiVersion = "4.0";
            if (((section is null) || !section.Exists()))
            {
                return;
            }
            if ((section["ServiceAApiVersion"] is string serviceAApiVersion))
            {
                this.ServiceAApiVersion = serviceAApiVersion;
            }
            if ((section["ServiceBApiVersion"] is string serviceBApiVersion))
            {
                this.ServiceBApiVersion = serviceBApiVersion;
            }
        }

        internal string ServiceAApiVersion { get; }

        internal string ServiceBApiVersion { get; }

        public enum ServiceAServiceVersion
        {
            V1_0 = 1,
            V2_0 = 2
        }

        public enum ServiceBServiceVersion
        {
            V3_0 = 1,
            V4_0 = 2
        }
    }
}
