// <auto-generated/>

#nullable disable

using System;
using System.ClientModel.Primitives;

namespace Sample
{
    public partial class TestClient
    {
        internal global::System.ClientModel.Primitives.PipelineMessage CreateGetCatsRequest(string p1, string p2, string h1, int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options)
        {
            global::Sample.ClientUriBuilder uri = new global::Sample.ClientUriBuilder();
            uri.Reset(_endpoint);
            uri.AppendQuery("p1", p1, true);
            uri.AppendQuery("p2", p2, true);
            if ((maxPageSize != null))
            {
                uri.AppendQuery("maxpagesize", global::Sample.TypeFormatters.ConvertToString(maxPageSize), true);
            }
            global::System.ClientModel.Primitives.PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
            global::System.ClientModel.Primitives.PipelineRequest request = message.Request;
            request.Headers.Set("h1", h1);
            request.Headers.Set("Accept", "application/json");
            message.Apply(options);
            return message;
        }

        internal global::System.ClientModel.Primitives.PipelineMessage CreateNextGetCatsRequest(global::System.Uri nextPage, string p1, int? maxPageSize, global::System.ClientModel.Primitives.RequestOptions options)
        {
            global::Sample.ClientUriBuilder uri = new global::Sample.ClientUriBuilder();
            if (nextPage.IsAbsoluteUri)
            {
                uri.Reset(nextPage);
            }
            else
            {
                uri.Reset(new global::System.Uri(_endpoint, nextPage));
            }
            uri.AppendQuery("p1", p1, true);
            if ((maxPageSize != null))
            {
                uri.UpdateQuery("maxpagesize", global::Sample.TypeFormatters.ConvertToString(maxPageSize));
            }
            global::System.ClientModel.Primitives.PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200);
            global::System.ClientModel.Primitives.PipelineRequest request = message.Request;
            request.Headers.Set("Accept", "application/json");
            message.Apply(options);
            return message;
        }
    }
}
