public async Task <ResponseWithHeaders <ContainerRegistryBlobUploadChunkHeaders> > UploadChunkAsync(string location, Stream value, CancellationToken cancellationToken = default)
        {
            if (location == null)
            {
                throw new ArgumentNullException(nameof(location));
            }
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            using var message = CreateUploadChunkRequest(location, value);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            var headers = new ContainerRegistryBlobUploadChunkHeaders(message.Response);

            switch (message.Response.Status)
            {
            case 202:
                return(ResponseWithHeaders.FromValue(headers, message.Response));

            default:
                throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }
        public ResponseWithHeaders <ContainerRegistryBlobUploadChunkHeaders> UploadChunk(string nextLink, Stream value, CancellationToken cancellationToken = default)
        {
            if (nextLink == null)
            {
                throw new ArgumentNullException(nameof(nextLink));
            }
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            using var message = CreateUploadChunkRequest(nextLink, value);
            _pipeline.Send(message, cancellationToken);
            var headers = new ContainerRegistryBlobUploadChunkHeaders(message.Response);

            switch (message.Response.Status)
            {
            case 202:
                return(ResponseWithHeaders.FromValue(headers, message.Response));

            default:
                throw ClientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }