public ResponseWithHeaders <ContainerRegistryBlobGetUploadStatusHeaders> GetUploadStatus(string location, CancellationToken cancellationToken = default)
        {
            if (location == null)
            {
                throw new ArgumentNullException(nameof(location));
            }

            using var message = CreateGetUploadStatusRequest(location);
            _pipeline.Send(message, cancellationToken);
            var headers = new ContainerRegistryBlobGetUploadStatusHeaders(message.Response);

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

            default:
                throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }
        public async Task <ResponseWithHeaders <ContainerRegistryBlobGetUploadStatusHeaders> > GetUploadStatusAsync(string nextLink, CancellationToken cancellationToken = default)
        {
            if (nextLink == null)
            {
                throw new ArgumentNullException(nameof(nextLink));
            }

            using var message = CreateGetUploadStatusRequest(nextLink);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            var headers = new ContainerRegistryBlobGetUploadStatusHeaders(message.Response);

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

            default:
                throw await ClientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
            }
        }