// <auto-generated/>

#nullable disable

using System.ClientModel;
using System.ClientModel.Primitives;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Sample.Models;

namespace Sample
{
    public partial class MultipartClient
    {
        public virtual global::System.ClientModel.ClientResult Upload(string contentType, global::System.ClientModel.BinaryContent content, global::System.ClientModel.Primitives.RequestOptions options = null)
        {
            using global::System.ClientModel.Primitives.PipelineMessage message = this.CreateUploadRequest(contentType, content, options);
            return global::System.ClientModel.ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
        }

        public virtual async global::System.Threading.Tasks.Task<global::System.ClientModel.ClientResult> UploadAsync(global::System.ClientModel.BinaryContent content, string contentType, global::System.ClientModel.Primitives.RequestOptions options = null)
        {
            using global::System.ClientModel.Primitives.PipelineMessage message = this.CreateUploadRequest(content, contentType, options);
            return global::System.ClientModel.ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
        }

        [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0004")]
        public virtual global::System.ClientModel.ClientResult Upload(global::Sample.Models.MultiPartRequest body = default, global::System.Threading.CancellationToken cancellationToken = default)
        {
            using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent();
            return this.Upload(content, content?.MediaType, cancellationToken.ToRequestOptions());
        }

        [global::System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SCME0004")]
        public virtual async global::System.Threading.Tasks.Task<global::System.ClientModel.ClientResult> UploadAsync(global::Sample.Models.MultiPartRequest body = default, global::System.Threading.CancellationToken cancellationToken = default)
        {
            using global::System.ClientModel.MultiPartFormContent content = body?.ToMultipartFormContent();
            return await this.UploadAsync(content, content?.MediaType, cancellationToken.ToRequestOptions()).ConfigureAwait(false);
        }
    }
}
