// <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.ServiceOneTestsVersion LatestServiceOneTestsVersion = global::Sample.TestClientOptions.ServiceOneTestsVersion.V2_0;
        private const global::Sample.TestClientOptions.ServiceTwoTestsVersion LatestServiceTwoTestsVersion = global::Sample.TestClientOptions.ServiceTwoTestsVersion.V4_0;

        public TestClientOptions(global::Sample.TestClientOptions.ServiceOneTestsVersion serviceOneTestsVersion = LatestServiceOneTestsVersion, global::Sample.TestClientOptions.ServiceTwoTestsVersion serviceTwoTestsVersion = LatestServiceTwoTestsVersion)
        {
            ServiceOneTestsApiVersion = serviceOneTestsVersion switch
            {
                global::Sample.TestClientOptions.ServiceOneTestsVersion.V1_0 => "1.0",
                global::Sample.TestClientOptions.ServiceOneTestsVersion.V2_0 => "2.0",
                _ => throw new global::System.NotSupportedException()
            };
            ServiceTwoTestsApiVersion = serviceTwoTestsVersion switch
            {
                global::Sample.TestClientOptions.ServiceTwoTestsVersion.V3_0 => "3.0",
                global::Sample.TestClientOptions.ServiceTwoTestsVersion.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)
        {
            ServiceOneTestsApiVersion = "2.0";
            ServiceTwoTestsApiVersion = "4.0";
            if (((section is null) || !section.Exists()))
            {
                return;
            }
            if ((section["ServiceOneTestsApiVersion"] is string serviceOneTestsApiVersion))
            {
                this.ServiceOneTestsApiVersion = serviceOneTestsApiVersion;
            }
            if ((section["ServiceTwoTestsApiVersion"] is string serviceTwoTestsApiVersion))
            {
                this.ServiceTwoTestsApiVersion = serviceTwoTestsApiVersion;
            }
        }

        internal string ServiceOneTestsApiVersion { get; }

        internal string ServiceTwoTestsApiVersion { get; }

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

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