// <auto-generated/>

#nullable disable

using System;
using System.ClientModel.Primitives;
using System.Diagnostics.CodeAnalysis;

namespace Sample
{
    public partial class TestClient
    {
        private readonly global::System.Uri _endpoint;

        protected TestClient()
        {
        }

        public TestClient(string endpoint = default) : this(endpoint, new global::Sample.TestClientOptions())
        {
        }

        internal TestClient(global::System.ClientModel.Primitives.AuthenticationPolicy authenticationPolicy, string endpoint = default, global::Sample.TestClientOptions options)
        {
            options ??= new global::Sample.TestClientOptions();

            _endpoint = new global::System.Uri($"https://{endpoint}");
            if ((authenticationPolicy != null))
            {
                Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly), authenticationPolicy }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>());
            }
            else
            {
                Pipeline = global::System.ClientModel.Primitives.ClientPipeline.Create(options, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>(), new global::System.ClientModel.Primitives.PipelinePolicy[] { new global::System.ClientModel.Primitives.UserAgentPolicy(typeof(global::Sample.TestClient).Assembly) }, Array.Empty<global::System.ClientModel.Primitives.PipelinePolicy>());
            }
        }

        public TestClient(string endpoint = default, global::Sample.TestClientOptions options) : this(null, endpoint, options)
        {
        }

        [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0002")]
        public TestClient(global::Sample.TestClientSettings settings) : this(global::System.ClientModel.Primitives.AuthenticationPolicy.Create(settings), settings?.Endpoint, settings?.Options)
        {
        }

        public global::System.ClientModel.Primitives.ClientPipeline Pipeline { get; }
    }
}
