< Summary

Class:Azure.Storage.Blobs.BlobRestClient
Assembly:Azure.Storage.Blobs
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Generated\BlobRestClient.cs
Covered lines:3670
Uncovered lines:1295
Coverable lines:4965
Total lines:22932
Line coverage:73.9% (3670 of 4965)
Covered branches:1960
Total branches:2935
Branch coverage:66.7% (1960 of 2935)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
SetPropertiesAsync()-100%100%
SetPropertiesAsync_CreateMessage(...)-76.19%50%
SetPropertiesAsync_CreateResponse(...)-100%100%
GetPropertiesAsync()-100%100%
GetPropertiesAsync_CreateMessage(...)-71.43%50%
GetPropertiesAsync_CreateResponse(...)-87.5%75%
GetStatisticsAsync()-85%100%
GetStatisticsAsync_CreateMessage(...)-71.43%50%
GetStatisticsAsync_CreateResponse(...)-50%25%
ListBlobContainersSegmentAsync()-100%100%
ListBlobContainersSegmentAsync_CreateMessage(...)-76.47%75%
ListBlobContainersSegmentAsync_CreateResponse(...)-87.5%75%
GetUserDelegationKeyAsync()-100%100%
GetUserDelegationKeyAsync_CreateMessage(...)-76.19%50%
GetUserDelegationKeyAsync_CreateResponse(...)-100%100%
GetAccountInfoAsync()-100%100%
GetAccountInfoAsync_CreateMessage(...)-83.33%50%
GetAccountInfoAsync_CreateResponse(...)-90.91%87.5%
SubmitBatchAsync()-0%0%
SubmitBatchAsync_CreateMessage(...)-0%0%
SubmitBatchAsync_CreateResponse(...)-0%0%
FilterBlobsAsync()-100%100%
FilterBlobsAsync_CreateMessage(...)-62.5%57.14%
FilterBlobsAsync_CreateResponse(...)-87.5%75%
CreateAsync()-100%100%
CreateAsync_CreateMessage(...)-70%66.67%
CreateAsync_CreateResponse(...)-100%100%
GetPropertiesAsync()-100%100%
GetPropertiesAsync_CreateMessage(...)-64.29%50%
GetPropertiesAsync_CreateResponse(...)-93.55%92.86%
DeleteAsync()-100%100%
DeleteAsync_CreateMessage(...)-75%71.43%
DeleteAsync_CreateResponse(...)-100%100%
SetMetadataAsync()-100%100%
SetMetadataAsync_CreateMessage(...)-78.95%75%
SetMetadataAsync_CreateResponse(...)-100%100%
GetAccessPolicyAsync()-100%100%
GetAccessPolicyAsync_CreateMessage(...)-73.33%60%
GetAccessPolicyAsync_CreateResponse(...)-94.74%90%
SetAccessPolicyAsync()-100%100%
SetAccessPolicyAsync_CreateMessage(...)-84.62%80%
SetAccessPolicyAsync_CreateResponse(...)-100%100%
RestoreAsync()-0%0%
RestoreAsync_CreateMessage(...)-0%0%
RestoreAsync_CreateResponse(...)-0%0%
AcquireLeaseAsync()-100%100%
AcquireLeaseAsync_CreateMessage(...)-78.95%75%
AcquireLeaseAsync_CreateResponse(...)-100%100%
ReleaseLeaseAsync()-100%100%
ReleaseLeaseAsync_CreateMessage(...)-75%64.29%
ReleaseLeaseAsync_CreateResponse(...)-100%100%
RenewLeaseAsync()-100%100%
RenewLeaseAsync_CreateMessage(...)-75%64.29%
RenewLeaseAsync_CreateResponse(...)-100%100%
BreakLeaseAsync()-100%100%
BreakLeaseAsync_CreateMessage(...)-77.78%71.43%
BreakLeaseAsync_CreateResponse(...)-100%100%
ChangeLeaseAsync()-100%100%
ChangeLeaseAsync_CreateMessage(...)-73.91%62.5%
ChangeLeaseAsync_CreateResponse(...)-100%100%
ListBlobsFlatSegmentAsync()-100%100%
ListBlobsFlatSegmentAsync_CreateMessage(...)-72.22%68.75%
ListBlobsFlatSegmentAsync_CreateResponse(...)-87.5%75%
ListBlobsHierarchySegmentAsync()-100%100%
ListBlobsHierarchySegmentAsync_CreateMessage(...)-73.68%72.22%
ListBlobsHierarchySegmentAsync_CreateResponse(...)-87.5%75%
DownloadAsync()-100%100%
DownloadAsync_CreateMessage(...)-75%80.56%
DownloadAsync_CreateResponse(...)-83.44%82.88%
GetPropertiesAsync()-100%100%
GetPropertiesAsync_CreateMessage(...)-73.91%80%
GetPropertiesAsync_CreateResponse(...)-98.94%98.91%
DeleteAsync()-100%100%
DeleteAsync_CreateMessage(...)-71.43%76.92%
DeleteAsync_CreateResponse(...)-100%100%
SetAccessControlAsync()-0%0%
SetAccessControlAsync_CreateMessage(...)-0%0%
SetAccessControlAsync_CreateResponse(...)-0%0%
GetAccessControlAsync()-0%0%
GetAccessControlAsync_CreateMessage(...)-0%0%
GetAccessControlAsync_CreateResponse(...)-0%0%
RenameAsync()-0%0%
RenameAsync_CreateMessage(...)-0%0%
RenameAsync_CreateResponse(...)-0%0%
UndeleteAsync()-100%100%
UndeleteAsync_CreateMessage(...)-69.23%50%
UndeleteAsync_CreateResponse(...)-100%100%
SetExpiryAsync()-0%0%
SetExpiryAsync_CreateMessage(...)-0%0%
SetExpiryAsync_CreateResponse(...)-0%0%
SetHttpHeadersAsync()-100%100%
SetHttpHeadersAsync_CreateMessage(...)-84%87.5%
SetHttpHeadersAsync_CreateResponse(...)-91.67%87.5%
SetMetadataAsync()-100%100%
SetMetadataAsync_CreateMessage(...)-84.62%87.5%
SetMetadataAsync_CreateResponse(...)-100%100%
AcquireLeaseAsync()-100%100%
AcquireLeaseAsync_CreateMessage(...)-80.95%81.82%
AcquireLeaseAsync_CreateResponse(...)-100%100%
ReleaseLeaseAsync()-100%100%
ReleaseLeaseAsync_CreateMessage(...)-77.27%75%
ReleaseLeaseAsync_CreateResponse(...)-100%100%
RenewLeaseAsync()-100%100%
RenewLeaseAsync_CreateMessage(...)-77.27%75%
RenewLeaseAsync_CreateResponse(...)-100%100%
ChangeLeaseAsync()-100%100%
ChangeLeaseAsync_CreateMessage(...)-76%72.73%
ChangeLeaseAsync_CreateResponse(...)-100%100%
BreakLeaseAsync()-100%100%
BreakLeaseAsync_CreateMessage(...)-80%80%
BreakLeaseAsync_CreateResponse(...)-100%100%
CreateSnapshotAsync()-100%100%
CreateSnapshotAsync_CreateMessage(...)-76.92%78.13%
CreateSnapshotAsync_CreateResponse(...)-100%100%
StartCopyFromUriAsync()-100%100%
StartCopyFromUriAsync_CreateMessage(...)-85.29%88.64%
StartCopyFromUriAsync_CreateResponse(...)-100%100%
CopyFromUriAsync()-100%100%
CopyFromUriAsync_CreateMessage(...)-81.25%85%
CopyFromUriAsync_CreateResponse(...)-100%100%
AbortCopyFromUriAsync()-100%100%
AbortCopyFromUriAsync_CreateMessage(...)-72.22%58.33%
AbortCopyFromUriAsync_CreateResponse(...)-100%100%
SetAccessTierAsync()-100%100%
SetAccessTierAsync_CreateMessage(...)-68.42%66.67%
SetAccessTierAsync_CreateResponse(...)-100%100%
QueryAsync()-100%100%
QueryAsync_CreateMessage(...)-72.41%73.33%
QueryAsync_CreateResponse(...)-35.66%34.68%
GetTagsAsync()-100%100%
GetTagsAsync_CreateMessage(...)-62.5%57.14%
GetTagsAsync_CreateResponse(...)-87.5%75%
SetTagsAsync()-100%100%
SetTagsAsync_CreateMessage(...)-69.57%61.11%
SetTagsAsync_CreateResponse(...)-100%100%
CreateAsync()-100%100%
CreateAsync_CreateMessage(...)-86.49%90%
CreateAsync_CreateResponse(...)-90%87.5%
UploadPagesAsync()-100%100%
UploadPagesAsync_CreateMessage(...)-82.35%85.71%
UploadPagesAsync_CreateResponse(...)-100%100%
ClearPagesAsync()-100%100%
ClearPagesAsync_CreateMessage(...)-75.86%80.56%
ClearPagesAsync_CreateResponse(...)-83.33%78.57%
UploadPagesFromUriAsync()-100%100%
UploadPagesFromUriAsync_CreateMessage(...)-81.4%84.62%
UploadPagesFromUriAsync_CreateResponse(...)-95.83%95%
GetPageRangesAsync()-100%100%
GetPageRangesAsync_CreateMessage(...)-76.19%79.17%
GetPageRangesAsync_CreateResponse(...)-100%100%
GetPageRangesDiffAsync()-100%100%
GetPageRangesDiffAsync_CreateMessage(...)-82.61%85.71%
GetPageRangesDiffAsync_CreateResponse(...)-100%100%
ResizeAsync()-100%100%
ResizeAsync_CreateMessage(...)-83.33%85.71%
ResizeAsync_CreateResponse(...)-100%100%
UpdateSequenceNumberAsync()-100%100%
UpdateSequenceNumberAsync_CreateMessage(...)-80.95%81.82%
UpdateSequenceNumberAsync_CreateResponse(...)-100%100%
CopyIncrementalAsync()-100%100%
CopyIncrementalAsync_CreateMessage(...)-76.19%75%
CopyIncrementalAsync_CreateResponse(...)-100%100%
CreateAsync()-100%100%
CreateAsync_CreateMessage(...)-70.59%78.26%
CreateAsync_CreateResponse(...)-90%87.5%
AppendBlockAsync()-100%100%
AppendBlockAsync_CreateMessage(...)-83.87%86.84%
AppendBlockAsync_CreateResponse(...)-100%100%
AppendBlockFromUriAsync()-100%100%
AppendBlockFromUriAsync_CreateMessage(...)-81.08%86%
AppendBlockFromUriAsync_CreateResponse(...)-100%100%
SealAsync()-100%100%
SealAsync_CreateMessage(...)-78.95%80%
SealAsync_CreateResponse(...)-100%100%
UploadAsync()-100%100%
UploadAsync_CreateMessage(...)-82.05%86.54%
UploadAsync_CreateResponse(...)-95%93.75%
StageBlockAsync()-100%100%
StageBlockAsync_CreateMessage(...)-70.37%69.23%
StageBlockAsync_CreateResponse(...)-92.86%90%
StageBlockFromUriAsync()-100%100%
StageBlockFromUriAsync_CreateMessage(...)-78.13%80.56%
StageBlockFromUriAsync_CreateResponse(...)-100%100%
CommitBlockListAsync()-100%100%
CommitBlockListAsync_CreateMessage(...)-83.72%87.04%
CommitBlockListAsync_CreateResponse(...)-90%87.5%
GetBlockListAsync()-100%100%
GetBlockListAsync_CreateMessage(...)-76.47%71.43%
GetBlockListAsync_CreateResponse(...)-94.12%91.67%
CreateAsync()-0%0%
CreateAsync_CreateMessage(...)-0%0%
CreateAsync_CreateResponse(...)-0%0%
RenameAsync()-0%0%
RenameAsync_CreateMessage(...)-0%0%
RenameAsync_CreateResponse(...)-0%0%
DeleteAsync()-0%0%
DeleteAsync_CreateMessage(...)-0%0%
DeleteAsync_CreateResponse(...)-0%0%
SetAccessControlAsync()-0%0%
SetAccessControlAsync_CreateMessage(...)-0%0%
SetAccessControlAsync_CreateResponse(...)-0%0%
GetAccessControlAsync()-0%0%
GetAccessControlAsync_CreateMessage(...)-0%0%
GetAccessControlAsync_CreateResponse(...)-0%0%
ToString(...)-0%0%
ParseArchiveStatus(...)-66.67%25%
ToString(...)-0%0%
ParseBlobGeoReplicationStatus(...)-57.14%16.67%
ToString(...)-0%0%
ParseBlobType(...)-85.71%83.33%
ToString(...)-85.71%75%
ParseBlockListType(...)-0%0%
ToString(...)-0%0%
ParseCopyStatus(...)-62.5%37.5%
ToString(...)-57.14%25%
ParseDeleteSnapshotsOption(...)-0%0%
ToString(...)-80%50%
ParseEncryptionAlgorithmType(...)-0%0%
ToString(...)-0%0%
ParseLeaseDurationType(...)-66.67%25%
ToString(...)-0%0%
ParseLeaseState(...)-77.78%80%
ToString(...)-0%0%
ParseLeaseStatus(...)-83.33%75%
ToString(...)-90.91%87.5%
ParseListBlobsIncludeItem(...)-0%0%
ToString(...)-66.67%25%
ParseListContainersIncludeType(...)-0%0%
ToString(...)-0%0%
ParsePathRenameMode(...)-0%0%
ToString(...)-71.43%50%
ParsePublicAccessType(...)-71.43%66.67%
ToString(...)-0%0%
ParseQueryFormatType(...)-0%0%
ToString(...)-57.14%25%
ParseSequenceNumberAction(...)-0%0%
ToString(...)-0%0%
ParseSkuName(...)-55.56%30%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Blobs\src\Generated\BlobRestClient.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// This file was automatically generated.  Do not edit.
 5
 6#pragma warning disable IDE0016 // Null check can be simplified
 7#pragma warning disable IDE0017 // Variable declaration can be inlined
 8#pragma warning disable IDE0018 // Object initialization can be simplified
 9#pragma warning disable SA1402  // File may only contain a single type
 10
 11#region Service
 12namespace Azure.Storage.Blobs
 13{
 14    /// <summary>
 15    /// Azure Blob Storage
 16    /// </summary>
 17    internal static partial class BlobRestClient
 18    {
 19        #region Service operations
 20        /// <summary>
 21        /// Service operations for Azure Blob Storage
 22        /// </summary>
 23        public static partial class Service
 24        {
 25            #region Service.SetPropertiesAsync
 26            /// <summary>
 27            /// Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytic
 28            /// </summary>
 29            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 30            /// <param name="pipeline">The pipeline used for sending requests.</param>
 31            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 32            /// <param name="blobServiceProperties">The StorageService properties.</param>
 33            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 34            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 35            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 36            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 37            /// <param name="operationName">Operation name.</param>
 38            /// <param name="cancellationToken">Cancellation token.</param>
 39            /// <returns>Azure.Response</returns>
 40            public static async System.Threading.Tasks.ValueTask<Azure.Response> SetPropertiesAsync(
 41                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 42                Azure.Core.Pipeline.HttpPipeline pipeline,
 43                System.Uri resourceUri,
 44                Azure.Storage.Blobs.Models.BlobServiceProperties blobServiceProperties,
 45                string version,
 46                int? timeout = default,
 47                string requestId = default,
 48                bool async = true,
 49                string operationName = "ServiceClient.SetProperties",
 50                System.Threading.CancellationToken cancellationToken = default)
 51            {
 2852                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 53                try
 54                {
 2855                    _scope.AddAttribute("url", resourceUri);
 2856                    _scope.Start();
 2857                    using (Azure.Core.HttpMessage _message = SetPropertiesAsync_CreateMessage(
 2858                        pipeline,
 2859                        resourceUri,
 2860                        blobServiceProperties,
 2861                        version,
 2862                        timeout,
 2863                        requestId))
 64                    {
 2865                        if (async)
 66                        {
 67                            // Send the request asynchronously if we're being called via an async path
 1468                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 69                        }
 70                        else
 71                        {
 72                            // Send the request synchronously through the API that blocks if we're being called via a sy
 73                            // (this is safe because the Task will complete before the user can call Wait)
 1474                            pipeline.Send(_message, cancellationToken);
 75                        }
 2876                        Azure.Response _response = _message.Response;
 2877                        cancellationToken.ThrowIfCancellationRequested();
 2878                        return SetPropertiesAsync_CreateResponse(clientDiagnostics, _response);
 79                    }
 80                }
 481                catch (System.Exception ex)
 82                {
 483                    _scope.Failed(ex);
 484                    throw;
 85                }
 86                finally
 87                {
 2888                    _scope.Dispose();
 89                }
 2490            }
 91
 92            /// <summary>
 93            /// Create the Service.SetPropertiesAsync request.
 94            /// </summary>
 95            /// <param name="pipeline">The pipeline used for sending requests.</param>
 96            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 97            /// <param name="blobServiceProperties">The StorageService properties.</param>
 98            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 99            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 100            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 101            /// <returns>The Service.SetPropertiesAsync Message.</returns>
 102            internal static Azure.Core.HttpMessage SetPropertiesAsync_CreateMessage(
 103                Azure.Core.Pipeline.HttpPipeline pipeline,
 104                System.Uri resourceUri,
 105                Azure.Storage.Blobs.Models.BlobServiceProperties blobServiceProperties,
 106                string version,
 107                int? timeout = default,
 108                string requestId = default)
 109            {
 110                // Validation
 28111                if (resourceUri == null)
 112                {
 0113                    throw new System.ArgumentNullException(nameof(resourceUri));
 114                }
 28115                if (blobServiceProperties == null)
 116                {
 0117                    throw new System.ArgumentNullException(nameof(blobServiceProperties));
 118                }
 28119                if (version == null)
 120                {
 0121                    throw new System.ArgumentNullException(nameof(version));
 122                }
 123
 124                // Create the request
 28125                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 28126                Azure.Core.Request _request = _message.Request;
 127
 128                // Set the endpoint
 28129                _request.Method = Azure.Core.RequestMethod.Put;
 28130                _request.Uri.Reset(resourceUri);
 28131                _request.Uri.AppendQuery("restype", "service", escapeValue: false);
 28132                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 0133                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 134
 135                // Add request headers
 28136                _request.Headers.SetValue("x-ms-version", version);
 0137                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 138
 139                // Create the body
 28140                System.Xml.Linq.XElement _body = Azure.Storage.Blobs.Models.BlobServiceProperties.ToXml(blobServicePrope
 28141                string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 28142                _request.Headers.SetValue("Content-Type", "application/xml");
 28143                _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.Invar
 28144                _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 145
 28146                return _message;
 147            }
 148
 149            /// <summary>
 150            /// Create the Service.SetPropertiesAsync response or throw a failure exception.
 151            /// </summary>
 152            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 153            /// <param name="response">The raw Response.</param>
 154            /// <returns>The Service.SetPropertiesAsync Azure.Response.</returns>
 155            internal static Azure.Response SetPropertiesAsync_CreateResponse(
 156                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 157                Azure.Response response)
 158            {
 159                // Process the response
 28160                switch (response.Status)
 161                {
 162                    case 202:
 163                    {
 24164                        return response;
 165                    }
 166                    default:
 167                    {
 168                        // Create the result
 4169                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4170                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 171
 4172                        throw _value.CreateException(clientDiagnostics, response);
 173                    }
 174                }
 175            }
 176            #endregion Service.SetPropertiesAsync
 177
 178            #region Service.GetPropertiesAsync
 179            /// <summary>
 180            /// gets the properties of a storage account's Blob service, including properties for Storage Analytics and 
 181            /// </summary>
 182            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 183            /// <param name="pipeline">The pipeline used for sending requests.</param>
 184            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 185            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 186            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 187            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 188            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 189            /// <param name="operationName">Operation name.</param>
 190            /// <param name="cancellationToken">Cancellation token.</param>
 191            /// <returns>Storage Service Properties.</returns>
 192            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobServicePr
 193                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 194                Azure.Core.Pipeline.HttpPipeline pipeline,
 195                System.Uri resourceUri,
 196                string version,
 197                int? timeout = default,
 198                string requestId = default,
 199                bool async = true,
 200                string operationName = "ServiceClient.GetProperties",
 201                System.Threading.CancellationToken cancellationToken = default)
 202            {
 48203                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 204                try
 205                {
 48206                    _scope.AddAttribute("url", resourceUri);
 48207                    _scope.Start();
 48208                    using (Azure.Core.HttpMessage _message = GetPropertiesAsync_CreateMessage(
 48209                        pipeline,
 48210                        resourceUri,
 48211                        version,
 48212                        timeout,
 48213                        requestId))
 214                    {
 48215                        if (async)
 216                        {
 217                            // Send the request asynchronously if we're being called via an async path
 24218                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 219                        }
 220                        else
 221                        {
 222                            // Send the request synchronously through the API that blocks if we're being called via a sy
 223                            // (this is safe because the Task will complete before the user can call Wait)
 24224                            pipeline.Send(_message, cancellationToken);
 225                        }
 48226                        Azure.Response _response = _message.Response;
 48227                        cancellationToken.ThrowIfCancellationRequested();
 48228                        return GetPropertiesAsync_CreateResponse(clientDiagnostics, _response);
 229                    }
 230                }
 4231                catch (System.Exception ex)
 232                {
 4233                    _scope.Failed(ex);
 4234                    throw;
 235                }
 236                finally
 237                {
 48238                    _scope.Dispose();
 239                }
 44240            }
 241
 242            /// <summary>
 243            /// Create the Service.GetPropertiesAsync request.
 244            /// </summary>
 245            /// <param name="pipeline">The pipeline used for sending requests.</param>
 246            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 247            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 248            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 249            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 250            /// <returns>The Service.GetPropertiesAsync Message.</returns>
 251            internal static Azure.Core.HttpMessage GetPropertiesAsync_CreateMessage(
 252                Azure.Core.Pipeline.HttpPipeline pipeline,
 253                System.Uri resourceUri,
 254                string version,
 255                int? timeout = default,
 256                string requestId = default)
 257            {
 258                // Validation
 48259                if (resourceUri == null)
 260                {
 0261                    throw new System.ArgumentNullException(nameof(resourceUri));
 262                }
 48263                if (version == null)
 264                {
 0265                    throw new System.ArgumentNullException(nameof(version));
 266                }
 267
 268                // Create the request
 48269                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 48270                Azure.Core.Request _request = _message.Request;
 271
 272                // Set the endpoint
 48273                _request.Method = Azure.Core.RequestMethod.Get;
 48274                _request.Uri.Reset(resourceUri);
 48275                _request.Uri.AppendQuery("restype", "service", escapeValue: false);
 48276                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 0277                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 278
 279                // Add request headers
 48280                _request.Headers.SetValue("x-ms-version", version);
 0281                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 282
 48283                return _message;
 284            }
 285
 286            /// <summary>
 287            /// Create the Service.GetPropertiesAsync response or throw a failure exception.
 288            /// </summary>
 289            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 290            /// <param name="response">The raw Response.</param>
 291            /// <returns>The Service.GetPropertiesAsync Azure.Response{Azure.Storage.Blobs.Models.BlobServiceProperties}
 292            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobServiceProperties> GetPropertiesAsync_CreateRe
 293                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 294                Azure.Response response)
 295            {
 296                // Process the response
 48297                switch (response.Status)
 298                {
 299                    case 200:
 300                    {
 301                        // Create the result
 44302                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 44303                        Azure.Storage.Blobs.Models.BlobServiceProperties _value = Azure.Storage.Blobs.Models.BlobService
 304
 305                        // Create the response
 44306                        return Response.FromValue(_value, response);
 307                    }
 308                    case 304:
 309                    {
 0310                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobServiceProperties>(response);
 311                    }
 312                    default:
 313                    {
 314                        // Create the result
 4315                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4316                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 317
 4318                        throw _value.CreateException(clientDiagnostics, response);
 319                    }
 320                }
 321            }
 322            #endregion Service.GetPropertiesAsync
 323
 324            #region Service.GetStatisticsAsync
 325            /// <summary>
 326            /// Retrieves statistics related to replication for the Blob service. It is only available on the secondary 
 327            /// </summary>
 328            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 329            /// <param name="pipeline">The pipeline used for sending requests.</param>
 330            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 331            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 332            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 333            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 334            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 335            /// <param name="operationName">Operation name.</param>
 336            /// <param name="cancellationToken">Cancellation token.</param>
 337            /// <returns>Statistics for the storage service.</returns>
 338            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobServiceSt
 339                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 340                Azure.Core.Pipeline.HttpPipeline pipeline,
 341                System.Uri resourceUri,
 342                string version,
 343                int? timeout = default,
 344                string requestId = default,
 345                bool async = true,
 346                string operationName = "ServiceClient.GetStatistics",
 347                System.Threading.CancellationToken cancellationToken = default)
 348            {
 4349                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 350                try
 351                {
 4352                    _scope.AddAttribute("url", resourceUri);
 4353                    _scope.Start();
 4354                    using (Azure.Core.HttpMessage _message = GetStatisticsAsync_CreateMessage(
 4355                        pipeline,
 4356                        resourceUri,
 4357                        version,
 4358                        timeout,
 4359                        requestId))
 360                    {
 4361                        if (async)
 362                        {
 363                            // Send the request asynchronously if we're being called via an async path
 2364                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 365                        }
 366                        else
 367                        {
 368                            // Send the request synchronously through the API that blocks if we're being called via a sy
 369                            // (this is safe because the Task will complete before the user can call Wait)
 2370                            pipeline.Send(_message, cancellationToken);
 371                        }
 4372                        Azure.Response _response = _message.Response;
 4373                        cancellationToken.ThrowIfCancellationRequested();
 4374                        return GetStatisticsAsync_CreateResponse(clientDiagnostics, _response);
 375                    }
 376                }
 0377                catch (System.Exception ex)
 378                {
 0379                    _scope.Failed(ex);
 0380                    throw;
 381                }
 382                finally
 383                {
 4384                    _scope.Dispose();
 385                }
 4386            }
 387
 388            /// <summary>
 389            /// Create the Service.GetStatisticsAsync request.
 390            /// </summary>
 391            /// <param name="pipeline">The pipeline used for sending requests.</param>
 392            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 393            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 394            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 395            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 396            /// <returns>The Service.GetStatisticsAsync Message.</returns>
 397            internal static Azure.Core.HttpMessage GetStatisticsAsync_CreateMessage(
 398                Azure.Core.Pipeline.HttpPipeline pipeline,
 399                System.Uri resourceUri,
 400                string version,
 401                int? timeout = default,
 402                string requestId = default)
 403            {
 404                // Validation
 4405                if (resourceUri == null)
 406                {
 0407                    throw new System.ArgumentNullException(nameof(resourceUri));
 408                }
 4409                if (version == null)
 410                {
 0411                    throw new System.ArgumentNullException(nameof(version));
 412                }
 413
 414                // Create the request
 4415                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 4416                Azure.Core.Request _request = _message.Request;
 417
 418                // Set the endpoint
 4419                _request.Method = Azure.Core.RequestMethod.Get;
 4420                _request.Uri.Reset(resourceUri);
 4421                _request.Uri.AppendQuery("restype", "service", escapeValue: false);
 4422                _request.Uri.AppendQuery("comp", "stats", escapeValue: false);
 0423                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 424
 425                // Add request headers
 4426                _request.Headers.SetValue("x-ms-version", version);
 0427                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 428
 4429                return _message;
 430            }
 431
 432            /// <summary>
 433            /// Create the Service.GetStatisticsAsync response or throw a failure exception.
 434            /// </summary>
 435            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 436            /// <param name="response">The raw Response.</param>
 437            /// <returns>The Service.GetStatisticsAsync Azure.Response{Azure.Storage.Blobs.Models.BlobServiceStatistics}
 438            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobServiceStatistics> GetStatisticsAsync_CreateRe
 439                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 440                Azure.Response response)
 441            {
 442                // Process the response
 4443                switch (response.Status)
 444                {
 445                    case 200:
 446                    {
 447                        // Create the result
 4448                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4449                        Azure.Storage.Blobs.Models.BlobServiceStatistics _value = Azure.Storage.Blobs.Models.BlobService
 450
 451                        // Create the response
 4452                        return Response.FromValue(_value, response);
 453                    }
 454                    case 304:
 455                    {
 0456                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobServiceStatistics>(response);
 457                    }
 458                    default:
 459                    {
 460                        // Create the result
 0461                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 0462                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 463
 0464                        throw _value.CreateException(clientDiagnostics, response);
 465                    }
 466                }
 467            }
 468            #endregion Service.GetStatisticsAsync
 469
 470            #region Service.ListBlobContainersSegmentAsync
 471            /// <summary>
 472            /// The List Containers Segment operation returns a list of the containers under the specified account
 473            /// </summary>
 474            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 475            /// <param name="pipeline">The pipeline used for sending requests.</param>
 476            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 477            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 478            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 479            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 480            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 481            /// <param name="include">Include this parameter to specify that the container's metadata be returned as par
 482            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 483            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 484            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 485            /// <param name="operationName">Operation name.</param>
 486            /// <param name="cancellationToken">Cancellation token.</param>
 487            /// <returns>An enumeration of containers</returns>
 488            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 489                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 490                Azure.Core.Pipeline.HttpPipeline pipeline,
 491                System.Uri resourceUri,
 492                string version,
 493                string prefix = default,
 494                string marker = default,
 495                int? maxresults = default,
 496                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListContainersIncludeType> include = d
 497                int? timeout = default,
 498                string requestId = default,
 499                bool async = true,
 500                string operationName = "ServiceClient.ListBlobContainersSegment",
 501                System.Threading.CancellationToken cancellationToken = default)
 502            {
 68503                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 504                try
 505                {
 68506                    _scope.AddAttribute("url", resourceUri);
 68507                    _scope.Start();
 68508                    using (Azure.Core.HttpMessage _message = ListBlobContainersSegmentAsync_CreateMessage(
 68509                        pipeline,
 68510                        resourceUri,
 68511                        version,
 68512                        prefix,
 68513                        marker,
 68514                        maxresults,
 68515                        include,
 68516                        timeout,
 68517                        requestId))
 518                    {
 68519                        if (async)
 520                        {
 521                            // Send the request asynchronously if we're being called via an async path
 38522                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 523                        }
 524                        else
 525                        {
 526                            // Send the request synchronously through the API that blocks if we're being called via a sy
 527                            // (this is safe because the Task will complete before the user can call Wait)
 30528                            pipeline.Send(_message, cancellationToken);
 529                        }
 68530                        Azure.Response _response = _message.Response;
 68531                        cancellationToken.ThrowIfCancellationRequested();
 68532                        return ListBlobContainersSegmentAsync_CreateResponse(clientDiagnostics, _response);
 533                    }
 534                }
 4535                catch (System.Exception ex)
 536                {
 4537                    _scope.Failed(ex);
 4538                    throw;
 539                }
 540                finally
 541                {
 68542                    _scope.Dispose();
 543                }
 64544            }
 545
 546            /// <summary>
 547            /// Create the Service.ListBlobContainersSegmentAsync request.
 548            /// </summary>
 549            /// <param name="pipeline">The pipeline used for sending requests.</param>
 550            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 551            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 552            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 553            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 554            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 555            /// <param name="include">Include this parameter to specify that the container's metadata be returned as par
 556            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 557            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 558            /// <returns>The Service.ListBlobContainersSegmentAsync Message.</returns>
 559            internal static Azure.Core.HttpMessage ListBlobContainersSegmentAsync_CreateMessage(
 560                Azure.Core.Pipeline.HttpPipeline pipeline,
 561                System.Uri resourceUri,
 562                string version,
 563                string prefix = default,
 564                string marker = default,
 565                int? maxresults = default,
 566                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListContainersIncludeType> include = d
 567                int? timeout = default,
 568                string requestId = default)
 569            {
 570                // Validation
 68571                if (resourceUri == null)
 572                {
 0573                    throw new System.ArgumentNullException(nameof(resourceUri));
 574                }
 68575                if (version == null)
 576                {
 0577                    throw new System.ArgumentNullException(nameof(version));
 578                }
 579
 580                // Create the request
 68581                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 68582                Azure.Core.Request _request = _message.Request;
 583
 584                // Set the endpoint
 68585                _request.Method = Azure.Core.RequestMethod.Get;
 68586                _request.Uri.Reset(resourceUri);
 68587                _request.Uri.AppendQuery("comp", "list", escapeValue: false);
 76588                if (prefix != null) { _request.Uri.AppendQuery("prefix", prefix); }
 72589                if (marker != null) { _request.Uri.AppendQuery("marker", marker); }
 72590                if (maxresults != null) { _request.Uri.AppendQuery("maxresults", maxresults.Value.ToString(System.Global
 84591                if (include != null) { _request.Uri.AppendQuery("include", string.Join(",", System.Linq.Enumerable.Selec
 0592                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 593
 594                // Add request headers
 68595                _request.Headers.SetValue("x-ms-version", version);
 0596                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 597
 68598                return _message;
 599            }
 600
 601            /// <summary>
 602            /// Create the Service.ListBlobContainersSegmentAsync response or throw a failure exception.
 603            /// </summary>
 604            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 605            /// <param name="response">The raw Response.</param>
 606            /// <returns>The Service.ListBlobContainersSegmentAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContai
 607            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainersSegment> ListBlobContainersSegmentAs
 608                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 609                Azure.Response response)
 610            {
 611                // Process the response
 68612                switch (response.Status)
 613                {
 614                    case 200:
 615                    {
 616                        // Create the result
 64617                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 64618                        Azure.Storage.Blobs.Models.BlobContainersSegment _value = Azure.Storage.Blobs.Models.BlobContain
 619
 620                        // Create the response
 64621                        return Response.FromValue(_value, response);
 622                    }
 623                    case 304:
 624                    {
 0625                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobContainersSegment>(response);
 626                    }
 627                    default:
 628                    {
 629                        // Create the result
 4630                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4631                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 632
 4633                        throw _value.CreateException(clientDiagnostics, response);
 634                    }
 635                }
 636            }
 637            #endregion Service.ListBlobContainersSegmentAsync
 638
 639            #region Service.GetUserDelegationKeyAsync
 640            /// <summary>
 641            /// Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer t
 642            /// </summary>
 643            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 644            /// <param name="pipeline">The pipeline used for sending requests.</param>
 645            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 646            /// <param name="keyInfo">Key information</param>
 647            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 648            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 649            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 650            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 651            /// <param name="operationName">Operation name.</param>
 652            /// <param name="cancellationToken">Cancellation token.</param>
 653            /// <returns>A user delegation key</returns>
 654            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.UserDelegatio
 655                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 656                Azure.Core.Pipeline.HttpPipeline pipeline,
 657                System.Uri resourceUri,
 658                Azure.Storage.Blobs.Models.KeyInfo keyInfo,
 659                string version,
 660                int? timeout = default,
 661                string requestId = default,
 662                bool async = true,
 663                string operationName = "ServiceClient.GetUserDelegationKey",
 664                System.Threading.CancellationToken cancellationToken = default)
 665            {
 100666                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 667                try
 668                {
 100669                    _scope.AddAttribute("url", resourceUri);
 100670                    _scope.Start();
 100671                    using (Azure.Core.HttpMessage _message = GetUserDelegationKeyAsync_CreateMessage(
 100672                        pipeline,
 100673                        resourceUri,
 100674                        keyInfo,
 100675                        version,
 100676                        timeout,
 100677                        requestId))
 678                    {
 100679                        if (async)
 680                        {
 681                            // Send the request asynchronously if we're being called via an async path
 50682                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 683                        }
 684                        else
 685                        {
 686                            // Send the request synchronously through the API that blocks if we're being called via a sy
 687                            // (this is safe because the Task will complete before the user can call Wait)
 50688                            pipeline.Send(_message, cancellationToken);
 689                        }
 100690                        Azure.Response _response = _message.Response;
 100691                        cancellationToken.ThrowIfCancellationRequested();
 100692                        return GetUserDelegationKeyAsync_CreateResponse(clientDiagnostics, _response);
 693                    }
 694                }
 8695                catch (System.Exception ex)
 696                {
 8697                    _scope.Failed(ex);
 8698                    throw;
 699                }
 700                finally
 701                {
 100702                    _scope.Dispose();
 703                }
 92704            }
 705
 706            /// <summary>
 707            /// Create the Service.GetUserDelegationKeyAsync request.
 708            /// </summary>
 709            /// <param name="pipeline">The pipeline used for sending requests.</param>
 710            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 711            /// <param name="keyInfo">Key information</param>
 712            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 713            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 714            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 715            /// <returns>The Service.GetUserDelegationKeyAsync Message.</returns>
 716            internal static Azure.Core.HttpMessage GetUserDelegationKeyAsync_CreateMessage(
 717                Azure.Core.Pipeline.HttpPipeline pipeline,
 718                System.Uri resourceUri,
 719                Azure.Storage.Blobs.Models.KeyInfo keyInfo,
 720                string version,
 721                int? timeout = default,
 722                string requestId = default)
 723            {
 724                // Validation
 100725                if (resourceUri == null)
 726                {
 0727                    throw new System.ArgumentNullException(nameof(resourceUri));
 728                }
 100729                if (keyInfo == null)
 730                {
 0731                    throw new System.ArgumentNullException(nameof(keyInfo));
 732                }
 100733                if (version == null)
 734                {
 0735                    throw new System.ArgumentNullException(nameof(version));
 736                }
 737
 738                // Create the request
 100739                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 100740                Azure.Core.Request _request = _message.Request;
 741
 742                // Set the endpoint
 100743                _request.Method = Azure.Core.RequestMethod.Post;
 100744                _request.Uri.Reset(resourceUri);
 100745                _request.Uri.AppendQuery("restype", "service", escapeValue: false);
 100746                _request.Uri.AppendQuery("comp", "userdelegationkey", escapeValue: false);
 0747                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 748
 749                // Add request headers
 100750                _request.Headers.SetValue("x-ms-version", version);
 0751                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 752
 753                // Create the body
 100754                System.Xml.Linq.XElement _body = Azure.Storage.Blobs.Models.KeyInfo.ToXml(keyInfo, "KeyInfo", "");
 100755                string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 100756                _request.Headers.SetValue("Content-Type", "application/xml");
 100757                _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.Invar
 100758                _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 759
 100760                return _message;
 761            }
 762
 763            /// <summary>
 764            /// Create the Service.GetUserDelegationKeyAsync response or throw a failure exception.
 765            /// </summary>
 766            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 767            /// <param name="response">The raw Response.</param>
 768            /// <returns>The Service.GetUserDelegationKeyAsync Azure.Response{Azure.Storage.Blobs.Models.UserDelegationK
 769            internal static Azure.Response<Azure.Storage.Blobs.Models.UserDelegationKey> GetUserDelegationKeyAsync_Creat
 770                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 771                Azure.Response response)
 772            {
 773                // Process the response
 100774                switch (response.Status)
 775                {
 776                    case 200:
 777                    {
 778                        // Create the result
 92779                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 92780                        Azure.Storage.Blobs.Models.UserDelegationKey _value = Azure.Storage.Blobs.Models.UserDelegationK
 781
 782                        // Create the response
 92783                        return Response.FromValue(_value, response);
 784                    }
 785                    default:
 786                    {
 787                        // Create the result
 8788                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 8789                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 790
 8791                        throw _value.CreateException(clientDiagnostics, response);
 792                    }
 793                }
 794            }
 795            #endregion Service.GetUserDelegationKeyAsync
 796
 797            #region Service.GetAccountInfoAsync
 798            /// <summary>
 799            /// Returns the sku name and account kind
 800            /// </summary>
 801            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 802            /// <param name="pipeline">The pipeline used for sending requests.</param>
 803            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 804            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 805            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 806            /// <param name="operationName">Operation name.</param>
 807            /// <param name="cancellationToken">Cancellation token.</param>
 808            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.AccountInfo}</returns>
 809            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.AccountInfo>>
 810                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 811                Azure.Core.Pipeline.HttpPipeline pipeline,
 812                System.Uri resourceUri,
 813                string version,
 814                bool async = true,
 815                string operationName = "ServiceClient.GetAccountInfo",
 816                System.Threading.CancellationToken cancellationToken = default)
 817            {
 32818                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 819                try
 820                {
 32821                    _scope.AddAttribute("url", resourceUri);
 32822                    _scope.Start();
 32823                    using (Azure.Core.HttpMessage _message = GetAccountInfoAsync_CreateMessage(
 32824                        pipeline,
 32825                        resourceUri,
 32826                        version))
 827                    {
 32828                        if (async)
 829                        {
 830                            // Send the request asynchronously if we're being called via an async path
 16831                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 832                        }
 833                        else
 834                        {
 835                            // Send the request synchronously through the API that blocks if we're being called via a sy
 836                            // (this is safe because the Task will complete before the user can call Wait)
 16837                            pipeline.Send(_message, cancellationToken);
 838                        }
 32839                        Azure.Response _response = _message.Response;
 32840                        cancellationToken.ThrowIfCancellationRequested();
 32841                        return GetAccountInfoAsync_CreateResponse(clientDiagnostics, _response);
 842                    }
 843                }
 12844                catch (System.Exception ex)
 845                {
 12846                    _scope.Failed(ex);
 12847                    throw;
 848                }
 849                finally
 850                {
 32851                    _scope.Dispose();
 852                }
 20853            }
 854
 855            /// <summary>
 856            /// Create the Service.GetAccountInfoAsync request.
 857            /// </summary>
 858            /// <param name="pipeline">The pipeline used for sending requests.</param>
 859            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 860            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 861            /// <returns>The Service.GetAccountInfoAsync Message.</returns>
 862            internal static Azure.Core.HttpMessage GetAccountInfoAsync_CreateMessage(
 863                Azure.Core.Pipeline.HttpPipeline pipeline,
 864                System.Uri resourceUri,
 865                string version)
 866            {
 867                // Validation
 32868                if (resourceUri == null)
 869                {
 0870                    throw new System.ArgumentNullException(nameof(resourceUri));
 871                }
 32872                if (version == null)
 873                {
 0874                    throw new System.ArgumentNullException(nameof(version));
 875                }
 876
 877                // Create the request
 32878                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 32879                Azure.Core.Request _request = _message.Request;
 880
 881                // Set the endpoint
 32882                _request.Method = Azure.Core.RequestMethod.Get;
 32883                _request.Uri.Reset(resourceUri);
 32884                _request.Uri.AppendQuery("restype", "account", escapeValue: false);
 32885                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 886
 887                // Add request headers
 32888                _request.Headers.SetValue("x-ms-version", version);
 889
 32890                return _message;
 891            }
 892
 893            /// <summary>
 894            /// Create the Service.GetAccountInfoAsync response or throw a failure exception.
 895            /// </summary>
 896            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 897            /// <param name="response">The raw Response.</param>
 898            /// <returns>The Service.GetAccountInfoAsync Azure.Response{Azure.Storage.Blobs.Models.AccountInfo}.</return
 899            internal static Azure.Response<Azure.Storage.Blobs.Models.AccountInfo> GetAccountInfoAsync_CreateResponse(
 900                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 901                Azure.Response response)
 902            {
 903                // Process the response
 32904                switch (response.Status)
 905                {
 906                    case 200:
 907                    {
 908                        // Create the result
 20909                        Azure.Storage.Blobs.Models.AccountInfo _value = new Azure.Storage.Blobs.Models.AccountInfo();
 910
 911                        // Get response headers
 912                        string _header;
 20913                        if (response.Headers.TryGetValue("x-ms-sku-name", out _header))
 914                        {
 20915                            _value.SkuName = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseSkuName(_header);
 916                        }
 20917                        if (response.Headers.TryGetValue("x-ms-account-kind", out _header))
 918                        {
 20919                            _value.AccountKind = (Azure.Storage.Blobs.Models.AccountKind)System.Enum.Parse(typeof(Azure.
 920                        }
 921
 922                        // Create the response
 20923                        return Response.FromValue(_value, response);
 924                    }
 925                    case 304:
 926                    {
 0927                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.AccountInfo>(response);
 928                    }
 929                    default:
 930                    {
 931                        // Create the result
 12932                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 12933                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 934
 12935                        throw _value.CreateException(clientDiagnostics, response);
 936                    }
 937                }
 938            }
 939            #endregion Service.GetAccountInfoAsync
 940
 941            #region Service.SubmitBatchAsync
 942            /// <summary>
 943            /// The Batch operation allows multiple API calls to be embedded into a single HTTP request.
 944            /// </summary>
 945            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 946            /// <param name="pipeline">The pipeline used for sending requests.</param>
 947            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 948            /// <param name="body">Initial data</param>
 949            /// <param name="contentLength">The length of the request.</param>
 950            /// <param name="multipartContentType">Required. The value of this header must be multipart/mixed with a bat
 951            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 952            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 953            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 954            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 955            /// <param name="operationName">Operation name.</param>
 956            /// <param name="cancellationToken">Cancellation token.</param>
 957            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobBatchResult}</returns>
 958            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobBatchResu
 959                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 960                Azure.Core.Pipeline.HttpPipeline pipeline,
 961                System.Uri resourceUri,
 962                System.IO.Stream body,
 963                long contentLength,
 964                string multipartContentType,
 965                string version,
 966                int? timeout = default,
 967                string requestId = default,
 968                bool async = true,
 969                string operationName = "ServiceClient.SubmitBatch",
 970                System.Threading.CancellationToken cancellationToken = default)
 971            {
 0972                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 973                try
 974                {
 0975                    _scope.AddAttribute("url", resourceUri);
 0976                    _scope.Start();
 0977                    using (Azure.Core.HttpMessage _message = SubmitBatchAsync_CreateMessage(
 0978                        pipeline,
 0979                        resourceUri,
 0980                        body,
 0981                        contentLength,
 0982                        multipartContentType,
 0983                        version,
 0984                        timeout,
 0985                        requestId))
 986                    {
 0987                        if (async)
 988                        {
 989                            // Send the request asynchronously if we're being called via an async path
 0990                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 991                        }
 992                        else
 993                        {
 994                            // Send the request synchronously through the API that blocks if we're being called via a sy
 995                            // (this is safe because the Task will complete before the user can call Wait)
 0996                            pipeline.Send(_message, cancellationToken);
 997                        }
 0998                        Azure.Response _response = _message.Response;
 0999                        cancellationToken.ThrowIfCancellationRequested();
 01000                        return SubmitBatchAsync_CreateResponse(clientDiagnostics, _response);
 1001                    }
 1002                }
 01003                catch (System.Exception ex)
 1004                {
 01005                    _scope.Failed(ex);
 01006                    throw;
 1007                }
 1008                finally
 1009                {
 01010                    _scope.Dispose();
 1011                }
 01012            }
 1013
 1014            /// <summary>
 1015            /// Create the Service.SubmitBatchAsync request.
 1016            /// </summary>
 1017            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1018            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1019            /// <param name="body">Initial data</param>
 1020            /// <param name="contentLength">The length of the request.</param>
 1021            /// <param name="multipartContentType">Required. The value of this header must be multipart/mixed with a bat
 1022            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1023            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1024            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1025            /// <returns>The Service.SubmitBatchAsync Message.</returns>
 1026            internal static Azure.Core.HttpMessage SubmitBatchAsync_CreateMessage(
 1027                Azure.Core.Pipeline.HttpPipeline pipeline,
 1028                System.Uri resourceUri,
 1029                System.IO.Stream body,
 1030                long contentLength,
 1031                string multipartContentType,
 1032                string version,
 1033                int? timeout = default,
 1034                string requestId = default)
 1035            {
 1036                // Validation
 01037                if (resourceUri == null)
 1038                {
 01039                    throw new System.ArgumentNullException(nameof(resourceUri));
 1040                }
 01041                if (body == null)
 1042                {
 01043                    throw new System.ArgumentNullException(nameof(body));
 1044                }
 01045                if (multipartContentType == null)
 1046                {
 01047                    throw new System.ArgumentNullException(nameof(multipartContentType));
 1048                }
 01049                if (version == null)
 1050                {
 01051                    throw new System.ArgumentNullException(nameof(version));
 1052                }
 1053
 1054                // Create the request
 01055                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 01056                Azure.Core.Request _request = _message.Request;
 1057
 1058                // Set the endpoint
 01059                _request.Method = Azure.Core.RequestMethod.Post;
 01060                _request.Uri.Reset(resourceUri);
 01061                _request.Uri.AppendQuery("comp", "batch", escapeValue: false);
 01062                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 1063
 1064                // Add request headers
 01065                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 01066                _request.Headers.SetValue("Content-Type", multipartContentType);
 01067                _request.Headers.SetValue("x-ms-version", version);
 01068                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1069
 1070                // Create the body
 01071                _request.Content = Azure.Core.RequestContent.Create(body);
 1072
 01073                return _message;
 1074            }
 1075
 1076            /// <summary>
 1077            /// Create the Service.SubmitBatchAsync response or throw a failure exception.
 1078            /// </summary>
 1079            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1080            /// <param name="response">The raw Response.</param>
 1081            /// <returns>The Service.SubmitBatchAsync Azure.Response{Azure.Storage.Blobs.Models.BlobBatchResult}.</retur
 1082            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobBatchResult> SubmitBatchAsync_CreateResponse(
 1083                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1084                Azure.Response response)
 1085            {
 1086                // Process the response
 01087                switch (response.Status)
 1088                {
 1089                    case 202:
 1090                    {
 1091                        // Create the result
 01092                        Azure.Storage.Blobs.Models.BlobBatchResult _value = new Azure.Storage.Blobs.Models.BlobBatchResu
 01093                        _value.Content = response.ContentStream; // You should manually wrap with RetriableStream!
 1094
 1095                        // Get response headers
 1096                        string _header;
 01097                        if (response.Headers.TryGetValue("Content-Type", out _header))
 1098                        {
 01099                            _value.ContentType = _header;
 1100                        }
 1101
 1102                        // Create the response
 01103                        return Response.FromValue(_value, response);
 1104                    }
 1105                    default:
 1106                    {
 1107                        // Create the result
 01108                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 01109                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1110
 01111                        throw _value.CreateException(clientDiagnostics, response);
 1112                    }
 1113                }
 1114            }
 1115            #endregion Service.SubmitBatchAsync
 1116
 1117            #region Service.FilterBlobsAsync
 1118            /// <summary>
 1119            /// The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given 
 1120            /// </summary>
 1121            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 1122            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1123            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1124            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1125            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1126            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1127            /// <param name="where">Filters the results to return only to return only blobs whose tags match the specifi
 1128            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 1129            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 1130            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 1131            /// <param name="operationName">Operation name.</param>
 1132            /// <param name="cancellationToken">Cancellation token.</param>
 1133            /// <returns>The result of a Filter Blobs API call</returns>
 1134            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.FilterBlobSeg
 1135                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1136                Azure.Core.Pipeline.HttpPipeline pipeline,
 1137                System.Uri resourceUri,
 1138                string version,
 1139                int? timeout = default,
 1140                string requestId = default,
 1141                string where = default,
 1142                string marker = default,
 1143                int? maxresults = default,
 1144                bool async = true,
 1145                string operationName = "ServiceClient.FilterBlobs",
 1146                System.Threading.CancellationToken cancellationToken = default)
 1147            {
 161148                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 1149                try
 1150                {
 161151                    _scope.AddAttribute("url", resourceUri);
 161152                    _scope.Start();
 161153                    using (Azure.Core.HttpMessage _message = FilterBlobsAsync_CreateMessage(
 161154                        pipeline,
 161155                        resourceUri,
 161156                        version,
 161157                        timeout,
 161158                        requestId,
 161159                        where,
 161160                        marker,
 161161                        maxresults))
 1162                    {
 161163                        if (async)
 1164                        {
 1165                            // Send the request asynchronously if we're being called via an async path
 121166                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 1167                        }
 1168                        else
 1169                        {
 1170                            // Send the request synchronously through the API that blocks if we're being called via a sy
 1171                            // (this is safe because the Task will complete before the user can call Wait)
 41172                            pipeline.Send(_message, cancellationToken);
 1173                        }
 161174                        Azure.Response _response = _message.Response;
 161175                        cancellationToken.ThrowIfCancellationRequested();
 161176                        return FilterBlobsAsync_CreateResponse(clientDiagnostics, _response);
 1177                    }
 1178                }
 41179                catch (System.Exception ex)
 1180                {
 41181                    _scope.Failed(ex);
 41182                    throw;
 1183                }
 1184                finally
 1185                {
 161186                    _scope.Dispose();
 1187                }
 121188            }
 1189
 1190            /// <summary>
 1191            /// Create the Service.FilterBlobsAsync request.
 1192            /// </summary>
 1193            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1194            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1195            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1196            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1197            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1198            /// <param name="where">Filters the results to return only to return only blobs whose tags match the specifi
 1199            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 1200            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 1201            /// <returns>The Service.FilterBlobsAsync Message.</returns>
 1202            internal static Azure.Core.HttpMessage FilterBlobsAsync_CreateMessage(
 1203                Azure.Core.Pipeline.HttpPipeline pipeline,
 1204                System.Uri resourceUri,
 1205                string version,
 1206                int? timeout = default,
 1207                string requestId = default,
 1208                string where = default,
 1209                string marker = default,
 1210                int? maxresults = default)
 1211            {
 1212                // Validation
 161213                if (resourceUri == null)
 1214                {
 01215                    throw new System.ArgumentNullException(nameof(resourceUri));
 1216                }
 161217                if (version == null)
 1218                {
 01219                    throw new System.ArgumentNullException(nameof(version));
 1220                }
 1221
 1222                // Create the request
 161223                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 161224                Azure.Core.Request _request = _message.Request;
 1225
 1226                // Set the endpoint
 161227                _request.Method = Azure.Core.RequestMethod.Get;
 161228                _request.Uri.Reset(resourceUri);
 161229                _request.Uri.AppendQuery("comp", "blobs", escapeValue: false);
 01230                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 321231                if (where != null) { _request.Uri.AppendQuery("where", where); }
 01232                if (marker != null) { _request.Uri.AppendQuery("marker", marker); }
 01233                if (maxresults != null) { _request.Uri.AppendQuery("maxresults", maxresults.Value.ToString(System.Global
 1234
 1235                // Add request headers
 161236                _request.Headers.SetValue("x-ms-version", version);
 01237                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1238
 161239                return _message;
 1240            }
 1241
 1242            /// <summary>
 1243            /// Create the Service.FilterBlobsAsync response or throw a failure exception.
 1244            /// </summary>
 1245            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1246            /// <param name="response">The raw Response.</param>
 1247            /// <returns>The Service.FilterBlobsAsync Azure.Response{Azure.Storage.Blobs.Models.FilterBlobSegment}.</ret
 1248            internal static Azure.Response<Azure.Storage.Blobs.Models.FilterBlobSegment> FilterBlobsAsync_CreateResponse
 1249                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1250                Azure.Response response)
 1251            {
 1252                // Process the response
 161253                switch (response.Status)
 1254                {
 1255                    case 200:
 1256                    {
 1257                        // Create the result
 121258                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 121259                        Azure.Storage.Blobs.Models.FilterBlobSegment _value = Azure.Storage.Blobs.Models.FilterBlobSegme
 1260
 1261                        // Create the response
 121262                        return Response.FromValue(_value, response);
 1263                    }
 1264                    case 304:
 1265                    {
 01266                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.FilterBlobSegment>(response);
 1267                    }
 1268                    default:
 1269                    {
 1270                        // Create the result
 41271                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 41272                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1273
 41274                        throw _value.CreateException(clientDiagnostics, response);
 1275                    }
 1276                }
 1277            }
 1278            #endregion Service.FilterBlobsAsync
 1279        }
 1280        #endregion Service operations
 1281
 1282        #region Container operations
 1283        /// <summary>
 1284        /// Container operations for Azure Blob Storage
 1285        /// </summary>
 1286        public static partial class Container
 1287        {
 1288            #region Container.CreateAsync
 1289            /// <summary>
 1290            /// creates a new container under the specified account. If the container with the same name already exists,
 1291            /// </summary>
 1292            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 1293            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1294            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1295            /// <param name="access">Specifies whether data in the container may be accessed publicly and the level of a
 1296            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1297            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1298            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 1299            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1300            /// <param name="defaultEncryptionScope">Optional.  Version 2019-07-07 and later.  Specifies the default enc
 1301            /// <param name="preventEncryptionScopeOverride">Optional.  Version 2019-07-07 and newer.  If true, prevents
 1302            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 1303            /// <param name="operationName">Operation name.</param>
 1304            /// <param name="cancellationToken">Cancellation token.</param>
 1305            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}</returns>
 1306            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 1307                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1308                Azure.Core.Pipeline.HttpPipeline pipeline,
 1309                System.Uri resourceUri,
 1310                Azure.Storage.Blobs.Models.PublicAccessType access,
 1311                string version,
 1312                int? timeout = default,
 1313                System.Collections.Generic.IDictionary<string, string> metadata = default,
 1314                string requestId = default,
 1315                string defaultEncryptionScope = default,
 1316                bool? preventEncryptionScopeOverride = default,
 1317                bool async = true,
 1318                string operationName = "ContainerClient.Create",
 1319                System.Threading.CancellationToken cancellationToken = default)
 1320            {
 65421321                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 1322                try
 1323                {
 65421324                    _scope.AddAttribute("url", resourceUri);
 65421325                    _scope.Start();
 65421326                    using (Azure.Core.HttpMessage _message = CreateAsync_CreateMessage(
 65421327                        pipeline,
 65421328                        resourceUri,
 65421329                        access,
 65421330                        version,
 65421331                        timeout,
 65421332                        metadata,
 65421333                        requestId,
 65421334                        defaultEncryptionScope,
 65421335                        preventEncryptionScopeOverride))
 1336                    {
 65421337                        if (async)
 1338                        {
 1339                            // Send the request asynchronously if we're being called via an async path
 32781340                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 1341                        }
 1342                        else
 1343                        {
 1344                            // Send the request synchronously through the API that blocks if we're being called via a sy
 1345                            // (this is safe because the Task will complete before the user can call Wait)
 32641346                            pipeline.Send(_message, cancellationToken);
 1347                        }
 65421348                        Azure.Response _response = _message.Response;
 65421349                        cancellationToken.ThrowIfCancellationRequested();
 65421350                        return CreateAsync_CreateResponse(clientDiagnostics, _response);
 1351                    }
 1352                }
 401353                catch (System.Exception ex)
 1354                {
 401355                    _scope.Failed(ex);
 401356                    throw;
 1357                }
 1358                finally
 1359                {
 65421360                    _scope.Dispose();
 1361                }
 65021362            }
 1363
 1364            /// <summary>
 1365            /// Create the Container.CreateAsync request.
 1366            /// </summary>
 1367            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1368            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1369            /// <param name="access">Specifies whether data in the container may be accessed publicly and the level of a
 1370            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1371            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1372            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 1373            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1374            /// <param name="defaultEncryptionScope">Optional.  Version 2019-07-07 and later.  Specifies the default enc
 1375            /// <param name="preventEncryptionScopeOverride">Optional.  Version 2019-07-07 and newer.  If true, prevents
 1376            /// <returns>The Container.CreateAsync Message.</returns>
 1377            internal static Azure.Core.HttpMessage CreateAsync_CreateMessage(
 1378                Azure.Core.Pipeline.HttpPipeline pipeline,
 1379                System.Uri resourceUri,
 1380                Azure.Storage.Blobs.Models.PublicAccessType access,
 1381                string version,
 1382                int? timeout = default,
 1383                System.Collections.Generic.IDictionary<string, string> metadata = default,
 1384                string requestId = default,
 1385                string defaultEncryptionScope = default,
 1386                bool? preventEncryptionScopeOverride = default)
 1387            {
 1388                // Validation
 65421389                if (resourceUri == null)
 1390                {
 01391                    throw new System.ArgumentNullException(nameof(resourceUri));
 1392                }
 65421393                if (version == null)
 1394                {
 01395                    throw new System.ArgumentNullException(nameof(version));
 1396                }
 1397
 1398                // Create the request
 65421399                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 65421400                Azure.Core.Request _request = _message.Request;
 1401
 1402                // Set the endpoint
 65421403                _request.Method = Azure.Core.RequestMethod.Put;
 65421404                _request.Uri.Reset(resourceUri);
 65421405                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 01406                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 1407
 1408                // Add request headers
 125801409                if (access != Azure.Storage.Blobs.Models.PublicAccessType.None) { _request.Headers.SetValue("x-ms-blob-p
 65421410                _request.Headers.SetValue("x-ms-version", version);
 65421411                if (metadata != null) {
 801412                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 1413                    {
 321414                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 1415                    }
 1416                }
 01417                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 01418                if (defaultEncryptionScope != null) { _request.Headers.SetValue("x-ms-default-encryption-scope", default
 65421419                if (preventEncryptionScopeOverride != null) {
 1420                #pragma warning disable CA1308 // Normalize strings to uppercase
 01421                _request.Headers.SetValue("x-ms-deny-encryption-scope-override", preventEncryptionScopeOverride.Value.To
 1422                #pragma warning restore CA1308 // Normalize strings to uppercase
 1423                }
 1424
 65421425                return _message;
 1426            }
 1427
 1428            /// <summary>
 1429            /// Create the Container.CreateAsync response or throw a failure exception.
 1430            /// </summary>
 1431            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1432            /// <param name="response">The raw Response.</param>
 1433            /// <returns>The Container.CreateAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}.</return
 1434            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> CreateAsync_CreateResponse(
 1435                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1436                Azure.Response response)
 1437            {
 1438                // Process the response
 65421439                switch (response.Status)
 1440                {
 1441                    case 201:
 1442                    {
 1443                        // Create the result
 65021444                        Azure.Storage.Blobs.Models.BlobContainerInfo _value = new Azure.Storage.Blobs.Models.BlobContain
 1445
 1446                        // Get response headers
 1447                        string _header;
 65021448                        if (response.Headers.TryGetValue("ETag", out _header))
 1449                        {
 65021450                            _value.ETag = new Azure.ETag(_header);
 1451                        }
 65021452                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 1453                        {
 65021454                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 1455                        }
 1456
 1457                        // Create the response
 65021458                        return Response.FromValue(_value, response);
 1459                    }
 1460                    default:
 1461                    {
 1462                        // Create the result
 401463                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 401464                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1465
 401466                        throw _value.CreateException(clientDiagnostics, response);
 1467                    }
 1468                }
 1469            }
 1470            #endregion Container.CreateAsync
 1471
 1472            #region Container.GetPropertiesAsync
 1473            /// <summary>
 1474            /// returns all user-defined metadata and system properties for the specified container. The data returned d
 1475            /// </summary>
 1476            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 1477            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1478            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1479            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1480            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1481            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1482            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1483            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 1484            /// <param name="operationName">Operation name.</param>
 1485            /// <param name="cancellationToken">Cancellation token.</param>
 1486            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.FlattenedContainerItem}</returns>
 1487            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.FlattenedCont
 1488                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1489                Azure.Core.Pipeline.HttpPipeline pipeline,
 1490                System.Uri resourceUri,
 1491                string version,
 1492                int? timeout = default,
 1493                string leaseId = default,
 1494                string requestId = default,
 1495                bool async = true,
 1496                string operationName = "ContainerClient.GetProperties",
 1497                System.Threading.CancellationToken cancellationToken = default)
 1498            {
 2441499                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 1500                try
 1501                {
 2441502                    _scope.AddAttribute("url", resourceUri);
 2441503                    _scope.Start();
 2441504                    using (Azure.Core.HttpMessage _message = GetPropertiesAsync_CreateMessage(
 2441505                        pipeline,
 2441506                        resourceUri,
 2441507                        version,
 2441508                        timeout,
 2441509                        leaseId,
 2441510                        requestId))
 1511                    {
 2441512                        if (async)
 1513                        {
 1514                            // Send the request asynchronously if we're being called via an async path
 1361515                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 1516                        }
 1517                        else
 1518                        {
 1519                            // Send the request synchronously through the API that blocks if we're being called via a sy
 1520                            // (this is safe because the Task will complete before the user can call Wait)
 1081521                            pipeline.Send(_message, cancellationToken);
 1522                        }
 2441523                        Azure.Response _response = _message.Response;
 2441524                        cancellationToken.ThrowIfCancellationRequested();
 2441525                        return GetPropertiesAsync_CreateResponse(clientDiagnostics, _response);
 1526                    }
 1527                }
 361528                catch (System.Exception ex)
 1529                {
 361530                    _scope.Failed(ex);
 361531                    throw;
 1532                }
 1533                finally
 1534                {
 2441535                    _scope.Dispose();
 1536                }
 2081537            }
 1538
 1539            /// <summary>
 1540            /// Create the Container.GetPropertiesAsync request.
 1541            /// </summary>
 1542            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1543            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1544            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1545            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1546            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1547            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1548            /// <returns>The Container.GetPropertiesAsync Message.</returns>
 1549            internal static Azure.Core.HttpMessage GetPropertiesAsync_CreateMessage(
 1550                Azure.Core.Pipeline.HttpPipeline pipeline,
 1551                System.Uri resourceUri,
 1552                string version,
 1553                int? timeout = default,
 1554                string leaseId = default,
 1555                string requestId = default)
 1556            {
 1557                // Validation
 2441558                if (resourceUri == null)
 1559                {
 01560                    throw new System.ArgumentNullException(nameof(resourceUri));
 1561                }
 2441562                if (version == null)
 1563                {
 01564                    throw new System.ArgumentNullException(nameof(version));
 1565                }
 1566
 1567                // Create the request
 2441568                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 2441569                Azure.Core.Request _request = _message.Request;
 1570
 1571                // Set the endpoint
 2441572                _request.Method = Azure.Core.RequestMethod.Get;
 2441573                _request.Uri.Reset(resourceUri);
 2441574                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 01575                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 1576
 1577                // Add request headers
 2441578                _request.Headers.SetValue("x-ms-version", version);
 01579                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 01580                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1581
 2441582                return _message;
 1583            }
 1584
 1585            /// <summary>
 1586            /// Create the Container.GetPropertiesAsync response or throw a failure exception.
 1587            /// </summary>
 1588            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1589            /// <param name="response">The raw Response.</param>
 1590            /// <returns>The Container.GetPropertiesAsync Azure.Response{Azure.Storage.Blobs.Models.FlattenedContainerIt
 1591            internal static Azure.Response<Azure.Storage.Blobs.Models.FlattenedContainerItem> GetPropertiesAsync_CreateR
 1592                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1593                Azure.Response response)
 1594            {
 1595                // Process the response
 2441596                switch (response.Status)
 1597                {
 1598                    case 200:
 1599                    {
 1600                        // Create the result
 2081601                        Azure.Storage.Blobs.Models.FlattenedContainerItem _value = new Azure.Storage.Blobs.Models.Flatte
 1602
 1603                        // Get response headers
 1604                        string _header;
 2081605                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 65521606                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 1607                        {
 30681608                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 1609                            {
 641610                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 1611                            }
 1612                        }
 2081613                        if (response.Headers.TryGetValue("ETag", out _header))
 1614                        {
 2081615                            _value.ETag = new Azure.ETag(_header);
 1616                        }
 2081617                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 1618                        {
 2081619                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 1620                        }
 2081621                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 1622                        {
 01623                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 1624                        }
 2081625                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 1626                        {
 2081627                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 1628                        }
 2081629                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 1630                        {
 2081631                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 1632                        }
 2081633                        if (response.Headers.TryGetValue("x-ms-blob-public-access", out _header))
 1634                        {
 801635                            _value.BlobPublicAccess = Azure.Storage.Blobs.BlobRestClient.Serialization.ParsePublicAccess
 1636                        }
 2081637                        if (response.Headers.TryGetValue("x-ms-has-immutability-policy", out _header))
 1638                        {
 2081639                            _value.HasImmutabilityPolicy = bool.Parse(_header);
 1640                        }
 2081641                        if (response.Headers.TryGetValue("x-ms-has-legal-hold", out _header))
 1642                        {
 2081643                            _value.HasLegalHold = bool.Parse(_header);
 1644                        }
 2081645                        if (response.Headers.TryGetValue("x-ms-default-encryption-scope", out _header))
 1646                        {
 2081647                            _value.DefaultEncryptionScope = _header;
 1648                        }
 2081649                        if (response.Headers.TryGetValue("x-ms-deny-encryption-scope-override", out _header))
 1650                        {
 2081651                            _value.DenyEncryptionScopeOverride = bool.Parse(_header);
 1652                        }
 1653
 1654                        // Create the response
 2081655                        return Response.FromValue(_value, response);
 1656                    }
 1657                    case 304:
 1658                    {
 01659                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.FlattenedContainerItem>(response);
 1660                    }
 1661                    default:
 1662                    {
 1663                        // Create the result
 361664                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 361665                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1666
 361667                        throw _value.CreateException(clientDiagnostics, response);
 1668                    }
 1669                }
 1670            }
 1671            #endregion Container.GetPropertiesAsync
 1672
 1673            #region Container.DeleteAsync
 1674            /// <summary>
 1675            /// operation marks the specified container for deletion. The container and any blobs contained within it ar
 1676            /// </summary>
 1677            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 1678            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1679            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1680            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1681            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1682            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1683            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 1684            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 1685            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1686            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 1687            /// <param name="operationName">Operation name.</param>
 1688            /// <param name="cancellationToken">Cancellation token.</param>
 1689            /// <returns>Azure.Response</returns>
 1690            public static async System.Threading.Tasks.ValueTask<Azure.Response> DeleteAsync(
 1691                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1692                Azure.Core.Pipeline.HttpPipeline pipeline,
 1693                System.Uri resourceUri,
 1694                string version,
 1695                int? timeout = default,
 1696                string leaseId = default,
 1697                System.DateTimeOffset? ifModifiedSince = default,
 1698                System.DateTimeOffset? ifUnmodifiedSince = default,
 1699                string requestId = default,
 1700                bool async = true,
 1701                string operationName = "ContainerClient.Delete",
 1702                System.Threading.CancellationToken cancellationToken = default)
 1703            {
 65281704                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 1705                try
 1706                {
 65281707                    _scope.AddAttribute("url", resourceUri);
 65281708                    _scope.Start();
 65281709                    using (Azure.Core.HttpMessage _message = DeleteAsync_CreateMessage(
 65281710                        pipeline,
 65281711                        resourceUri,
 65281712                        version,
 65281713                        timeout,
 65281714                        leaseId,
 65281715                        ifModifiedSince,
 65281716                        ifUnmodifiedSince,
 65281717                        requestId))
 1718                    {
 65281719                        if (async)
 1720                        {
 1721                            // Send the request asynchronously if we're being called via an async path
 32721722                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 1723                        }
 1724                        else
 1725                        {
 1726                            // Send the request synchronously through the API that blocks if we're being called via a sy
 1727                            // (this is safe because the Task will complete before the user can call Wait)
 32561728                            pipeline.Send(_message, cancellationToken);
 1729                        }
 65161730                        Azure.Response _response = _message.Response;
 65161731                        cancellationToken.ThrowIfCancellationRequested();
 65161732                        return DeleteAsync_CreateResponse(clientDiagnostics, _response);
 1733                    }
 1734                }
 561735                catch (System.Exception ex)
 1736                {
 561737                    _scope.Failed(ex);
 561738                    throw;
 1739                }
 1740                finally
 1741                {
 65281742                    _scope.Dispose();
 1743                }
 64721744            }
 1745
 1746            /// <summary>
 1747            /// Create the Container.DeleteAsync request.
 1748            /// </summary>
 1749            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1750            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1751            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1752            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1753            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1754            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 1755            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 1756            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1757            /// <returns>The Container.DeleteAsync Message.</returns>
 1758            internal static Azure.Core.HttpMessage DeleteAsync_CreateMessage(
 1759                Azure.Core.Pipeline.HttpPipeline pipeline,
 1760                System.Uri resourceUri,
 1761                string version,
 1762                int? timeout = default,
 1763                string leaseId = default,
 1764                System.DateTimeOffset? ifModifiedSince = default,
 1765                System.DateTimeOffset? ifUnmodifiedSince = default,
 1766                string requestId = default)
 1767            {
 1768                // Validation
 65281769                if (resourceUri == null)
 1770                {
 01771                    throw new System.ArgumentNullException(nameof(resourceUri));
 1772                }
 65281773                if (version == null)
 1774                {
 01775                    throw new System.ArgumentNullException(nameof(version));
 1776                }
 1777
 1778                // Create the request
 65281779                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 65281780                Azure.Core.Request _request = _message.Request;
 1781
 1782                // Set the endpoint
 65281783                _request.Method = Azure.Core.RequestMethod.Delete;
 65281784                _request.Uri.Reset(resourceUri);
 65281785                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 01786                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 1787
 1788                // Add request headers
 65281789                _request.Headers.SetValue("x-ms-version", version);
 66401790                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 64441791                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 64441792                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 01793                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1794
 65281795                return _message;
 1796            }
 1797
 1798            /// <summary>
 1799            /// Create the Container.DeleteAsync response or throw a failure exception.
 1800            /// </summary>
 1801            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1802            /// <param name="response">The raw Response.</param>
 1803            /// <returns>The Container.DeleteAsync Azure.Response.</returns>
 1804            internal static Azure.Response DeleteAsync_CreateResponse(
 1805                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1806                Azure.Response response)
 1807            {
 1808                // Process the response
 65161809                switch (response.Status)
 1810                {
 1811                    case 202:
 1812                    {
 64721813                        return response;
 1814                    }
 1815                    default:
 1816                    {
 1817                        // Create the result
 441818                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 441819                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1820
 441821                        throw _value.CreateException(clientDiagnostics, response);
 1822                    }
 1823                }
 1824            }
 1825            #endregion Container.DeleteAsync
 1826
 1827            #region Container.SetMetadataAsync
 1828            /// <summary>
 1829            /// operation sets one or more user-defined name-value pairs for the specified container.
 1830            /// </summary>
 1831            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 1832            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1833            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1834            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1835            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1836            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1837            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 1838            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 1839            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1840            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 1841            /// <param name="operationName">Operation name.</param>
 1842            /// <param name="cancellationToken">Cancellation token.</param>
 1843            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}</returns>
 1844            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 1845                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1846                Azure.Core.Pipeline.HttpPipeline pipeline,
 1847                System.Uri resourceUri,
 1848                string version,
 1849                int? timeout = default,
 1850                string leaseId = default,
 1851                System.Collections.Generic.IDictionary<string, string> metadata = default,
 1852                System.DateTimeOffset? ifModifiedSince = default,
 1853                string requestId = default,
 1854                bool async = true,
 1855                string operationName = "ContainerClient.SetMetadata",
 1856                System.Threading.CancellationToken cancellationToken = default)
 1857            {
 681858                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 1859                try
 1860                {
 681861                    _scope.AddAttribute("url", resourceUri);
 681862                    _scope.Start();
 681863                    using (Azure.Core.HttpMessage _message = SetMetadataAsync_CreateMessage(
 681864                        pipeline,
 681865                        resourceUri,
 681866                        version,
 681867                        timeout,
 681868                        leaseId,
 681869                        metadata,
 681870                        ifModifiedSince,
 681871                        requestId))
 1872                    {
 681873                        if (async)
 1874                        {
 1875                            // Send the request asynchronously if we're being called via an async path
 341876                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 1877                        }
 1878                        else
 1879                        {
 1880                            // Send the request synchronously through the API that blocks if we're being called via a sy
 1881                            // (this is safe because the Task will complete before the user can call Wait)
 341882                            pipeline.Send(_message, cancellationToken);
 1883                        }
 681884                        Azure.Response _response = _message.Response;
 681885                        cancellationToken.ThrowIfCancellationRequested();
 681886                        return SetMetadataAsync_CreateResponse(clientDiagnostics, _response);
 1887                    }
 1888                }
 241889                catch (System.Exception ex)
 1890                {
 241891                    _scope.Failed(ex);
 241892                    throw;
 1893                }
 1894                finally
 1895                {
 681896                    _scope.Dispose();
 1897                }
 441898            }
 1899
 1900            /// <summary>
 1901            /// Create the Container.SetMetadataAsync request.
 1902            /// </summary>
 1903            /// <param name="pipeline">The pipeline used for sending requests.</param>
 1904            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 1905            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 1906            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 1907            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 1908            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 1909            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 1910            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 1911            /// <returns>The Container.SetMetadataAsync Message.</returns>
 1912            internal static Azure.Core.HttpMessage SetMetadataAsync_CreateMessage(
 1913                Azure.Core.Pipeline.HttpPipeline pipeline,
 1914                System.Uri resourceUri,
 1915                string version,
 1916                int? timeout = default,
 1917                string leaseId = default,
 1918                System.Collections.Generic.IDictionary<string, string> metadata = default,
 1919                System.DateTimeOffset? ifModifiedSince = default,
 1920                string requestId = default)
 1921            {
 1922                // Validation
 681923                if (resourceUri == null)
 1924                {
 01925                    throw new System.ArgumentNullException(nameof(resourceUri));
 1926                }
 681927                if (version == null)
 1928                {
 01929                    throw new System.ArgumentNullException(nameof(version));
 1930                }
 1931
 1932                // Create the request
 681933                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 681934                Azure.Core.Request _request = _message.Request;
 1935
 1936                // Set the endpoint
 681937                _request.Method = Azure.Core.RequestMethod.Put;
 681938                _request.Uri.Reset(resourceUri);
 681939                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 681940                _request.Uri.AppendQuery("comp", "metadata", escapeValue: false);
 01941                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 1942
 1943                // Add request headers
 681944                _request.Headers.SetValue("x-ms-version", version);
 841945                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 681946                if (metadata != null) {
 6801947                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 1948                    {
 2721949                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 1950                    }
 1951                }
 841952                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 01953                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1954
 681955                return _message;
 1956            }
 1957
 1958            /// <summary>
 1959            /// Create the Container.SetMetadataAsync response or throw a failure exception.
 1960            /// </summary>
 1961            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 1962            /// <param name="response">The raw Response.</param>
 1963            /// <returns>The Container.SetMetadataAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}.</r
 1964            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> SetMetadataAsync_CreateResponse
 1965                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 1966                Azure.Response response)
 1967            {
 1968                // Process the response
 681969                switch (response.Status)
 1970                {
 1971                    case 200:
 1972                    {
 1973                        // Create the result
 441974                        Azure.Storage.Blobs.Models.BlobContainerInfo _value = new Azure.Storage.Blobs.Models.BlobContain
 1975
 1976                        // Get response headers
 1977                        string _header;
 441978                        if (response.Headers.TryGetValue("ETag", out _header))
 1979                        {
 441980                            _value.ETag = new Azure.ETag(_header);
 1981                        }
 441982                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 1983                        {
 441984                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 1985                        }
 1986
 1987                        // Create the response
 441988                        return Response.FromValue(_value, response);
 1989                    }
 1990                    default:
 1991                    {
 1992                        // Create the result
 241993                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 241994                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 1995
 241996                        throw _value.CreateException(clientDiagnostics, response);
 1997                    }
 1998                }
 1999            }
 2000            #endregion Container.SetMetadataAsync
 2001
 2002            #region Container.GetAccessPolicyAsync
 2003            /// <summary>
 2004            /// gets the permissions for the specified container. The permissions indicate whether container data may be
 2005            /// </summary>
 2006            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2007            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2008            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2009            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2010            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2011            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 2012            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2013            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2014            /// <param name="operationName">Operation name.</param>
 2015            /// <param name="cancellationToken">Cancellation token.</param>
 2016            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContainerAccessPolicy}</returns>
 2017            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 2018                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2019                Azure.Core.Pipeline.HttpPipeline pipeline,
 2020                System.Uri resourceUri,
 2021                string version,
 2022                int? timeout = default,
 2023                string leaseId = default,
 2024                string requestId = default,
 2025                bool async = true,
 2026                string operationName = "ContainerClient.GetAccessPolicy",
 2027                System.Threading.CancellationToken cancellationToken = default)
 2028            {
 642029                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2030                try
 2031                {
 642032                    _scope.AddAttribute("url", resourceUri);
 642033                    _scope.Start();
 642034                    using (Azure.Core.HttpMessage _message = GetAccessPolicyAsync_CreateMessage(
 642035                        pipeline,
 642036                        resourceUri,
 642037                        version,
 642038                        timeout,
 642039                        leaseId,
 642040                        requestId))
 2041                    {
 642042                        if (async)
 2043                        {
 2044                            // Send the request asynchronously if we're being called via an async path
 322045                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2046                        }
 2047                        else
 2048                        {
 2049                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2050                            // (this is safe because the Task will complete before the user can call Wait)
 322051                            pipeline.Send(_message, cancellationToken);
 2052                        }
 642053                        Azure.Response _response = _message.Response;
 642054                        cancellationToken.ThrowIfCancellationRequested();
 642055                        return GetAccessPolicyAsync_CreateResponse(clientDiagnostics, _response);
 2056                    }
 2057                }
 162058                catch (System.Exception ex)
 2059                {
 162060                    _scope.Failed(ex);
 162061                    throw;
 2062                }
 2063                finally
 2064                {
 642065                    _scope.Dispose();
 2066                }
 482067            }
 2068
 2069            /// <summary>
 2070            /// Create the Container.GetAccessPolicyAsync request.
 2071            /// </summary>
 2072            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2073            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2074            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2075            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2076            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 2077            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2078            /// <returns>The Container.GetAccessPolicyAsync Message.</returns>
 2079            internal static Azure.Core.HttpMessage GetAccessPolicyAsync_CreateMessage(
 2080                Azure.Core.Pipeline.HttpPipeline pipeline,
 2081                System.Uri resourceUri,
 2082                string version,
 2083                int? timeout = default,
 2084                string leaseId = default,
 2085                string requestId = default)
 2086            {
 2087                // Validation
 642088                if (resourceUri == null)
 2089                {
 02090                    throw new System.ArgumentNullException(nameof(resourceUri));
 2091                }
 642092                if (version == null)
 2093                {
 02094                    throw new System.ArgumentNullException(nameof(version));
 2095                }
 2096
 2097                // Create the request
 642098                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 642099                Azure.Core.Request _request = _message.Request;
 2100
 2101                // Set the endpoint
 642102                _request.Method = Azure.Core.RequestMethod.Get;
 642103                _request.Uri.Reset(resourceUri);
 642104                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 642105                _request.Uri.AppendQuery("comp", "acl", escapeValue: false);
 02106                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2107
 2108                // Add request headers
 642109                _request.Headers.SetValue("x-ms-version", version);
 802110                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 02111                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 2112
 642113                return _message;
 2114            }
 2115
 2116            /// <summary>
 2117            /// Create the Container.GetAccessPolicyAsync response or throw a failure exception.
 2118            /// </summary>
 2119            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 2120            /// <param name="response">The raw Response.</param>
 2121            /// <returns>The Container.GetAccessPolicyAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContainerAcces
 2122            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy> GetAccessPolicyAsync_Cr
 2123                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2124                Azure.Response response)
 2125            {
 2126                // Process the response
 642127                switch (response.Status)
 2128                {
 2129                    case 200:
 2130                    {
 2131                        // Create the result
 482132                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 482133                        Azure.Storage.Blobs.Models.BlobContainerAccessPolicy _value = new Azure.Storage.Blobs.Models.Blo
 482134                        _value.SignedIdentifiers =
 482135                            System.Linq.Enumerable.ToList(
 482136                                System.Linq.Enumerable.Select(
 482137                                    _xml.Element(System.Xml.Linq.XName.Get("SignedIdentifiers", "")).Elements(System.Xml
 482138                                    Azure.Storage.Blobs.Models.BlobSignedIdentifier.FromXml));
 2139
 2140                        // Get response headers
 2141                        string _header;
 482142                        if (response.Headers.TryGetValue("x-ms-blob-public-access", out _header))
 2143                        {
 162144                            _value.BlobPublicAccess = Azure.Storage.Blobs.BlobRestClient.Serialization.ParsePublicAccess
 2145                        }
 482146                        if (response.Headers.TryGetValue("ETag", out _header))
 2147                        {
 482148                            _value.ETag = new Azure.ETag(_header);
 2149                        }
 482150                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 2151                        {
 482152                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 2153                        }
 2154
 2155                        // Create the response
 482156                        return Response.FromValue(_value, response);
 2157                    }
 2158                    case 304:
 2159                    {
 02160                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobContainerAccessPolicy>(response);
 2161                    }
 2162                    default:
 2163                    {
 2164                        // Create the result
 162165                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 162166                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 2167
 162168                        throw _value.CreateException(clientDiagnostics, response);
 2169                    }
 2170                }
 2171            }
 2172            #endregion Container.GetAccessPolicyAsync
 2173
 2174            #region Container.SetAccessPolicyAsync
 2175            /// <summary>
 2176            /// sets the permissions for the specified container. The permissions indicate whether blobs in a container 
 2177            /// </summary>
 2178            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2179            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2180            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2181            /// <param name="access">Specifies whether data in the container may be accessed publicly and the level of a
 2182            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2183            /// <param name="permissions">the acls for the container</param>
 2184            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2185            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 2186            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2187            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2188            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2189            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2190            /// <param name="operationName">Operation name.</param>
 2191            /// <param name="cancellationToken">Cancellation token.</param>
 2192            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}</returns>
 2193            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 2194                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2195                Azure.Core.Pipeline.HttpPipeline pipeline,
 2196                System.Uri resourceUri,
 2197                Azure.Storage.Blobs.Models.PublicAccessType access,
 2198                string version,
 2199                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> permissions = de
 2200                int? timeout = default,
 2201                string leaseId = default,
 2202                System.DateTimeOffset? ifModifiedSince = default,
 2203                System.DateTimeOffset? ifUnmodifiedSince = default,
 2204                string requestId = default,
 2205                bool async = true,
 2206                string operationName = "ContainerClient.SetAccessPolicy",
 2207                System.Threading.CancellationToken cancellationToken = default)
 2208            {
 4402209                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2210                try
 2211                {
 4402212                    _scope.AddAttribute("url", resourceUri);
 4402213                    _scope.Start();
 4402214                    using (Azure.Core.HttpMessage _message = SetAccessPolicyAsync_CreateMessage(
 4402215                        pipeline,
 4402216                        resourceUri,
 4402217                        access,
 4402218                        version,
 4402219                        permissions,
 4402220                        timeout,
 4402221                        leaseId,
 4402222                        ifModifiedSince,
 4402223                        ifUnmodifiedSince,
 4402224                        requestId))
 2225                    {
 4402226                        if (async)
 2227                        {
 2228                            // Send the request asynchronously if we're being called via an async path
 2202229                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2230                        }
 2231                        else
 2232                        {
 2233                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2234                            // (this is safe because the Task will complete before the user can call Wait)
 2202235                            pipeline.Send(_message, cancellationToken);
 2236                        }
 4402237                        Azure.Response _response = _message.Response;
 4402238                        cancellationToken.ThrowIfCancellationRequested();
 4402239                        return SetAccessPolicyAsync_CreateResponse(clientDiagnostics, _response);
 2240                    }
 2241                }
 322242                catch (System.Exception ex)
 2243                {
 322244                    _scope.Failed(ex);
 322245                    throw;
 2246                }
 2247                finally
 2248                {
 4402249                    _scope.Dispose();
 2250                }
 4082251            }
 2252
 2253            /// <summary>
 2254            /// Create the Container.SetAccessPolicyAsync request.
 2255            /// </summary>
 2256            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2257            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2258            /// <param name="access">Specifies whether data in the container may be accessed publicly and the level of a
 2259            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2260            /// <param name="permissions">the acls for the container</param>
 2261            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2262            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 2263            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2264            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2265            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2266            /// <returns>The Container.SetAccessPolicyAsync Message.</returns>
 2267            internal static Azure.Core.HttpMessage SetAccessPolicyAsync_CreateMessage(
 2268                Azure.Core.Pipeline.HttpPipeline pipeline,
 2269                System.Uri resourceUri,
 2270                Azure.Storage.Blobs.Models.PublicAccessType access,
 2271                string version,
 2272                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> permissions = de
 2273                int? timeout = default,
 2274                string leaseId = default,
 2275                System.DateTimeOffset? ifModifiedSince = default,
 2276                System.DateTimeOffset? ifUnmodifiedSince = default,
 2277                string requestId = default)
 2278            {
 2279                // Validation
 4402280                if (resourceUri == null)
 2281                {
 02282                    throw new System.ArgumentNullException(nameof(resourceUri));
 2283                }
 4402284                if (version == null)
 2285                {
 02286                    throw new System.ArgumentNullException(nameof(version));
 2287                }
 2288
 2289                // Create the request
 4402290                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 4402291                Azure.Core.Request _request = _message.Request;
 2292
 2293                // Set the endpoint
 4402294                _request.Method = Azure.Core.RequestMethod.Put;
 4402295                _request.Uri.Reset(resourceUri);
 4402296                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 4402297                _request.Uri.AppendQuery("comp", "acl", escapeValue: false);
 02298                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2299
 2300                // Add request headers
 8402301                if (access != Azure.Storage.Blobs.Models.PublicAccessType.None) { _request.Headers.SetValue("x-ms-blob-p
 4402302                _request.Headers.SetValue("x-ms-version", version);
 4522303                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 4562304                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 4562305                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 02306                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 2307
 2308                // Create the body
 4402309                System.Xml.Linq.XElement _body = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("SignedIdentifie
 4402310                if (permissions != null)
 2311                {
 4162312                    foreach (Azure.Storage.Blobs.Models.BlobSignedIdentifier _child in permissions)
 2313                    {
 1042314                        _body.Add(Azure.Storage.Blobs.Models.BlobSignedIdentifier.ToXml(_child));
 2315                    }
 2316                }
 4402317                string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 4402318                _request.Headers.SetValue("Content-Type", "application/xml");
 4402319                _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.Invar
 4402320                _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 2321
 4402322                return _message;
 2323            }
 2324
 2325            /// <summary>
 2326            /// Create the Container.SetAccessPolicyAsync response or throw a failure exception.
 2327            /// </summary>
 2328            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 2329            /// <param name="response">The raw Response.</param>
 2330            /// <returns>The Container.SetAccessPolicyAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}
 2331            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> SetAccessPolicyAsync_CreateResp
 2332                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2333                Azure.Response response)
 2334            {
 2335                // Process the response
 4402336                switch (response.Status)
 2337                {
 2338                    case 200:
 2339                    {
 2340                        // Create the result
 4082341                        Azure.Storage.Blobs.Models.BlobContainerInfo _value = new Azure.Storage.Blobs.Models.BlobContain
 2342
 2343                        // Get response headers
 2344                        string _header;
 4082345                        if (response.Headers.TryGetValue("ETag", out _header))
 2346                        {
 4082347                            _value.ETag = new Azure.ETag(_header);
 2348                        }
 4082349                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 2350                        {
 4082351                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 2352                        }
 2353
 2354                        // Create the response
 4082355                        return Response.FromValue(_value, response);
 2356                    }
 2357                    default:
 2358                    {
 2359                        // Create the result
 322360                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 322361                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 2362
 322363                        throw _value.CreateException(clientDiagnostics, response);
 2364                    }
 2365                }
 2366            }
 2367            #endregion Container.SetAccessPolicyAsync
 2368
 2369            #region Container.RestoreAsync
 2370            /// <summary>
 2371            /// Restores a previously-deleted container.
 2372            /// </summary>
 2373            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2374            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2375            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2376            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2377            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2378            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2379            /// <param name="deletedContainerName">Optional.  Version 2019-12-12 and laster.  Specifies the name of the 
 2380            /// <param name="deletedContainerVersion">Optional.  Version 2019-12-12 and laster.  Specifies the version o
 2381            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2382            /// <param name="operationName">Operation name.</param>
 2383            /// <param name="cancellationToken">Cancellation token.</param>
 2384            /// <returns>Azure.Response</returns>
 2385            public static async System.Threading.Tasks.ValueTask<Azure.Response> RestoreAsync(
 2386                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2387                Azure.Core.Pipeline.HttpPipeline pipeline,
 2388                System.Uri resourceUri,
 2389                string version,
 2390                int? timeout = default,
 2391                string requestId = default,
 2392                string deletedContainerName = default,
 2393                string deletedContainerVersion = default,
 2394                bool async = true,
 2395                string operationName = "ContainerClient.Restore",
 2396                System.Threading.CancellationToken cancellationToken = default)
 2397            {
 02398                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2399                try
 2400                {
 02401                    _scope.AddAttribute("url", resourceUri);
 02402                    _scope.Start();
 02403                    using (Azure.Core.HttpMessage _message = RestoreAsync_CreateMessage(
 02404                        pipeline,
 02405                        resourceUri,
 02406                        version,
 02407                        timeout,
 02408                        requestId,
 02409                        deletedContainerName,
 02410                        deletedContainerVersion))
 2411                    {
 02412                        if (async)
 2413                        {
 2414                            // Send the request asynchronously if we're being called via an async path
 02415                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2416                        }
 2417                        else
 2418                        {
 2419                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2420                            // (this is safe because the Task will complete before the user can call Wait)
 02421                            pipeline.Send(_message, cancellationToken);
 2422                        }
 02423                        Azure.Response _response = _message.Response;
 02424                        cancellationToken.ThrowIfCancellationRequested();
 02425                        return RestoreAsync_CreateResponse(clientDiagnostics, _response);
 2426                    }
 2427                }
 02428                catch (System.Exception ex)
 2429                {
 02430                    _scope.Failed(ex);
 02431                    throw;
 2432                }
 2433                finally
 2434                {
 02435                    _scope.Dispose();
 2436                }
 02437            }
 2438
 2439            /// <summary>
 2440            /// Create the Container.RestoreAsync request.
 2441            /// </summary>
 2442            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2443            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2444            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2445            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2446            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2447            /// <param name="deletedContainerName">Optional.  Version 2019-12-12 and laster.  Specifies the name of the 
 2448            /// <param name="deletedContainerVersion">Optional.  Version 2019-12-12 and laster.  Specifies the version o
 2449            /// <returns>The Container.RestoreAsync Message.</returns>
 2450            internal static Azure.Core.HttpMessage RestoreAsync_CreateMessage(
 2451                Azure.Core.Pipeline.HttpPipeline pipeline,
 2452                System.Uri resourceUri,
 2453                string version,
 2454                int? timeout = default,
 2455                string requestId = default,
 2456                string deletedContainerName = default,
 2457                string deletedContainerVersion = default)
 2458            {
 2459                // Validation
 02460                if (resourceUri == null)
 2461                {
 02462                    throw new System.ArgumentNullException(nameof(resourceUri));
 2463                }
 02464                if (version == null)
 2465                {
 02466                    throw new System.ArgumentNullException(nameof(version));
 2467                }
 2468
 2469                // Create the request
 02470                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 02471                Azure.Core.Request _request = _message.Request;
 2472
 2473                // Set the endpoint
 02474                _request.Method = Azure.Core.RequestMethod.Put;
 02475                _request.Uri.Reset(resourceUri);
 02476                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 02477                _request.Uri.AppendQuery("comp", "undelete", escapeValue: false);
 02478                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2479
 2480                // Add request headers
 02481                _request.Headers.SetValue("x-ms-version", version);
 02482                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 02483                if (deletedContainerName != null) { _request.Headers.SetValue("x-ms-deleted-container-name", deletedCont
 02484                if (deletedContainerVersion != null) { _request.Headers.SetValue("x-ms-deleted-container-version", delet
 2485
 02486                return _message;
 2487            }
 2488
 2489            /// <summary>
 2490            /// Create the Container.RestoreAsync response or throw a failure exception.
 2491            /// </summary>
 2492            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 2493            /// <param name="response">The raw Response.</param>
 2494            /// <returns>The Container.RestoreAsync Azure.Response.</returns>
 2495            internal static Azure.Response RestoreAsync_CreateResponse(
 2496                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2497                Azure.Response response)
 2498            {
 2499                // Process the response
 02500                switch (response.Status)
 2501                {
 2502                    case 201:
 2503                    {
 02504                        return response;
 2505                    }
 2506                    default:
 2507                    {
 2508                        // Create the result
 02509                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 02510                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 2511
 02512                        throw _value.CreateException(clientDiagnostics, response);
 2513                    }
 2514                }
 2515            }
 2516            #endregion Container.RestoreAsync
 2517
 2518            #region Container.AcquireLeaseAsync
 2519            /// <summary>
 2520            /// [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 1
 2521            /// </summary>
 2522            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2523            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2524            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2525            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2526            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2527            /// <param name="duration">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease
 2528            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 2529            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2530            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2531            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2532            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2533            /// <param name="operationName">Operation name.</param>
 2534            /// <param name="cancellationToken">Cancellation token.</param>
 2535            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 2536            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> A
 2537                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2538                Azure.Core.Pipeline.HttpPipeline pipeline,
 2539                System.Uri resourceUri,
 2540                string version,
 2541                int? timeout = default,
 2542                long? duration = default,
 2543                string proposedLeaseId = default,
 2544                System.DateTimeOffset? ifModifiedSince = default,
 2545                System.DateTimeOffset? ifUnmodifiedSince = default,
 2546                string requestId = default,
 2547                bool async = true,
 2548                string operationName = "ContainerClient.AcquireLease",
 2549                System.Threading.CancellationToken cancellationToken = default)
 2550            {
 2802551                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2552                try
 2553                {
 2802554                    _scope.AddAttribute("url", resourceUri);
 2802555                    _scope.Start();
 2802556                    using (Azure.Core.HttpMessage _message = AcquireLeaseAsync_CreateMessage(
 2802557                        pipeline,
 2802558                        resourceUri,
 2802559                        version,
 2802560                        timeout,
 2802561                        duration,
 2802562                        proposedLeaseId,
 2802563                        ifModifiedSince,
 2802564                        ifUnmodifiedSince,
 2802565                        requestId))
 2566                    {
 2802567                        if (async)
 2568                        {
 2569                            // Send the request asynchronously if we're being called via an async path
 1402570                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2571                        }
 2572                        else
 2573                        {
 2574                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2575                            // (this is safe because the Task will complete before the user can call Wait)
 1402576                            pipeline.Send(_message, cancellationToken);
 2577                        }
 2802578                        Azure.Response _response = _message.Response;
 2802579                        cancellationToken.ThrowIfCancellationRequested();
 2802580                        return AcquireLeaseAsync_CreateResponse(clientDiagnostics, _response);
 2581                    }
 2582                }
 282583                catch (System.Exception ex)
 2584                {
 282585                    _scope.Failed(ex);
 282586                    throw;
 2587                }
 2588                finally
 2589                {
 2802590                    _scope.Dispose();
 2591                }
 2522592            }
 2593
 2594            /// <summary>
 2595            /// Create the Container.AcquireLeaseAsync request.
 2596            /// </summary>
 2597            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2598            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2599            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2600            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2601            /// <param name="duration">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease
 2602            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 2603            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2604            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2605            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2606            /// <returns>The Container.AcquireLeaseAsync Message.</returns>
 2607            internal static Azure.Core.HttpMessage AcquireLeaseAsync_CreateMessage(
 2608                Azure.Core.Pipeline.HttpPipeline pipeline,
 2609                System.Uri resourceUri,
 2610                string version,
 2611                int? timeout = default,
 2612                long? duration = default,
 2613                string proposedLeaseId = default,
 2614                System.DateTimeOffset? ifModifiedSince = default,
 2615                System.DateTimeOffset? ifUnmodifiedSince = default,
 2616                string requestId = default)
 2617            {
 2618                // Validation
 2802619                if (resourceUri == null)
 2620                {
 02621                    throw new System.ArgumentNullException(nameof(resourceUri));
 2622                }
 2802623                if (version == null)
 2624                {
 02625                    throw new System.ArgumentNullException(nameof(version));
 2626                }
 2627
 2628                // Create the request
 2802629                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 2802630                Azure.Core.Request _request = _message.Request;
 2631
 2632                // Set the endpoint
 2802633                _request.Method = Azure.Core.RequestMethod.Put;
 2802634                _request.Uri.Reset(resourceUri);
 2802635                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 2802636                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 02637                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2638
 2639                // Add request headers
 2802640                _request.Headers.SetValue("x-ms-lease-action", "acquire");
 2802641                _request.Headers.SetValue("x-ms-version", version);
 5602642                if (duration != null) { _request.Headers.SetValue("x-ms-lease-duration", duration.Value.ToString(System.
 5602643                if (proposedLeaseId != null) { _request.Headers.SetValue("x-ms-proposed-lease-id", proposedLeaseId); }
 2962644                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 2962645                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 02646                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 2647
 2802648                return _message;
 2649            }
 2650
 2651            /// <summary>
 2652            /// Create the Container.AcquireLeaseAsync response or throw a failure exception.
 2653            /// </summary>
 2654            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 2655            /// <param name="response">The raw Response.</param>
 2656            /// <returns>The Container.AcquireLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 2657            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> AcquireLeaseAsync_CreateResponse(
 2658                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2659                Azure.Response response)
 2660            {
 2661                // Process the response
 2802662                switch (response.Status)
 2663                {
 2664                    case 201:
 2665                    {
 2666                        // Create the result
 2522667                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 2668
 2669                        // Get response headers
 2670                        string _header;
 2522671                        if (response.Headers.TryGetValue("ETag", out _header))
 2672                        {
 2522673                            _value.ETag = new Azure.ETag(_header);
 2674                        }
 2522675                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 2676                        {
 2522677                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 2678                        }
 2522679                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 2680                        {
 2522681                            _value.LeaseId = _header;
 2682                        }
 2683
 2684                        // Create the response
 2522685                        return Response.FromValue(_value, response);
 2686                    }
 2687                    default:
 2688                    {
 2689                        // Create the result
 282690                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 282691                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 2692
 282693                        throw _value.CreateException(clientDiagnostics, response);
 2694                    }
 2695                }
 2696            }
 2697            #endregion Container.AcquireLeaseAsync
 2698
 2699            #region Container.ReleaseLeaseAsync
 2700            /// <summary>
 2701            /// [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 1
 2702            /// </summary>
 2703            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2704            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2705            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2706            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 2707            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2708            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2709            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2710            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2711            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2712            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2713            /// <param name="operationName">Operation name.</param>
 2714            /// <param name="cancellationToken">Cancellation token.</param>
 2715            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}</returns>
 2716            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContainer
 2717                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2718                Azure.Core.Pipeline.HttpPipeline pipeline,
 2719                System.Uri resourceUri,
 2720                string leaseId,
 2721                string version,
 2722                int? timeout = default,
 2723                System.DateTimeOffset? ifModifiedSince = default,
 2724                System.DateTimeOffset? ifUnmodifiedSince = default,
 2725                string requestId = default,
 2726                bool async = true,
 2727                string operationName = "ContainerClient.ReleaseLease",
 2728                System.Threading.CancellationToken cancellationToken = default)
 2729            {
 722730                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2731                try
 2732                {
 722733                    _scope.AddAttribute("url", resourceUri);
 722734                    _scope.Start();
 722735                    using (Azure.Core.HttpMessage _message = ReleaseLeaseAsync_CreateMessage(
 722736                        pipeline,
 722737                        resourceUri,
 722738                        leaseId,
 722739                        version,
 722740                        timeout,
 722741                        ifModifiedSince,
 722742                        ifUnmodifiedSince,
 722743                        requestId))
 2744                    {
 722745                        if (async)
 2746                        {
 2747                            // Send the request asynchronously if we're being called via an async path
 362748                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2749                        }
 2750                        else
 2751                        {
 2752                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2753                            // (this is safe because the Task will complete before the user can call Wait)
 362754                            pipeline.Send(_message, cancellationToken);
 2755                        }
 722756                        Azure.Response _response = _message.Response;
 722757                        cancellationToken.ThrowIfCancellationRequested();
 722758                        return ReleaseLeaseAsync_CreateResponse(clientDiagnostics, _response);
 2759                    }
 2760                }
 322761                catch (System.Exception ex)
 2762                {
 322763                    _scope.Failed(ex);
 322764                    throw;
 2765                }
 2766                finally
 2767                {
 722768                    _scope.Dispose();
 2769                }
 402770            }
 2771
 2772            /// <summary>
 2773            /// Create the Container.ReleaseLeaseAsync request.
 2774            /// </summary>
 2775            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2776            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2777            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 2778            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2779            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2780            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2781            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2782            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2783            /// <returns>The Container.ReleaseLeaseAsync Message.</returns>
 2784            internal static Azure.Core.HttpMessage ReleaseLeaseAsync_CreateMessage(
 2785                Azure.Core.Pipeline.HttpPipeline pipeline,
 2786                System.Uri resourceUri,
 2787                string leaseId,
 2788                string version,
 2789                int? timeout = default,
 2790                System.DateTimeOffset? ifModifiedSince = default,
 2791                System.DateTimeOffset? ifUnmodifiedSince = default,
 2792                string requestId = default)
 2793            {
 2794                // Validation
 722795                if (resourceUri == null)
 2796                {
 02797                    throw new System.ArgumentNullException(nameof(resourceUri));
 2798                }
 722799                if (leaseId == null)
 2800                {
 02801                    throw new System.ArgumentNullException(nameof(leaseId));
 2802                }
 722803                if (version == null)
 2804                {
 02805                    throw new System.ArgumentNullException(nameof(version));
 2806                }
 2807
 2808                // Create the request
 722809                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 722810                Azure.Core.Request _request = _message.Request;
 2811
 2812                // Set the endpoint
 722813                _request.Method = Azure.Core.RequestMethod.Put;
 722814                _request.Uri.Reset(resourceUri);
 722815                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 722816                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 02817                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2818
 2819                // Add request headers
 722820                _request.Headers.SetValue("x-ms-lease-action", "release");
 722821                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 722822                _request.Headers.SetValue("x-ms-version", version);
 882823                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 882824                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 02825                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 2826
 722827                return _message;
 2828            }
 2829
 2830            /// <summary>
 2831            /// Create the Container.ReleaseLeaseAsync response or throw a failure exception.
 2832            /// </summary>
 2833            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 2834            /// <param name="response">The raw Response.</param>
 2835            /// <returns>The Container.ReleaseLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContainerInfo}.</
 2836            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContainerInfo> ReleaseLeaseAsync_CreateRespons
 2837                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2838                Azure.Response response)
 2839            {
 2840                // Process the response
 722841                switch (response.Status)
 2842                {
 2843                    case 200:
 2844                    {
 2845                        // Create the result
 402846                        Azure.Storage.Blobs.Models.BlobContainerInfo _value = new Azure.Storage.Blobs.Models.BlobContain
 2847
 2848                        // Get response headers
 2849                        string _header;
 402850                        if (response.Headers.TryGetValue("ETag", out _header))
 2851                        {
 402852                            _value.ETag = new Azure.ETag(_header);
 2853                        }
 402854                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 2855                        {
 402856                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 2857                        }
 2858
 2859                        // Create the response
 402860                        return Response.FromValue(_value, response);
 2861                    }
 2862                    default:
 2863                    {
 2864                        // Create the result
 322865                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 322866                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 2867
 322868                        throw _value.CreateException(clientDiagnostics, response);
 2869                    }
 2870                }
 2871            }
 2872            #endregion Container.ReleaseLeaseAsync
 2873
 2874            #region Container.RenewLeaseAsync
 2875            /// <summary>
 2876            /// [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 1
 2877            /// </summary>
 2878            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 2879            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2880            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2881            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 2882            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2883            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2884            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2885            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2886            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2887            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 2888            /// <param name="operationName">Operation name.</param>
 2889            /// <param name="cancellationToken">Cancellation token.</param>
 2890            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 2891            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> R
 2892                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 2893                Azure.Core.Pipeline.HttpPipeline pipeline,
 2894                System.Uri resourceUri,
 2895                string leaseId,
 2896                string version,
 2897                int? timeout = default,
 2898                System.DateTimeOffset? ifModifiedSince = default,
 2899                System.DateTimeOffset? ifUnmodifiedSince = default,
 2900                string requestId = default,
 2901                bool async = true,
 2902                string operationName = "ContainerClient.RenewLease",
 2903                System.Threading.CancellationToken cancellationToken = default)
 2904            {
 482905                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 2906                try
 2907                {
 482908                    _scope.AddAttribute("url", resourceUri);
 482909                    _scope.Start();
 482910                    using (Azure.Core.HttpMessage _message = RenewLeaseAsync_CreateMessage(
 482911                        pipeline,
 482912                        resourceUri,
 482913                        leaseId,
 482914                        version,
 482915                        timeout,
 482916                        ifModifiedSince,
 482917                        ifUnmodifiedSince,
 482918                        requestId))
 2919                    {
 482920                        if (async)
 2921                        {
 2922                            // Send the request asynchronously if we're being called via an async path
 242923                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 2924                        }
 2925                        else
 2926                        {
 2927                            // Send the request synchronously through the API that blocks if we're being called via a sy
 2928                            // (this is safe because the Task will complete before the user can call Wait)
 242929                            pipeline.Send(_message, cancellationToken);
 2930                        }
 482931                        Azure.Response _response = _message.Response;
 482932                        cancellationToken.ThrowIfCancellationRequested();
 482933                        return RenewLeaseAsync_CreateResponse(clientDiagnostics, _response);
 2934                    }
 2935                }
 162936                catch (System.Exception ex)
 2937                {
 162938                    _scope.Failed(ex);
 162939                    throw;
 2940                }
 2941                finally
 2942                {
 482943                    _scope.Dispose();
 2944                }
 322945            }
 2946
 2947            /// <summary>
 2948            /// Create the Container.RenewLeaseAsync request.
 2949            /// </summary>
 2950            /// <param name="pipeline">The pipeline used for sending requests.</param>
 2951            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 2952            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 2953            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 2954            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 2955            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 2956            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 2957            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 2958            /// <returns>The Container.RenewLeaseAsync Message.</returns>
 2959            internal static Azure.Core.HttpMessage RenewLeaseAsync_CreateMessage(
 2960                Azure.Core.Pipeline.HttpPipeline pipeline,
 2961                System.Uri resourceUri,
 2962                string leaseId,
 2963                string version,
 2964                int? timeout = default,
 2965                System.DateTimeOffset? ifModifiedSince = default,
 2966                System.DateTimeOffset? ifUnmodifiedSince = default,
 2967                string requestId = default)
 2968            {
 2969                // Validation
 482970                if (resourceUri == null)
 2971                {
 02972                    throw new System.ArgumentNullException(nameof(resourceUri));
 2973                }
 482974                if (leaseId == null)
 2975                {
 02976                    throw new System.ArgumentNullException(nameof(leaseId));
 2977                }
 482978                if (version == null)
 2979                {
 02980                    throw new System.ArgumentNullException(nameof(version));
 2981                }
 2982
 2983                // Create the request
 482984                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 482985                Azure.Core.Request _request = _message.Request;
 2986
 2987                // Set the endpoint
 482988                _request.Method = Azure.Core.RequestMethod.Put;
 482989                _request.Uri.Reset(resourceUri);
 482990                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 482991                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 02992                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 2993
 2994                // Add request headers
 482995                _request.Headers.SetValue("x-ms-lease-action", "renew");
 482996                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 482997                _request.Headers.SetValue("x-ms-version", version);
 642998                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 642999                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 03000                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3001
 483002                return _message;
 3003            }
 3004
 3005            /// <summary>
 3006            /// Create the Container.RenewLeaseAsync response or throw a failure exception.
 3007            /// </summary>
 3008            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3009            /// <param name="response">The raw Response.</param>
 3010            /// <returns>The Container.RenewLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 3011            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> RenewLeaseAsync_CreateResponse(
 3012                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3013                Azure.Response response)
 3014            {
 3015                // Process the response
 483016                switch (response.Status)
 3017                {
 3018                    case 200:
 3019                    {
 3020                        // Create the result
 323021                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 3022
 3023                        // Get response headers
 3024                        string _header;
 323025                        if (response.Headers.TryGetValue("ETag", out _header))
 3026                        {
 323027                            _value.ETag = new Azure.ETag(_header);
 3028                        }
 323029                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 3030                        {
 323031                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 3032                        }
 323033                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 3034                        {
 323035                            _value.LeaseId = _header;
 3036                        }
 3037
 3038                        // Create the response
 323039                        return Response.FromValue(_value, response);
 3040                    }
 3041                    default:
 3042                    {
 3043                        // Create the result
 163044                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 163045                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 3046
 163047                        throw _value.CreateException(clientDiagnostics, response);
 3048                    }
 3049                }
 3050            }
 3051            #endregion Container.RenewLeaseAsync
 3052
 3053            #region Container.BreakLeaseAsync
 3054            /// <summary>
 3055            /// [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 1
 3056            /// </summary>
 3057            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 3058            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3059            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3060            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3061            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3062            /// <param name="breakPeriod">For a break operation, proposed duration the lease should continue before it i
 3063            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3064            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3065            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3066            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 3067            /// <param name="operationName">Operation name.</param>
 3068            /// <param name="cancellationToken">Cancellation token.</param>
 3069            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BrokenLease}</returns>
 3070            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BrokenLease>>
 3071                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3072                Azure.Core.Pipeline.HttpPipeline pipeline,
 3073                System.Uri resourceUri,
 3074                string version,
 3075                int? timeout = default,
 3076                long? breakPeriod = default,
 3077                System.DateTimeOffset? ifModifiedSince = default,
 3078                System.DateTimeOffset? ifUnmodifiedSince = default,
 3079                string requestId = default,
 3080                bool async = true,
 3081                string operationName = "ContainerClient.BreakLease",
 3082                System.Threading.CancellationToken cancellationToken = default)
 3083            {
 563084                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 3085                try
 3086                {
 563087                    _scope.AddAttribute("url", resourceUri);
 563088                    _scope.Start();
 563089                    using (Azure.Core.HttpMessage _message = BreakLeaseAsync_CreateMessage(
 563090                        pipeline,
 563091                        resourceUri,
 563092                        version,
 563093                        timeout,
 563094                        breakPeriod,
 563095                        ifModifiedSince,
 563096                        ifUnmodifiedSince,
 563097                        requestId))
 3098                    {
 563099                        if (async)
 3100                        {
 3101                            // Send the request asynchronously if we're being called via an async path
 283102                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 3103                        }
 3104                        else
 3105                        {
 3106                            // Send the request synchronously through the API that blocks if we're being called via a sy
 3107                            // (this is safe because the Task will complete before the user can call Wait)
 283108                            pipeline.Send(_message, cancellationToken);
 3109                        }
 563110                        Azure.Response _response = _message.Response;
 563111                        cancellationToken.ThrowIfCancellationRequested();
 563112                        return BreakLeaseAsync_CreateResponse(clientDiagnostics, _response);
 3113                    }
 3114                }
 243115                catch (System.Exception ex)
 3116                {
 243117                    _scope.Failed(ex);
 243118                    throw;
 3119                }
 3120                finally
 3121                {
 563122                    _scope.Dispose();
 3123                }
 323124            }
 3125
 3126            /// <summary>
 3127            /// Create the Container.BreakLeaseAsync request.
 3128            /// </summary>
 3129            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3130            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3131            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3132            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3133            /// <param name="breakPeriod">For a break operation, proposed duration the lease should continue before it i
 3134            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3135            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3136            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3137            /// <returns>The Container.BreakLeaseAsync Message.</returns>
 3138            internal static Azure.Core.HttpMessage BreakLeaseAsync_CreateMessage(
 3139                Azure.Core.Pipeline.HttpPipeline pipeline,
 3140                System.Uri resourceUri,
 3141                string version,
 3142                int? timeout = default,
 3143                long? breakPeriod = default,
 3144                System.DateTimeOffset? ifModifiedSince = default,
 3145                System.DateTimeOffset? ifUnmodifiedSince = default,
 3146                string requestId = default)
 3147            {
 3148                // Validation
 563149                if (resourceUri == null)
 3150                {
 03151                    throw new System.ArgumentNullException(nameof(resourceUri));
 3152                }
 563153                if (version == null)
 3154                {
 03155                    throw new System.ArgumentNullException(nameof(version));
 3156                }
 3157
 3158                // Create the request
 563159                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 563160                Azure.Core.Request _request = _message.Request;
 3161
 3162                // Set the endpoint
 563163                _request.Method = Azure.Core.RequestMethod.Put;
 563164                _request.Uri.Reset(resourceUri);
 563165                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 563166                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 03167                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 3168
 3169                // Add request headers
 563170                _request.Headers.SetValue("x-ms-lease-action", "break");
 563171                _request.Headers.SetValue("x-ms-version", version);
 643172                if (breakPeriod != null) { _request.Headers.SetValue("x-ms-lease-break-period", breakPeriod.Value.ToStri
 723173                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 723174                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 03175                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3176
 563177                return _message;
 3178            }
 3179
 3180            /// <summary>
 3181            /// Create the Container.BreakLeaseAsync response or throw a failure exception.
 3182            /// </summary>
 3183            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3184            /// <param name="response">The raw Response.</param>
 3185            /// <returns>The Container.BreakLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BrokenLease}.</returns>
 3186            internal static Azure.Response<Azure.Storage.Blobs.Models.BrokenLease> BreakLeaseAsync_CreateResponse(
 3187                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3188                Azure.Response response)
 3189            {
 3190                // Process the response
 563191                switch (response.Status)
 3192                {
 3193                    case 202:
 3194                    {
 3195                        // Create the result
 323196                        Azure.Storage.Blobs.Models.BrokenLease _value = new Azure.Storage.Blobs.Models.BrokenLease();
 3197
 3198                        // Get response headers
 3199                        string _header;
 323200                        if (response.Headers.TryGetValue("ETag", out _header))
 3201                        {
 323202                            _value.ETag = new Azure.ETag(_header);
 3203                        }
 323204                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 3205                        {
 323206                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 3207                        }
 323208                        if (response.Headers.TryGetValue("x-ms-lease-time", out _header))
 3209                        {
 323210                            _value.LeaseTime = int.Parse(_header, System.Globalization.CultureInfo.InvariantCulture);
 3211                        }
 3212
 3213                        // Create the response
 323214                        return Response.FromValue(_value, response);
 3215                    }
 3216                    default:
 3217                    {
 3218                        // Create the result
 243219                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 243220                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 3221
 243222                        throw _value.CreateException(clientDiagnostics, response);
 3223                    }
 3224                }
 3225            }
 3226            #endregion Container.BreakLeaseAsync
 3227
 3228            #region Container.ChangeLeaseAsync
 3229            /// <summary>
 3230            /// [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 1
 3231            /// </summary>
 3232            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 3233            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3234            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3235            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 3236            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 3237            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3238            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3239            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3240            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3241            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3242            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 3243            /// <param name="operationName">Operation name.</param>
 3244            /// <param name="cancellationToken">Cancellation token.</param>
 3245            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 3246            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> C
 3247                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3248                Azure.Core.Pipeline.HttpPipeline pipeline,
 3249                System.Uri resourceUri,
 3250                string leaseId,
 3251                string proposedLeaseId,
 3252                string version,
 3253                int? timeout = default,
 3254                System.DateTimeOffset? ifModifiedSince = default,
 3255                System.DateTimeOffset? ifUnmodifiedSince = default,
 3256                string requestId = default,
 3257                bool async = true,
 3258                string operationName = "ContainerClient.ChangeLease",
 3259                System.Threading.CancellationToken cancellationToken = default)
 3260            {
 563261                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 3262                try
 3263                {
 563264                    _scope.AddAttribute("url", resourceUri);
 563265                    _scope.Start();
 563266                    using (Azure.Core.HttpMessage _message = ChangeLeaseAsync_CreateMessage(
 563267                        pipeline,
 563268                        resourceUri,
 563269                        leaseId,
 563270                        proposedLeaseId,
 563271                        version,
 563272                        timeout,
 563273                        ifModifiedSince,
 563274                        ifUnmodifiedSince,
 563275                        requestId))
 3276                    {
 563277                        if (async)
 3278                        {
 3279                            // Send the request asynchronously if we're being called via an async path
 283280                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 3281                        }
 3282                        else
 3283                        {
 3284                            // Send the request synchronously through the API that blocks if we're being called via a sy
 3285                            // (this is safe because the Task will complete before the user can call Wait)
 283286                            pipeline.Send(_message, cancellationToken);
 3287                        }
 563288                        Azure.Response _response = _message.Response;
 563289                        cancellationToken.ThrowIfCancellationRequested();
 563290                        return ChangeLeaseAsync_CreateResponse(clientDiagnostics, _response);
 3291                    }
 3292                }
 243293                catch (System.Exception ex)
 3294                {
 243295                    _scope.Failed(ex);
 243296                    throw;
 3297                }
 3298                finally
 3299                {
 563300                    _scope.Dispose();
 3301                }
 323302            }
 3303
 3304            /// <summary>
 3305            /// Create the Container.ChangeLeaseAsync request.
 3306            /// </summary>
 3307            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3308            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3309            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 3310            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 3311            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3312            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3313            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3314            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3315            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3316            /// <returns>The Container.ChangeLeaseAsync Message.</returns>
 3317            internal static Azure.Core.HttpMessage ChangeLeaseAsync_CreateMessage(
 3318                Azure.Core.Pipeline.HttpPipeline pipeline,
 3319                System.Uri resourceUri,
 3320                string leaseId,
 3321                string proposedLeaseId,
 3322                string version,
 3323                int? timeout = default,
 3324                System.DateTimeOffset? ifModifiedSince = default,
 3325                System.DateTimeOffset? ifUnmodifiedSince = default,
 3326                string requestId = default)
 3327            {
 3328                // Validation
 563329                if (resourceUri == null)
 3330                {
 03331                    throw new System.ArgumentNullException(nameof(resourceUri));
 3332                }
 563333                if (leaseId == null)
 3334                {
 03335                    throw new System.ArgumentNullException(nameof(leaseId));
 3336                }
 563337                if (proposedLeaseId == null)
 3338                {
 03339                    throw new System.ArgumentNullException(nameof(proposedLeaseId));
 3340                }
 563341                if (version == null)
 3342                {
 03343                    throw new System.ArgumentNullException(nameof(version));
 3344                }
 3345
 3346                // Create the request
 563347                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 563348                Azure.Core.Request _request = _message.Request;
 3349
 3350                // Set the endpoint
 563351                _request.Method = Azure.Core.RequestMethod.Put;
 563352                _request.Uri.Reset(resourceUri);
 563353                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 563354                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 03355                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 3356
 3357                // Add request headers
 563358                _request.Headers.SetValue("x-ms-lease-action", "change");
 563359                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 563360                _request.Headers.SetValue("x-ms-proposed-lease-id", proposedLeaseId);
 563361                _request.Headers.SetValue("x-ms-version", version);
 723362                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 723363                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 03364                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3365
 563366                return _message;
 3367            }
 3368
 3369            /// <summary>
 3370            /// Create the Container.ChangeLeaseAsync response or throw a failure exception.
 3371            /// </summary>
 3372            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3373            /// <param name="response">The raw Response.</param>
 3374            /// <returns>The Container.ChangeLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 3375            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> ChangeLeaseAsync_CreateResponse(
 3376                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3377                Azure.Response response)
 3378            {
 3379                // Process the response
 563380                switch (response.Status)
 3381                {
 3382                    case 200:
 3383                    {
 3384                        // Create the result
 323385                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 3386
 3387                        // Get response headers
 3388                        string _header;
 323389                        if (response.Headers.TryGetValue("ETag", out _header))
 3390                        {
 323391                            _value.ETag = new Azure.ETag(_header);
 3392                        }
 323393                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 3394                        {
 323395                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 3396                        }
 323397                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 3398                        {
 323399                            _value.LeaseId = _header;
 3400                        }
 3401
 3402                        // Create the response
 323403                        return Response.FromValue(_value, response);
 3404                    }
 3405                    default:
 3406                    {
 3407                        // Create the result
 243408                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 243409                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 3410
 243411                        throw _value.CreateException(clientDiagnostics, response);
 3412                    }
 3413                }
 3414            }
 3415            #endregion Container.ChangeLeaseAsync
 3416
 3417            #region Container.ListBlobsFlatSegmentAsync
 3418            /// <summary>
 3419            /// [Update] The List Blobs operation returns a list of the blobs under the specified container
 3420            /// </summary>
 3421            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 3422            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3423            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3424            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3425            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 3426            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 3427            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 3428            /// <param name="include">Include this parameter to specify one or more datasets to include in the response.
 3429            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3430            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3431            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 3432            /// <param name="operationName">Operation name.</param>
 3433            /// <param name="cancellationToken">Cancellation token.</param>
 3434            /// <returns>An enumeration of blobs</returns>
 3435            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobsFlatSegm
 3436                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3437                Azure.Core.Pipeline.HttpPipeline pipeline,
 3438                System.Uri resourceUri,
 3439                string version,
 3440                string prefix = default,
 3441                string marker = default,
 3442                int? maxresults = default,
 3443                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListBlobsIncludeItem> include = defaul
 3444                int? timeout = default,
 3445                string requestId = default,
 3446                bool async = true,
 3447                string operationName = "ContainerClient.ListBlobsFlatSegment",
 3448                System.Threading.CancellationToken cancellationToken = default)
 3449            {
 1463450                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 3451                try
 3452                {
 1463453                    _scope.AddAttribute("url", resourceUri);
 1463454                    _scope.Start();
 1463455                    using (Azure.Core.HttpMessage _message = ListBlobsFlatSegmentAsync_CreateMessage(
 1463456                        pipeline,
 1463457                        resourceUri,
 1463458                        version,
 1463459                        prefix,
 1463460                        marker,
 1463461                        maxresults,
 1463462                        include,
 1463463                        timeout,
 1463464                        requestId))
 3465                    {
 1463466                        if (async)
 3467                        {
 3468                            // Send the request asynchronously if we're being called via an async path
 783469                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 3470                        }
 3471                        else
 3472                        {
 3473                            // Send the request synchronously through the API that blocks if we're being called via a sy
 3474                            // (this is safe because the Task will complete before the user can call Wait)
 683475                            pipeline.Send(_message, cancellationToken);
 3476                        }
 1463477                        Azure.Response _response = _message.Response;
 1463478                        cancellationToken.ThrowIfCancellationRequested();
 1463479                        return ListBlobsFlatSegmentAsync_CreateResponse(clientDiagnostics, _response);
 3480                    }
 3481                }
 43482                catch (System.Exception ex)
 3483                {
 43484                    _scope.Failed(ex);
 43485                    throw;
 3486                }
 3487                finally
 3488                {
 1463489                    _scope.Dispose();
 3490                }
 1423491            }
 3492
 3493            /// <summary>
 3494            /// Create the Container.ListBlobsFlatSegmentAsync request.
 3495            /// </summary>
 3496            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3497            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3498            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3499            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 3500            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 3501            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 3502            /// <param name="include">Include this parameter to specify one or more datasets to include in the response.
 3503            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3504            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3505            /// <returns>The Container.ListBlobsFlatSegmentAsync Message.</returns>
 3506            internal static Azure.Core.HttpMessage ListBlobsFlatSegmentAsync_CreateMessage(
 3507                Azure.Core.Pipeline.HttpPipeline pipeline,
 3508                System.Uri resourceUri,
 3509                string version,
 3510                string prefix = default,
 3511                string marker = default,
 3512                int? maxresults = default,
 3513                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListBlobsIncludeItem> include = defaul
 3514                int? timeout = default,
 3515                string requestId = default)
 3516            {
 3517                // Validation
 1463518                if (resourceUri == null)
 3519                {
 03520                    throw new System.ArgumentNullException(nameof(resourceUri));
 3521                }
 1463522                if (version == null)
 3523                {
 03524                    throw new System.ArgumentNullException(nameof(version));
 3525                }
 3526
 3527                // Create the request
 1463528                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1463529                Azure.Core.Request _request = _message.Request;
 3530
 3531                // Set the endpoint
 1463532                _request.Method = Azure.Core.RequestMethod.Get;
 1463533                _request.Uri.Reset(resourceUri);
 1463534                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 1463535                _request.Uri.AppendQuery("comp", "list", escapeValue: false);
 1503536                if (prefix != null) { _request.Uri.AppendQuery("prefix", prefix); }
 03537                if (marker != null) { _request.Uri.AppendQuery("marker", marker); }
 1483538                if (maxresults != null) { _request.Uri.AppendQuery("maxresults", maxresults.Value.ToString(System.Global
 1943539                if (include != null) { _request.Uri.AppendQuery("include", string.Join(",", System.Linq.Enumerable.Selec
 03540                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 3541
 3542                // Add request headers
 1463543                _request.Headers.SetValue("x-ms-version", version);
 03544                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3545
 1463546                return _message;
 3547            }
 3548
 3549            /// <summary>
 3550            /// Create the Container.ListBlobsFlatSegmentAsync response or throw a failure exception.
 3551            /// </summary>
 3552            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3553            /// <param name="response">The raw Response.</param>
 3554            /// <returns>The Container.ListBlobsFlatSegmentAsync Azure.Response{Azure.Storage.Blobs.Models.BlobsFlatSegm
 3555            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobsFlatSegment> ListBlobsFlatSegmentAsync_Create
 3556                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3557                Azure.Response response)
 3558            {
 3559                // Process the response
 1463560                switch (response.Status)
 3561                {
 3562                    case 200:
 3563                    {
 3564                        // Create the result
 1423565                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 1423566                        Azure.Storage.Blobs.Models.BlobsFlatSegment _value = Azure.Storage.Blobs.Models.BlobsFlatSegment
 3567
 3568                        // Create the response
 1423569                        return Response.FromValue(_value, response);
 3570                    }
 3571                    case 304:
 3572                    {
 03573                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobsFlatSegment>(response);
 3574                    }
 3575                    default:
 3576                    {
 3577                        // Create the result
 43578                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 43579                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 3580
 43581                        throw _value.CreateException(clientDiagnostics, response);
 3582                    }
 3583                }
 3584            }
 3585            #endregion Container.ListBlobsFlatSegmentAsync
 3586
 3587            #region Container.ListBlobsHierarchySegmentAsync
 3588            /// <summary>
 3589            /// [Update] The List Blobs operation returns a list of the blobs under the specified container
 3590            /// </summary>
 3591            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 3592            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3593            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3594            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3595            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 3596            /// <param name="delimiter">When the request includes this parameter, the operation returns a BlobPrefix ele
 3597            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 3598            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 3599            /// <param name="include">Include this parameter to specify one or more datasets to include in the response.
 3600            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3601            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3602            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 3603            /// <param name="operationName">Operation name.</param>
 3604            /// <param name="cancellationToken">Cancellation token.</param>
 3605            /// <returns>An enumeration of blobs</returns>
 3606            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobsHierarch
 3607                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3608                Azure.Core.Pipeline.HttpPipeline pipeline,
 3609                System.Uri resourceUri,
 3610                string version,
 3611                string prefix = default,
 3612                string delimiter = default,
 3613                string marker = default,
 3614                int? maxresults = default,
 3615                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListBlobsIncludeItem> include = defaul
 3616                int? timeout = default,
 3617                string requestId = default,
 3618                bool async = true,
 3619                string operationName = "ContainerClient.ListBlobsHierarchySegment",
 3620                System.Threading.CancellationToken cancellationToken = default)
 3621            {
 4263622                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 3623                try
 3624                {
 4263625                    _scope.AddAttribute("url", resourceUri);
 4263626                    _scope.Start();
 4263627                    using (Azure.Core.HttpMessage _message = ListBlobsHierarchySegmentAsync_CreateMessage(
 4263628                        pipeline,
 4263629                        resourceUri,
 4263630                        version,
 4263631                        prefix,
 4263632                        delimiter,
 4263633                        marker,
 4263634                        maxresults,
 4263635                        include,
 4263636                        timeout,
 4263637                        requestId))
 3638                    {
 4263639                        if (async)
 3640                        {
 3641                            // Send the request asynchronously if we're being called via an async path
 2143642                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 3643                        }
 3644                        else
 3645                        {
 3646                            // Send the request synchronously through the API that blocks if we're being called via a sy
 3647                            // (this is safe because the Task will complete before the user can call Wait)
 2123648                            pipeline.Send(_message, cancellationToken);
 3649                        }
 4263650                        Azure.Response _response = _message.Response;
 4263651                        cancellationToken.ThrowIfCancellationRequested();
 4263652                        return ListBlobsHierarchySegmentAsync_CreateResponse(clientDiagnostics, _response);
 3653                    }
 3654                }
 43655                catch (System.Exception ex)
 3656                {
 43657                    _scope.Failed(ex);
 43658                    throw;
 3659                }
 3660                finally
 3661                {
 4263662                    _scope.Dispose();
 3663                }
 4223664            }
 3665
 3666            /// <summary>
 3667            /// Create the Container.ListBlobsHierarchySegmentAsync request.
 3668            /// </summary>
 3669            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3670            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3671            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3672            /// <param name="prefix">Filters the results to return only containers whose name begins with the specified 
 3673            /// <param name="delimiter">When the request includes this parameter, the operation returns a BlobPrefix ele
 3674            /// <param name="marker">A string value that identifies the portion of the list of containers to be returned
 3675            /// <param name="maxresults">Specifies the maximum number of containers to return. If the request does not s
 3676            /// <param name="include">Include this parameter to specify one or more datasets to include in the response.
 3677            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3678            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3679            /// <returns>The Container.ListBlobsHierarchySegmentAsync Message.</returns>
 3680            internal static Azure.Core.HttpMessage ListBlobsHierarchySegmentAsync_CreateMessage(
 3681                Azure.Core.Pipeline.HttpPipeline pipeline,
 3682                System.Uri resourceUri,
 3683                string version,
 3684                string prefix = default,
 3685                string delimiter = default,
 3686                string marker = default,
 3687                int? maxresults = default,
 3688                System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ListBlobsIncludeItem> include = defaul
 3689                int? timeout = default,
 3690                string requestId = default)
 3691            {
 3692                // Validation
 4263693                if (resourceUri == null)
 3694                {
 03695                    throw new System.ArgumentNullException(nameof(resourceUri));
 3696                }
 4263697                if (version == null)
 3698                {
 03699                    throw new System.ArgumentNullException(nameof(version));
 3700                }
 3701
 3702                // Create the request
 4263703                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 4263704                Azure.Core.Request _request = _message.Request;
 3705
 3706                // Set the endpoint
 4263707                _request.Method = Azure.Core.RequestMethod.Get;
 4263708                _request.Uri.Reset(resourceUri);
 4263709                _request.Uri.AppendQuery("restype", "container", escapeValue: false);
 4263710                _request.Uri.AppendQuery("comp", "list", escapeValue: false);
 7983711                if (prefix != null) { _request.Uri.AppendQuery("prefix", prefix); }
 5083712                if (delimiter != null) { _request.Uri.AppendQuery("delimiter", delimiter); }
 03713                if (marker != null) { _request.Uri.AppendQuery("marker", marker); }
 603714                if (maxresults != null) { _request.Uri.AppendQuery("maxresults", maxresults.Value.ToString(System.Global
 1063715                if (include != null) { _request.Uri.AppendQuery("include", string.Join(",", System.Linq.Enumerable.Selec
 03716                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 3717
 3718                // Add request headers
 4263719                _request.Headers.SetValue("x-ms-version", version);
 03720                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3721
 4263722                return _message;
 3723            }
 3724
 3725            /// <summary>
 3726            /// Create the Container.ListBlobsHierarchySegmentAsync response or throw a failure exception.
 3727            /// </summary>
 3728            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3729            /// <param name="response">The raw Response.</param>
 3730            /// <returns>The Container.ListBlobsHierarchySegmentAsync Azure.Response{Azure.Storage.Blobs.Models.BlobsHie
 3731            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobsHierarchySegment> ListBlobsHierarchySegmentAs
 3732                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3733                Azure.Response response)
 3734            {
 3735                // Process the response
 4263736                switch (response.Status)
 3737                {
 3738                    case 200:
 3739                    {
 3740                        // Create the result
 4223741                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4223742                        Azure.Storage.Blobs.Models.BlobsHierarchySegment _value = Azure.Storage.Blobs.Models.BlobsHierar
 3743
 3744                        // Create the response
 4223745                        return Response.FromValue(_value, response);
 3746                    }
 3747                    case 304:
 3748                    {
 03749                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobsHierarchySegment>(response);
 3750                    }
 3751                    default:
 3752                    {
 3753                        // Create the result
 43754                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 43755                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 3756
 43757                        throw _value.CreateException(clientDiagnostics, response);
 3758                    }
 3759                }
 3760            }
 3761            #endregion Container.ListBlobsHierarchySegmentAsync
 3762        }
 3763        #endregion Container operations
 3764
 3765        #region Blob operations
 3766        /// <summary>
 3767        /// Blob operations for Azure Blob Storage
 3768        /// </summary>
 3769        public static partial class Blob
 3770        {
 3771            #region Blob.DownloadAsync
 3772            /// <summary>
 3773            /// The Download operation reads or downloads a blob from the system, including its metadata and properties.
 3774            /// </summary>
 3775            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 3776            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3777            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3778            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3779            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 3780            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 3781            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3782            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 3783            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 3784            /// <param name="rangeGetContentHash">When set to true and specified together with the Range, the service re
 3785            /// <param name="rangeGetContentCRC64">When set to true and specified together with the Range, the service r
 3786            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 3787            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 3788            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 3789            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3790            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3791            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 3792            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 3793            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 3794            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3795            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 3796            /// <param name="operationName">Operation name.</param>
 3797            /// <param name="cancellationToken">Cancellation token.</param>
 3798            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.FlattenedDownloadProperties}</returns>
 3799            public static async System.Threading.Tasks.ValueTask<(Azure.Response<Azure.Storage.Blobs.Models.FlattenedDow
 3800                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3801                Azure.Core.Pipeline.HttpPipeline pipeline,
 3802                System.Uri resourceUri,
 3803                string version,
 3804                string snapshot = default,
 3805                string versionId = default,
 3806                int? timeout = default,
 3807                string range = default,
 3808                string leaseId = default,
 3809                bool? rangeGetContentHash = default,
 3810                bool? rangeGetContentCRC64 = default,
 3811                string encryptionKey = default,
 3812                string encryptionKeySha256 = default,
 3813                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 3814                System.DateTimeOffset? ifModifiedSince = default,
 3815                System.DateTimeOffset? ifUnmodifiedSince = default,
 3816                Azure.ETag? ifMatch = default,
 3817                Azure.ETag? ifNoneMatch = default,
 3818                string ifTags = default,
 3819                string requestId = default,
 3820                bool async = true,
 3821                string operationName = "BlobClient.Download",
 3822                System.Threading.CancellationToken cancellationToken = default)
 3823            {
 15563824                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 3825                try
 3826                {
 15563827                    _scope.AddAttribute("url", resourceUri);
 15563828                    _scope.Start();
 15563829                    using (Azure.Core.HttpMessage _message = DownloadAsync_CreateMessage(
 15563830                        pipeline,
 15563831                        resourceUri,
 15563832                        version,
 15563833                        snapshot,
 15563834                        versionId,
 15563835                        timeout,
 15563836                        range,
 15563837                        leaseId,
 15563838                        rangeGetContentHash,
 15563839                        rangeGetContentCRC64,
 15563840                        encryptionKey,
 15563841                        encryptionKeySha256,
 15563842                        encryptionAlgorithm,
 15563843                        ifModifiedSince,
 15563844                        ifUnmodifiedSince,
 15563845                        ifMatch,
 15563846                        ifNoneMatch,
 15563847                        ifTags,
 15563848                        requestId))
 3849                    {
 3850                        // Avoid buffering if stream is going to be returned to the caller
 15563851                        _message.BufferResponse = false;
 15563852                        if (async)
 3853                        {
 3854                            // Send the request asynchronously if we're being called via an async path
 11363855                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 3856                        }
 3857                        else
 3858                        {
 3859                            // Send the request synchronously through the API that blocks if we're being called via a sy
 3860                            // (this is safe because the Task will complete before the user can call Wait)
 4203861                            pipeline.Send(_message, cancellationToken);
 3862                        }
 15163863                        Azure.Response _response = _message.Response;
 15163864                        cancellationToken.ThrowIfCancellationRequested();
 15163865                        return (DownloadAsync_CreateResponse(clientDiagnostics, _response), _message.ExtractResponseCont
 3866                    }
 3867                }
 1043868                catch (System.Exception ex)
 3869                {
 1043870                    _scope.Failed(ex);
 1043871                    throw;
 3872                }
 3873                finally
 3874                {
 15563875                    _scope.Dispose();
 3876                }
 14523877            }
 3878
 3879            /// <summary>
 3880            /// Create the Blob.DownloadAsync request.
 3881            /// </summary>
 3882            /// <param name="pipeline">The pipeline used for sending requests.</param>
 3883            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 3884            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 3885            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 3886            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 3887            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 3888            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 3889            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 3890            /// <param name="rangeGetContentHash">When set to true and specified together with the Range, the service re
 3891            /// <param name="rangeGetContentCRC64">When set to true and specified together with the Range, the service r
 3892            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 3893            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 3894            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 3895            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 3896            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 3897            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 3898            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 3899            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 3900            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 3901            /// <returns>The Blob.DownloadAsync Message.</returns>
 3902            internal static Azure.Core.HttpMessage DownloadAsync_CreateMessage(
 3903                Azure.Core.Pipeline.HttpPipeline pipeline,
 3904                System.Uri resourceUri,
 3905                string version,
 3906                string snapshot = default,
 3907                string versionId = default,
 3908                int? timeout = default,
 3909                string range = default,
 3910                string leaseId = default,
 3911                bool? rangeGetContentHash = default,
 3912                bool? rangeGetContentCRC64 = default,
 3913                string encryptionKey = default,
 3914                string encryptionKeySha256 = default,
 3915                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 3916                System.DateTimeOffset? ifModifiedSince = default,
 3917                System.DateTimeOffset? ifUnmodifiedSince = default,
 3918                Azure.ETag? ifMatch = default,
 3919                Azure.ETag? ifNoneMatch = default,
 3920                string ifTags = default,
 3921                string requestId = default)
 3922            {
 3923                // Validation
 15563924                if (resourceUri == null)
 3925                {
 03926                    throw new System.ArgumentNullException(nameof(resourceUri));
 3927                }
 15563928                if (version == null)
 3929                {
 03930                    throw new System.ArgumentNullException(nameof(version));
 3931                }
 3932
 3933                // Create the request
 15563934                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 15563935                Azure.Core.Request _request = _message.Request;
 3936
 3937                // Set the endpoint
 15563938                _request.Method = Azure.Core.RequestMethod.Get;
 15563939                _request.Uri.Reset(resourceUri);
 03940                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 03941                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 03942                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 3943
 3944                // Add request headers
 15563945                _request.Headers.SetValue("x-ms-version", version);
 26603946                if (range != null) { _request.Headers.SetValue("x-ms-range", range); }
 11203947                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 15563948                if (rangeGetContentHash != null) {
 3949                #pragma warning disable CA1308 // Normalize strings to uppercase
 123950                _request.Headers.SetValue("x-ms-range-get-content-md5", rangeGetContentHash.Value.ToString(System.Global
 3951                #pragma warning restore CA1308 // Normalize strings to uppercase
 3952                }
 15563953                if (rangeGetContentCRC64 != null) {
 3954                #pragma warning disable CA1308 // Normalize strings to uppercase
 03955                _request.Headers.SetValue("x-ms-range-get-content-crc64", rangeGetContentCRC64.Value.ToString(System.Glo
 3956                #pragma warning restore CA1308 // Normalize strings to uppercase
 3957                }
 7723958                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 7723959                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 7723960                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 11283961                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 11243962                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 14203963                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 11243964                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 7763965                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 03966                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 3967
 15563968                return _message;
 3969            }
 3970
 3971            /// <summary>
 3972            /// Create the Blob.DownloadAsync response or throw a failure exception.
 3973            /// </summary>
 3974            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 3975            /// <param name="response">The raw Response.</param>
 3976            /// <returns>The Blob.DownloadAsync Azure.Response{Azure.Storage.Blobs.Models.FlattenedDownloadProperties}.<
 3977            internal static Azure.Response<Azure.Storage.Blobs.Models.FlattenedDownloadProperties> DownloadAsync_CreateR
 3978                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 3979                Azure.Response response)
 3980            {
 3981                // Process the response
 15163982                switch (response.Status)
 3983                {
 3984                    case 200:
 3985                    {
 3986                        // Create the result
 4003987                        Azure.Storage.Blobs.Models.FlattenedDownloadProperties _value = new Azure.Storage.Blobs.Models.F
 4003988                        _value.Content = response.ContentStream; // You should manually wrap with RetriableStream!
 3989
 3990                        // Get response headers
 3991                        string _header;
 4003992                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 3993                        {
 4003994                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 3995                        }
 4003996                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 138963997                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 3998                        {
 65483999                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 4000                            {
 164001                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 4002                            }
 4003                        }
 4004004                        if (response.Headers.TryGetValue("x-ms-or-policy-id", out _header))
 4005                        {
 44006                            _value.ObjectReplicationPolicyId = _header;
 4007                        }
 4004008                        _value.ObjectReplicationRules = new System.Collections.Generic.Dictionary<string, string>(System
 138964009                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 4010                        {
 65484011                            if (_headerPair.Name.StartsWith("x-ms-or-", System.StringComparison.InvariantCulture))
 4012                            {
 84013                                _value.ObjectReplicationRules[_headerPair.Name.Substring(8)] = _headerPair.Value;
 4014                            }
 4015                        }
 4004016                        if (response.Headers.TryGetValue("Content-Length", out _header))
 4017                        {
 4004018                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 4019                        }
 4004020                        if (response.Headers.TryGetValue("Content-Type", out _header))
 4021                        {
 4004022                            _value.ContentType = _header;
 4023                        }
 4004024                        if (response.Headers.TryGetValue("Content-Range", out _header))
 4025                        {
 04026                            _value.ContentRange = _header;
 4027                        }
 4004028                        if (response.Headers.TryGetValue("ETag", out _header))
 4029                        {
 4004030                            _value.ETag = new Azure.ETag(_header);
 4031                        }
 4004032                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 4033                        {
 3604034                            _value.ContentHash = System.Convert.FromBase64String(_header);
 4035                        }
 4004036                        if (response.Headers.TryGetValue("Content-Encoding", out _header))
 4037                        {
 04038                            _value.ContentEncoding = _header;
 4039                        }
 4004040                        if (response.Headers.TryGetValue("Cache-Control", out _header))
 4041                        {
 04042                            _value.CacheControl = _header;
 4043                        }
 4004044                        if (response.Headers.TryGetValue("Content-Disposition", out _header))
 4045                        {
 04046                            _value.ContentDisposition = _header;
 4047                        }
 4004048                        if (response.Headers.TryGetValue("Content-Language", out _header))
 4049                        {
 04050                            _value.ContentLanguage = _header;
 4051                        }
 4004052                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 4053                        {
 44054                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 4055                        }
 4004056                        if (response.Headers.TryGetValue("x-ms-blob-type", out _header))
 4057                        {
 4004058                            _value.BlobType = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobType(_header);
 4059                        }
 4004060                        if (response.Headers.TryGetValue("x-ms-copy-completion-time", out _header))
 4061                        {
 44062                            _value.CopyCompletionTime = System.DateTimeOffset.Parse(_header, System.Globalization.Cultur
 4063                        }
 4004064                        if (response.Headers.TryGetValue("x-ms-copy-status-description", out _header))
 4065                        {
 04066                            _value.CopyStatusDescription = _header;
 4067                        }
 4004068                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 4069                        {
 44070                            _value.CopyId = _header;
 4071                        }
 4004072                        if (response.Headers.TryGetValue("x-ms-copy-progress", out _header))
 4073                        {
 44074                            _value.CopyProgress = _header;
 4075                        }
 4004076                        if (response.Headers.TryGetValue("x-ms-copy-source", out _header))
 4077                        {
 44078                            _value.CopySource = new System.Uri(_header);
 4079                        }
 4004080                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 4081                        {
 44082                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 4083                        }
 4004084                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 4085                        {
 44086                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 4087                        }
 4004088                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 4089                        {
 4004090                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 4091                        }
 4004092                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 4093                        {
 4004094                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 4095                        }
 4004096                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 4097                        {
 244098                            _value.VersionId = _header;
 4099                        }
 4004100                        if (response.Headers.TryGetValue("Accept-Ranges", out _header))
 4101                        {
 4004102                            _value.AcceptRanges = _header;
 4103                        }
 4004104                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 4105                        {
 84106                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 4107                        }
 4004108                        if (response.Headers.TryGetValue("x-ms-server-encrypted", out _header))
 4109                        {
 4004110                            _value.IsServerEncrypted = bool.Parse(_header);
 4111                        }
 4004112                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 4113                        {
 44114                            _value.EncryptionKeySha256 = _header;
 4115                        }
 4004116                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 4117                        {
 44118                            _value.EncryptionScope = _header;
 4119                        }
 4004120                        if (response.Headers.TryGetValue("x-ms-blob-content-md5", out _header))
 4121                        {
 04122                            _value.BlobContentHash = System.Convert.FromBase64String(_header);
 4123                        }
 4004124                        if (response.Headers.TryGetValue("x-ms-tag-count", out _header))
 4125                        {
 84126                            _value.TagCount = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture);
 4127                        }
 4004128                        if (response.Headers.TryGetValue("x-ms-blob-sealed", out _header))
 4129                        {
 44130                            _value.IsSealed = bool.Parse(_header);
 4131                        }
 4132
 4133                        // Create the response
 4004134                        return Response.FromValue(_value, response);
 4135                    }
 4136                    case 206:
 4137                    {
 4138                        // Create the result
 10324139                        Azure.Storage.Blobs.Models.FlattenedDownloadProperties _value = new Azure.Storage.Blobs.Models.F
 10324140                        _value.Content = response.ContentStream; // You should manually wrap with RetriableStream!
 4141
 4142                        // Get response headers
 4143                        string _header;
 10324144                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 4145                        {
 10324146                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 4147                        }
 10324148                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 387164149                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 4150                        {
 183264151                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 4152                            {
 04153                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 4154                            }
 4155                        }
 10324156                        if (response.Headers.TryGetValue("x-ms-or-policy-id", out _header))
 4157                        {
 04158                            _value.ObjectReplicationPolicyId = _header;
 4159                        }
 10324160                        _value.ObjectReplicationRules = new System.Collections.Generic.Dictionary<string, string>(System
 387164161                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 4162                        {
 183264163                            if (_headerPair.Name.StartsWith("x-ms-or-", System.StringComparison.InvariantCulture))
 4164                            {
 04165                                _value.ObjectReplicationRules[_headerPair.Name.Substring(8)] = _headerPair.Value;
 4166                            }
 4167                        }
 10324168                        if (response.Headers.TryGetValue("Content-Length", out _header))
 4169                        {
 10324170                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 4171                        }
 10324172                        if (response.Headers.TryGetValue("Content-Type", out _header))
 4173                        {
 10324174                            _value.ContentType = _header;
 4175                        }
 10324176                        if (response.Headers.TryGetValue("Content-Range", out _header))
 4177                        {
 10324178                            _value.ContentRange = _header;
 4179                        }
 10324180                        if (response.Headers.TryGetValue("ETag", out _header))
 4181                        {
 10324182                            _value.ETag = new Azure.ETag(_header);
 4183                        }
 10324184                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 4185                        {
 124186                            _value.ContentHash = System.Convert.FromBase64String(_header);
 4187                        }
 10324188                        if (response.Headers.TryGetValue("Content-Encoding", out _header))
 4189                        {
 04190                            _value.ContentEncoding = _header;
 4191                        }
 10324192                        if (response.Headers.TryGetValue("Cache-Control", out _header))
 4193                        {
 04194                            _value.CacheControl = _header;
 4195                        }
 10324196                        if (response.Headers.TryGetValue("Content-Disposition", out _header))
 4197                        {
 04198                            _value.ContentDisposition = _header;
 4199                        }
 10324200                        if (response.Headers.TryGetValue("Content-Language", out _header))
 4201                        {
 04202                            _value.ContentLanguage = _header;
 4203                        }
 10324204                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 4205                        {
 124206                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 4207                        }
 10324208                        if (response.Headers.TryGetValue("x-ms-blob-type", out _header))
 4209                        {
 10324210                            _value.BlobType = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobType(_header);
 4211                        }
 10324212                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 4213                        {
 04214                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 4215                        }
 10324216                        if (response.Headers.TryGetValue("x-ms-copy-completion-time", out _header))
 4217                        {
 04218                            _value.CopyCompletionTime = System.DateTimeOffset.Parse(_header, System.Globalization.Cultur
 4219                        }
 10324220                        if (response.Headers.TryGetValue("x-ms-copy-status-description", out _header))
 4221                        {
 04222                            _value.CopyStatusDescription = _header;
 4223                        }
 10324224                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 4225                        {
 04226                            _value.CopyId = _header;
 4227                        }
 10324228                        if (response.Headers.TryGetValue("x-ms-copy-progress", out _header))
 4229                        {
 04230                            _value.CopyProgress = _header;
 4231                        }
 10324232                        if (response.Headers.TryGetValue("x-ms-copy-source", out _header))
 4233                        {
 04234                            _value.CopySource = new System.Uri(_header);
 4235                        }
 10324236                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 4237                        {
 04238                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 4239                        }
 10324240                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 4241                        {
 324242                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 4243                        }
 10324244                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 4245                        {
 10324246                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 4247                        }
 10324248                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 4249                        {
 10324250                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 4251                        }
 10324252                        if (response.Headers.TryGetValue("Accept-Ranges", out _header))
 4253                        {
 10324254                            _value.AcceptRanges = _header;
 4255                        }
 10324256                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 4257                        {
 2724258                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 4259                        }
 10324260                        if (response.Headers.TryGetValue("x-ms-server-encrypted", out _header))
 4261                        {
 10324262                            _value.IsServerEncrypted = bool.Parse(_header);
 4263                        }
 10324264                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 4265                        {
 04266                            _value.EncryptionKeySha256 = _header;
 4267                        }
 10324268                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 4269                        {
 04270                            _value.EncryptionScope = _header;
 4271                        }
 10324272                        if (response.Headers.TryGetValue("x-ms-blob-content-md5", out _header))
 4273                        {
 4644274                            _value.BlobContentHash = System.Convert.FromBase64String(_header);
 4275                        }
 10324276                        if (response.Headers.TryGetValue("x-ms-tag-count", out _header))
 4277                        {
 04278                            _value.TagCount = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture);
 4279                        }
 10324280                        if (response.Headers.TryGetValue("x-ms-blob-sealed", out _header))
 4281                        {
 04282                            _value.IsSealed = bool.Parse(_header);
 4283                        }
 4284
 4285                        // Create the response
 10324286                        return Response.FromValue(_value, response);
 4287                    }
 4288                    case 304:
 4289                    {
 204290                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.FlattenedDownloadProperties>(response
 4291                    }
 4292                    default:
 4293                    {
 4294                        // Create the result
 644295                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 644296                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 4297
 644298                        throw _value.CreateException(clientDiagnostics, response);
 4299                    }
 4300                }
 4301            }
 4302            #endregion Blob.DownloadAsync
 4303
 4304            #region Blob.GetPropertiesAsync
 4305            /// <summary>
 4306            /// The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system pro
 4307            /// </summary>
 4308            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 4309            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4310            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4311            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4312            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 4313            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 4314            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4315            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4316            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 4317            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 4318            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 4319            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4320            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4321            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4322            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4323            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 4324            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4325            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 4326            /// <param name="operationName">Operation name.</param>
 4327            /// <param name="cancellationToken">Cancellation token.</param>
 4328            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobPropertiesInternal}</returns>
 4329            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobPropertie
 4330                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 4331                Azure.Core.Pipeline.HttpPipeline pipeline,
 4332                System.Uri resourceUri,
 4333                string version,
 4334                string snapshot = default,
 4335                string versionId = default,
 4336                int? timeout = default,
 4337                string leaseId = default,
 4338                string encryptionKey = default,
 4339                string encryptionKeySha256 = default,
 4340                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 4341                System.DateTimeOffset? ifModifiedSince = default,
 4342                System.DateTimeOffset? ifUnmodifiedSince = default,
 4343                Azure.ETag? ifMatch = default,
 4344                Azure.ETag? ifNoneMatch = default,
 4345                string ifTags = default,
 4346                string requestId = default,
 4347                bool async = true,
 4348                string operationName = "BlobClient.GetProperties",
 4349                System.Threading.CancellationToken cancellationToken = default)
 4350            {
 16764351                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 4352                try
 4353                {
 16764354                    _scope.AddAttribute("url", resourceUri);
 16764355                    _scope.Start();
 16764356                    using (Azure.Core.HttpMessage _message = GetPropertiesAsync_CreateMessage(
 16764357                        pipeline,
 16764358                        resourceUri,
 16764359                        version,
 16764360                        snapshot,
 16764361                        versionId,
 16764362                        timeout,
 16764363                        leaseId,
 16764364                        encryptionKey,
 16764365                        encryptionKeySha256,
 16764366                        encryptionAlgorithm,
 16764367                        ifModifiedSince,
 16764368                        ifUnmodifiedSince,
 16764369                        ifMatch,
 16764370                        ifNoneMatch,
 16764371                        ifTags,
 16764372                        requestId))
 4373                    {
 16764374                        if (async)
 4375                        {
 4376                            // Send the request asynchronously if we're being called via an async path
 11664377                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 4378                        }
 4379                        else
 4380                        {
 4381                            // Send the request synchronously through the API that blocks if we're being called via a sy
 4382                            // (this is safe because the Task will complete before the user can call Wait)
 5104383                            pipeline.Send(_message, cancellationToken);
 4384                        }
 16764385                        Azure.Response _response = _message.Response;
 16764386                        cancellationToken.ThrowIfCancellationRequested();
 16764387                        return GetPropertiesAsync_CreateResponse(clientDiagnostics, _response);
 4388                    }
 4389                }
 2084390                catch (System.Exception ex)
 4391                {
 2084392                    _scope.Failed(ex);
 2084393                    throw;
 4394                }
 4395                finally
 4396                {
 16764397                    _scope.Dispose();
 4398                }
 14684399            }
 4400
 4401            /// <summary>
 4402            /// Create the Blob.GetPropertiesAsync request.
 4403            /// </summary>
 4404            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4405            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4406            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4407            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 4408            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 4409            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4410            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4411            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 4412            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 4413            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 4414            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4415            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4416            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4417            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4418            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 4419            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4420            /// <returns>The Blob.GetPropertiesAsync Message.</returns>
 4421            internal static Azure.Core.HttpMessage GetPropertiesAsync_CreateMessage(
 4422                Azure.Core.Pipeline.HttpPipeline pipeline,
 4423                System.Uri resourceUri,
 4424                string version,
 4425                string snapshot = default,
 4426                string versionId = default,
 4427                int? timeout = default,
 4428                string leaseId = default,
 4429                string encryptionKey = default,
 4430                string encryptionKeySha256 = default,
 4431                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 4432                System.DateTimeOffset? ifModifiedSince = default,
 4433                System.DateTimeOffset? ifUnmodifiedSince = default,
 4434                Azure.ETag? ifMatch = default,
 4435                Azure.ETag? ifNoneMatch = default,
 4436                string ifTags = default,
 4437                string requestId = default)
 4438            {
 4439                // Validation
 16764440                if (resourceUri == null)
 4441                {
 04442                    throw new System.ArgumentNullException(nameof(resourceUri));
 4443                }
 16764444                if (version == null)
 4445                {
 04446                    throw new System.ArgumentNullException(nameof(version));
 4447                }
 4448
 4449                // Create the request
 16764450                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 16764451                Azure.Core.Request _request = _message.Request;
 4452
 4453                // Set the endpoint
 16764454                _request.Method = Azure.Core.RequestMethod.Head;
 16764455                _request.Uri.Reset(resourceUri);
 04456                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 04457                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 04458                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 4459
 4460                // Add request headers
 16764461                _request.Headers.SetValue("x-ms-version", version);
 15564462                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 8164463                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 8164464                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 8164465                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 15564466                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 15564467                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 15564468                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 15564469                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 8204470                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 04471                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 4472
 16764473                return _message;
 4474            }
 4475
 4476            /// <summary>
 4477            /// Create the Blob.GetPropertiesAsync response or throw a failure exception.
 4478            /// </summary>
 4479            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 4480            /// <param name="response">The raw Response.</param>
 4481            /// <returns>The Blob.GetPropertiesAsync Azure.Response{Azure.Storage.Blobs.Models.BlobPropertiesInternal}.<
 4482            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobPropertiesInternal> GetPropertiesAsync_CreateR
 4483                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 4484                Azure.Response response)
 4485            {
 4486                // Process the response
 16764487                switch (response.Status)
 4488                {
 4489                    case 200:
 4490                    {
 4491                        // Create the result
 14444492                        Azure.Storage.Blobs.Models.BlobPropertiesInternal _value = new Azure.Storage.Blobs.Models.BlobPr
 4493
 4494                        // Get response headers
 4495                        string _header;
 14444496                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 4497                        {
 14444498                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 4499                        }
 14444500                        if (response.Headers.TryGetValue("x-ms-creation-time", out _header))
 4501                        {
 14444502                            _value.CreatedOn = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.Inv
 4503                        }
 14444504                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 571764505                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 4506                        {
 271444507                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 4508                            {
 8204509                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 4510                            }
 4511                        }
 14444512                        if (response.Headers.TryGetValue("x-ms-or-policy-id", out _header))
 4513                        {
 44514                            _value.ObjectReplicationPolicyId = _header;
 4515                        }
 14444516                        _value.ObjectReplicationRules = new System.Collections.Generic.Dictionary<string, string>(System
 571764517                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 4518                        {
 271444519                            if (_headerPair.Name.StartsWith("x-ms-or-", System.StringComparison.InvariantCulture))
 4520                            {
 84521                                _value.ObjectReplicationRules[_headerPair.Name.Substring(8)] = _headerPair.Value;
 4522                            }
 4523                        }
 14444524                        if (response.Headers.TryGetValue("x-ms-blob-type", out _header))
 4525                        {
 14444526                            _value.BlobType = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobType(_header);
 4527                        }
 14444528                        if (response.Headers.TryGetValue("x-ms-copy-completion-time", out _header))
 4529                        {
 1244530                            _value.CopyCompletedOn = System.DateTimeOffset.Parse(_header, System.Globalization.CultureIn
 4531                        }
 14444532                        if (response.Headers.TryGetValue("x-ms-copy-status-description", out _header))
 4533                        {
 04534                            _value.CopyStatusDescription = _header;
 4535                        }
 14444536                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 4537                        {
 1244538                            _value.CopyId = _header;
 4539                        }
 14444540                        if (response.Headers.TryGetValue("x-ms-copy-progress", out _header))
 4541                        {
 1244542                            _value.CopyProgress = _header;
 4543                        }
 14444544                        if (response.Headers.TryGetValue("x-ms-copy-source", out _header))
 4545                        {
 1244546                            _value.CopySource = new System.Uri(_header);
 4547                        }
 14444548                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 4549                        {
 1244550                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 4551                        }
 14444552                        if (response.Headers.TryGetValue("x-ms-incremental-copy", out _header))
 4553                        {
 604554                            _value.IsIncrementalCopy = bool.Parse(_header);
 4555                        }
 14444556                        if (response.Headers.TryGetValue("x-ms-copy-destination-snapshot", out _header))
 4557                        {
 604558                            _value.DestinationSnapshot = _header;
 4559                        }
 14444560                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 4561                        {
 284562                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 4563                        }
 14444564                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 4565                        {
 14164566                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 4567                        }
 14444568                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 4569                        {
 14164570                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 4571                        }
 14444572                        if (response.Headers.TryGetValue("Content-Length", out _header))
 4573                        {
 14444574                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 4575                        }
 14444576                        if (response.Headers.TryGetValue("Content-Type", out _header))
 4577                        {
 14404578                            _value.ContentType = _header;
 4579                        }
 14444580                        if (response.Headers.TryGetValue("ETag", out _header))
 4581                        {
 14444582                            _value.ETag = new Azure.ETag(_header);
 4583                        }
 14444584                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 4585                        {
 5004586                            _value.ContentHash = System.Convert.FromBase64String(_header);
 4587                        }
 14444588                        if (response.Headers.TryGetValue("Content-Encoding", out _header))
 4589                        {
 564590                            _value.ContentEncoding = _header;
 4591                        }
 14444592                        if (response.Headers.TryGetValue("Content-Disposition", out _header))
 4593                        {
 564594                            _value.ContentDisposition = _header;
 4595                        }
 14444596                        if (response.Headers.TryGetValue("Content-Language", out _header))
 4597                        {
 604598                            _value.ContentLanguage = _header;
 4599                        }
 14444600                        if (response.Headers.TryGetValue("Cache-Control", out _header))
 4601                        {
 564602                            _value.CacheControl = _header;
 4603                        }
 14444604                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 4605                        {
 1724606                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 4607                        }
 14444608                        if (response.Headers.TryGetValue("Accept-Ranges", out _header))
 4609                        {
 14444610                            _value.AcceptRanges = _header;
 4611                        }
 14444612                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 4613                        {
 1244614                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 4615                        }
 14444616                        if (response.Headers.TryGetValue("x-ms-server-encrypted", out _header))
 4617                        {
 14444618                            _value.IsServerEncrypted = bool.Parse(_header);
 4619                        }
 14444620                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 4621                        {
 44622                            _value.EncryptionKeySha256 = _header;
 4623                        }
 14444624                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 4625                        {
 44626                            _value.EncryptionScope = _header;
 4627                        }
 14444628                        if (response.Headers.TryGetValue("x-ms-access-tier", out _header))
 4629                        {
 11604630                            _value.AccessTier = _header;
 4631                        }
 14444632                        if (response.Headers.TryGetValue("x-ms-access-tier-inferred", out _header))
 4633                        {
 10484634                            _value.AccessTierInferred = bool.Parse(_header);
 4635                        }
 14444636                        if (response.Headers.TryGetValue("x-ms-archive-status", out _header))
 4637                        {
 164638                            _value.ArchiveStatus = _header;
 4639                        }
 14444640                        if (response.Headers.TryGetValue("x-ms-access-tier-change-time", out _header))
 4641                        {
 1004642                            _value.AccessTierChangedOn = System.DateTimeOffset.Parse(_header, System.Globalization.Cultu
 4643                        }
 14444644                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 4645                        {
 1724646                            _value.VersionId = _header;
 4647                        }
 14444648                        if (response.Headers.TryGetValue("x-ms-is-current-version", out _header))
 4649                        {
 1684650                            _value.IsCurrentVersion = bool.Parse(_header);
 4651                        }
 14444652                        if (response.Headers.TryGetValue("x-ms-tag-count", out _header))
 4653                        {
 164654                            _value.TagCount = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture);
 4655                        }
 14444656                        if (response.Headers.TryGetValue("x-ms-expiry-time", out _header))
 4657                        {
 124658                            _value.ExpiresOn = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.Inv
 4659                        }
 14444660                        if (response.Headers.TryGetValue("x-ms-blob-sealed", out _header))
 4661                        {
 124662                            _value.IsSealed = bool.Parse(_header);
 4663                        }
 14444664                        if (response.Headers.TryGetValue("x-ms-rehydrate-priority", out _header))
 4665                        {
 164666                            _value.RehydratePriority = _header;
 4667                        }
 4668
 4669                        // Create the response
 14444670                        return Response.FromValue(_value, response);
 4671                    }
 4672                    case 304:
 4673                    {
 244674                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobPropertiesInternal>(response);
 4675                    }
 4676                    default:
 4677                    {
 4678                        // Create the result
 2084679                        Azure.Storage.Blobs.Models.ConditionNotMetError _value = new Azure.Storage.Blobs.Models.Conditio
 4680
 4681                        // Get response headers
 4682                        string _header;
 2084683                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 4684                        {
 2084685                            _value.ErrorCode = _header;
 4686                        }
 4687
 2084688                        throw _value.CreateException(clientDiagnostics, response);
 4689                    }
 4690                }
 4691            }
 4692            #endregion Blob.GetPropertiesAsync
 4693
 4694            #region Blob.DeleteAsync
 4695            /// <summary>
 4696            /// If the storage account's soft delete feature is disabled then, when a blob is deleted, it is permanently
 4697            /// </summary>
 4698            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 4699            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4700            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4701            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4702            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 4703            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 4704            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4705            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4706            /// <param name="deleteSnapshots">Required if the blob has associated snapshots. Specify one of the followin
 4707            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4708            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4709            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4710            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4711            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 4712            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4713            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 4714            /// <param name="operationName">Operation name.</param>
 4715            /// <param name="cancellationToken">Cancellation token.</param>
 4716            /// <returns>Azure.Response</returns>
 4717            public static async System.Threading.Tasks.ValueTask<Azure.Response> DeleteAsync(
 4718                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 4719                Azure.Core.Pipeline.HttpPipeline pipeline,
 4720                System.Uri resourceUri,
 4721                string version,
 4722                string snapshot = default,
 4723                string versionId = default,
 4724                int? timeout = default,
 4725                string leaseId = default,
 4726                Azure.Storage.Blobs.Models.DeleteSnapshotsOption? deleteSnapshots = default,
 4727                System.DateTimeOffset? ifModifiedSince = default,
 4728                System.DateTimeOffset? ifUnmodifiedSince = default,
 4729                Azure.ETag? ifMatch = default,
 4730                Azure.ETag? ifNoneMatch = default,
 4731                string ifTags = default,
 4732                string requestId = default,
 4733                bool async = true,
 4734                string operationName = "BlobClient.Delete",
 4735                System.Threading.CancellationToken cancellationToken = default)
 4736            {
 1764737                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 4738                try
 4739                {
 1764740                    _scope.AddAttribute("url", resourceUri);
 1764741                    _scope.Start();
 1764742                    using (Azure.Core.HttpMessage _message = DeleteAsync_CreateMessage(
 1764743                        pipeline,
 1764744                        resourceUri,
 1764745                        version,
 1764746                        snapshot,
 1764747                        versionId,
 1764748                        timeout,
 1764749                        leaseId,
 1764750                        deleteSnapshots,
 1764751                        ifModifiedSince,
 1764752                        ifUnmodifiedSince,
 1764753                        ifMatch,
 1764754                        ifNoneMatch,
 1764755                        ifTags,
 1764756                        requestId))
 4757                    {
 1764758                        if (async)
 4759                        {
 4760                            // Send the request asynchronously if we're being called via an async path
 1204761                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 4762                        }
 4763                        else
 4764                        {
 4765                            // Send the request synchronously through the API that blocks if we're being called via a sy
 4766                            // (this is safe because the Task will complete before the user can call Wait)
 564767                            pipeline.Send(_message, cancellationToken);
 4768                        }
 1764769                        Azure.Response _response = _message.Response;
 1764770                        cancellationToken.ThrowIfCancellationRequested();
 1764771                        return DeleteAsync_CreateResponse(clientDiagnostics, _response);
 4772                    }
 4773                }
 564774                catch (System.Exception ex)
 4775                {
 564776                    _scope.Failed(ex);
 564777                    throw;
 4778                }
 4779                finally
 4780                {
 1764781                    _scope.Dispose();
 4782                }
 1204783            }
 4784
 4785            /// <summary>
 4786            /// Create the Blob.DeleteAsync request.
 4787            /// </summary>
 4788            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4789            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4790            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4791            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 4792            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 4793            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4794            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4795            /// <param name="deleteSnapshots">Required if the blob has associated snapshots. Specify one of the followin
 4796            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4797            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4798            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4799            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4800            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 4801            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4802            /// <returns>The Blob.DeleteAsync Message.</returns>
 4803            internal static Azure.Core.HttpMessage DeleteAsync_CreateMessage(
 4804                Azure.Core.Pipeline.HttpPipeline pipeline,
 4805                System.Uri resourceUri,
 4806                string version,
 4807                string snapshot = default,
 4808                string versionId = default,
 4809                int? timeout = default,
 4810                string leaseId = default,
 4811                Azure.Storage.Blobs.Models.DeleteSnapshotsOption? deleteSnapshots = default,
 4812                System.DateTimeOffset? ifModifiedSince = default,
 4813                System.DateTimeOffset? ifUnmodifiedSince = default,
 4814                Azure.ETag? ifMatch = default,
 4815                Azure.ETag? ifNoneMatch = default,
 4816                string ifTags = default,
 4817                string requestId = default)
 4818            {
 4819                // Validation
 1764820                if (resourceUri == null)
 4821                {
 04822                    throw new System.ArgumentNullException(nameof(resourceUri));
 4823                }
 1764824                if (version == null)
 4825                {
 04826                    throw new System.ArgumentNullException(nameof(version));
 4827                }
 4828
 4829                // Create the request
 1764830                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1764831                Azure.Core.Request _request = _message.Request;
 4832
 4833                // Set the endpoint
 1764834                _request.Method = Azure.Core.RequestMethod.Delete;
 1764835                _request.Uri.Reset(resourceUri);
 04836                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 04837                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 04838                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 4839
 4840                // Add request headers
 1764841                _request.Headers.SetValue("x-ms-version", version);
 1844842                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 1804843                if (deleteSnapshots != null) { _request.Headers.SetValue("x-ms-delete-snapshots", Azure.Storage.Blobs.Bl
 1844844                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1844845                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1844846                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1844847                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 1844848                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 04849                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 4850
 1764851                return _message;
 4852            }
 4853
 4854            /// <summary>
 4855            /// Create the Blob.DeleteAsync response or throw a failure exception.
 4856            /// </summary>
 4857            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 4858            /// <param name="response">The raw Response.</param>
 4859            /// <returns>The Blob.DeleteAsync Azure.Response.</returns>
 4860            internal static Azure.Response DeleteAsync_CreateResponse(
 4861                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 4862                Azure.Response response)
 4863            {
 4864                // Process the response
 1764865                switch (response.Status)
 4866                {
 4867                    case 202:
 4868                    {
 1204869                        return response;
 4870                    }
 4871                    default:
 4872                    {
 4873                        // Create the result
 564874                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 564875                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 4876
 564877                        throw _value.CreateException(clientDiagnostics, response);
 4878                    }
 4879                }
 4880            }
 4881            #endregion Blob.DeleteAsync
 4882
 4883            #region Blob.SetAccessControlAsync
 4884            /// <summary>
 4885            /// Set the owner, group, permissions, or access control list for a blob.
 4886            /// </summary>
 4887            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 4888            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4889            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4890            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4891            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4892            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4893            /// <param name="owner">Optional. The owner of the blob or directory.</param>
 4894            /// <param name="group">Optional. The owning group of the blob or directory.</param>
 4895            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 4896            /// <param name="posixAcl">Sets POSIX access control rights on files and directories. The value is a comma-s
 4897            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4898            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4899            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4900            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4901            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4902            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 4903            /// <param name="operationName">Operation name.</param>
 4904            /// <param name="cancellationToken">Cancellation token.</param>
 4905            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobSetAccessControlResult}</returns>
 4906            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobSetAccess
 4907                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 4908                Azure.Core.Pipeline.HttpPipeline pipeline,
 4909                System.Uri resourceUri,
 4910                string version,
 4911                int? timeout = default,
 4912                string leaseId = default,
 4913                string owner = default,
 4914                string group = default,
 4915                string posixPermissions = default,
 4916                string posixAcl = default,
 4917                Azure.ETag? ifMatch = default,
 4918                Azure.ETag? ifNoneMatch = default,
 4919                System.DateTimeOffset? ifModifiedSince = default,
 4920                System.DateTimeOffset? ifUnmodifiedSince = default,
 4921                string requestId = default,
 4922                bool async = true,
 4923                string operationName = "BlobClient.SetAccessControl",
 4924                System.Threading.CancellationToken cancellationToken = default)
 4925            {
 04926                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 4927                try
 4928                {
 04929                    _scope.AddAttribute("url", resourceUri);
 04930                    _scope.Start();
 04931                    using (Azure.Core.HttpMessage _message = SetAccessControlAsync_CreateMessage(
 04932                        pipeline,
 04933                        resourceUri,
 04934                        version,
 04935                        timeout,
 04936                        leaseId,
 04937                        owner,
 04938                        group,
 04939                        posixPermissions,
 04940                        posixAcl,
 04941                        ifMatch,
 04942                        ifNoneMatch,
 04943                        ifModifiedSince,
 04944                        ifUnmodifiedSince,
 04945                        requestId))
 4946                    {
 04947                        if (async)
 4948                        {
 4949                            // Send the request asynchronously if we're being called via an async path
 04950                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 4951                        }
 4952                        else
 4953                        {
 4954                            // Send the request synchronously through the API that blocks if we're being called via a sy
 4955                            // (this is safe because the Task will complete before the user can call Wait)
 04956                            pipeline.Send(_message, cancellationToken);
 4957                        }
 04958                        Azure.Response _response = _message.Response;
 04959                        cancellationToken.ThrowIfCancellationRequested();
 04960                        return SetAccessControlAsync_CreateResponse(clientDiagnostics, _response);
 4961                    }
 4962                }
 04963                catch (System.Exception ex)
 4964                {
 04965                    _scope.Failed(ex);
 04966                    throw;
 4967                }
 4968                finally
 4969                {
 04970                    _scope.Dispose();
 4971                }
 04972            }
 4973
 4974            /// <summary>
 4975            /// Create the Blob.SetAccessControlAsync request.
 4976            /// </summary>
 4977            /// <param name="pipeline">The pipeline used for sending requests.</param>
 4978            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 4979            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 4980            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 4981            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 4982            /// <param name="owner">Optional. The owner of the blob or directory.</param>
 4983            /// <param name="group">Optional. The owning group of the blob or directory.</param>
 4984            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 4985            /// <param name="posixAcl">Sets POSIX access control rights on files and directories. The value is a comma-s
 4986            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 4987            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 4988            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 4989            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 4990            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 4991            /// <returns>The Blob.SetAccessControlAsync Message.</returns>
 4992            internal static Azure.Core.HttpMessage SetAccessControlAsync_CreateMessage(
 4993                Azure.Core.Pipeline.HttpPipeline pipeline,
 4994                System.Uri resourceUri,
 4995                string version,
 4996                int? timeout = default,
 4997                string leaseId = default,
 4998                string owner = default,
 4999                string group = default,
 5000                string posixPermissions = default,
 5001                string posixAcl = default,
 5002                Azure.ETag? ifMatch = default,
 5003                Azure.ETag? ifNoneMatch = default,
 5004                System.DateTimeOffset? ifModifiedSince = default,
 5005                System.DateTimeOffset? ifUnmodifiedSince = default,
 5006                string requestId = default)
 5007            {
 5008                // Validation
 05009                if (resourceUri == null)
 5010                {
 05011                    throw new System.ArgumentNullException(nameof(resourceUri));
 5012                }
 05013                if (version == null)
 5014                {
 05015                    throw new System.ArgumentNullException(nameof(version));
 5016                }
 5017
 5018                // Create the request
 05019                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 05020                Azure.Core.Request _request = _message.Request;
 5021
 5022                // Set the endpoint
 05023                _request.Method = Azure.Core.RequestMethod.Patch;
 05024                _request.Uri.Reset(resourceUri);
 05025                _request.Uri.AppendQuery("action", "setAccessControl", escapeValue: false);
 05026                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 5027
 5028                // Add request headers
 05029                _request.Headers.SetValue("x-ms-version", version);
 05030                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 05031                if (owner != null) { _request.Headers.SetValue("x-ms-owner", owner); }
 05032                if (group != null) { _request.Headers.SetValue("x-ms-group", group); }
 05033                if (posixPermissions != null) { _request.Headers.SetValue("x-ms-permissions", posixPermissions); }
 05034                if (posixAcl != null) { _request.Headers.SetValue("x-ms-acl", posixAcl); }
 05035                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 05036                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 05037                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 05038                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 05039                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 5040
 05041                return _message;
 5042            }
 5043
 5044            /// <summary>
 5045            /// Create the Blob.SetAccessControlAsync response or throw a failure exception.
 5046            /// </summary>
 5047            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 5048            /// <param name="response">The raw Response.</param>
 5049            /// <returns>The Blob.SetAccessControlAsync Azure.Response{Azure.Storage.Blobs.Models.BlobSetAccessControlRe
 5050            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobSetAccessControlResult> SetAccessControlAsync_
 5051                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5052                Azure.Response response)
 5053            {
 5054                // Process the response
 05055                switch (response.Status)
 5056                {
 5057                    case 200:
 5058                    {
 5059                        // Create the result
 05060                        Azure.Storage.Blobs.Models.BlobSetAccessControlResult _value = new Azure.Storage.Blobs.Models.Bl
 5061
 5062                        // Get response headers
 5063                        string _header;
 05064                        if (response.Headers.TryGetValue("ETag", out _header))
 5065                        {
 05066                            _value.ETag = new Azure.ETag(_header);
 5067                        }
 05068                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 5069                        {
 05070                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 5071                        }
 5072
 5073                        // Create the response
 05074                        return Response.FromValue(_value, response);
 5075                    }
 5076                    default:
 5077                    {
 5078                        // Create the result
 05079                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 05080                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 5081
 05082                        throw _value.CreateException(clientDiagnostics, response);
 5083                    }
 5084                }
 5085            }
 5086            #endregion Blob.SetAccessControlAsync
 5087
 5088            #region Blob.GetAccessControlAsync
 5089            /// <summary>
 5090            /// Get the owner, group, permissions, or access control list for a blob.
 5091            /// </summary>
 5092            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 5093            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5094            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5095            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5096            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5097            /// <param name="upn">Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true"
 5098            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5099            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5100            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5101            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5102            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5103            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5104            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 5105            /// <param name="operationName">Operation name.</param>
 5106            /// <param name="cancellationToken">Cancellation token.</param>
 5107            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobGetAccessControlResult}</returns>
 5108            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobGetAccess
 5109                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5110                Azure.Core.Pipeline.HttpPipeline pipeline,
 5111                System.Uri resourceUri,
 5112                string version,
 5113                int? timeout = default,
 5114                bool? upn = default,
 5115                string leaseId = default,
 5116                Azure.ETag? ifMatch = default,
 5117                Azure.ETag? ifNoneMatch = default,
 5118                System.DateTimeOffset? ifModifiedSince = default,
 5119                System.DateTimeOffset? ifUnmodifiedSince = default,
 5120                string requestId = default,
 5121                bool async = true,
 5122                string operationName = "BlobClient.GetAccessControl",
 5123                System.Threading.CancellationToken cancellationToken = default)
 5124            {
 05125                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 5126                try
 5127                {
 05128                    _scope.AddAttribute("url", resourceUri);
 05129                    _scope.Start();
 05130                    using (Azure.Core.HttpMessage _message = GetAccessControlAsync_CreateMessage(
 05131                        pipeline,
 05132                        resourceUri,
 05133                        version,
 05134                        timeout,
 05135                        upn,
 05136                        leaseId,
 05137                        ifMatch,
 05138                        ifNoneMatch,
 05139                        ifModifiedSince,
 05140                        ifUnmodifiedSince,
 05141                        requestId))
 5142                    {
 05143                        if (async)
 5144                        {
 5145                            // Send the request asynchronously if we're being called via an async path
 05146                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 5147                        }
 5148                        else
 5149                        {
 5150                            // Send the request synchronously through the API that blocks if we're being called via a sy
 5151                            // (this is safe because the Task will complete before the user can call Wait)
 05152                            pipeline.Send(_message, cancellationToken);
 5153                        }
 05154                        Azure.Response _response = _message.Response;
 05155                        cancellationToken.ThrowIfCancellationRequested();
 05156                        return GetAccessControlAsync_CreateResponse(clientDiagnostics, _response);
 5157                    }
 5158                }
 05159                catch (System.Exception ex)
 5160                {
 05161                    _scope.Failed(ex);
 05162                    throw;
 5163                }
 5164                finally
 5165                {
 05166                    _scope.Dispose();
 5167                }
 05168            }
 5169
 5170            /// <summary>
 5171            /// Create the Blob.GetAccessControlAsync request.
 5172            /// </summary>
 5173            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5174            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5175            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5176            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5177            /// <param name="upn">Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true"
 5178            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5179            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5180            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5181            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5182            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5183            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5184            /// <returns>The Blob.GetAccessControlAsync Message.</returns>
 5185            internal static Azure.Core.HttpMessage GetAccessControlAsync_CreateMessage(
 5186                Azure.Core.Pipeline.HttpPipeline pipeline,
 5187                System.Uri resourceUri,
 5188                string version,
 5189                int? timeout = default,
 5190                bool? upn = default,
 5191                string leaseId = default,
 5192                Azure.ETag? ifMatch = default,
 5193                Azure.ETag? ifNoneMatch = default,
 5194                System.DateTimeOffset? ifModifiedSince = default,
 5195                System.DateTimeOffset? ifUnmodifiedSince = default,
 5196                string requestId = default)
 5197            {
 5198                // Validation
 05199                if (resourceUri == null)
 5200                {
 05201                    throw new System.ArgumentNullException(nameof(resourceUri));
 5202                }
 05203                if (version == null)
 5204                {
 05205                    throw new System.ArgumentNullException(nameof(version));
 5206                }
 5207
 5208                // Create the request
 05209                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 05210                Azure.Core.Request _request = _message.Request;
 5211
 5212                // Set the endpoint
 05213                _request.Method = Azure.Core.RequestMethod.Head;
 05214                _request.Uri.Reset(resourceUri);
 05215                _request.Uri.AppendQuery("action", "getAccessControl", escapeValue: false);
 05216                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 05217                if (upn != null) {
 5218                #pragma warning disable CA1308 // Normalize strings to uppercase
 05219                _request.Uri.AppendQuery("upn", upn.Value.ToString(System.Globalization.CultureInfo.InvariantCulture).To
 5220                #pragma warning restore CA1308 // Normalize strings to uppercase
 5221                }
 5222
 5223                // Add request headers
 05224                _request.Headers.SetValue("x-ms-version", version);
 05225                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 05226                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 05227                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 05228                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 05229                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 05230                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 5231
 05232                return _message;
 5233            }
 5234
 5235            /// <summary>
 5236            /// Create the Blob.GetAccessControlAsync response or throw a failure exception.
 5237            /// </summary>
 5238            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 5239            /// <param name="response">The raw Response.</param>
 5240            /// <returns>The Blob.GetAccessControlAsync Azure.Response{Azure.Storage.Blobs.Models.BlobGetAccessControlRe
 5241            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobGetAccessControlResult> GetAccessControlAsync_
 5242                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5243                Azure.Response response)
 5244            {
 5245                // Process the response
 05246                switch (response.Status)
 5247                {
 5248                    case 200:
 5249                    {
 5250                        // Create the result
 05251                        Azure.Storage.Blobs.Models.BlobGetAccessControlResult _value = new Azure.Storage.Blobs.Models.Bl
 5252
 5253                        // Get response headers
 5254                        string _header;
 05255                        if (response.Headers.TryGetValue("ETag", out _header))
 5256                        {
 05257                            _value.ETag = new Azure.ETag(_header);
 5258                        }
 05259                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 5260                        {
 05261                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 5262                        }
 05263                        if (response.Headers.TryGetValue("x-ms-owner", out _header))
 5264                        {
 05265                            _value.XMSOwner = _header;
 5266                        }
 05267                        if (response.Headers.TryGetValue("x-ms-group", out _header))
 5268                        {
 05269                            _value.XMSGroup = _header;
 5270                        }
 05271                        if (response.Headers.TryGetValue("x-ms-permissions", out _header))
 5272                        {
 05273                            _value.XMSPermissions = _header;
 5274                        }
 05275                        if (response.Headers.TryGetValue("x-ms-acl", out _header))
 5276                        {
 05277                            _value.XMSAcl = _header;
 5278                        }
 5279
 5280                        // Create the response
 05281                        return Response.FromValue(_value, response);
 5282                    }
 5283                    case 304:
 5284                    {
 05285                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobGetAccessControlResult>(response)
 5286                    }
 5287                    default:
 5288                    {
 5289                        // Create the result
 05290                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 05291                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 5292
 05293                        throw _value.CreateException(clientDiagnostics, response);
 5294                    }
 5295                }
 5296            }
 5297            #endregion Blob.GetAccessControlAsync
 5298
 5299            #region Blob.RenameAsync
 5300            /// <summary>
 5301            /// Rename a blob/file.  By default, the destination is overwritten and if the destination already exists an
 5302            /// </summary>
 5303            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 5304            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5305            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5306            /// <param name="renameSource">The file or directory to be renamed. The value must have the following format
 5307            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5308            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5309            /// <param name="pathRenameMode">Determines the behavior of the rename operation</param>
 5310            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 5311            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 5312            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 5313            /// <param name="cacheControl">Cache control for given resource</param>
 5314            /// <param name="contentType">Content type for given resource</param>
 5315            /// <param name="contentEncoding">Content encoding for given resource</param>
 5316            /// <param name="contentLanguage">Content language for given resource</param>
 5317            /// <param name="contentDisposition">Content disposition for given resource</param>
 5318            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5319            /// <param name="sourceLeaseId">A lease ID for the source path. If specified, the source path must have an a
 5320            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5321            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5322            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5323            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5324            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 5325            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 5326            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 5327            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 5328            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5329            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 5330            /// <param name="operationName">Operation name.</param>
 5331            /// <param name="cancellationToken">Cancellation token.</param>
 5332            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobRenameResult}</returns>
 5333            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobRenameRes
 5334                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5335                Azure.Core.Pipeline.HttpPipeline pipeline,
 5336                System.Uri resourceUri,
 5337                string renameSource,
 5338                string version,
 5339                int? timeout = default,
 5340                Azure.Storage.Blobs.Models.PathRenameMode? pathRenameMode = default,
 5341                string directoryProperties = default,
 5342                string posixPermissions = default,
 5343                string posixUmask = default,
 5344                string cacheControl = default,
 5345                string contentType = default,
 5346                string contentEncoding = default,
 5347                string contentLanguage = default,
 5348                string contentDisposition = default,
 5349                string leaseId = default,
 5350                string sourceLeaseId = default,
 5351                System.DateTimeOffset? ifModifiedSince = default,
 5352                System.DateTimeOffset? ifUnmodifiedSince = default,
 5353                Azure.ETag? ifMatch = default,
 5354                Azure.ETag? ifNoneMatch = default,
 5355                System.DateTimeOffset? sourceIfModifiedSince = default,
 5356                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 5357                Azure.ETag? sourceIfMatch = default,
 5358                Azure.ETag? sourceIfNoneMatch = default,
 5359                string requestId = default,
 5360                bool async = true,
 5361                string operationName = "BlobClient.Rename",
 5362                System.Threading.CancellationToken cancellationToken = default)
 5363            {
 05364                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 5365                try
 5366                {
 05367                    _scope.AddAttribute("url", resourceUri);
 05368                    _scope.Start();
 05369                    using (Azure.Core.HttpMessage _message = RenameAsync_CreateMessage(
 05370                        pipeline,
 05371                        resourceUri,
 05372                        renameSource,
 05373                        version,
 05374                        timeout,
 05375                        pathRenameMode,
 05376                        directoryProperties,
 05377                        posixPermissions,
 05378                        posixUmask,
 05379                        cacheControl,
 05380                        contentType,
 05381                        contentEncoding,
 05382                        contentLanguage,
 05383                        contentDisposition,
 05384                        leaseId,
 05385                        sourceLeaseId,
 05386                        ifModifiedSince,
 05387                        ifUnmodifiedSince,
 05388                        ifMatch,
 05389                        ifNoneMatch,
 05390                        sourceIfModifiedSince,
 05391                        sourceIfUnmodifiedSince,
 05392                        sourceIfMatch,
 05393                        sourceIfNoneMatch,
 05394                        requestId))
 5395                    {
 05396                        if (async)
 5397                        {
 5398                            // Send the request asynchronously if we're being called via an async path
 05399                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 5400                        }
 5401                        else
 5402                        {
 5403                            // Send the request synchronously through the API that blocks if we're being called via a sy
 5404                            // (this is safe because the Task will complete before the user can call Wait)
 05405                            pipeline.Send(_message, cancellationToken);
 5406                        }
 05407                        Azure.Response _response = _message.Response;
 05408                        cancellationToken.ThrowIfCancellationRequested();
 05409                        return RenameAsync_CreateResponse(clientDiagnostics, _response);
 5410                    }
 5411                }
 05412                catch (System.Exception ex)
 5413                {
 05414                    _scope.Failed(ex);
 05415                    throw;
 5416                }
 5417                finally
 5418                {
 05419                    _scope.Dispose();
 5420                }
 05421            }
 5422
 5423            /// <summary>
 5424            /// Create the Blob.RenameAsync request.
 5425            /// </summary>
 5426            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5427            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5428            /// <param name="renameSource">The file or directory to be renamed. The value must have the following format
 5429            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5430            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5431            /// <param name="pathRenameMode">Determines the behavior of the rename operation</param>
 5432            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 5433            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 5434            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 5435            /// <param name="cacheControl">Cache control for given resource</param>
 5436            /// <param name="contentType">Content type for given resource</param>
 5437            /// <param name="contentEncoding">Content encoding for given resource</param>
 5438            /// <param name="contentLanguage">Content language for given resource</param>
 5439            /// <param name="contentDisposition">Content disposition for given resource</param>
 5440            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5441            /// <param name="sourceLeaseId">A lease ID for the source path. If specified, the source path must have an a
 5442            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5443            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5444            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5445            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5446            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 5447            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 5448            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 5449            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 5450            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5451            /// <returns>The Blob.RenameAsync Message.</returns>
 5452            internal static Azure.Core.HttpMessage RenameAsync_CreateMessage(
 5453                Azure.Core.Pipeline.HttpPipeline pipeline,
 5454                System.Uri resourceUri,
 5455                string renameSource,
 5456                string version,
 5457                int? timeout = default,
 5458                Azure.Storage.Blobs.Models.PathRenameMode? pathRenameMode = default,
 5459                string directoryProperties = default,
 5460                string posixPermissions = default,
 5461                string posixUmask = default,
 5462                string cacheControl = default,
 5463                string contentType = default,
 5464                string contentEncoding = default,
 5465                string contentLanguage = default,
 5466                string contentDisposition = default,
 5467                string leaseId = default,
 5468                string sourceLeaseId = default,
 5469                System.DateTimeOffset? ifModifiedSince = default,
 5470                System.DateTimeOffset? ifUnmodifiedSince = default,
 5471                Azure.ETag? ifMatch = default,
 5472                Azure.ETag? ifNoneMatch = default,
 5473                System.DateTimeOffset? sourceIfModifiedSince = default,
 5474                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 5475                Azure.ETag? sourceIfMatch = default,
 5476                Azure.ETag? sourceIfNoneMatch = default,
 5477                string requestId = default)
 5478            {
 5479                // Validation
 05480                if (resourceUri == null)
 5481                {
 05482                    throw new System.ArgumentNullException(nameof(resourceUri));
 5483                }
 05484                if (renameSource == null)
 5485                {
 05486                    throw new System.ArgumentNullException(nameof(renameSource));
 5487                }
 05488                if (version == null)
 5489                {
 05490                    throw new System.ArgumentNullException(nameof(version));
 5491                }
 5492
 5493                // Create the request
 05494                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 05495                Azure.Core.Request _request = _message.Request;
 5496
 5497                // Set the endpoint
 05498                _request.Method = Azure.Core.RequestMethod.Put;
 05499                _request.Uri.Reset(resourceUri);
 05500                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 05501                if (pathRenameMode != null) { _request.Uri.AppendQuery("mode", Azure.Storage.Blobs.BlobRestClient.Serial
 5502
 5503                // Add request headers
 05504                _request.Headers.SetValue("x-ms-rename-source", renameSource);
 05505                _request.Headers.SetValue("x-ms-version", version);
 05506                if (directoryProperties != null) { _request.Headers.SetValue("x-ms-properties", directoryProperties); }
 05507                if (posixPermissions != null) { _request.Headers.SetValue("x-ms-permissions", posixPermissions); }
 05508                if (posixUmask != null) { _request.Headers.SetValue("x-ms-umask", posixUmask); }
 05509                if (cacheControl != null) { _request.Headers.SetValue("x-ms-cache-control", cacheControl); }
 05510                if (contentType != null) { _request.Headers.SetValue("x-ms-content-type", contentType); }
 05511                if (contentEncoding != null) { _request.Headers.SetValue("x-ms-content-encoding", contentEncoding); }
 05512                if (contentLanguage != null) { _request.Headers.SetValue("x-ms-content-language", contentLanguage); }
 05513                if (contentDisposition != null) { _request.Headers.SetValue("x-ms-content-disposition", contentDispositi
 05514                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 05515                if (sourceLeaseId != null) { _request.Headers.SetValue("x-ms-source-lease-id", sourceLeaseId); }
 05516                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 05517                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 05518                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 05519                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 05520                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 05521                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 05522                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 05523                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 05524                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 5525
 05526                return _message;
 5527            }
 5528
 5529            /// <summary>
 5530            /// Create the Blob.RenameAsync response or throw a failure exception.
 5531            /// </summary>
 5532            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 5533            /// <param name="response">The raw Response.</param>
 5534            /// <returns>The Blob.RenameAsync Azure.Response{Azure.Storage.Blobs.Models.BlobRenameResult}.</returns>
 5535            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobRenameResult> RenameAsync_CreateResponse(
 5536                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5537                Azure.Response response)
 5538            {
 5539                // Process the response
 05540                switch (response.Status)
 5541                {
 5542                    case 201:
 5543                    {
 5544                        // Create the result
 05545                        Azure.Storage.Blobs.Models.BlobRenameResult _value = new Azure.Storage.Blobs.Models.BlobRenameRe
 5546
 5547                        // Get response headers
 5548                        string _header;
 05549                        if (response.Headers.TryGetValue("ETag", out _header))
 5550                        {
 05551                            _value.ETag = new Azure.ETag(_header);
 5552                        }
 05553                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 5554                        {
 05555                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 5556                        }
 05557                        if (response.Headers.TryGetValue("Content-Length", out _header))
 5558                        {
 05559                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 5560                        }
 5561
 5562                        // Create the response
 05563                        return Response.FromValue(_value, response);
 5564                    }
 5565                    default:
 5566                    {
 5567                        // Create the result
 05568                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 05569                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 5570
 05571                        throw _value.CreateException(clientDiagnostics, response);
 5572                    }
 5573                }
 5574            }
 5575            #endregion Blob.RenameAsync
 5576
 5577            #region Blob.UndeleteAsync
 5578            /// <summary>
 5579            /// Undelete a blob that was previously soft deleted
 5580            /// </summary>
 5581            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 5582            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5583            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5584            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5585            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5586            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5587            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 5588            /// <param name="operationName">Operation name.</param>
 5589            /// <param name="cancellationToken">Cancellation token.</param>
 5590            /// <returns>Azure.Response</returns>
 5591            public static async System.Threading.Tasks.ValueTask<Azure.Response> UndeleteAsync(
 5592                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5593                Azure.Core.Pipeline.HttpPipeline pipeline,
 5594                System.Uri resourceUri,
 5595                string version,
 5596                int? timeout = default,
 5597                string requestId = default,
 5598                bool async = true,
 5599                string operationName = "BlobClient.Undelete",
 5600                System.Threading.CancellationToken cancellationToken = default)
 5601            {
 85602                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 5603                try
 5604                {
 85605                    _scope.AddAttribute("url", resourceUri);
 85606                    _scope.Start();
 85607                    using (Azure.Core.HttpMessage _message = UndeleteAsync_CreateMessage(
 85608                        pipeline,
 85609                        resourceUri,
 85610                        version,
 85611                        timeout,
 85612                        requestId))
 5613                    {
 85614                        if (async)
 5615                        {
 5616                            // Send the request asynchronously if we're being called via an async path
 45617                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 5618                        }
 5619                        else
 5620                        {
 5621                            // Send the request synchronously through the API that blocks if we're being called via a sy
 5622                            // (this is safe because the Task will complete before the user can call Wait)
 45623                            pipeline.Send(_message, cancellationToken);
 5624                        }
 85625                        Azure.Response _response = _message.Response;
 85626                        cancellationToken.ThrowIfCancellationRequested();
 85627                        return UndeleteAsync_CreateResponse(clientDiagnostics, _response);
 5628                    }
 5629                }
 45630                catch (System.Exception ex)
 5631                {
 45632                    _scope.Failed(ex);
 45633                    throw;
 5634                }
 5635                finally
 5636                {
 85637                    _scope.Dispose();
 5638                }
 45639            }
 5640
 5641            /// <summary>
 5642            /// Create the Blob.UndeleteAsync request.
 5643            /// </summary>
 5644            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5645            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5646            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5647            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5648            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5649            /// <returns>The Blob.UndeleteAsync Message.</returns>
 5650            internal static Azure.Core.HttpMessage UndeleteAsync_CreateMessage(
 5651                Azure.Core.Pipeline.HttpPipeline pipeline,
 5652                System.Uri resourceUri,
 5653                string version,
 5654                int? timeout = default,
 5655                string requestId = default)
 5656            {
 5657                // Validation
 85658                if (resourceUri == null)
 5659                {
 05660                    throw new System.ArgumentNullException(nameof(resourceUri));
 5661                }
 85662                if (version == null)
 5663                {
 05664                    throw new System.ArgumentNullException(nameof(version));
 5665                }
 5666
 5667                // Create the request
 85668                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 85669                Azure.Core.Request _request = _message.Request;
 5670
 5671                // Set the endpoint
 85672                _request.Method = Azure.Core.RequestMethod.Put;
 85673                _request.Uri.Reset(resourceUri);
 85674                _request.Uri.AppendQuery("comp", "undelete", escapeValue: false);
 05675                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 5676
 5677                // Add request headers
 85678                _request.Headers.SetValue("x-ms-version", version);
 05679                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 5680
 85681                return _message;
 5682            }
 5683
 5684            /// <summary>
 5685            /// Create the Blob.UndeleteAsync response or throw a failure exception.
 5686            /// </summary>
 5687            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 5688            /// <param name="response">The raw Response.</param>
 5689            /// <returns>The Blob.UndeleteAsync Azure.Response.</returns>
 5690            internal static Azure.Response UndeleteAsync_CreateResponse(
 5691                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5692                Azure.Response response)
 5693            {
 5694                // Process the response
 85695                switch (response.Status)
 5696                {
 5697                    case 200:
 5698                    {
 45699                        return response;
 5700                    }
 5701                    default:
 5702                    {
 5703                        // Create the result
 45704                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 45705                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 5706
 45707                        throw _value.CreateException(clientDiagnostics, response);
 5708                    }
 5709                }
 5710            }
 5711            #endregion Blob.UndeleteAsync
 5712
 5713            #region Blob.SetExpiryAsync
 5714            /// <summary>
 5715            /// Sets the time a blob will expire and be deleted.
 5716            /// </summary>
 5717            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 5718            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5719            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5720            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5721            /// <param name="expiryOptions">Required. Indicates mode of the expiry time</param>
 5722            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5723            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5724            /// <param name="expiresOn">The time to set the blob to expiry</param>
 5725            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 5726            /// <param name="operationName">Operation name.</param>
 5727            /// <param name="cancellationToken">Cancellation token.</param>
 5728            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobSetExpiryInternal}</returns>
 5729            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobSetExpiry
 5730                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5731                Azure.Core.Pipeline.HttpPipeline pipeline,
 5732                System.Uri resourceUri,
 5733                string version,
 5734                Azure.Storage.Blobs.Models.BlobExpiryOptions expiryOptions,
 5735                int? timeout = default,
 5736                string requestId = default,
 5737                string expiresOn = default,
 5738                bool async = true,
 5739                string operationName = "BlobClient.SetExpiry",
 5740                System.Threading.CancellationToken cancellationToken = default)
 5741            {
 05742                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 5743                try
 5744                {
 05745                    _scope.AddAttribute("url", resourceUri);
 05746                    _scope.Start();
 05747                    using (Azure.Core.HttpMessage _message = SetExpiryAsync_CreateMessage(
 05748                        pipeline,
 05749                        resourceUri,
 05750                        version,
 05751                        expiryOptions,
 05752                        timeout,
 05753                        requestId,
 05754                        expiresOn))
 5755                    {
 05756                        if (async)
 5757                        {
 5758                            // Send the request asynchronously if we're being called via an async path
 05759                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 5760                        }
 5761                        else
 5762                        {
 5763                            // Send the request synchronously through the API that blocks if we're being called via a sy
 5764                            // (this is safe because the Task will complete before the user can call Wait)
 05765                            pipeline.Send(_message, cancellationToken);
 5766                        }
 05767                        Azure.Response _response = _message.Response;
 05768                        cancellationToken.ThrowIfCancellationRequested();
 05769                        return SetExpiryAsync_CreateResponse(clientDiagnostics, _response);
 5770                    }
 5771                }
 05772                catch (System.Exception ex)
 5773                {
 05774                    _scope.Failed(ex);
 05775                    throw;
 5776                }
 5777                finally
 5778                {
 05779                    _scope.Dispose();
 5780                }
 05781            }
 5782
 5783            /// <summary>
 5784            /// Create the Blob.SetExpiryAsync request.
 5785            /// </summary>
 5786            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5787            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5788            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5789            /// <param name="expiryOptions">Required. Indicates mode of the expiry time</param>
 5790            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5791            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5792            /// <param name="expiresOn">The time to set the blob to expiry</param>
 5793            /// <returns>The Blob.SetExpiryAsync Message.</returns>
 5794            internal static Azure.Core.HttpMessage SetExpiryAsync_CreateMessage(
 5795                Azure.Core.Pipeline.HttpPipeline pipeline,
 5796                System.Uri resourceUri,
 5797                string version,
 5798                Azure.Storage.Blobs.Models.BlobExpiryOptions expiryOptions,
 5799                int? timeout = default,
 5800                string requestId = default,
 5801                string expiresOn = default)
 5802            {
 5803                // Validation
 05804                if (resourceUri == null)
 5805                {
 05806                    throw new System.ArgumentNullException(nameof(resourceUri));
 5807                }
 05808                if (version == null)
 5809                {
 05810                    throw new System.ArgumentNullException(nameof(version));
 5811                }
 5812
 5813                // Create the request
 05814                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 05815                Azure.Core.Request _request = _message.Request;
 5816
 5817                // Set the endpoint
 05818                _request.Method = Azure.Core.RequestMethod.Put;
 05819                _request.Uri.Reset(resourceUri);
 05820                _request.Uri.AppendQuery("comp", "expiry", escapeValue: false);
 05821                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 5822
 5823                // Add request headers
 05824                _request.Headers.SetValue("x-ms-version", version);
 05825                _request.Headers.SetValue("x-ms-expiry-option", expiryOptions.ToString());
 05826                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 05827                if (expiresOn != null) { _request.Headers.SetValue("x-ms-expiry-time", expiresOn); }
 5828
 05829                return _message;
 5830            }
 5831
 5832            /// <summary>
 5833            /// Create the Blob.SetExpiryAsync response or throw a failure exception.
 5834            /// </summary>
 5835            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 5836            /// <param name="response">The raw Response.</param>
 5837            /// <returns>The Blob.SetExpiryAsync Azure.Response{Azure.Storage.Blobs.Models.BlobSetExpiryInternal}.</retu
 5838            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobSetExpiryInternal> SetExpiryAsync_CreateRespon
 5839                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5840                Azure.Response response)
 5841            {
 5842                // Process the response
 05843                switch (response.Status)
 5844                {
 5845                    case 200:
 5846                    {
 5847                        // Create the result
 05848                        Azure.Storage.Blobs.Models.BlobSetExpiryInternal _value = new Azure.Storage.Blobs.Models.BlobSet
 5849
 5850                        // Get response headers
 5851                        string _header;
 05852                        if (response.Headers.TryGetValue("ETag", out _header))
 5853                        {
 05854                            _value.ETag = new Azure.ETag(_header);
 5855                        }
 05856                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 5857                        {
 05858                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 5859                        }
 5860
 5861                        // Create the response
 05862                        return Response.FromValue(_value, response);
 5863                    }
 5864                    default:
 5865                    {
 5866                        // Create the result
 05867                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 05868                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 5869
 05870                        throw _value.CreateException(clientDiagnostics, response);
 5871                    }
 5872                }
 5873            }
 5874            #endregion Blob.SetExpiryAsync
 5875
 5876            #region Blob.SetHttpHeadersAsync
 5877            /// <summary>
 5878            /// The Set HTTP Headers operation sets system properties on the blob
 5879            /// </summary>
 5880            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 5881            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5882            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5883            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5884            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5885            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 5886            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 5887            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 5888            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 5889            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 5890            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5891            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5892            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5893            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5894            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5895            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 5896            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 5897            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5898            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 5899            /// <param name="operationName">Operation name.</param>
 5900            /// <param name="cancellationToken">Cancellation token.</param>
 5901            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.SetHttpHeadersOperation}</returns>
 5902            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.SetHttpHeader
 5903                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 5904                Azure.Core.Pipeline.HttpPipeline pipeline,
 5905                System.Uri resourceUri,
 5906                string version,
 5907                int? timeout = default,
 5908                string blobCacheControl = default,
 5909                string blobContentType = default,
 5910                byte[] blobContentHash = default,
 5911                string blobContentEncoding = default,
 5912                string blobContentLanguage = default,
 5913                string leaseId = default,
 5914                System.DateTimeOffset? ifModifiedSince = default,
 5915                System.DateTimeOffset? ifUnmodifiedSince = default,
 5916                Azure.ETag? ifMatch = default,
 5917                Azure.ETag? ifNoneMatch = default,
 5918                string ifTags = default,
 5919                string blobContentDisposition = default,
 5920                string requestId = default,
 5921                bool async = true,
 5922                string operationName = "BlobClient.SetHttpHeaders",
 5923                System.Threading.CancellationToken cancellationToken = default)
 5924            {
 1685925                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 5926                try
 5927                {
 1685928                    _scope.AddAttribute("url", resourceUri);
 1685929                    _scope.Start();
 1685930                    using (Azure.Core.HttpMessage _message = SetHttpHeadersAsync_CreateMessage(
 1685931                        pipeline,
 1685932                        resourceUri,
 1685933                        version,
 1685934                        timeout,
 1685935                        blobCacheControl,
 1685936                        blobContentType,
 1685937                        blobContentHash,
 1685938                        blobContentEncoding,
 1685939                        blobContentLanguage,
 1685940                        leaseId,
 1685941                        ifModifiedSince,
 1685942                        ifUnmodifiedSince,
 1685943                        ifMatch,
 1685944                        ifNoneMatch,
 1685945                        ifTags,
 1685946                        blobContentDisposition,
 1685947                        requestId))
 5948                    {
 1685949                        if (async)
 5950                        {
 5951                            // Send the request asynchronously if we're being called via an async path
 1325952                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 5953                        }
 5954                        else
 5955                        {
 5956                            // Send the request synchronously through the API that blocks if we're being called via a sy
 5957                            // (this is safe because the Task will complete before the user can call Wait)
 365958                            pipeline.Send(_message, cancellationToken);
 5959                        }
 1685960                        Azure.Response _response = _message.Response;
 1685961                        cancellationToken.ThrowIfCancellationRequested();
 1685962                        return SetHttpHeadersAsync_CreateResponse(clientDiagnostics, _response);
 5963                    }
 5964                }
 765965                catch (System.Exception ex)
 5966                {
 765967                    _scope.Failed(ex);
 765968                    throw;
 5969                }
 5970                finally
 5971                {
 1685972                    _scope.Dispose();
 5973                }
 925974            }
 5975
 5976            /// <summary>
 5977            /// Create the Blob.SetHttpHeadersAsync request.
 5978            /// </summary>
 5979            /// <param name="pipeline">The pipeline used for sending requests.</param>
 5980            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 5981            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 5982            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 5983            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 5984            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 5985            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 5986            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 5987            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 5988            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 5989            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 5990            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 5991            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 5992            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 5993            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 5994            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 5995            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 5996            /// <returns>The Blob.SetHttpHeadersAsync Message.</returns>
 5997            internal static Azure.Core.HttpMessage SetHttpHeadersAsync_CreateMessage(
 5998                Azure.Core.Pipeline.HttpPipeline pipeline,
 5999                System.Uri resourceUri,
 6000                string version,
 6001                int? timeout = default,
 6002                string blobCacheControl = default,
 6003                string blobContentType = default,
 6004                byte[] blobContentHash = default,
 6005                string blobContentEncoding = default,
 6006                string blobContentLanguage = default,
 6007                string leaseId = default,
 6008                System.DateTimeOffset? ifModifiedSince = default,
 6009                System.DateTimeOffset? ifUnmodifiedSince = default,
 6010                Azure.ETag? ifMatch = default,
 6011                Azure.ETag? ifNoneMatch = default,
 6012                string ifTags = default,
 6013                string blobContentDisposition = default,
 6014                string requestId = default)
 6015            {
 6016                // Validation
 1686017                if (resourceUri == null)
 6018                {
 06019                    throw new System.ArgumentNullException(nameof(resourceUri));
 6020                }
 1686021                if (version == null)
 6022                {
 06023                    throw new System.ArgumentNullException(nameof(version));
 6024                }
 6025
 6026                // Create the request
 1686027                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1686028                Azure.Core.Request _request = _message.Request;
 6029
 6030                // Set the endpoint
 1686031                _request.Method = Azure.Core.RequestMethod.Put;
 1686032                _request.Uri.Reset(resourceUri);
 1686033                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 06034                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 6035
 6036                // Add request headers
 1686037                _request.Headers.SetValue("x-ms-version", version);
 2766038                if (blobCacheControl != null) { _request.Headers.SetValue("x-ms-blob-cache-control", blobCacheControl); 
 2766039                if (blobContentType != null) { _request.Headers.SetValue("x-ms-blob-content-type", blobContentType); }
 2766040                if (blobContentHash != null) { _request.Headers.SetValue("x-ms-blob-content-md5", System.Convert.ToBase6
 2886041                if (blobContentEncoding != null) { _request.Headers.SetValue("x-ms-blob-content-encoding", blobContentEn
 2886042                if (blobContentLanguage != null) { _request.Headers.SetValue("x-ms-blob-content-language", blobContentLa
 1926043                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 1926044                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1926045                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1926046                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1926047                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 726048                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 2766049                if (blobContentDisposition != null) { _request.Headers.SetValue("x-ms-blob-content-disposition", blobCon
 06050                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6051
 1686052                return _message;
 6053            }
 6054
 6055            /// <summary>
 6056            /// Create the Blob.SetHttpHeadersAsync response or throw a failure exception.
 6057            /// </summary>
 6058            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 6059            /// <param name="response">The raw Response.</param>
 6060            /// <returns>The Blob.SetHttpHeadersAsync Azure.Response{Azure.Storage.Blobs.Models.SetHttpHeadersOperation}
 6061            internal static Azure.Response<Azure.Storage.Blobs.Models.SetHttpHeadersOperation> SetHttpHeadersAsync_Creat
 6062                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6063                Azure.Response response)
 6064            {
 6065                // Process the response
 1686066                switch (response.Status)
 6067                {
 6068                    case 200:
 6069                    {
 6070                        // Create the result
 926071                        Azure.Storage.Blobs.Models.SetHttpHeadersOperation _value = new Azure.Storage.Blobs.Models.SetHt
 6072
 6073                        // Get response headers
 6074                        string _header;
 926075                        if (response.Headers.TryGetValue("ETag", out _header))
 6076                        {
 926077                            _value.ETag = new Azure.ETag(_header);
 6078                        }
 926079                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 6080                        {
 926081                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 6082                        }
 926083                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 6084                        {
 06085                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 6086                        }
 6087
 6088                        // Create the response
 926089                        return Response.FromValue(_value, response);
 6090                    }
 6091                    default:
 6092                    {
 6093                        // Create the result
 766094                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 766095                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 6096
 766097                        throw _value.CreateException(clientDiagnostics, response);
 6098                    }
 6099                }
 6100            }
 6101            #endregion Blob.SetHttpHeadersAsync
 6102
 6103            #region Blob.SetMetadataAsync
 6104            /// <summary>
 6105            /// The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more name-va
 6106            /// </summary>
 6107            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 6108            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6109            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6110            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6111            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6112            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 6113            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 6114            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 6115            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 6116            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 6117            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 6118            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6119            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6120            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6121            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6122            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6123            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6124            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 6125            /// <param name="operationName">Operation name.</param>
 6126            /// <param name="cancellationToken">Cancellation token.</param>
 6127            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.SetMetadataOperation}</returns>
 6128            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.SetMetadataOp
 6129                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6130                Azure.Core.Pipeline.HttpPipeline pipeline,
 6131                System.Uri resourceUri,
 6132                string version,
 6133                int? timeout = default,
 6134                System.Collections.Generic.IDictionary<string, string> metadata = default,
 6135                string leaseId = default,
 6136                string encryptionKey = default,
 6137                string encryptionKeySha256 = default,
 6138                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 6139                string encryptionScope = default,
 6140                System.DateTimeOffset? ifModifiedSince = default,
 6141                System.DateTimeOffset? ifUnmodifiedSince = default,
 6142                Azure.ETag? ifMatch = default,
 6143                Azure.ETag? ifNoneMatch = default,
 6144                string ifTags = default,
 6145                string requestId = default,
 6146                bool async = true,
 6147                string operationName = "BlobClient.SetMetadata",
 6148                System.Threading.CancellationToken cancellationToken = default)
 6149            {
 2766150                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 6151                try
 6152                {
 2766153                    _scope.AddAttribute("url", resourceUri);
 2766154                    _scope.Start();
 2766155                    using (Azure.Core.HttpMessage _message = SetMetadataAsync_CreateMessage(
 2766156                        pipeline,
 2766157                        resourceUri,
 2766158                        version,
 2766159                        timeout,
 2766160                        metadata,
 2766161                        leaseId,
 2766162                        encryptionKey,
 2766163                        encryptionKeySha256,
 2766164                        encryptionAlgorithm,
 2766165                        encryptionScope,
 2766166                        ifModifiedSince,
 2766167                        ifUnmodifiedSince,
 2766168                        ifMatch,
 2766169                        ifNoneMatch,
 2766170                        ifTags,
 2766171                        requestId))
 6172                    {
 2766173                        if (async)
 6174                        {
 6175                            // Send the request asynchronously if we're being called via an async path
 1886176                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 6177                        }
 6178                        else
 6179                        {
 6180                            // Send the request synchronously through the API that blocks if we're being called via a sy
 6181                            // (this is safe because the Task will complete before the user can call Wait)
 886182                            pipeline.Send(_message, cancellationToken);
 6183                        }
 2766184                        Azure.Response _response = _message.Response;
 2766185                        cancellationToken.ThrowIfCancellationRequested();
 2766186                        return SetMetadataAsync_CreateResponse(clientDiagnostics, _response);
 6187                    }
 6188                }
 766189                catch (System.Exception ex)
 6190                {
 766191                    _scope.Failed(ex);
 766192                    throw;
 6193                }
 6194                finally
 6195                {
 2766196                    _scope.Dispose();
 6197                }
 2006198            }
 6199
 6200            /// <summary>
 6201            /// Create the Blob.SetMetadataAsync request.
 6202            /// </summary>
 6203            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6204            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6205            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6206            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6207            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 6208            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 6209            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 6210            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 6211            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 6212            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 6213            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6214            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6215            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6216            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6217            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6218            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6219            /// <returns>The Blob.SetMetadataAsync Message.</returns>
 6220            internal static Azure.Core.HttpMessage SetMetadataAsync_CreateMessage(
 6221                Azure.Core.Pipeline.HttpPipeline pipeline,
 6222                System.Uri resourceUri,
 6223                string version,
 6224                int? timeout = default,
 6225                System.Collections.Generic.IDictionary<string, string> metadata = default,
 6226                string leaseId = default,
 6227                string encryptionKey = default,
 6228                string encryptionKeySha256 = default,
 6229                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 6230                string encryptionScope = default,
 6231                System.DateTimeOffset? ifModifiedSince = default,
 6232                System.DateTimeOffset? ifUnmodifiedSince = default,
 6233                Azure.ETag? ifMatch = default,
 6234                Azure.ETag? ifNoneMatch = default,
 6235                string ifTags = default,
 6236                string requestId = default)
 6237            {
 6238                // Validation
 2766239                if (resourceUri == null)
 6240                {
 06241                    throw new System.ArgumentNullException(nameof(resourceUri));
 6242                }
 2766243                if (version == null)
 6244                {
 06245                    throw new System.ArgumentNullException(nameof(version));
 6246                }
 6247
 6248                // Create the request
 2766249                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 2766250                Azure.Core.Request _request = _message.Request;
 6251
 6252                // Set the endpoint
 2766253                _request.Method = Azure.Core.RequestMethod.Put;
 2766254                _request.Uri.Reset(resourceUri);
 2766255                _request.Uri.AppendQuery("comp", "metadata", escapeValue: false);
 06256                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 6257
 6258                // Add request headers
 2766259                _request.Headers.SetValue("x-ms-version", version);
 2766260                if (metadata != null) {
 27606261                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 6262                    {
 11046263                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 6264                    }
 6265                }
 3006266                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 1766267                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 1766268                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 1766269                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 1766270                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 3006271                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 3006272                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 3006273                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 3006274                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 1806275                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 06276                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6277
 2766278                return _message;
 6279            }
 6280
 6281            /// <summary>
 6282            /// Create the Blob.SetMetadataAsync response or throw a failure exception.
 6283            /// </summary>
 6284            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 6285            /// <param name="response">The raw Response.</param>
 6286            /// <returns>The Blob.SetMetadataAsync Azure.Response{Azure.Storage.Blobs.Models.SetMetadataOperation}.</ret
 6287            internal static Azure.Response<Azure.Storage.Blobs.Models.SetMetadataOperation> SetMetadataAsync_CreateRespo
 6288                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6289                Azure.Response response)
 6290            {
 6291                // Process the response
 2766292                switch (response.Status)
 6293                {
 6294                    case 200:
 6295                    {
 6296                        // Create the result
 2006297                        Azure.Storage.Blobs.Models.SetMetadataOperation _value = new Azure.Storage.Blobs.Models.SetMetad
 6298
 6299                        // Get response headers
 6300                        string _header;
 2006301                        if (response.Headers.TryGetValue("ETag", out _header))
 6302                        {
 2006303                            _value.ETag = new Azure.ETag(_header);
 6304                        }
 2006305                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 6306                        {
 2006307                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 6308                        }
 2006309                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 6310                        {
 1086311                            _value.VersionId = _header;
 6312                        }
 2006313                        if (response.Headers.TryGetValue("x-ms-request-server-encrypted", out _header))
 6314                        {
 2006315                            _value.IsServerEncrypted = bool.Parse(_header);
 6316                        }
 2006317                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 6318                        {
 46319                            _value.EncryptionKeySha256 = _header;
 6320                        }
 2006321                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 6322                        {
 46323                            _value.EncryptionScope = _header;
 6324                        }
 6325
 6326                        // Create the response
 2006327                        return Response.FromValue(_value, response);
 6328                    }
 6329                    default:
 6330                    {
 6331                        // Create the result
 766332                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 766333                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 6334
 766335                        throw _value.CreateException(clientDiagnostics, response);
 6336                    }
 6337                }
 6338            }
 6339            #endregion Blob.SetMetadataAsync
 6340
 6341            #region Blob.AcquireLeaseAsync
 6342            /// <summary>
 6343            /// [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operatio
 6344            /// </summary>
 6345            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 6346            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6347            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6348            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6349            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6350            /// <param name="duration">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease
 6351            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 6352            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6353            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6354            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6355            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6356            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6357            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6358            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 6359            /// <param name="operationName">Operation name.</param>
 6360            /// <param name="cancellationToken">Cancellation token.</param>
 6361            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 6362            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> A
 6363                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6364                Azure.Core.Pipeline.HttpPipeline pipeline,
 6365                System.Uri resourceUri,
 6366                string version,
 6367                int? timeout = default,
 6368                long? duration = default,
 6369                string proposedLeaseId = default,
 6370                System.DateTimeOffset? ifModifiedSince = default,
 6371                System.DateTimeOffset? ifUnmodifiedSince = default,
 6372                Azure.ETag? ifMatch = default,
 6373                Azure.ETag? ifNoneMatch = default,
 6374                string ifTags = default,
 6375                string requestId = default,
 6376                bool async = true,
 6377                string operationName = "BlobClient.AcquireLease",
 6378                System.Threading.CancellationToken cancellationToken = default)
 6379            {
 9126380                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 6381                try
 6382                {
 9126383                    _scope.AddAttribute("url", resourceUri);
 9126384                    _scope.Start();
 9126385                    using (Azure.Core.HttpMessage _message = AcquireLeaseAsync_CreateMessage(
 9126386                        pipeline,
 9126387                        resourceUri,
 9126388                        version,
 9126389                        timeout,
 9126390                        duration,
 9126391                        proposedLeaseId,
 9126392                        ifModifiedSince,
 9126393                        ifUnmodifiedSince,
 9126394                        ifMatch,
 9126395                        ifNoneMatch,
 9126396                        ifTags,
 9126397                        requestId))
 6398                    {
 9126399                        if (async)
 6400                        {
 6401                            // Send the request asynchronously if we're being called via an async path
 4566402                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 6403                        }
 6404                        else
 6405                        {
 6406                            // Send the request synchronously through the API that blocks if we're being called via a sy
 6407                            // (this is safe because the Task will complete before the user can call Wait)
 4566408                            pipeline.Send(_message, cancellationToken);
 6409                        }
 9126410                        Azure.Response _response = _message.Response;
 9126411                        cancellationToken.ThrowIfCancellationRequested();
 9126412                        return AcquireLeaseAsync_CreateResponse(clientDiagnostics, _response);
 6413                    }
 6414                }
 646415                catch (System.Exception ex)
 6416                {
 646417                    _scope.Failed(ex);
 646418                    throw;
 6419                }
 6420                finally
 6421                {
 9126422                    _scope.Dispose();
 6423                }
 8486424            }
 6425
 6426            /// <summary>
 6427            /// Create the Blob.AcquireLeaseAsync request.
 6428            /// </summary>
 6429            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6430            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6431            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6432            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6433            /// <param name="duration">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease
 6434            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 6435            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6436            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6437            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6438            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6439            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6440            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6441            /// <returns>The Blob.AcquireLeaseAsync Message.</returns>
 6442            internal static Azure.Core.HttpMessage AcquireLeaseAsync_CreateMessage(
 6443                Azure.Core.Pipeline.HttpPipeline pipeline,
 6444                System.Uri resourceUri,
 6445                string version,
 6446                int? timeout = default,
 6447                long? duration = default,
 6448                string proposedLeaseId = default,
 6449                System.DateTimeOffset? ifModifiedSince = default,
 6450                System.DateTimeOffset? ifUnmodifiedSince = default,
 6451                Azure.ETag? ifMatch = default,
 6452                Azure.ETag? ifNoneMatch = default,
 6453                string ifTags = default,
 6454                string requestId = default)
 6455            {
 6456                // Validation
 9126457                if (resourceUri == null)
 6458                {
 06459                    throw new System.ArgumentNullException(nameof(resourceUri));
 6460                }
 9126461                if (version == null)
 6462                {
 06463                    throw new System.ArgumentNullException(nameof(version));
 6464                }
 6465
 6466                // Create the request
 9126467                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 9126468                Azure.Core.Request _request = _message.Request;
 6469
 6470                // Set the endpoint
 9126471                _request.Method = Azure.Core.RequestMethod.Put;
 9126472                _request.Uri.Reset(resourceUri);
 9126473                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 06474                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 6475
 6476                // Add request headers
 9126477                _request.Headers.SetValue("x-ms-lease-action", "acquire");
 9126478                _request.Headers.SetValue("x-ms-version", version);
 18246479                if (duration != null) { _request.Headers.SetValue("x-ms-lease-duration", duration.Value.ToString(System.
 18246480                if (proposedLeaseId != null) { _request.Headers.SetValue("x-ms-proposed-lease-id", proposedLeaseId); }
 9366481                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 9366482                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 9366483                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 9366484                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 4046485                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 06486                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6487
 9126488                return _message;
 6489            }
 6490
 6491            /// <summary>
 6492            /// Create the Blob.AcquireLeaseAsync response or throw a failure exception.
 6493            /// </summary>
 6494            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 6495            /// <param name="response">The raw Response.</param>
 6496            /// <returns>The Blob.AcquireLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 6497            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> AcquireLeaseAsync_CreateResponse(
 6498                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6499                Azure.Response response)
 6500            {
 6501                // Process the response
 9126502                switch (response.Status)
 6503                {
 6504                    case 201:
 6505                    {
 6506                        // Create the result
 8486507                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 6508
 6509                        // Get response headers
 6510                        string _header;
 8486511                        if (response.Headers.TryGetValue("ETag", out _header))
 6512                        {
 8486513                            _value.ETag = new Azure.ETag(_header);
 6514                        }
 8486515                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 6516                        {
 8486517                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 6518                        }
 8486519                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 6520                        {
 8486521                            _value.LeaseId = _header;
 6522                        }
 6523
 6524                        // Create the response
 8486525                        return Response.FromValue(_value, response);
 6526                    }
 6527                    default:
 6528                    {
 6529                        // Create the result
 646530                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 646531                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 6532
 646533                        throw _value.CreateException(clientDiagnostics, response);
 6534                    }
 6535                }
 6536            }
 6537            #endregion Blob.AcquireLeaseAsync
 6538
 6539            #region Blob.ReleaseLeaseAsync
 6540            /// <summary>
 6541            /// [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operatio
 6542            /// </summary>
 6543            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 6544            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6545            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6546            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 6547            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6548            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6549            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6550            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6551            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6552            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6553            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6554            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6555            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 6556            /// <param name="operationName">Operation name.</param>
 6557            /// <param name="cancellationToken">Cancellation token.</param>
 6558            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobInfo}</returns>
 6559            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobInfo>> Re
 6560                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6561                Azure.Core.Pipeline.HttpPipeline pipeline,
 6562                System.Uri resourceUri,
 6563                string leaseId,
 6564                string version,
 6565                int? timeout = default,
 6566                System.DateTimeOffset? ifModifiedSince = default,
 6567                System.DateTimeOffset? ifUnmodifiedSince = default,
 6568                Azure.ETag? ifMatch = default,
 6569                Azure.ETag? ifNoneMatch = default,
 6570                string ifTags = default,
 6571                string requestId = default,
 6572                bool async = true,
 6573                string operationName = "BlobClient.ReleaseLease",
 6574                System.Threading.CancellationToken cancellationToken = default)
 6575            {
 1406576                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 6577                try
 6578                {
 1406579                    _scope.AddAttribute("url", resourceUri);
 1406580                    _scope.Start();
 1406581                    using (Azure.Core.HttpMessage _message = ReleaseLeaseAsync_CreateMessage(
 1406582                        pipeline,
 1406583                        resourceUri,
 1406584                        leaseId,
 1406585                        version,
 1406586                        timeout,
 1406587                        ifModifiedSince,
 1406588                        ifUnmodifiedSince,
 1406589                        ifMatch,
 1406590                        ifNoneMatch,
 1406591                        ifTags,
 1406592                        requestId))
 6593                    {
 1406594                        if (async)
 6595                        {
 6596                            // Send the request asynchronously if we're being called via an async path
 706597                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 6598                        }
 6599                        else
 6600                        {
 6601                            // Send the request synchronously through the API that blocks if we're being called via a sy
 6602                            // (this is safe because the Task will complete before the user can call Wait)
 706603                            pipeline.Send(_message, cancellationToken);
 6604                        }
 1406605                        Azure.Response _response = _message.Response;
 1406606                        cancellationToken.ThrowIfCancellationRequested();
 1406607                        return ReleaseLeaseAsync_CreateResponse(clientDiagnostics, _response);
 6608                    }
 6609                }
 646610                catch (System.Exception ex)
 6611                {
 646612                    _scope.Failed(ex);
 646613                    throw;
 6614                }
 6615                finally
 6616                {
 1406617                    _scope.Dispose();
 6618                }
 766619            }
 6620
 6621            /// <summary>
 6622            /// Create the Blob.ReleaseLeaseAsync request.
 6623            /// </summary>
 6624            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6625            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6626            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 6627            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6628            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6629            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6630            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6631            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6632            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6633            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6634            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6635            /// <returns>The Blob.ReleaseLeaseAsync Message.</returns>
 6636            internal static Azure.Core.HttpMessage ReleaseLeaseAsync_CreateMessage(
 6637                Azure.Core.Pipeline.HttpPipeline pipeline,
 6638                System.Uri resourceUri,
 6639                string leaseId,
 6640                string version,
 6641                int? timeout = default,
 6642                System.DateTimeOffset? ifModifiedSince = default,
 6643                System.DateTimeOffset? ifUnmodifiedSince = default,
 6644                Azure.ETag? ifMatch = default,
 6645                Azure.ETag? ifNoneMatch = default,
 6646                string ifTags = default,
 6647                string requestId = default)
 6648            {
 6649                // Validation
 1406650                if (resourceUri == null)
 6651                {
 06652                    throw new System.ArgumentNullException(nameof(resourceUri));
 6653                }
 1406654                if (leaseId == null)
 6655                {
 06656                    throw new System.ArgumentNullException(nameof(leaseId));
 6657                }
 1406658                if (version == null)
 6659                {
 06660                    throw new System.ArgumentNullException(nameof(version));
 6661                }
 6662
 6663                // Create the request
 1406664                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1406665                Azure.Core.Request _request = _message.Request;
 6666
 6667                // Set the endpoint
 1406668                _request.Method = Azure.Core.RequestMethod.Put;
 1406669                _request.Uri.Reset(resourceUri);
 1406670                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 06671                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 6672
 6673                // Add request headers
 1406674                _request.Headers.SetValue("x-ms-lease-action", "release");
 1406675                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 1406676                _request.Headers.SetValue("x-ms-version", version);
 1646677                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1646678                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1646679                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1646680                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 606681                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 06682                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6683
 1406684                return _message;
 6685            }
 6686
 6687            /// <summary>
 6688            /// Create the Blob.ReleaseLeaseAsync response or throw a failure exception.
 6689            /// </summary>
 6690            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 6691            /// <param name="response">The raw Response.</param>
 6692            /// <returns>The Blob.ReleaseLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobInfo}.</returns>
 6693            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobInfo> ReleaseLeaseAsync_CreateResponse(
 6694                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6695                Azure.Response response)
 6696            {
 6697                // Process the response
 1406698                switch (response.Status)
 6699                {
 6700                    case 200:
 6701                    {
 6702                        // Create the result
 766703                        Azure.Storage.Blobs.Models.BlobInfo _value = new Azure.Storage.Blobs.Models.BlobInfo();
 6704
 6705                        // Get response headers
 6706                        string _header;
 766707                        if (response.Headers.TryGetValue("ETag", out _header))
 6708                        {
 766709                            _value.ETag = new Azure.ETag(_header);
 6710                        }
 766711                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 6712                        {
 766713                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 6714                        }
 6715
 6716                        // Create the response
 766717                        return Response.FromValue(_value, response);
 6718                    }
 6719                    default:
 6720                    {
 6721                        // Create the result
 646722                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 646723                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 6724
 646725                        throw _value.CreateException(clientDiagnostics, response);
 6726                    }
 6727                }
 6728            }
 6729            #endregion Blob.ReleaseLeaseAsync
 6730
 6731            #region Blob.RenewLeaseAsync
 6732            /// <summary>
 6733            /// [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operatio
 6734            /// </summary>
 6735            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 6736            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6737            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6738            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 6739            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6740            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6741            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6742            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6743            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6744            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6745            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6746            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6747            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 6748            /// <param name="operationName">Operation name.</param>
 6749            /// <param name="cancellationToken">Cancellation token.</param>
 6750            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 6751            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> R
 6752                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6753                Azure.Core.Pipeline.HttpPipeline pipeline,
 6754                System.Uri resourceUri,
 6755                string leaseId,
 6756                string version,
 6757                int? timeout = default,
 6758                System.DateTimeOffset? ifModifiedSince = default,
 6759                System.DateTimeOffset? ifUnmodifiedSince = default,
 6760                Azure.ETag? ifMatch = default,
 6761                Azure.ETag? ifNoneMatch = default,
 6762                string ifTags = default,
 6763                string requestId = default,
 6764                bool async = true,
 6765                string operationName = "BlobClient.RenewLease",
 6766                System.Threading.CancellationToken cancellationToken = default)
 6767            {
 1406768                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 6769                try
 6770                {
 1406771                    _scope.AddAttribute("url", resourceUri);
 1406772                    _scope.Start();
 1406773                    using (Azure.Core.HttpMessage _message = RenewLeaseAsync_CreateMessage(
 1406774                        pipeline,
 1406775                        resourceUri,
 1406776                        leaseId,
 1406777                        version,
 1406778                        timeout,
 1406779                        ifModifiedSince,
 1406780                        ifUnmodifiedSince,
 1406781                        ifMatch,
 1406782                        ifNoneMatch,
 1406783                        ifTags,
 1406784                        requestId))
 6785                    {
 1406786                        if (async)
 6787                        {
 6788                            // Send the request asynchronously if we're being called via an async path
 706789                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 6790                        }
 6791                        else
 6792                        {
 6793                            // Send the request synchronously through the API that blocks if we're being called via a sy
 6794                            // (this is safe because the Task will complete before the user can call Wait)
 706795                            pipeline.Send(_message, cancellationToken);
 6796                        }
 1406797                        Azure.Response _response = _message.Response;
 1406798                        cancellationToken.ThrowIfCancellationRequested();
 1406799                        return RenewLeaseAsync_CreateResponse(clientDiagnostics, _response);
 6800                    }
 6801                }
 646802                catch (System.Exception ex)
 6803                {
 646804                    _scope.Failed(ex);
 646805                    throw;
 6806                }
 6807                finally
 6808                {
 1406809                    _scope.Dispose();
 6810                }
 766811            }
 6812
 6813            /// <summary>
 6814            /// Create the Blob.RenewLeaseAsync request.
 6815            /// </summary>
 6816            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6817            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6818            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 6819            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6820            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6821            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6822            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6823            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6824            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6825            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6826            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6827            /// <returns>The Blob.RenewLeaseAsync Message.</returns>
 6828            internal static Azure.Core.HttpMessage RenewLeaseAsync_CreateMessage(
 6829                Azure.Core.Pipeline.HttpPipeline pipeline,
 6830                System.Uri resourceUri,
 6831                string leaseId,
 6832                string version,
 6833                int? timeout = default,
 6834                System.DateTimeOffset? ifModifiedSince = default,
 6835                System.DateTimeOffset? ifUnmodifiedSince = default,
 6836                Azure.ETag? ifMatch = default,
 6837                Azure.ETag? ifNoneMatch = default,
 6838                string ifTags = default,
 6839                string requestId = default)
 6840            {
 6841                // Validation
 1406842                if (resourceUri == null)
 6843                {
 06844                    throw new System.ArgumentNullException(nameof(resourceUri));
 6845                }
 1406846                if (leaseId == null)
 6847                {
 06848                    throw new System.ArgumentNullException(nameof(leaseId));
 6849                }
 1406850                if (version == null)
 6851                {
 06852                    throw new System.ArgumentNullException(nameof(version));
 6853                }
 6854
 6855                // Create the request
 1406856                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1406857                Azure.Core.Request _request = _message.Request;
 6858
 6859                // Set the endpoint
 1406860                _request.Method = Azure.Core.RequestMethod.Put;
 1406861                _request.Uri.Reset(resourceUri);
 1406862                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 06863                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 6864
 6865                // Add request headers
 1406866                _request.Headers.SetValue("x-ms-lease-action", "renew");
 1406867                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 1406868                _request.Headers.SetValue("x-ms-version", version);
 1646869                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1646870                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1646871                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1646872                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 606873                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 06874                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6875
 1406876                return _message;
 6877            }
 6878
 6879            /// <summary>
 6880            /// Create the Blob.RenewLeaseAsync response or throw a failure exception.
 6881            /// </summary>
 6882            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 6883            /// <param name="response">The raw Response.</param>
 6884            /// <returns>The Blob.RenewLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 6885            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> RenewLeaseAsync_CreateResponse(
 6886                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6887                Azure.Response response)
 6888            {
 6889                // Process the response
 1406890                switch (response.Status)
 6891                {
 6892                    case 200:
 6893                    {
 6894                        // Create the result
 766895                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 6896
 6897                        // Get response headers
 6898                        string _header;
 766899                        if (response.Headers.TryGetValue("ETag", out _header))
 6900                        {
 766901                            _value.ETag = new Azure.ETag(_header);
 6902                        }
 766903                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 6904                        {
 766905                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 6906                        }
 766907                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 6908                        {
 766909                            _value.LeaseId = _header;
 6910                        }
 6911
 6912                        // Create the response
 766913                        return Response.FromValue(_value, response);
 6914                    }
 6915                    default:
 6916                    {
 6917                        // Create the result
 646918                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 646919                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 6920
 646921                        throw _value.CreateException(clientDiagnostics, response);
 6922                    }
 6923                }
 6924            }
 6925            #endregion Blob.RenewLeaseAsync
 6926
 6927            #region Blob.ChangeLeaseAsync
 6928            /// <summary>
 6929            /// [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operatio
 6930            /// </summary>
 6931            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 6932            /// <param name="pipeline">The pipeline used for sending requests.</param>
 6933            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 6934            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 6935            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 6936            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 6937            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 6938            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 6939            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 6940            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 6941            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 6942            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 6943            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 6944            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 6945            /// <param name="operationName">Operation name.</param>
 6946            /// <param name="cancellationToken">Cancellation token.</param>
 6947            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobLease}</returns>
 6948            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobLease>> C
 6949                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 6950                Azure.Core.Pipeline.HttpPipeline pipeline,
 6951                System.Uri resourceUri,
 6952                string leaseId,
 6953                string proposedLeaseId,
 6954                string version,
 6955                int? timeout = default,
 6956                System.DateTimeOffset? ifModifiedSince = default,
 6957                System.DateTimeOffset? ifUnmodifiedSince = default,
 6958                Azure.ETag? ifMatch = default,
 6959                Azure.ETag? ifNoneMatch = default,
 6960                string ifTags = default,
 6961                string requestId = default,
 6962                bool async = true,
 6963                string operationName = "BlobClient.ChangeLease",
 6964                System.Threading.CancellationToken cancellationToken = default)
 6965            {
 1406966                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 6967                try
 6968                {
 1406969                    _scope.AddAttribute("url", resourceUri);
 1406970                    _scope.Start();
 1406971                    using (Azure.Core.HttpMessage _message = ChangeLeaseAsync_CreateMessage(
 1406972                        pipeline,
 1406973                        resourceUri,
 1406974                        leaseId,
 1406975                        proposedLeaseId,
 1406976                        version,
 1406977                        timeout,
 1406978                        ifModifiedSince,
 1406979                        ifUnmodifiedSince,
 1406980                        ifMatch,
 1406981                        ifNoneMatch,
 1406982                        ifTags,
 1406983                        requestId))
 6984                    {
 1406985                        if (async)
 6986                        {
 6987                            // Send the request asynchronously if we're being called via an async path
 706988                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 6989                        }
 6990                        else
 6991                        {
 6992                            // Send the request synchronously through the API that blocks if we're being called via a sy
 6993                            // (this is safe because the Task will complete before the user can call Wait)
 706994                            pipeline.Send(_message, cancellationToken);
 6995                        }
 1406996                        Azure.Response _response = _message.Response;
 1406997                        cancellationToken.ThrowIfCancellationRequested();
 1406998                        return ChangeLeaseAsync_CreateResponse(clientDiagnostics, _response);
 6999                    }
 7000                }
 647001                catch (System.Exception ex)
 7002                {
 647003                    _scope.Failed(ex);
 647004                    throw;
 7005                }
 7006                finally
 7007                {
 1407008                    _scope.Dispose();
 7009                }
 767010            }
 7011
 7012            /// <summary>
 7013            /// Create the Blob.ChangeLeaseAsync request.
 7014            /// </summary>
 7015            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7016            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7017            /// <param name="leaseId">Specifies the current lease ID on the resource.</param>
 7018            /// <param name="proposedLeaseId">Proposed lease ID, in a GUID string format. The Blob service returns 400 (
 7019            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7020            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7021            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7022            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7023            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7024            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7025            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7026            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7027            /// <returns>The Blob.ChangeLeaseAsync Message.</returns>
 7028            internal static Azure.Core.HttpMessage ChangeLeaseAsync_CreateMessage(
 7029                Azure.Core.Pipeline.HttpPipeline pipeline,
 7030                System.Uri resourceUri,
 7031                string leaseId,
 7032                string proposedLeaseId,
 7033                string version,
 7034                int? timeout = default,
 7035                System.DateTimeOffset? ifModifiedSince = default,
 7036                System.DateTimeOffset? ifUnmodifiedSince = default,
 7037                Azure.ETag? ifMatch = default,
 7038                Azure.ETag? ifNoneMatch = default,
 7039                string ifTags = default,
 7040                string requestId = default)
 7041            {
 7042                // Validation
 1407043                if (resourceUri == null)
 7044                {
 07045                    throw new System.ArgumentNullException(nameof(resourceUri));
 7046                }
 1407047                if (leaseId == null)
 7048                {
 07049                    throw new System.ArgumentNullException(nameof(leaseId));
 7050                }
 1407051                if (proposedLeaseId == null)
 7052                {
 07053                    throw new System.ArgumentNullException(nameof(proposedLeaseId));
 7054                }
 1407055                if (version == null)
 7056                {
 07057                    throw new System.ArgumentNullException(nameof(version));
 7058                }
 7059
 7060                // Create the request
 1407061                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1407062                Azure.Core.Request _request = _message.Request;
 7063
 7064                // Set the endpoint
 1407065                _request.Method = Azure.Core.RequestMethod.Put;
 1407066                _request.Uri.Reset(resourceUri);
 1407067                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 07068                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 7069
 7070                // Add request headers
 1407071                _request.Headers.SetValue("x-ms-lease-action", "change");
 1407072                _request.Headers.SetValue("x-ms-lease-id", leaseId);
 1407073                _request.Headers.SetValue("x-ms-proposed-lease-id", proposedLeaseId);
 1407074                _request.Headers.SetValue("x-ms-version", version);
 1647075                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1647076                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1647077                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1647078                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 607079                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 07080                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 7081
 1407082                return _message;
 7083            }
 7084
 7085            /// <summary>
 7086            /// Create the Blob.ChangeLeaseAsync response or throw a failure exception.
 7087            /// </summary>
 7088            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 7089            /// <param name="response">The raw Response.</param>
 7090            /// <returns>The Blob.ChangeLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BlobLease}.</returns>
 7091            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobLease> ChangeLeaseAsync_CreateResponse(
 7092                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7093                Azure.Response response)
 7094            {
 7095                // Process the response
 1407096                switch (response.Status)
 7097                {
 7098                    case 200:
 7099                    {
 7100                        // Create the result
 767101                        Azure.Storage.Blobs.Models.BlobLease _value = new Azure.Storage.Blobs.Models.BlobLease();
 7102
 7103                        // Get response headers
 7104                        string _header;
 767105                        if (response.Headers.TryGetValue("ETag", out _header))
 7106                        {
 767107                            _value.ETag = new Azure.ETag(_header);
 7108                        }
 767109                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 7110                        {
 767111                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 7112                        }
 767113                        if (response.Headers.TryGetValue("x-ms-lease-id", out _header))
 7114                        {
 767115                            _value.LeaseId = _header;
 7116                        }
 7117
 7118                        // Create the response
 767119                        return Response.FromValue(_value, response);
 7120                    }
 7121                    default:
 7122                    {
 7123                        // Create the result
 647124                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 647125                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 7126
 647127                        throw _value.CreateException(clientDiagnostics, response);
 7128                    }
 7129                }
 7130            }
 7131            #endregion Blob.ChangeLeaseAsync
 7132
 7133            #region Blob.BreakLeaseAsync
 7134            /// <summary>
 7135            /// [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete operatio
 7136            /// </summary>
 7137            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 7138            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7139            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7140            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7141            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7142            /// <param name="breakPeriod">For a break operation, proposed duration the lease should continue before it i
 7143            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7144            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7145            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7146            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7147            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7148            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7149            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 7150            /// <param name="operationName">Operation name.</param>
 7151            /// <param name="cancellationToken">Cancellation token.</param>
 7152            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BrokenLease}</returns>
 7153            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BrokenLease>>
 7154                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7155                Azure.Core.Pipeline.HttpPipeline pipeline,
 7156                System.Uri resourceUri,
 7157                string version,
 7158                int? timeout = default,
 7159                long? breakPeriod = default,
 7160                System.DateTimeOffset? ifModifiedSince = default,
 7161                System.DateTimeOffset? ifUnmodifiedSince = default,
 7162                Azure.ETag? ifMatch = default,
 7163                Azure.ETag? ifNoneMatch = default,
 7164                string ifTags = default,
 7165                string requestId = default,
 7166                bool async = true,
 7167                string operationName = "BlobClient.BreakLease",
 7168                System.Threading.CancellationToken cancellationToken = default)
 7169            {
 1447170                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 7171                try
 7172                {
 1447173                    _scope.AddAttribute("url", resourceUri);
 1447174                    _scope.Start();
 1447175                    using (Azure.Core.HttpMessage _message = BreakLeaseAsync_CreateMessage(
 1447176                        pipeline,
 1447177                        resourceUri,
 1447178                        version,
 1447179                        timeout,
 1447180                        breakPeriod,
 1447181                        ifModifiedSince,
 1447182                        ifUnmodifiedSince,
 1447183                        ifMatch,
 1447184                        ifNoneMatch,
 1447185                        ifTags,
 1447186                        requestId))
 7187                    {
 1447188                        if (async)
 7189                        {
 7190                            // Send the request asynchronously if we're being called via an async path
 727191                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 7192                        }
 7193                        else
 7194                        {
 7195                            // Send the request synchronously through the API that blocks if we're being called via a sy
 7196                            // (this is safe because the Task will complete before the user can call Wait)
 727197                            pipeline.Send(_message, cancellationToken);
 7198                        }
 1447199                        Azure.Response _response = _message.Response;
 1447200                        cancellationToken.ThrowIfCancellationRequested();
 1447201                        return BreakLeaseAsync_CreateResponse(clientDiagnostics, _response);
 7202                    }
 7203                }
 647204                catch (System.Exception ex)
 7205                {
 647206                    _scope.Failed(ex);
 647207                    throw;
 7208                }
 7209                finally
 7210                {
 1447211                    _scope.Dispose();
 7212                }
 807213            }
 7214
 7215            /// <summary>
 7216            /// Create the Blob.BreakLeaseAsync request.
 7217            /// </summary>
 7218            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7219            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7220            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7221            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7222            /// <param name="breakPeriod">For a break operation, proposed duration the lease should continue before it i
 7223            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7224            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7225            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7226            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7227            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7228            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7229            /// <returns>The Blob.BreakLeaseAsync Message.</returns>
 7230            internal static Azure.Core.HttpMessage BreakLeaseAsync_CreateMessage(
 7231                Azure.Core.Pipeline.HttpPipeline pipeline,
 7232                System.Uri resourceUri,
 7233                string version,
 7234                int? timeout = default,
 7235                long? breakPeriod = default,
 7236                System.DateTimeOffset? ifModifiedSince = default,
 7237                System.DateTimeOffset? ifUnmodifiedSince = default,
 7238                Azure.ETag? ifMatch = default,
 7239                Azure.ETag? ifNoneMatch = default,
 7240                string ifTags = default,
 7241                string requestId = default)
 7242            {
 7243                // Validation
 1447244                if (resourceUri == null)
 7245                {
 07246                    throw new System.ArgumentNullException(nameof(resourceUri));
 7247                }
 1447248                if (version == null)
 7249                {
 07250                    throw new System.ArgumentNullException(nameof(version));
 7251                }
 7252
 7253                // Create the request
 1447254                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1447255                Azure.Core.Request _request = _message.Request;
 7256
 7257                // Set the endpoint
 1447258                _request.Method = Azure.Core.RequestMethod.Put;
 1447259                _request.Uri.Reset(resourceUri);
 1447260                _request.Uri.AppendQuery("comp", "lease", escapeValue: false);
 07261                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 7262
 7263                // Add request headers
 1447264                _request.Headers.SetValue("x-ms-lease-action", "break");
 1447265                _request.Headers.SetValue("x-ms-version", version);
 607266                if (breakPeriod != null) { _request.Headers.SetValue("x-ms-lease-break-period", breakPeriod.Value.ToStri
 1687267                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1687268                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1687269                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1687270                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 647271                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 07272                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 7273
 1447274                return _message;
 7275            }
 7276
 7277            /// <summary>
 7278            /// Create the Blob.BreakLeaseAsync response or throw a failure exception.
 7279            /// </summary>
 7280            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 7281            /// <param name="response">The raw Response.</param>
 7282            /// <returns>The Blob.BreakLeaseAsync Azure.Response{Azure.Storage.Blobs.Models.BrokenLease}.</returns>
 7283            internal static Azure.Response<Azure.Storage.Blobs.Models.BrokenLease> BreakLeaseAsync_CreateResponse(
 7284                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7285                Azure.Response response)
 7286            {
 7287                // Process the response
 1447288                switch (response.Status)
 7289                {
 7290                    case 202:
 7291                    {
 7292                        // Create the result
 807293                        Azure.Storage.Blobs.Models.BrokenLease _value = new Azure.Storage.Blobs.Models.BrokenLease();
 7294
 7295                        // Get response headers
 7296                        string _header;
 807297                        if (response.Headers.TryGetValue("ETag", out _header))
 7298                        {
 807299                            _value.ETag = new Azure.ETag(_header);
 7300                        }
 807301                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 7302                        {
 807303                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 7304                        }
 807305                        if (response.Headers.TryGetValue("x-ms-lease-time", out _header))
 7306                        {
 807307                            _value.LeaseTime = int.Parse(_header, System.Globalization.CultureInfo.InvariantCulture);
 7308                        }
 7309
 7310                        // Create the response
 807311                        return Response.FromValue(_value, response);
 7312                    }
 7313                    default:
 7314                    {
 7315                        // Create the result
 647316                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 647317                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 7318
 647319                        throw _value.CreateException(clientDiagnostics, response);
 7320                    }
 7321                }
 7322            }
 7323            #endregion Blob.BreakLeaseAsync
 7324
 7325            #region Blob.CreateSnapshotAsync
 7326            /// <summary>
 7327            /// The Create Snapshot operation creates a read-only snapshot of a blob
 7328            /// </summary>
 7329            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 7330            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7331            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7332            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7333            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7334            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7335            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 7336            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 7337            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 7338            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 7339            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7340            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7341            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7342            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7343            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7344            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7345            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7346            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 7347            /// <param name="operationName">Operation name.</param>
 7348            /// <param name="cancellationToken">Cancellation token.</param>
 7349            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobSnapshotInfo}</returns>
 7350            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobSnapshotI
 7351                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7352                Azure.Core.Pipeline.HttpPipeline pipeline,
 7353                System.Uri resourceUri,
 7354                string version,
 7355                int? timeout = default,
 7356                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7357                string encryptionKey = default,
 7358                string encryptionKeySha256 = default,
 7359                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 7360                string encryptionScope = default,
 7361                System.DateTimeOffset? ifModifiedSince = default,
 7362                System.DateTimeOffset? ifUnmodifiedSince = default,
 7363                Azure.ETag? ifMatch = default,
 7364                Azure.ETag? ifNoneMatch = default,
 7365                string ifTags = default,
 7366                string leaseId = default,
 7367                string requestId = default,
 7368                bool async = true,
 7369                string operationName = "BlobClient.CreateSnapshot",
 7370                System.Threading.CancellationToken cancellationToken = default)
 7371            {
 3527372                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 7373                try
 7374                {
 3527375                    _scope.AddAttribute("url", resourceUri);
 3527376                    _scope.Start();
 3527377                    using (Azure.Core.HttpMessage _message = CreateSnapshotAsync_CreateMessage(
 3527378                        pipeline,
 3527379                        resourceUri,
 3527380                        version,
 3527381                        timeout,
 3527382                        metadata,
 3527383                        encryptionKey,
 3527384                        encryptionKeySha256,
 3527385                        encryptionAlgorithm,
 3527386                        encryptionScope,
 3527387                        ifModifiedSince,
 3527388                        ifUnmodifiedSince,
 3527389                        ifMatch,
 3527390                        ifNoneMatch,
 3527391                        ifTags,
 3527392                        leaseId,
 3527393                        requestId))
 7394                    {
 3527395                        if (async)
 7396                        {
 7397                            // Send the request asynchronously if we're being called via an async path
 1767398                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 7399                        }
 7400                        else
 7401                        {
 7402                            // Send the request synchronously through the API that blocks if we're being called via a sy
 7403                            // (this is safe because the Task will complete before the user can call Wait)
 1767404                            pipeline.Send(_message, cancellationToken);
 7405                        }
 3527406                        Azure.Response _response = _message.Response;
 3527407                        cancellationToken.ThrowIfCancellationRequested();
 3527408                        return CreateSnapshotAsync_CreateResponse(clientDiagnostics, _response);
 7409                    }
 7410                }
 287411                catch (System.Exception ex)
 7412                {
 287413                    _scope.Failed(ex);
 287414                    throw;
 7415                }
 7416                finally
 7417                {
 3527418                    _scope.Dispose();
 7419                }
 3247420            }
 7421
 7422            /// <summary>
 7423            /// Create the Blob.CreateSnapshotAsync request.
 7424            /// </summary>
 7425            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7426            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7427            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7428            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7429            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7430            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 7431            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 7432            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 7433            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 7434            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7435            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7436            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7437            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7438            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7439            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7440            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7441            /// <returns>The Blob.CreateSnapshotAsync Message.</returns>
 7442            internal static Azure.Core.HttpMessage CreateSnapshotAsync_CreateMessage(
 7443                Azure.Core.Pipeline.HttpPipeline pipeline,
 7444                System.Uri resourceUri,
 7445                string version,
 7446                int? timeout = default,
 7447                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7448                string encryptionKey = default,
 7449                string encryptionKeySha256 = default,
 7450                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 7451                string encryptionScope = default,
 7452                System.DateTimeOffset? ifModifiedSince = default,
 7453                System.DateTimeOffset? ifUnmodifiedSince = default,
 7454                Azure.ETag? ifMatch = default,
 7455                Azure.ETag? ifNoneMatch = default,
 7456                string ifTags = default,
 7457                string leaseId = default,
 7458                string requestId = default)
 7459            {
 7460                // Validation
 3527461                if (resourceUri == null)
 7462                {
 07463                    throw new System.ArgumentNullException(nameof(resourceUri));
 7464                }
 3527465                if (version == null)
 7466                {
 07467                    throw new System.ArgumentNullException(nameof(version));
 7468                }
 7469
 7470                // Create the request
 3527471                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 3527472                Azure.Core.Request _request = _message.Request;
 7473
 7474                // Set the endpoint
 3527475                _request.Method = Azure.Core.RequestMethod.Put;
 3527476                _request.Uri.Reset(resourceUri);
 3527477                _request.Uri.AppendQuery("comp", "snapshot", escapeValue: false);
 07478                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 7479
 7480                // Add request headers
 3527481                _request.Headers.SetValue("x-ms-version", version);
 3527482                if (metadata != null) {
 07483                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 7484                    {
 07485                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 7486                    }
 7487                }
 3567488                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 3567489                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 3567490                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 3567491                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 3607492                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 3607493                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 3607494                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 3607495                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 3607496                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 3607497                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 07498                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 7499
 3527500                return _message;
 7501            }
 7502
 7503            /// <summary>
 7504            /// Create the Blob.CreateSnapshotAsync response or throw a failure exception.
 7505            /// </summary>
 7506            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 7507            /// <param name="response">The raw Response.</param>
 7508            /// <returns>The Blob.CreateSnapshotAsync Azure.Response{Azure.Storage.Blobs.Models.BlobSnapshotInfo}.</retu
 7509            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobSnapshotInfo> CreateSnapshotAsync_CreateRespon
 7510                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7511                Azure.Response response)
 7512            {
 7513                // Process the response
 3527514                switch (response.Status)
 7515                {
 7516                    case 201:
 7517                    {
 7518                        // Create the result
 3247519                        Azure.Storage.Blobs.Models.BlobSnapshotInfo _value = new Azure.Storage.Blobs.Models.BlobSnapshot
 7520
 7521                        // Get response headers
 7522                        string _header;
 3247523                        if (response.Headers.TryGetValue("x-ms-snapshot", out _header))
 7524                        {
 3247525                            _value.Snapshot = _header;
 7526                        }
 3247527                        if (response.Headers.TryGetValue("ETag", out _header))
 7528                        {
 3247529                            _value.ETag = new Azure.ETag(_header);
 7530                        }
 3247531                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 7532                        {
 3247533                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 7534                        }
 3247535                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 7536                        {
 487537                            _value.VersionId = _header;
 7538                        }
 3247539                        if (response.Headers.TryGetValue("x-ms-request-server-encrypted", out _header))
 7540                        {
 3247541                            _value.IsServerEncrypted = bool.Parse(_header);
 7542                        }
 7543
 7544                        // Create the response
 3247545                        return Response.FromValue(_value, response);
 7546                    }
 7547                    default:
 7548                    {
 7549                        // Create the result
 287550                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 287551                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 7552
 287553                        throw _value.CreateException(clientDiagnostics, response);
 7554                    }
 7555                }
 7556            }
 7557            #endregion Blob.CreateSnapshotAsync
 7558
 7559            #region Blob.StartCopyFromUriAsync
 7560            /// <summary>
 7561            /// The Start Copy From URL operation copies a blob or an internet resource to a new blob.
 7562            /// </summary>
 7563            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 7564            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7565            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7566            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 7567            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7568            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7569            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7570            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 7571            /// <param name="rehydratePriority">Optional: Indicates the priority with which to rehydrate an archived blo
 7572            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 7573            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 7574            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 7575            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 7576            /// <param name="sourceIfTags">Specify a SQL where clause on blob tags to operate only on blobs with a match
 7577            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7578            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7579            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7580            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7581            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7582            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7583            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7584            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 7585            /// <param name="sealBlob">Overrides the sealed state of the destination blob.  Service version 2019-12-12 a
 7586            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 7587            /// <param name="operationName">Operation name.</param>
 7588            /// <param name="cancellationToken">Cancellation token.</param>
 7589            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}</returns>
 7590            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo>
 7591                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7592                Azure.Core.Pipeline.HttpPipeline pipeline,
 7593                System.Uri resourceUri,
 7594                System.Uri copySource,
 7595                string version,
 7596                int? timeout = default,
 7597                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7598                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 7599                Azure.Storage.Blobs.Models.RehydratePriority? rehydratePriority = default,
 7600                System.DateTimeOffset? sourceIfModifiedSince = default,
 7601                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 7602                Azure.ETag? sourceIfMatch = default,
 7603                Azure.ETag? sourceIfNoneMatch = default,
 7604                string sourceIfTags = default,
 7605                System.DateTimeOffset? ifModifiedSince = default,
 7606                System.DateTimeOffset? ifUnmodifiedSince = default,
 7607                Azure.ETag? ifMatch = default,
 7608                Azure.ETag? ifNoneMatch = default,
 7609                string ifTags = default,
 7610                string leaseId = default,
 7611                string requestId = default,
 7612                string blobTagsString = default,
 7613                bool? sealBlob = default,
 7614                bool async = true,
 7615                string operationName = "BlobClient.StartCopyFromUri",
 7616                System.Threading.CancellationToken cancellationToken = default)
 7617            {
 1527618                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 7619                try
 7620                {
 1527621                    _scope.AddAttribute("url", resourceUri);
 1527622                    _scope.Start();
 1527623                    using (Azure.Core.HttpMessage _message = StartCopyFromUriAsync_CreateMessage(
 1527624                        pipeline,
 1527625                        resourceUri,
 1527626                        copySource,
 1527627                        version,
 1527628                        timeout,
 1527629                        metadata,
 1527630                        tier,
 1527631                        rehydratePriority,
 1527632                        sourceIfModifiedSince,
 1527633                        sourceIfUnmodifiedSince,
 1527634                        sourceIfMatch,
 1527635                        sourceIfNoneMatch,
 1527636                        sourceIfTags,
 1527637                        ifModifiedSince,
 1527638                        ifUnmodifiedSince,
 1527639                        ifMatch,
 1527640                        ifNoneMatch,
 1527641                        ifTags,
 1527642                        leaseId,
 1527643                        requestId,
 1527644                        blobTagsString,
 1527645                        sealBlob))
 7646                    {
 1527647                        if (async)
 7648                        {
 7649                            // Send the request asynchronously if we're being called via an async path
 767650                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 7651                        }
 7652                        else
 7653                        {
 7654                            // Send the request synchronously through the API that blocks if we're being called via a sy
 7655                            // (this is safe because the Task will complete before the user can call Wait)
 767656                            pipeline.Send(_message, cancellationToken);
 7657                        }
 1527658                        Azure.Response _response = _message.Response;
 1527659                        cancellationToken.ThrowIfCancellationRequested();
 1527660                        return StartCopyFromUriAsync_CreateResponse(clientDiagnostics, _response);
 7661                    }
 7662                }
 567663                catch (System.Exception ex)
 7664                {
 567665                    _scope.Failed(ex);
 567666                    throw;
 7667                }
 7668                finally
 7669                {
 1527670                    _scope.Dispose();
 7671                }
 967672            }
 7673
 7674            /// <summary>
 7675            /// Create the Blob.StartCopyFromUriAsync request.
 7676            /// </summary>
 7677            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7678            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7679            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 7680            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7681            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7682            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7683            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 7684            /// <param name="rehydratePriority">Optional: Indicates the priority with which to rehydrate an archived blo
 7685            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 7686            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 7687            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 7688            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 7689            /// <param name="sourceIfTags">Specify a SQL where clause on blob tags to operate only on blobs with a match
 7690            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7691            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7692            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7693            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7694            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7695            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7696            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7697            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 7698            /// <param name="sealBlob">Overrides the sealed state of the destination blob.  Service version 2019-12-12 a
 7699            /// <returns>The Blob.StartCopyFromUriAsync Message.</returns>
 7700            internal static Azure.Core.HttpMessage StartCopyFromUriAsync_CreateMessage(
 7701                Azure.Core.Pipeline.HttpPipeline pipeline,
 7702                System.Uri resourceUri,
 7703                System.Uri copySource,
 7704                string version,
 7705                int? timeout = default,
 7706                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7707                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 7708                Azure.Storage.Blobs.Models.RehydratePriority? rehydratePriority = default,
 7709                System.DateTimeOffset? sourceIfModifiedSince = default,
 7710                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 7711                Azure.ETag? sourceIfMatch = default,
 7712                Azure.ETag? sourceIfNoneMatch = default,
 7713                string sourceIfTags = default,
 7714                System.DateTimeOffset? ifModifiedSince = default,
 7715                System.DateTimeOffset? ifUnmodifiedSince = default,
 7716                Azure.ETag? ifMatch = default,
 7717                Azure.ETag? ifNoneMatch = default,
 7718                string ifTags = default,
 7719                string leaseId = default,
 7720                string requestId = default,
 7721                string blobTagsString = default,
 7722                bool? sealBlob = default)
 7723            {
 7724                // Validation
 1527725                if (resourceUri == null)
 7726                {
 07727                    throw new System.ArgumentNullException(nameof(resourceUri));
 7728                }
 1527729                if (copySource == null)
 7730                {
 07731                    throw new System.ArgumentNullException(nameof(copySource));
 7732                }
 1527733                if (version == null)
 7734                {
 07735                    throw new System.ArgumentNullException(nameof(version));
 7736                }
 7737
 7738                // Create the request
 1527739                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1527740                Azure.Core.Request _request = _message.Request;
 7741
 7742                // Set the endpoint
 1527743                _request.Method = Azure.Core.RequestMethod.Put;
 1527744                _request.Uri.Reset(resourceUri);
 07745                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 7746
 7747                // Add request headers
 1527748                _request.Headers.SetValue("x-ms-copy-source", copySource.AbsoluteUri);
 1527749                _request.Headers.SetValue("x-ms-version", version);
 1527750                if (metadata != null) {
 407751                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 7752                    {
 167753                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 7754                    }
 7755                }
 1727756                if (tier != null) { _request.Headers.SetValue("x-ms-access-tier", tier.ToString()); }
 1567757                if (rehydratePriority != null) { _request.Headers.SetValue("x-ms-rehydrate-priority", rehydratePriority.
 1607758                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 1607759                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 1607760                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 1607761                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 1607762                if (sourceIfTags != null) { _request.Headers.SetValue("x-ms-source-if-tags", sourceIfTags); }
 1607763                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1607764                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1607765                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1607766                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 1607767                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 1647768                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 07769                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1567770                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 1527771                if (sealBlob != null) {
 7772                #pragma warning disable CA1308 // Normalize strings to uppercase
 47773                _request.Headers.SetValue("x-ms-seal-blob", sealBlob.Value.ToString(System.Globalization.CultureInfo.Inv
 7774                #pragma warning restore CA1308 // Normalize strings to uppercase
 7775                }
 7776
 1527777                return _message;
 7778            }
 7779
 7780            /// <summary>
 7781            /// Create the Blob.StartCopyFromUriAsync response or throw a failure exception.
 7782            /// </summary>
 7783            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 7784            /// <param name="response">The raw Response.</param>
 7785            /// <returns>The Blob.StartCopyFromUriAsync Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}.</return
 7786            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo> StartCopyFromUriAsync_CreateResponse
 7787                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7788                Azure.Response response)
 7789            {
 7790                // Process the response
 1527791                switch (response.Status)
 7792                {
 7793                    case 202:
 7794                    {
 7795                        // Create the result
 967796                        Azure.Storage.Blobs.Models.BlobCopyInfo _value = new Azure.Storage.Blobs.Models.BlobCopyInfo();
 7797
 7798                        // Get response headers
 7799                        string _header;
 967800                        if (response.Headers.TryGetValue("ETag", out _header))
 7801                        {
 967802                            _value.ETag = new Azure.ETag(_header);
 7803                        }
 967804                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 7805                        {
 967806                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 7807                        }
 967808                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 7809                        {
 167810                            _value.VersionId = _header;
 7811                        }
 967812                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 7813                        {
 967814                            _value.CopyId = _header;
 7815                        }
 967816                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 7817                        {
 967818                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 7819                        }
 7820
 7821                        // Create the response
 967822                        return Response.FromValue(_value, response);
 7823                    }
 7824                    default:
 7825                    {
 7826                        // Create the result
 567827                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 567828                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 7829
 567830                        throw _value.CreateException(clientDiagnostics, response);
 7831                    }
 7832                }
 7833            }
 7834            #endregion Blob.StartCopyFromUriAsync
 7835
 7836            #region Blob.CopyFromUriAsync
 7837            /// <summary>
 7838            /// The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return a re
 7839            /// </summary>
 7840            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 7841            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7842            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7843            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 7844            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7845            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7846            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7847            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 7848            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 7849            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 7850            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 7851            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 7852            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7853            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7854            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7855            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7856            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7857            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7858            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7859            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 7860            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 7861            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 7862            /// <param name="operationName">Operation name.</param>
 7863            /// <param name="cancellationToken">Cancellation token.</param>
 7864            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}</returns>
 7865            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo>
 7866                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 7867                Azure.Core.Pipeline.HttpPipeline pipeline,
 7868                System.Uri resourceUri,
 7869                System.Uri copySource,
 7870                string version,
 7871                int? timeout = default,
 7872                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7873                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 7874                System.DateTimeOffset? sourceIfModifiedSince = default,
 7875                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 7876                Azure.ETag? sourceIfMatch = default,
 7877                Azure.ETag? sourceIfNoneMatch = default,
 7878                System.DateTimeOffset? ifModifiedSince = default,
 7879                System.DateTimeOffset? ifUnmodifiedSince = default,
 7880                Azure.ETag? ifMatch = default,
 7881                Azure.ETag? ifNoneMatch = default,
 7882                string ifTags = default,
 7883                string leaseId = default,
 7884                string requestId = default,
 7885                byte[] sourceContentHash = default,
 7886                string blobTagsString = default,
 7887                bool async = true,
 7888                string operationName = "BlobClient.CopyFromUri",
 7889                System.Threading.CancellationToken cancellationToken = default)
 7890            {
 1127891                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 7892                try
 7893                {
 1127894                    _scope.AddAttribute("url", resourceUri);
 1127895                    _scope.Start();
 1127896                    using (Azure.Core.HttpMessage _message = CopyFromUriAsync_CreateMessage(
 1127897                        pipeline,
 1127898                        resourceUri,
 1127899                        copySource,
 1127900                        version,
 1127901                        timeout,
 1127902                        metadata,
 1127903                        tier,
 1127904                        sourceIfModifiedSince,
 1127905                        sourceIfUnmodifiedSince,
 1127906                        sourceIfMatch,
 1127907                        sourceIfNoneMatch,
 1127908                        ifModifiedSince,
 1127909                        ifUnmodifiedSince,
 1127910                        ifMatch,
 1127911                        ifNoneMatch,
 1127912                        ifTags,
 1127913                        leaseId,
 1127914                        requestId,
 1127915                        sourceContentHash,
 1127916                        blobTagsString))
 7917                    {
 1127918                        if (async)
 7919                        {
 7920                            // Send the request asynchronously if we're being called via an async path
 567921                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 7922                        }
 7923                        else
 7924                        {
 7925                            // Send the request synchronously through the API that blocks if we're being called via a sy
 7926                            // (this is safe because the Task will complete before the user can call Wait)
 567927                            pipeline.Send(_message, cancellationToken);
 7928                        }
 1127929                        Azure.Response _response = _message.Response;
 1127930                        cancellationToken.ThrowIfCancellationRequested();
 1127931                        return CopyFromUriAsync_CreateResponse(clientDiagnostics, _response);
 7932                    }
 7933                }
 487934                catch (System.Exception ex)
 7935                {
 487936                    _scope.Failed(ex);
 487937                    throw;
 7938                }
 7939                finally
 7940                {
 1127941                    _scope.Dispose();
 7942                }
 647943            }
 7944
 7945            /// <summary>
 7946            /// Create the Blob.CopyFromUriAsync request.
 7947            /// </summary>
 7948            /// <param name="pipeline">The pipeline used for sending requests.</param>
 7949            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 7950            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 7951            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 7952            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 7953            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 7954            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 7955            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 7956            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 7957            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 7958            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 7959            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 7960            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 7961            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 7962            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 7963            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 7964            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 7965            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 7966            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 7967            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 7968            /// <returns>The Blob.CopyFromUriAsync Message.</returns>
 7969            internal static Azure.Core.HttpMessage CopyFromUriAsync_CreateMessage(
 7970                Azure.Core.Pipeline.HttpPipeline pipeline,
 7971                System.Uri resourceUri,
 7972                System.Uri copySource,
 7973                string version,
 7974                int? timeout = default,
 7975                System.Collections.Generic.IDictionary<string, string> metadata = default,
 7976                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 7977                System.DateTimeOffset? sourceIfModifiedSince = default,
 7978                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 7979                Azure.ETag? sourceIfMatch = default,
 7980                Azure.ETag? sourceIfNoneMatch = default,
 7981                System.DateTimeOffset? ifModifiedSince = default,
 7982                System.DateTimeOffset? ifUnmodifiedSince = default,
 7983                Azure.ETag? ifMatch = default,
 7984                Azure.ETag? ifNoneMatch = default,
 7985                string ifTags = default,
 7986                string leaseId = default,
 7987                string requestId = default,
 7988                byte[] sourceContentHash = default,
 7989                string blobTagsString = default)
 7990            {
 7991                // Validation
 1127992                if (resourceUri == null)
 7993                {
 07994                    throw new System.ArgumentNullException(nameof(resourceUri));
 7995                }
 1127996                if (copySource == null)
 7997                {
 07998                    throw new System.ArgumentNullException(nameof(copySource));
 7999                }
 1128000                if (version == null)
 8001                {
 08002                    throw new System.ArgumentNullException(nameof(version));
 8003                }
 8004
 8005                // Create the request
 1128006                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1128007                Azure.Core.Request _request = _message.Request;
 8008
 8009                // Set the endpoint
 1128010                _request.Method = Azure.Core.RequestMethod.Put;
 1128011                _request.Uri.Reset(resourceUri);
 08012                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 8013
 8014                // Add request headers
 1128015                _request.Headers.SetValue("x-ms-requires-sync", "true");
 1128016                _request.Headers.SetValue("x-ms-copy-source", copySource.AbsoluteUri);
 1128017                _request.Headers.SetValue("x-ms-version", version);
 1128018                if (metadata != null) {
 408019                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 8020                    {
 168021                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 8022                    }
 8023                }
 1168024                if (tier != null) { _request.Headers.SetValue("x-ms-access-tier", tier.ToString()); }
 1208025                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 1208026                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 1208027                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 1208028                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 1208029                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1208030                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1208031                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1208032                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 1208033                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 1208034                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 08035                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 08036                if (sourceContentHash != null) { _request.Headers.SetValue("x-ms-source-content-md5", System.Convert.ToB
 1168037                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 8038
 1128039                return _message;
 8040            }
 8041
 8042            /// <summary>
 8043            /// Create the Blob.CopyFromUriAsync response or throw a failure exception.
 8044            /// </summary>
 8045            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 8046            /// <param name="response">The raw Response.</param>
 8047            /// <returns>The Blob.CopyFromUriAsync Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}.</returns>
 8048            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo> CopyFromUriAsync_CreateResponse(
 8049                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8050                Azure.Response response)
 8051            {
 8052                // Process the response
 1128053                switch (response.Status)
 8054                {
 8055                    case 202:
 8056                    {
 8057                        // Create the result
 648058                        Azure.Storage.Blobs.Models.BlobCopyInfo _value = new Azure.Storage.Blobs.Models.BlobCopyInfo();
 8059
 8060                        // Get response headers
 8061                        string _header;
 648062                        if (response.Headers.TryGetValue("ETag", out _header))
 8063                        {
 648064                            _value.ETag = new Azure.ETag(_header);
 8065                        }
 648066                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 8067                        {
 648068                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 8069                        }
 648070                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 8071                        {
 648072                            _value.VersionId = _header;
 8073                        }
 648074                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 8075                        {
 648076                            _value.CopyId = _header;
 8077                        }
 648078                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 8079                        {
 648080                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 8081                        }
 8082
 8083                        // Create the response
 648084                        return Response.FromValue(_value, response);
 8085                    }
 8086                    case 304:
 8087                    {
 8088                        // Create the result
 88089                        Azure.Storage.Blobs.Models.ConditionNotMetError _value = new Azure.Storage.Blobs.Models.Conditio
 8090
 8091                        // Get response headers
 8092                        string _header;
 88093                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 8094                        {
 88095                            _value.ErrorCode = _header;
 8096                        }
 8097
 88098                        throw _value.CreateException(clientDiagnostics, response);
 8099                    }
 8100                    default:
 8101                    {
 8102                        // Create the result
 408103                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 408104                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 8105
 408106                        throw _value.CreateException(clientDiagnostics, response);
 8107                    }
 8108                }
 8109            }
 8110            #endregion Blob.CopyFromUriAsync
 8111
 8112            #region Blob.AbortCopyFromUriAsync
 8113            /// <summary>
 8114            /// The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blo
 8115            /// </summary>
 8116            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 8117            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8118            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8119            /// <param name="copyId">The copy identifier provided in the x-ms-copy-id header of the original Copy Blob o
 8120            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8121            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8122            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8123            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8124            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 8125            /// <param name="operationName">Operation name.</param>
 8126            /// <param name="cancellationToken">Cancellation token.</param>
 8127            /// <returns>Azure.Response</returns>
 8128            public static async System.Threading.Tasks.ValueTask<Azure.Response> AbortCopyFromUriAsync(
 8129                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8130                Azure.Core.Pipeline.HttpPipeline pipeline,
 8131                System.Uri resourceUri,
 8132                string copyId,
 8133                string version,
 8134                int? timeout = default,
 8135                string leaseId = default,
 8136                string requestId = default,
 8137                bool async = true,
 8138                string operationName = "BlobClient.AbortCopyFromUri",
 8139                System.Threading.CancellationToken cancellationToken = default)
 8140            {
 168141                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 8142                try
 8143                {
 168144                    _scope.AddAttribute("url", resourceUri);
 168145                    _scope.Start();
 168146                    using (Azure.Core.HttpMessage _message = AbortCopyFromUriAsync_CreateMessage(
 168147                        pipeline,
 168148                        resourceUri,
 168149                        copyId,
 168150                        version,
 168151                        timeout,
 168152                        leaseId,
 168153                        requestId))
 8154                    {
 168155                        if (async)
 8156                        {
 8157                            // Send the request asynchronously if we're being called via an async path
 88158                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 8159                        }
 8160                        else
 8161                        {
 8162                            // Send the request synchronously through the API that blocks if we're being called via a sy
 8163                            // (this is safe because the Task will complete before the user can call Wait)
 88164                            pipeline.Send(_message, cancellationToken);
 8165                        }
 168166                        Azure.Response _response = _message.Response;
 168167                        cancellationToken.ThrowIfCancellationRequested();
 168168                        return AbortCopyFromUriAsync_CreateResponse(clientDiagnostics, _response);
 8169                    }
 8170                }
 88171                catch (System.Exception ex)
 8172                {
 88173                    _scope.Failed(ex);
 88174                    throw;
 8175                }
 8176                finally
 8177                {
 168178                    _scope.Dispose();
 8179                }
 88180            }
 8181
 8182            /// <summary>
 8183            /// Create the Blob.AbortCopyFromUriAsync request.
 8184            /// </summary>
 8185            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8186            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8187            /// <param name="copyId">The copy identifier provided in the x-ms-copy-id header of the original Copy Blob o
 8188            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8189            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8190            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8191            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8192            /// <returns>The Blob.AbortCopyFromUriAsync Message.</returns>
 8193            internal static Azure.Core.HttpMessage AbortCopyFromUriAsync_CreateMessage(
 8194                Azure.Core.Pipeline.HttpPipeline pipeline,
 8195                System.Uri resourceUri,
 8196                string copyId,
 8197                string version,
 8198                int? timeout = default,
 8199                string leaseId = default,
 8200                string requestId = default)
 8201            {
 8202                // Validation
 168203                if (resourceUri == null)
 8204                {
 08205                    throw new System.ArgumentNullException(nameof(resourceUri));
 8206                }
 168207                if (copyId == null)
 8208                {
 08209                    throw new System.ArgumentNullException(nameof(copyId));
 8210                }
 168211                if (version == null)
 8212                {
 08213                    throw new System.ArgumentNullException(nameof(version));
 8214                }
 8215
 8216                // Create the request
 168217                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 168218                Azure.Core.Request _request = _message.Request;
 8219
 8220                // Set the endpoint
 168221                _request.Method = Azure.Core.RequestMethod.Put;
 168222                _request.Uri.Reset(resourceUri);
 168223                _request.Uri.AppendQuery("comp", "copy", escapeValue: false);
 168224                _request.Uri.AppendQuery("copyid", copyId);
 08225                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 8226
 8227                // Add request headers
 168228                _request.Headers.SetValue("x-ms-copy-action", "abort");
 168229                _request.Headers.SetValue("x-ms-version", version);
 248230                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 08231                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 8232
 168233                return _message;
 8234            }
 8235
 8236            /// <summary>
 8237            /// Create the Blob.AbortCopyFromUriAsync response or throw a failure exception.
 8238            /// </summary>
 8239            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 8240            /// <param name="response">The raw Response.</param>
 8241            /// <returns>The Blob.AbortCopyFromUriAsync Azure.Response.</returns>
 8242            internal static Azure.Response AbortCopyFromUriAsync_CreateResponse(
 8243                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8244                Azure.Response response)
 8245            {
 8246                // Process the response
 168247                switch (response.Status)
 8248                {
 8249                    case 204:
 8250                    {
 88251                        return response;
 8252                    }
 8253                    default:
 8254                    {
 8255                        // Create the result
 88256                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 88257                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 8258
 88259                        throw _value.CreateException(clientDiagnostics, response);
 8260                    }
 8261                }
 8262            }
 8263            #endregion Blob.AbortCopyFromUriAsync
 8264
 8265            #region Blob.SetAccessTierAsync
 8266            /// <summary>
 8267            /// The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium sto
 8268            /// </summary>
 8269            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 8270            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8271            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8272            /// <param name="tier">Indicates the tier to be set on the blob.</param>
 8273            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8274            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8275            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 8276            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8277            /// <param name="rehydratePriority">Optional: Indicates the priority with which to rehydrate an archived blo
 8278            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8279            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8280            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 8281            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 8282            /// <param name="operationName">Operation name.</param>
 8283            /// <param name="cancellationToken">Cancellation token.</param>
 8284            /// <returns>Azure.Response</returns>
 8285            public static async System.Threading.Tasks.ValueTask<Azure.Response> SetAccessTierAsync(
 8286                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8287                Azure.Core.Pipeline.HttpPipeline pipeline,
 8288                System.Uri resourceUri,
 8289                Azure.Storage.Blobs.Models.AccessTier tier,
 8290                string version,
 8291                string snapshot = default,
 8292                string versionId = default,
 8293                int? timeout = default,
 8294                Azure.Storage.Blobs.Models.RehydratePriority? rehydratePriority = default,
 8295                string requestId = default,
 8296                string leaseId = default,
 8297                string ifTags = default,
 8298                bool async = true,
 8299                string operationName = "BlobClient.SetAccessTier",
 8300                System.Threading.CancellationToken cancellationToken = default)
 8301            {
 1088302                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 8303                try
 8304                {
 1088305                    _scope.AddAttribute("url", resourceUri);
 1088306                    _scope.Start();
 1088307                    using (Azure.Core.HttpMessage _message = SetAccessTierAsync_CreateMessage(
 1088308                        pipeline,
 1088309                        resourceUri,
 1088310                        tier,
 1088311                        version,
 1088312                        snapshot,
 1088313                        versionId,
 1088314                        timeout,
 1088315                        rehydratePriority,
 1088316                        requestId,
 1088317                        leaseId,
 1088318                        ifTags))
 8319                    {
 1088320                        if (async)
 8321                        {
 8322                            // Send the request asynchronously if we're being called via an async path
 568323                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 8324                        }
 8325                        else
 8326                        {
 8327                            // Send the request synchronously through the API that blocks if we're being called via a sy
 8328                            // (this is safe because the Task will complete before the user can call Wait)
 528329                            pipeline.Send(_message, cancellationToken);
 8330                        }
 1088331                        Azure.Response _response = _message.Response;
 1088332                        cancellationToken.ThrowIfCancellationRequested();
 1088333                        return SetAccessTierAsync_CreateResponse(clientDiagnostics, _response);
 8334                    }
 8335                }
 248336                catch (System.Exception ex)
 8337                {
 248338                    _scope.Failed(ex);
 248339                    throw;
 8340                }
 8341                finally
 8342                {
 1088343                    _scope.Dispose();
 8344                }
 848345            }
 8346
 8347            /// <summary>
 8348            /// Create the Blob.SetAccessTierAsync request.
 8349            /// </summary>
 8350            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8351            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8352            /// <param name="tier">Indicates the tier to be set on the blob.</param>
 8353            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8354            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8355            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 8356            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8357            /// <param name="rehydratePriority">Optional: Indicates the priority with which to rehydrate an archived blo
 8358            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8359            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8360            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 8361            /// <returns>The Blob.SetAccessTierAsync Message.</returns>
 8362            internal static Azure.Core.HttpMessage SetAccessTierAsync_CreateMessage(
 8363                Azure.Core.Pipeline.HttpPipeline pipeline,
 8364                System.Uri resourceUri,
 8365                Azure.Storage.Blobs.Models.AccessTier tier,
 8366                string version,
 8367                string snapshot = default,
 8368                string versionId = default,
 8369                int? timeout = default,
 8370                Azure.Storage.Blobs.Models.RehydratePriority? rehydratePriority = default,
 8371                string requestId = default,
 8372                string leaseId = default,
 8373                string ifTags = default)
 8374            {
 8375                // Validation
 1088376                if (resourceUri == null)
 8377                {
 08378                    throw new System.ArgumentNullException(nameof(resourceUri));
 8379                }
 1088380                if (version == null)
 8381                {
 08382                    throw new System.ArgumentNullException(nameof(version));
 8383                }
 8384
 8385                // Create the request
 1088386                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1088387                Azure.Core.Request _request = _message.Request;
 8388
 8389                // Set the endpoint
 1088390                _request.Method = Azure.Core.RequestMethod.Put;
 1088391                _request.Uri.Reset(resourceUri);
 1088392                _request.Uri.AppendQuery("comp", "tier", escapeValue: false);
 08393                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 08394                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 08395                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 8396
 8397                // Add request headers
 1088398                _request.Headers.SetValue("x-ms-access-tier", tier.ToString());
 1088399                _request.Headers.SetValue("x-ms-version", version);
 1368400                if (rehydratePriority != null) { _request.Headers.SetValue("x-ms-rehydrate-priority", rehydratePriority.
 08401                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 1168402                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 1168403                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 8404
 1088405                return _message;
 8406            }
 8407
 8408            /// <summary>
 8409            /// Create the Blob.SetAccessTierAsync response or throw a failure exception.
 8410            /// </summary>
 8411            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 8412            /// <param name="response">The raw Response.</param>
 8413            /// <returns>The Blob.SetAccessTierAsync Azure.Response.</returns>
 8414            internal static Azure.Response SetAccessTierAsync_CreateResponse(
 8415                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8416                Azure.Response response)
 8417            {
 8418                // Process the response
 1088419                switch (response.Status)
 8420                {
 8421                    case 200:
 8422                    {
 528423                        return response;
 8424                    }
 8425                    case 202:
 8426                    {
 328427                        return response;
 8428                    }
 8429                    default:
 8430                    {
 8431                        // Create the result
 248432                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 248433                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 8434
 248435                        throw _value.CreateException(clientDiagnostics, response);
 8436                    }
 8437                }
 8438            }
 8439            #endregion Blob.SetAccessTierAsync
 8440
 8441            #region Blob.QueryAsync
 8442            /// <summary>
 8443            /// The Query operation enables users to select/project on blob data by providing simple query expressions.
 8444            /// </summary>
 8445            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 8446            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8447            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8448            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8449            /// <param name="queryRequest">the query request</param>
 8450            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8451            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8452            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8453            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 8454            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 8455            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 8456            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 8457            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 8458            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 8459            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 8460            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 8461            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8462            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 8463            /// <param name="operationName">Operation name.</param>
 8464            /// <param name="cancellationToken">Cancellation token.</param>
 8465            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobQueryResult}</returns>
 8466            public static async System.Threading.Tasks.ValueTask<(Azure.Response<Azure.Storage.Blobs.Models.BlobQueryRes
 8467                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8468                Azure.Core.Pipeline.HttpPipeline pipeline,
 8469                System.Uri resourceUri,
 8470                string version,
 8471                Azure.Storage.Blobs.Models.QueryRequest queryRequest = default,
 8472                string snapshot = default,
 8473                int? timeout = default,
 8474                string leaseId = default,
 8475                string encryptionKey = default,
 8476                string encryptionKeySha256 = default,
 8477                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 8478                System.DateTimeOffset? ifModifiedSince = default,
 8479                System.DateTimeOffset? ifUnmodifiedSince = default,
 8480                Azure.ETag? ifMatch = default,
 8481                Azure.ETag? ifNoneMatch = default,
 8482                string ifTags = default,
 8483                string requestId = default,
 8484                bool async = true,
 8485                string operationName = "BlobClient.Query",
 8486                System.Threading.CancellationToken cancellationToken = default)
 8487            {
 1408488                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 8489                try
 8490                {
 1408491                    _scope.AddAttribute("url", resourceUri);
 1408492                    _scope.Start();
 1408493                    using (Azure.Core.HttpMessage _message = QueryAsync_CreateMessage(
 1408494                        pipeline,
 1408495                        resourceUri,
 1408496                        version,
 1408497                        queryRequest,
 1408498                        snapshot,
 1408499                        timeout,
 1408500                        leaseId,
 1408501                        encryptionKey,
 1408502                        encryptionKeySha256,
 1408503                        encryptionAlgorithm,
 1408504                        ifModifiedSince,
 1408505                        ifUnmodifiedSince,
 1408506                        ifMatch,
 1408507                        ifNoneMatch,
 1408508                        ifTags,
 1408509                        requestId))
 8510                    {
 8511                        // Avoid buffering if stream is going to be returned to the caller
 1408512                        _message.BufferResponse = false;
 1408513                        if (async)
 8514                        {
 8515                            // Send the request asynchronously if we're being called via an async path
 708516                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 8517                        }
 8518                        else
 8519                        {
 8520                            // Send the request synchronously through the API that blocks if we're being called via a sy
 8521                            // (this is safe because the Task will complete before the user can call Wait)
 708522                            pipeline.Send(_message, cancellationToken);
 8523                        }
 1408524                        Azure.Response _response = _message.Response;
 1408525                        cancellationToken.ThrowIfCancellationRequested();
 1408526                        return (QueryAsync_CreateResponse(clientDiagnostics, _response), _message.ExtractResponseContent
 8527                    }
 8528                }
 528529                catch (System.Exception ex)
 8530                {
 528531                    _scope.Failed(ex);
 528532                    throw;
 8533                }
 8534                finally
 8535                {
 1408536                    _scope.Dispose();
 8537                }
 888538            }
 8539
 8540            /// <summary>
 8541            /// Create the Blob.QueryAsync request.
 8542            /// </summary>
 8543            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8544            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8545            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8546            /// <param name="queryRequest">the query request</param>
 8547            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8548            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8549            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 8550            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 8551            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 8552            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 8553            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 8554            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 8555            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 8556            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 8557            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 8558            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8559            /// <returns>The Blob.QueryAsync Message.</returns>
 8560            internal static Azure.Core.HttpMessage QueryAsync_CreateMessage(
 8561                Azure.Core.Pipeline.HttpPipeline pipeline,
 8562                System.Uri resourceUri,
 8563                string version,
 8564                Azure.Storage.Blobs.Models.QueryRequest queryRequest = default,
 8565                string snapshot = default,
 8566                int? timeout = default,
 8567                string leaseId = default,
 8568                string encryptionKey = default,
 8569                string encryptionKeySha256 = default,
 8570                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 8571                System.DateTimeOffset? ifModifiedSince = default,
 8572                System.DateTimeOffset? ifUnmodifiedSince = default,
 8573                Azure.ETag? ifMatch = default,
 8574                Azure.ETag? ifNoneMatch = default,
 8575                string ifTags = default,
 8576                string requestId = default)
 8577            {
 8578                // Validation
 1408579                if (resourceUri == null)
 8580                {
 08581                    throw new System.ArgumentNullException(nameof(resourceUri));
 8582                }
 1408583                if (version == null)
 8584                {
 08585                    throw new System.ArgumentNullException(nameof(version));
 8586                }
 8587
 8588                // Create the request
 1408589                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 1408590                Azure.Core.Request _request = _message.Request;
 8591
 8592                // Set the endpoint
 1408593                _request.Method = Azure.Core.RequestMethod.Post;
 1408594                _request.Uri.Reset(resourceUri);
 1408595                _request.Uri.AppendQuery("comp", "query", escapeValue: false);
 08596                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 08597                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 8598
 8599                // Add request headers
 1408600                _request.Headers.SetValue("x-ms-version", version);
 1568601                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 08602                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 08603                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 08604                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 1568605                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 1568606                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 1568607                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 1568608                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 848609                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 08610                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 8611
 8612                // Create the body
 1408613                if (queryRequest != null)
 8614                {
 1408615                    System.Xml.Linq.XElement _body = Azure.Storage.Blobs.Models.QueryRequest.ToXml(queryRequest, "QueryR
 1408616                    string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 1408617                    _request.Headers.SetValue("Content-Type", "application/xml");
 1408618                    _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.I
 1408619                    _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 8620                }
 8621
 1408622                return _message;
 8623            }
 8624
 8625            /// <summary>
 8626            /// Create the Blob.QueryAsync response or throw a failure exception.
 8627            /// </summary>
 8628            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 8629            /// <param name="response">The raw Response.</param>
 8630            /// <returns>The Blob.QueryAsync Azure.Response{Azure.Storage.Blobs.Models.BlobQueryResult}.</returns>
 8631            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobQueryResult> QueryAsync_CreateResponse(
 8632                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8633                Azure.Response response)
 8634            {
 8635                // Process the response
 1408636                switch (response.Status)
 8637                {
 8638                    case 200:
 8639                    {
 8640                        // Create the result
 888641                        Azure.Storage.Blobs.Models.BlobQueryResult _value = new Azure.Storage.Blobs.Models.BlobQueryResu
 888642                        _value.Body = response.ContentStream; // You should manually wrap with RetriableStream!
 8643
 8644                        // Get response headers
 8645                        string _header;
 888646                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 8647                        {
 888648                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 8649                        }
 888650                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 26408651                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 8652                        {
 12328653                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 8654                            {
 08655                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 8656                            }
 8657                        }
 888658                        if (response.Headers.TryGetValue("Content-Length", out _header))
 8659                        {
 08660                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 8661                        }
 888662                        if (response.Headers.TryGetValue("Content-Type", out _header))
 8663                        {
 888664                            _value.ContentType = _header;
 8665                        }
 888666                        if (response.Headers.TryGetValue("Content-Range", out _header))
 8667                        {
 08668                            _value.ContentRange = _header;
 8669                        }
 888670                        if (response.Headers.TryGetValue("ETag", out _header))
 8671                        {
 888672                            _value.ETag = new Azure.ETag(_header);
 8673                        }
 888674                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 8675                        {
 08676                            _value.ContentHash = System.Convert.FromBase64String(_header);
 8677                        }
 888678                        if (response.Headers.TryGetValue("Content-Encoding", out _header))
 8679                        {
 08680                            _value.ContentEncoding = _header;
 8681                        }
 888682                        if (response.Headers.TryGetValue("Cache-Control", out _header))
 8683                        {
 08684                            _value.CacheControl = _header;
 8685                        }
 888686                        if (response.Headers.TryGetValue("Content-Disposition", out _header))
 8687                        {
 08688                            _value.ContentDisposition = _header;
 8689                        }
 888690                        if (response.Headers.TryGetValue("Content-Language", out _header))
 8691                        {
 08692                            _value.ContentLanguage = _header;
 8693                        }
 888694                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 8695                        {
 08696                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 8697                        }
 888698                        if (response.Headers.TryGetValue("x-ms-blob-type", out _header))
 8699                        {
 888700                            _value.BlobType = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobType(_header);
 8701                        }
 888702                        if (response.Headers.TryGetValue("x-ms-copy-completion-time", out _header))
 8703                        {
 08704                            _value.CopyCompletionTime = System.DateTimeOffset.Parse(_header, System.Globalization.Cultur
 8705                        }
 888706                        if (response.Headers.TryGetValue("x-ms-copy-status-description", out _header))
 8707                        {
 08708                            _value.CopyStatusDescription = _header;
 8709                        }
 888710                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 8711                        {
 08712                            _value.CopyId = _header;
 8713                        }
 888714                        if (response.Headers.TryGetValue("x-ms-copy-progress", out _header))
 8715                        {
 08716                            _value.CopyProgress = _header;
 8717                        }
 888718                        if (response.Headers.TryGetValue("x-ms-copy-source", out _header))
 8719                        {
 08720                            _value.CopySource = _header;
 8721                        }
 888722                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 8723                        {
 08724                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 8725                        }
 888726                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 8727                        {
 88728                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 8729                        }
 888730                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 8731                        {
 848732                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 8733                        }
 888734                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 8735                        {
 848736                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 8737                        }
 888738                        if (response.Headers.TryGetValue("Accept-Ranges", out _header))
 8739                        {
 888740                            _value.AcceptRanges = _header;
 8741                        }
 888742                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 8743                        {
 08744                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 8745                        }
 888746                        if (response.Headers.TryGetValue("x-ms-server-encrypted", out _header))
 8747                        {
 08748                            _value.IsServerEncrypted = bool.Parse(_header);
 8749                        }
 888750                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 8751                        {
 08752                            _value.EncryptionKeySha256 = _header;
 8753                        }
 888754                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 8755                        {
 08756                            _value.EncryptionScope = _header;
 8757                        }
 888758                        if (response.Headers.TryGetValue("x-ms-blob-content-md5", out _header))
 8759                        {
 08760                            _value.BlobContentMD5 = System.Convert.FromBase64String(_header);
 8761                        }
 8762
 8763                        // Create the response
 888764                        return Response.FromValue(_value, response);
 8765                    }
 8766                    case 206:
 8767                    {
 8768                        // Create the result
 08769                        Azure.Storage.Blobs.Models.BlobQueryResult _value = new Azure.Storage.Blobs.Models.BlobQueryResu
 08770                        _value.Body = response.ContentStream; // You should manually wrap with RetriableStream!
 8771
 8772                        // Get response headers
 8773                        string _header;
 08774                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 8775                        {
 08776                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 8777                        }
 08778                        _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompare
 08779                        foreach (Azure.Core.HttpHeader _headerPair in response.Headers)
 8780                        {
 08781                            if (_headerPair.Name.StartsWith("x-ms-meta-", System.StringComparison.InvariantCulture))
 8782                            {
 08783                                _value.Metadata[_headerPair.Name.Substring(10)] = _headerPair.Value;
 8784                            }
 8785                        }
 08786                        if (response.Headers.TryGetValue("Content-Length", out _header))
 8787                        {
 08788                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 8789                        }
 08790                        if (response.Headers.TryGetValue("Content-Type", out _header))
 8791                        {
 08792                            _value.ContentType = _header;
 8793                        }
 08794                        if (response.Headers.TryGetValue("Content-Range", out _header))
 8795                        {
 08796                            _value.ContentRange = _header;
 8797                        }
 08798                        if (response.Headers.TryGetValue("ETag", out _header))
 8799                        {
 08800                            _value.ETag = new Azure.ETag(_header);
 8801                        }
 08802                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 8803                        {
 08804                            _value.ContentHash = System.Convert.FromBase64String(_header);
 8805                        }
 08806                        if (response.Headers.TryGetValue("Content-Encoding", out _header))
 8807                        {
 08808                            _value.ContentEncoding = _header;
 8809                        }
 08810                        if (response.Headers.TryGetValue("Cache-Control", out _header))
 8811                        {
 08812                            _value.CacheControl = _header;
 8813                        }
 08814                        if (response.Headers.TryGetValue("Content-Disposition", out _header))
 8815                        {
 08816                            _value.ContentDisposition = _header;
 8817                        }
 08818                        if (response.Headers.TryGetValue("Content-Language", out _header))
 8819                        {
 08820                            _value.ContentLanguage = _header;
 8821                        }
 08822                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 8823                        {
 08824                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 8825                        }
 08826                        if (response.Headers.TryGetValue("x-ms-blob-type", out _header))
 8827                        {
 08828                            _value.BlobType = (Azure.Storage.Blobs.Models.BlobType)System.Enum.Parse(typeof(Azure.Storag
 8829                        }
 08830                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 8831                        {
 08832                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 8833                        }
 08834                        if (response.Headers.TryGetValue("x-ms-copy-completion-time", out _header))
 8835                        {
 08836                            _value.CopyCompletionTime = System.DateTimeOffset.Parse(_header, System.Globalization.Cultur
 8837                        }
 08838                        if (response.Headers.TryGetValue("x-ms-copy-status-description", out _header))
 8839                        {
 08840                            _value.CopyStatusDescription = _header;
 8841                        }
 08842                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 8843                        {
 08844                            _value.CopyId = _header;
 8845                        }
 08846                        if (response.Headers.TryGetValue("x-ms-copy-progress", out _header))
 8847                        {
 08848                            _value.CopyProgress = _header;
 8849                        }
 08850                        if (response.Headers.TryGetValue("x-ms-copy-source", out _header))
 8851                        {
 08852                            _value.CopySource = _header;
 8853                        }
 08854                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 8855                        {
 08856                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 8857                        }
 08858                        if (response.Headers.TryGetValue("x-ms-lease-duration", out _header))
 8859                        {
 08860                            _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationTy
 8861                        }
 08862                        if (response.Headers.TryGetValue("x-ms-lease-state", out _header))
 8863                        {
 08864                            _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_header
 8865                        }
 08866                        if (response.Headers.TryGetValue("x-ms-lease-status", out _header))
 8867                        {
 08868                            _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_head
 8869                        }
 08870                        if (response.Headers.TryGetValue("Accept-Ranges", out _header))
 8871                        {
 08872                            _value.AcceptRanges = _header;
 8873                        }
 08874                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 8875                        {
 08876                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 8877                        }
 08878                        if (response.Headers.TryGetValue("x-ms-server-encrypted", out _header))
 8879                        {
 08880                            _value.IsServerEncrypted = bool.Parse(_header);
 8881                        }
 08882                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 8883                        {
 08884                            _value.EncryptionKeySha256 = _header;
 8885                        }
 08886                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 8887                        {
 08888                            _value.EncryptionScope = _header;
 8889                        }
 08890                        if (response.Headers.TryGetValue("x-ms-blob-content-md5", out _header))
 8891                        {
 08892                            _value.BlobContentMD5 = System.Convert.FromBase64String(_header);
 8893                        }
 8894
 8895                        // Create the response
 08896                        return Response.FromValue(_value, response);
 8897                    }
 8898                    default:
 8899                    {
 8900                        // Create the result
 528901                        Azure.Storage.Blobs.Models.FailureNoContent _value = new Azure.Storage.Blobs.Models.FailureNoCon
 8902
 8903                        // Get response headers
 8904                        string _header;
 528905                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 8906                        {
 528907                            _value.ErrorCode = _header;
 8908                        }
 8909
 528910                        throw _value.CreateException(clientDiagnostics, response);
 8911                    }
 8912                }
 8913            }
 8914            #endregion Blob.QueryAsync
 8915
 8916            #region Blob.GetTagsAsync
 8917            /// <summary>
 8918            /// The Get Tags operation enables users to get the tags associated with a blob.
 8919            /// </summary>
 8920            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 8921            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8922            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8923            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8924            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8925            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8926            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8927            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 8928            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 8929            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 8930            /// <param name="operationName">Operation name.</param>
 8931            /// <param name="cancellationToken">Cancellation token.</param>
 8932            /// <returns>Blob tags</returns>
 8933            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobTags>> Ge
 8934                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 8935                Azure.Core.Pipeline.HttpPipeline pipeline,
 8936                System.Uri resourceUri,
 8937                string version,
 8938                int? timeout = default,
 8939                string requestId = default,
 8940                string snapshot = default,
 8941                string versionId = default,
 8942                string ifTags = default,
 8943                bool async = true,
 8944                string operationName = "BlobClient.GetTags",
 8945                System.Threading.CancellationToken cancellationToken = default)
 8946            {
 848947                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 8948                try
 8949                {
 848950                    _scope.AddAttribute("url", resourceUri);
 848951                    _scope.Start();
 848952                    using (Azure.Core.HttpMessage _message = GetTagsAsync_CreateMessage(
 848953                        pipeline,
 848954                        resourceUri,
 848955                        version,
 848956                        timeout,
 848957                        requestId,
 848958                        snapshot,
 848959                        versionId,
 848960                        ifTags))
 8961                    {
 848962                        if (async)
 8963                        {
 8964                            // Send the request asynchronously if we're being called via an async path
 548965                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 8966                        }
 8967                        else
 8968                        {
 8969                            // Send the request synchronously through the API that blocks if we're being called via a sy
 8970                            // (this is safe because the Task will complete before the user can call Wait)
 308971                            pipeline.Send(_message, cancellationToken);
 8972                        }
 848973                        Azure.Response _response = _message.Response;
 848974                        cancellationToken.ThrowIfCancellationRequested();
 848975                        return GetTagsAsync_CreateResponse(clientDiagnostics, _response);
 8976                    }
 8977                }
 128978                catch (System.Exception ex)
 8979                {
 128980                    _scope.Failed(ex);
 128981                    throw;
 8982                }
 8983                finally
 8984                {
 848985                    _scope.Dispose();
 8986                }
 728987            }
 8988
 8989            /// <summary>
 8990            /// Create the Blob.GetTagsAsync request.
 8991            /// </summary>
 8992            /// <param name="pipeline">The pipeline used for sending requests.</param>
 8993            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 8994            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 8995            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 8996            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 8997            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 8998            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 8999            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9000            /// <returns>The Blob.GetTagsAsync Message.</returns>
 9001            internal static Azure.Core.HttpMessage GetTagsAsync_CreateMessage(
 9002                Azure.Core.Pipeline.HttpPipeline pipeline,
 9003                System.Uri resourceUri,
 9004                string version,
 9005                int? timeout = default,
 9006                string requestId = default,
 9007                string snapshot = default,
 9008                string versionId = default,
 9009                string ifTags = default)
 9010            {
 9011                // Validation
 849012                if (resourceUri == null)
 9013                {
 09014                    throw new System.ArgumentNullException(nameof(resourceUri));
 9015                }
 849016                if (version == null)
 9017                {
 09018                    throw new System.ArgumentNullException(nameof(version));
 9019                }
 9020
 9021                // Create the request
 849022                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 849023                Azure.Core.Request _request = _message.Request;
 9024
 9025                // Set the endpoint
 849026                _request.Method = Azure.Core.RequestMethod.Get;
 849027                _request.Uri.Reset(resourceUri);
 849028                _request.Uri.AppendQuery("comp", "tags", escapeValue: false);
 09029                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 09030                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 09031                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 9032
 9033                // Add request headers
 849034                _request.Headers.SetValue("x-ms-version", version);
 09035                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 929036                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 9037
 849038                return _message;
 9039            }
 9040
 9041            /// <summary>
 9042            /// Create the Blob.GetTagsAsync response or throw a failure exception.
 9043            /// </summary>
 9044            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 9045            /// <param name="response">The raw Response.</param>
 9046            /// <returns>The Blob.GetTagsAsync Azure.Response{Azure.Storage.Blobs.Models.BlobTags}.</returns>
 9047            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobTags> GetTagsAsync_CreateResponse(
 9048                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9049                Azure.Response response)
 9050            {
 9051                // Process the response
 849052                switch (response.Status)
 9053                {
 9054                    case 200:
 9055                    {
 9056                        // Create the result
 729057                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 729058                        Azure.Storage.Blobs.Models.BlobTags _value = Azure.Storage.Blobs.Models.BlobTags.FromXml(_xml.Ro
 9059
 9060                        // Create the response
 729061                        return Response.FromValue(_value, response);
 9062                    }
 9063                    case 304:
 9064                    {
 09065                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.BlobTags>(response);
 9066                    }
 9067                    default:
 9068                    {
 9069                        // Create the result
 129070                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 129071                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 9072
 129073                        throw _value.CreateException(clientDiagnostics, response);
 9074                    }
 9075                }
 9076            }
 9077            #endregion Blob.GetTagsAsync
 9078
 9079            #region Blob.SetTagsAsync
 9080            /// <summary>
 9081            /// The Set Tags operation enables users to set tags on a blob.
 9082            /// </summary>
 9083            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 9084            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9085            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9086            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9087            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9088            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 9089            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 9090            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 9091            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9092            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9093            /// <param name="tags">Blob tags</param>
 9094            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 9095            /// <param name="operationName">Operation name.</param>
 9096            /// <param name="cancellationToken">Cancellation token.</param>
 9097            /// <returns>Azure.Response</returns>
 9098            public static async System.Threading.Tasks.ValueTask<Azure.Response> SetTagsAsync(
 9099                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9100                Azure.Core.Pipeline.HttpPipeline pipeline,
 9101                System.Uri resourceUri,
 9102                string version,
 9103                int? timeout = default,
 9104                string versionId = default,
 9105                byte[] transactionalContentHash = default,
 9106                byte[] transactionalContentCrc64 = default,
 9107                string requestId = default,
 9108                string ifTags = default,
 9109                Azure.Storage.Blobs.Models.BlobTags tags = default,
 9110                bool async = true,
 9111                string operationName = "BlobClient.SetTags",
 9112                System.Threading.CancellationToken cancellationToken = default)
 9113            {
 2009114                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 9115                try
 9116                {
 2009117                    _scope.AddAttribute("url", resourceUri);
 2009118                    _scope.Start();
 2009119                    using (Azure.Core.HttpMessage _message = SetTagsAsync_CreateMessage(
 2009120                        pipeline,
 2009121                        resourceUri,
 2009122                        version,
 2009123                        timeout,
 2009124                        versionId,
 2009125                        transactionalContentHash,
 2009126                        transactionalContentCrc64,
 2009127                        requestId,
 2009128                        ifTags,
 2009129                        tags))
 9130                    {
 2009131                        if (async)
 9132                        {
 9133                            // Send the request asynchronously if we're being called via an async path
 1229134                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 9135                        }
 9136                        else
 9137                        {
 9138                            // Send the request synchronously through the API that blocks if we're being called via a sy
 9139                            // (this is safe because the Task will complete before the user can call Wait)
 789140                            pipeline.Send(_message, cancellationToken);
 9141                        }
 2009142                        Azure.Response _response = _message.Response;
 2009143                        cancellationToken.ThrowIfCancellationRequested();
 2009144                        return SetTagsAsync_CreateResponse(clientDiagnostics, _response);
 9145                    }
 9146                }
 289147                catch (System.Exception ex)
 9148                {
 289149                    _scope.Failed(ex);
 289150                    throw;
 9151                }
 9152                finally
 9153                {
 2009154                    _scope.Dispose();
 9155                }
 1729156            }
 9157
 9158            /// <summary>
 9159            /// Create the Blob.SetTagsAsync request.
 9160            /// </summary>
 9161            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9162            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9163            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9164            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9165            /// <param name="versionId">The version id parameter is an opaque DateTime value that, when present, specifi
 9166            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 9167            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 9168            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9169            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9170            /// <param name="tags">Blob tags</param>
 9171            /// <returns>The Blob.SetTagsAsync Message.</returns>
 9172            internal static Azure.Core.HttpMessage SetTagsAsync_CreateMessage(
 9173                Azure.Core.Pipeline.HttpPipeline pipeline,
 9174                System.Uri resourceUri,
 9175                string version,
 9176                int? timeout = default,
 9177                string versionId = default,
 9178                byte[] transactionalContentHash = default,
 9179                byte[] transactionalContentCrc64 = default,
 9180                string requestId = default,
 9181                string ifTags = default,
 9182                Azure.Storage.Blobs.Models.BlobTags tags = default)
 9183            {
 9184                // Validation
 2009185                if (resourceUri == null)
 9186                {
 09187                    throw new System.ArgumentNullException(nameof(resourceUri));
 9188                }
 2009189                if (version == null)
 9190                {
 09191                    throw new System.ArgumentNullException(nameof(version));
 9192                }
 9193
 9194                // Create the request
 2009195                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 2009196                Azure.Core.Request _request = _message.Request;
 9197
 9198                // Set the endpoint
 2009199                _request.Method = Azure.Core.RequestMethod.Put;
 2009200                _request.Uri.Reset(resourceUri);
 2009201                _request.Uri.AppendQuery("comp", "tags", escapeValue: false);
 09202                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 09203                if (versionId != null) { _request.Uri.AppendQuery("versionid", versionId); }
 9204
 9205                // Add request headers
 2009206                _request.Headers.SetValue("x-ms-version", version);
 09207                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 09208                if (transactionalContentCrc64 != null) { _request.Headers.SetValue("x-ms-content-crc64", System.Convert.
 09209                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 2089210                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 9211
 9212                // Create the body
 2009213                if (tags != null)
 9214                {
 2009215                    System.Xml.Linq.XElement _body = Azure.Storage.Blobs.Models.BlobTags.ToXml(tags, "Tags", "");
 2009216                    string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 2009217                    _request.Headers.SetValue("Content-Type", "application/xml");
 2009218                    _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.I
 2009219                    _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 9220                }
 9221
 2009222                return _message;
 9223            }
 9224
 9225            /// <summary>
 9226            /// Create the Blob.SetTagsAsync response or throw a failure exception.
 9227            /// </summary>
 9228            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 9229            /// <param name="response">The raw Response.</param>
 9230            /// <returns>The Blob.SetTagsAsync Azure.Response.</returns>
 9231            internal static Azure.Response SetTagsAsync_CreateResponse(
 9232                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9233                Azure.Response response)
 9234            {
 9235                // Process the response
 2009236                switch (response.Status)
 9237                {
 9238                    case 204:
 9239                    {
 1729240                        return response;
 9241                    }
 9242                    default:
 9243                    {
 9244                        // Create the result
 289245                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 289246                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 9247
 289248                        throw _value.CreateException(clientDiagnostics, response);
 9249                    }
 9250                }
 9251            }
 9252            #endregion Blob.SetTagsAsync
 9253        }
 9254        #endregion Blob operations
 9255
 9256        #region PageBlob operations
 9257        /// <summary>
 9258        /// PageBlob operations for Azure Blob Storage
 9259        /// </summary>
 9260        public static partial class PageBlob
 9261        {
 9262            #region PageBlob.CreateAsync
 9263            /// <summary>
 9264            /// The Create operation creates a new page blob.
 9265            /// </summary>
 9266            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 9267            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9268            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9269            /// <param name="contentLength">The length of the request.</param>
 9270            /// <param name="blobContentLength">This header specifies the maximum size for the page blob, up to 1 TB. Th
 9271            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9272            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9273            /// <param name="tier">Optional. Indicates the tier to be set on the page blob.</param>
 9274            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 9275            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 9276            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 9277            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 9278            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 9279            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 9280            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9281            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 9282            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9283            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9284            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9285            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9286            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9287            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9288            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9289            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9290            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9291            /// <param name="blobSequenceNumber">Set for page blobs only. The sequence number is a user-controlled value
 9292            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9293            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 9294            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 9295            /// <param name="operationName">Operation name.</param>
 9296            /// <param name="cancellationToken">Cancellation token.</param>
 9297            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}</returns>
 9298            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContentIn
 9299                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9300                Azure.Core.Pipeline.HttpPipeline pipeline,
 9301                System.Uri resourceUri,
 9302                long contentLength,
 9303                long blobContentLength,
 9304                string version,
 9305                int? timeout = default,
 9306                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 9307                string blobContentType = default,
 9308                string blobContentEncoding = default,
 9309                string blobContentLanguage = default,
 9310                byte[] blobContentHash = default,
 9311                string blobCacheControl = default,
 9312                System.Collections.Generic.IDictionary<string, string> metadata = default,
 9313                string leaseId = default,
 9314                string blobContentDisposition = default,
 9315                string encryptionKey = default,
 9316                string encryptionKeySha256 = default,
 9317                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 9318                string encryptionScope = default,
 9319                System.DateTimeOffset? ifModifiedSince = default,
 9320                System.DateTimeOffset? ifUnmodifiedSince = default,
 9321                Azure.ETag? ifMatch = default,
 9322                Azure.ETag? ifNoneMatch = default,
 9323                string ifTags = default,
 9324                long? blobSequenceNumber = default,
 9325                string requestId = default,
 9326                string blobTagsString = default,
 9327                bool async = true,
 9328                string operationName = "PageBlobClient.Create",
 9329                System.Threading.CancellationToken cancellationToken = default)
 9330            {
 10049331                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 9332                try
 9333                {
 10049334                    _scope.AddAttribute("url", resourceUri);
 10049335                    _scope.Start();
 10049336                    using (Azure.Core.HttpMessage _message = CreateAsync_CreateMessage(
 10049337                        pipeline,
 10049338                        resourceUri,
 10049339                        contentLength,
 10049340                        blobContentLength,
 10049341                        version,
 10049342                        timeout,
 10049343                        tier,
 10049344                        blobContentType,
 10049345                        blobContentEncoding,
 10049346                        blobContentLanguage,
 10049347                        blobContentHash,
 10049348                        blobCacheControl,
 10049349                        metadata,
 10049350                        leaseId,
 10049351                        blobContentDisposition,
 10049352                        encryptionKey,
 10049353                        encryptionKeySha256,
 10049354                        encryptionAlgorithm,
 10049355                        encryptionScope,
 10049356                        ifModifiedSince,
 10049357                        ifUnmodifiedSince,
 10049358                        ifMatch,
 10049359                        ifNoneMatch,
 10049360                        ifTags,
 10049361                        blobSequenceNumber,
 10049362                        requestId,
 10049363                        blobTagsString))
 9364                    {
 10049365                        if (async)
 9366                        {
 9367                            // Send the request asynchronously if we're being called via an async path
 5069368                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 9369                        }
 9370                        else
 9371                        {
 9372                            // Send the request synchronously through the API that blocks if we're being called via a sy
 9373                            // (this is safe because the Task will complete before the user can call Wait)
 4989374                            pipeline.Send(_message, cancellationToken);
 9375                        }
 10049376                        Azure.Response _response = _message.Response;
 10049377                        cancellationToken.ThrowIfCancellationRequested();
 10049378                        return CreateAsync_CreateResponse(clientDiagnostics, _response);
 9379                    }
 9380                }
 369381                catch (System.Exception ex)
 9382                {
 369383                    _scope.Failed(ex);
 369384                    throw;
 9385                }
 9386                finally
 9387                {
 10049388                    _scope.Dispose();
 9389                }
 9689390            }
 9391
 9392            /// <summary>
 9393            /// Create the PageBlob.CreateAsync request.
 9394            /// </summary>
 9395            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9396            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9397            /// <param name="contentLength">The length of the request.</param>
 9398            /// <param name="blobContentLength">This header specifies the maximum size for the page blob, up to 1 TB. Th
 9399            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9400            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9401            /// <param name="tier">Optional. Indicates the tier to be set on the page blob.</param>
 9402            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 9403            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 9404            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 9405            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 9406            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 9407            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 9408            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9409            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 9410            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9411            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9412            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9413            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9414            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9415            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9416            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9417            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9418            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9419            /// <param name="blobSequenceNumber">Set for page blobs only. The sequence number is a user-controlled value
 9420            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9421            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 9422            /// <returns>The PageBlob.CreateAsync Message.</returns>
 9423            internal static Azure.Core.HttpMessage CreateAsync_CreateMessage(
 9424                Azure.Core.Pipeline.HttpPipeline pipeline,
 9425                System.Uri resourceUri,
 9426                long contentLength,
 9427                long blobContentLength,
 9428                string version,
 9429                int? timeout = default,
 9430                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 9431                string blobContentType = default,
 9432                string blobContentEncoding = default,
 9433                string blobContentLanguage = default,
 9434                byte[] blobContentHash = default,
 9435                string blobCacheControl = default,
 9436                System.Collections.Generic.IDictionary<string, string> metadata = default,
 9437                string leaseId = default,
 9438                string blobContentDisposition = default,
 9439                string encryptionKey = default,
 9440                string encryptionKeySha256 = default,
 9441                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 9442                string encryptionScope = default,
 9443                System.DateTimeOffset? ifModifiedSince = default,
 9444                System.DateTimeOffset? ifUnmodifiedSince = default,
 9445                Azure.ETag? ifMatch = default,
 9446                Azure.ETag? ifNoneMatch = default,
 9447                string ifTags = default,
 9448                long? blobSequenceNumber = default,
 9449                string requestId = default,
 9450                string blobTagsString = default)
 9451            {
 9452                // Validation
 10049453                if (resourceUri == null)
 9454                {
 09455                    throw new System.ArgumentNullException(nameof(resourceUri));
 9456                }
 10049457                if (version == null)
 9458                {
 09459                    throw new System.ArgumentNullException(nameof(version));
 9460                }
 9461
 9462                // Create the request
 10049463                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 10049464                Azure.Core.Request _request = _message.Request;
 9465
 9466                // Set the endpoint
 10049467                _request.Method = Azure.Core.RequestMethod.Put;
 10049468                _request.Uri.Reset(resourceUri);
 09469                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 9470
 9471                // Add request headers
 10049472                _request.Headers.SetValue("x-ms-blob-type", "PageBlob");
 10049473                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 10049474                _request.Headers.SetValue("x-ms-blob-content-length", blobContentLength.ToString(System.Globalization.Cu
 10049475                _request.Headers.SetValue("x-ms-version", version);
 09476                if (tier != null) { _request.Headers.SetValue("x-ms-access-tier", tier.ToString()); }
 10089477                if (blobContentType != null) { _request.Headers.SetValue("x-ms-blob-content-type", blobContentType); }
 10089478                if (blobContentEncoding != null) { _request.Headers.SetValue("x-ms-blob-content-encoding", blobContentEn
 10089479                if (blobContentLanguage != null) { _request.Headers.SetValue("x-ms-blob-content-language", blobContentLa
 10089480                if (blobContentHash != null) { _request.Headers.SetValue("x-ms-blob-content-md5", System.Convert.ToBase6
 10089481                if (blobCacheControl != null) { _request.Headers.SetValue("x-ms-blob-cache-control", blobCacheControl); 
 10049482                if (metadata != null) {
 409483                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 9484                    {
 169485                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 9486                    }
 9487                }
 10129488                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 10089489                if (blobContentDisposition != null) { _request.Headers.SetValue("x-ms-blob-content-disposition", blobCon
 10209490                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 10209491                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 10209492                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 10249493                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 10129494                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 10129495                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 10129496                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 10249497                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 10129498                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 15969499                if (blobSequenceNumber != null) { _request.Headers.SetValue("x-ms-blob-sequence-number", blobSequenceNum
 09500                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 10089501                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 9502
 10049503                return _message;
 9504            }
 9505
 9506            /// <summary>
 9507            /// Create the PageBlob.CreateAsync response or throw a failure exception.
 9508            /// </summary>
 9509            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 9510            /// <param name="response">The raw Response.</param>
 9511            /// <returns>The PageBlob.CreateAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}.</returns>
 9512            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CreateAsync_CreateResponse(
 9513                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9514                Azure.Response response)
 9515            {
 9516                // Process the response
 10049517                switch (response.Status)
 9518                {
 9519                    case 201:
 9520                    {
 9521                        // Create the result
 9689522                        Azure.Storage.Blobs.Models.BlobContentInfo _value = new Azure.Storage.Blobs.Models.BlobContentIn
 9523
 9524                        // Get response headers
 9525                        string _header;
 9689526                        if (response.Headers.TryGetValue("ETag", out _header))
 9527                        {
 9689528                            _value.ETag = new Azure.ETag(_header);
 9529                        }
 9689530                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 9531                        {
 9689532                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 9533                        }
 9689534                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 9535                        {
 09536                            _value.ContentHash = System.Convert.FromBase64String(_header);
 9537                        }
 9689538                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 9539                        {
 1089540                            _value.VersionId = _header;
 9541                        }
 9689542                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 9543                        {
 169544                            _value.EncryptionKeySha256 = _header;
 9545                        }
 9689546                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 9547                        {
 209548                            _value.EncryptionScope = _header;
 9549                        }
 9689550                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 9551                        {
 09552                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 9553                        }
 9554
 9555                        // Create the response
 9689556                        return Response.FromValue(_value, response);
 9557                    }
 9558                    default:
 9559                    {
 9560                        // Create the result
 369561                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 369562                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 9563
 369564                        throw _value.CreateException(clientDiagnostics, response);
 9565                    }
 9566                }
 9567            }
 9568            #endregion PageBlob.CreateAsync
 9569
 9570            #region PageBlob.UploadPagesAsync
 9571            /// <summary>
 9572            /// The Upload Pages operation writes a range of pages to a page blob
 9573            /// </summary>
 9574            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 9575            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9576            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9577            /// <param name="body">Initial data</param>
 9578            /// <param name="contentLength">The length of the request.</param>
 9579            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9580            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 9581            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 9582            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9583            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 9584            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9585            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9586            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9587            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9588            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9589            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 9590            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 9591            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 9592            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9593            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9594            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9595            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9596            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9597            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9598            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 9599            /// <param name="operationName">Operation name.</param>
 9600            /// <param name="cancellationToken">Cancellation token.</param>
 9601            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageInfo}</returns>
 9602            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> Up
 9603                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9604                Azure.Core.Pipeline.HttpPipeline pipeline,
 9605                System.Uri resourceUri,
 9606                System.IO.Stream body,
 9607                long contentLength,
 9608                string version,
 9609                byte[] transactionalContentHash = default,
 9610                byte[] transactionalContentCrc64 = default,
 9611                int? timeout = default,
 9612                string range = default,
 9613                string leaseId = default,
 9614                string encryptionKey = default,
 9615                string encryptionKeySha256 = default,
 9616                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 9617                string encryptionScope = default,
 9618                long? ifSequenceNumberLessThanOrEqualTo = default,
 9619                long? ifSequenceNumberLessThan = default,
 9620                long? ifSequenceNumberEqualTo = default,
 9621                System.DateTimeOffset? ifModifiedSince = default,
 9622                System.DateTimeOffset? ifUnmodifiedSince = default,
 9623                Azure.ETag? ifMatch = default,
 9624                Azure.ETag? ifNoneMatch = default,
 9625                string ifTags = default,
 9626                string requestId = default,
 9627                bool async = true,
 9628                string operationName = "PageBlobClient.UploadPages",
 9629                System.Threading.CancellationToken cancellationToken = default)
 9630            {
 5569631                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 9632                try
 9633                {
 5569634                    _scope.AddAttribute("url", resourceUri);
 5569635                    _scope.Start();
 5569636                    using (Azure.Core.HttpMessage _message = UploadPagesAsync_CreateMessage(
 5569637                        pipeline,
 5569638                        resourceUri,
 5569639                        body,
 5569640                        contentLength,
 5569641                        version,
 5569642                        transactionalContentHash,
 5569643                        transactionalContentCrc64,
 5569644                        timeout,
 5569645                        range,
 5569646                        leaseId,
 5569647                        encryptionKey,
 5569648                        encryptionKeySha256,
 5569649                        encryptionAlgorithm,
 5569650                        encryptionScope,
 5569651                        ifSequenceNumberLessThanOrEqualTo,
 5569652                        ifSequenceNumberLessThan,
 5569653                        ifSequenceNumberEqualTo,
 5569654                        ifModifiedSince,
 5569655                        ifUnmodifiedSince,
 5569656                        ifMatch,
 5569657                        ifNoneMatch,
 5569658                        ifTags,
 5569659                        requestId))
 9660                    {
 5529661                        if (async)
 9662                        {
 9663                            // Send the request asynchronously if we're being called via an async path
 2769664                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 9665                        }
 9666                        else
 9667                        {
 9668                            // Send the request synchronously through the API that blocks if we're being called via a sy
 9669                            // (this is safe because the Task will complete before the user can call Wait)
 2769670                            pipeline.Send(_message, cancellationToken);
 9671                        }
 5529672                        Azure.Response _response = _message.Response;
 5529673                        cancellationToken.ThrowIfCancellationRequested();
 5529674                        return UploadPagesAsync_CreateResponse(clientDiagnostics, _response);
 9675                    }
 9676                }
 449677                catch (System.Exception ex)
 9678                {
 449679                    _scope.Failed(ex);
 449680                    throw;
 9681                }
 9682                finally
 9683                {
 5569684                    _scope.Dispose();
 9685                }
 5129686            }
 9687
 9688            /// <summary>
 9689            /// Create the PageBlob.UploadPagesAsync request.
 9690            /// </summary>
 9691            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9692            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9693            /// <param name="body">Initial data</param>
 9694            /// <param name="contentLength">The length of the request.</param>
 9695            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9696            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 9697            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 9698            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9699            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 9700            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9701            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9702            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9703            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9704            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9705            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 9706            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 9707            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 9708            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9709            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9710            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9711            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9712            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9713            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9714            /// <returns>The PageBlob.UploadPagesAsync Message.</returns>
 9715            internal static Azure.Core.HttpMessage UploadPagesAsync_CreateMessage(
 9716                Azure.Core.Pipeline.HttpPipeline pipeline,
 9717                System.Uri resourceUri,
 9718                System.IO.Stream body,
 9719                long contentLength,
 9720                string version,
 9721                byte[] transactionalContentHash = default,
 9722                byte[] transactionalContentCrc64 = default,
 9723                int? timeout = default,
 9724                string range = default,
 9725                string leaseId = default,
 9726                string encryptionKey = default,
 9727                string encryptionKeySha256 = default,
 9728                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 9729                string encryptionScope = default,
 9730                long? ifSequenceNumberLessThanOrEqualTo = default,
 9731                long? ifSequenceNumberLessThan = default,
 9732                long? ifSequenceNumberEqualTo = default,
 9733                System.DateTimeOffset? ifModifiedSince = default,
 9734                System.DateTimeOffset? ifUnmodifiedSince = default,
 9735                Azure.ETag? ifMatch = default,
 9736                Azure.ETag? ifNoneMatch = default,
 9737                string ifTags = default,
 9738                string requestId = default)
 9739            {
 9740                // Validation
 5569741                if (resourceUri == null)
 9742                {
 09743                    throw new System.ArgumentNullException(nameof(resourceUri));
 9744                }
 5569745                if (body == null)
 9746                {
 49747                    throw new System.ArgumentNullException(nameof(body));
 9748                }
 5529749                if (version == null)
 9750                {
 09751                    throw new System.ArgumentNullException(nameof(version));
 9752                }
 9753
 9754                // Create the request
 5529755                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 5529756                Azure.Core.Request _request = _message.Request;
 9757
 9758                // Set the endpoint
 5529759                _request.Method = Azure.Core.RequestMethod.Put;
 5529760                _request.Uri.Reset(resourceUri);
 5529761                _request.Uri.AppendQuery("comp", "page", escapeValue: false);
 09762                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 9763
 9764                // Add request headers
 5529765                _request.Headers.SetValue("x-ms-page-write", "update");
 5529766                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 5529767                _request.Headers.SetValue("x-ms-version", version);
 09768                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 09769                if (transactionalContentCrc64 != null) { _request.Headers.SetValue("x-ms-content-crc64", System.Convert.
 11049770                if (range != null) { _request.Headers.SetValue("x-ms-range", range); }
 5609771                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 5569772                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 5569773                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 5569774                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 5609775                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 5609776                if (ifSequenceNumberLessThanOrEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-le",
 5609777                if (ifSequenceNumberLessThan != null) { _request.Headers.SetValue("x-ms-if-sequence-number-lt", ifSequen
 5609778                if (ifSequenceNumberEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-eq", ifSequenc
 5609779                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 5609780                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 5609781                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 5609782                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 5609783                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 09784                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 9785
 9786                // Create the body
 5529787                _request.Content = Azure.Core.RequestContent.Create(body);
 9788
 5529789                return _message;
 9790            }
 9791
 9792            /// <summary>
 9793            /// Create the PageBlob.UploadPagesAsync response or throw a failure exception.
 9794            /// </summary>
 9795            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 9796            /// <param name="response">The raw Response.</param>
 9797            /// <returns>The PageBlob.UploadPagesAsync Azure.Response{Azure.Storage.Blobs.Models.PageInfo}.</returns>
 9798            internal static Azure.Response<Azure.Storage.Blobs.Models.PageInfo> UploadPagesAsync_CreateResponse(
 9799                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9800                Azure.Response response)
 9801            {
 9802                // Process the response
 5529803                switch (response.Status)
 9804                {
 9805                    case 201:
 9806                    {
 9807                        // Create the result
 5129808                        Azure.Storage.Blobs.Models.PageInfo _value = new Azure.Storage.Blobs.Models.PageInfo();
 9809
 9810                        // Get response headers
 9811                        string _header;
 5129812                        if (response.Headers.TryGetValue("ETag", out _header))
 9813                        {
 5129814                            _value.ETag = new Azure.ETag(_header);
 9815                        }
 5129816                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 9817                        {
 5129818                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 9819                        }
 5129820                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 9821                        {
 3569822                            _value.ContentHash = System.Convert.FromBase64String(_header);
 9823                        }
 5129824                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 9825                        {
 1569826                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 9827                        }
 5129828                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 9829                        {
 5129830                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 9831                        }
 5129832                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 9833                        {
 49834                            _value.EncryptionKeySha256 = _header;
 9835                        }
 5129836                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 9837                        {
 89838                            _value.EncryptionScope = _header;
 9839                        }
 9840
 9841                        // Create the response
 5129842                        return Response.FromValue(_value, response);
 9843                    }
 9844                    default:
 9845                    {
 9846                        // Create the result
 409847                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 409848                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 9849
 409850                        throw _value.CreateException(clientDiagnostics, response);
 9851                    }
 9852                }
 9853            }
 9854            #endregion PageBlob.UploadPagesAsync
 9855
 9856            #region PageBlob.ClearPagesAsync
 9857            /// <summary>
 9858            /// The Clear Pages operation clears a set of pages from a page blob
 9859            /// </summary>
 9860            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 9861            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9862            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9863            /// <param name="contentLength">The length of the request.</param>
 9864            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9865            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9866            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 9867            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9868            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9869            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9870            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9871            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9872            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 9873            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 9874            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 9875            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9876            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9877            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9878            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9879            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9880            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9881            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 9882            /// <param name="operationName">Operation name.</param>
 9883            /// <param name="cancellationToken">Cancellation token.</param>
 9884            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageInfo}</returns>
 9885            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> Cl
 9886                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 9887                Azure.Core.Pipeline.HttpPipeline pipeline,
 9888                System.Uri resourceUri,
 9889                long contentLength,
 9890                string version,
 9891                int? timeout = default,
 9892                string range = default,
 9893                string leaseId = default,
 9894                string encryptionKey = default,
 9895                string encryptionKeySha256 = default,
 9896                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 9897                string encryptionScope = default,
 9898                long? ifSequenceNumberLessThanOrEqualTo = default,
 9899                long? ifSequenceNumberLessThan = default,
 9900                long? ifSequenceNumberEqualTo = default,
 9901                System.DateTimeOffset? ifModifiedSince = default,
 9902                System.DateTimeOffset? ifUnmodifiedSince = default,
 9903                Azure.ETag? ifMatch = default,
 9904                Azure.ETag? ifNoneMatch = default,
 9905                string ifTags = default,
 9906                string requestId = default,
 9907                bool async = true,
 9908                string operationName = "PageBlobClient.ClearPages",
 9909                System.Threading.CancellationToken cancellationToken = default)
 9910            {
 929911                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 9912                try
 9913                {
 929914                    _scope.AddAttribute("url", resourceUri);
 929915                    _scope.Start();
 929916                    using (Azure.Core.HttpMessage _message = ClearPagesAsync_CreateMessage(
 929917                        pipeline,
 929918                        resourceUri,
 929919                        contentLength,
 929920                        version,
 929921                        timeout,
 929922                        range,
 929923                        leaseId,
 929924                        encryptionKey,
 929925                        encryptionKeySha256,
 929926                        encryptionAlgorithm,
 929927                        encryptionScope,
 929928                        ifSequenceNumberLessThanOrEqualTo,
 929929                        ifSequenceNumberLessThan,
 929930                        ifSequenceNumberEqualTo,
 929931                        ifModifiedSince,
 929932                        ifUnmodifiedSince,
 929933                        ifMatch,
 929934                        ifNoneMatch,
 929935                        ifTags,
 929936                        requestId))
 9937                    {
 929938                        if (async)
 9939                        {
 9940                            // Send the request asynchronously if we're being called via an async path
 469941                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 9942                        }
 9943                        else
 9944                        {
 9945                            // Send the request synchronously through the API that blocks if we're being called via a sy
 9946                            // (this is safe because the Task will complete before the user can call Wait)
 469947                            pipeline.Send(_message, cancellationToken);
 9948                        }
 929949                        Azure.Response _response = _message.Response;
 929950                        cancellationToken.ThrowIfCancellationRequested();
 929951                        return ClearPagesAsync_CreateResponse(clientDiagnostics, _response);
 9952                    }
 9953                }
 409954                catch (System.Exception ex)
 9955                {
 409956                    _scope.Failed(ex);
 409957                    throw;
 9958                }
 9959                finally
 9960                {
 929961                    _scope.Dispose();
 9962                }
 529963            }
 9964
 9965            /// <summary>
 9966            /// Create the PageBlob.ClearPagesAsync request.
 9967            /// </summary>
 9968            /// <param name="pipeline">The pipeline used for sending requests.</param>
 9969            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 9970            /// <param name="contentLength">The length of the request.</param>
 9971            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 9972            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 9973            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 9974            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 9975            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 9976            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 9977            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 9978            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 9979            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 9980            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 9981            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 9982            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 9983            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 9984            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 9985            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 9986            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 9987            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 9988            /// <returns>The PageBlob.ClearPagesAsync Message.</returns>
 9989            internal static Azure.Core.HttpMessage ClearPagesAsync_CreateMessage(
 9990                Azure.Core.Pipeline.HttpPipeline pipeline,
 9991                System.Uri resourceUri,
 9992                long contentLength,
 9993                string version,
 9994                int? timeout = default,
 9995                string range = default,
 9996                string leaseId = default,
 9997                string encryptionKey = default,
 9998                string encryptionKeySha256 = default,
 9999                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 10000                string encryptionScope = default,
 10001                long? ifSequenceNumberLessThanOrEqualTo = default,
 10002                long? ifSequenceNumberLessThan = default,
 10003                long? ifSequenceNumberEqualTo = default,
 10004                System.DateTimeOffset? ifModifiedSince = default,
 10005                System.DateTimeOffset? ifUnmodifiedSince = default,
 10006                Azure.ETag? ifMatch = default,
 10007                Azure.ETag? ifNoneMatch = default,
 10008                string ifTags = default,
 10009                string requestId = default)
 10010            {
 10011                // Validation
 9210012                if (resourceUri == null)
 10013                {
 010014                    throw new System.ArgumentNullException(nameof(resourceUri));
 10015                }
 9210016                if (version == null)
 10017                {
 010018                    throw new System.ArgumentNullException(nameof(version));
 10019                }
 10020
 10021                // Create the request
 9210022                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 9210023                Azure.Core.Request _request = _message.Request;
 10024
 10025                // Set the endpoint
 9210026                _request.Method = Azure.Core.RequestMethod.Put;
 9210027                _request.Uri.Reset(resourceUri);
 9210028                _request.Uri.AppendQuery("comp", "page", escapeValue: false);
 010029                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 10030
 10031                // Add request headers
 9210032                _request.Headers.SetValue("x-ms-page-write", "clear");
 9210033                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 9210034                _request.Headers.SetValue("x-ms-version", version);
 18410035                if (range != null) { _request.Headers.SetValue("x-ms-range", range); }
 10010036                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 010037                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 010038                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 010039                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 9610040                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 10010041                if (ifSequenceNumberLessThanOrEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-le",
 10010042                if (ifSequenceNumberLessThan != null) { _request.Headers.SetValue("x-ms-if-sequence-number-lt", ifSequen
 10010043                if (ifSequenceNumberEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-eq", ifSequenc
 10010044                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 10010045                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 10010046                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 10010047                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 10010048                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 010049                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 10050
 9210051                return _message;
 10052            }
 10053
 10054            /// <summary>
 10055            /// Create the PageBlob.ClearPagesAsync response or throw a failure exception.
 10056            /// </summary>
 10057            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 10058            /// <param name="response">The raw Response.</param>
 10059            /// <returns>The PageBlob.ClearPagesAsync Azure.Response{Azure.Storage.Blobs.Models.PageInfo}.</returns>
 10060            internal static Azure.Response<Azure.Storage.Blobs.Models.PageInfo> ClearPagesAsync_CreateResponse(
 10061                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10062                Azure.Response response)
 10063            {
 10064                // Process the response
 9210065                switch (response.Status)
 10066                {
 10067                    case 201:
 10068                    {
 10069                        // Create the result
 5210070                        Azure.Storage.Blobs.Models.PageInfo _value = new Azure.Storage.Blobs.Models.PageInfo();
 10071
 10072                        // Get response headers
 10073                        string _header;
 5210074                        if (response.Headers.TryGetValue("ETag", out _header))
 10075                        {
 5210076                            _value.ETag = new Azure.ETag(_header);
 10077                        }
 5210078                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 10079                        {
 5210080                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 10081                        }
 5210082                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 10083                        {
 010084                            _value.ContentHash = System.Convert.FromBase64String(_header);
 10085                        }
 5210086                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 10087                        {
 010088                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 10089                        }
 5210090                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 10091                        {
 5210092                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 10093                        }
 5210094                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 10095                        {
 010096                            _value.EncryptionKeySha256 = _header;
 10097                        }
 10098
 10099                        // Create the response
 5210100                        return Response.FromValue(_value, response);
 10101                    }
 10102                    default:
 10103                    {
 10104                        // Create the result
 4010105                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4010106                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 10107
 4010108                        throw _value.CreateException(clientDiagnostics, response);
 10109                    }
 10110                }
 10111            }
 10112            #endregion PageBlob.ClearPagesAsync
 10113
 10114            #region PageBlob.UploadPagesFromUriAsync
 10115            /// <summary>
 10116            /// The Upload Pages operation writes a range of pages to a page blob where the contents are read from a URL
 10117            /// </summary>
 10118            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 10119            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10120            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10121            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 10122            /// <param name="sourceRange">Bytes of source data in the specified range. The length of this range should m
 10123            /// <param name="contentLength">The length of the request.</param>
 10124            /// <param name="range">The range of bytes to which the source range would be written. The range should be 5
 10125            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10126            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 10127            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 10128            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10129            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 10130            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 10131            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 10132            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 10133            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10134            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 10135            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 10136            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 10137            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10138            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10139            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10140            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10141            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10142            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 10143            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 10144            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 10145            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 10146            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10147            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 10148            /// <param name="operationName">Operation name.</param>
 10149            /// <param name="cancellationToken">Cancellation token.</param>
 10150            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageInfo}</returns>
 10151            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageInfo>> Up
 10152                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10153                Azure.Core.Pipeline.HttpPipeline pipeline,
 10154                System.Uri resourceUri,
 10155                System.Uri sourceUri,
 10156                string sourceRange,
 10157                long contentLength,
 10158                string range,
 10159                string version,
 10160                byte[] sourceContentHash = default,
 10161                byte[] sourceContentcrc64 = default,
 10162                int? timeout = default,
 10163                string encryptionKey = default,
 10164                string encryptionKeySha256 = default,
 10165                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 10166                string encryptionScope = default,
 10167                string leaseId = default,
 10168                long? ifSequenceNumberLessThanOrEqualTo = default,
 10169                long? ifSequenceNumberLessThan = default,
 10170                long? ifSequenceNumberEqualTo = default,
 10171                System.DateTimeOffset? ifModifiedSince = default,
 10172                System.DateTimeOffset? ifUnmodifiedSince = default,
 10173                Azure.ETag? ifMatch = default,
 10174                Azure.ETag? ifNoneMatch = default,
 10175                string ifTags = default,
 10176                System.DateTimeOffset? sourceIfModifiedSince = default,
 10177                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 10178                Azure.ETag? sourceIfMatch = default,
 10179                Azure.ETag? sourceIfNoneMatch = default,
 10180                string requestId = default,
 10181                bool async = true,
 10182                string operationName = "PageBlobClient.UploadPagesFromUri",
 10183                System.Threading.CancellationToken cancellationToken = default)
 10184            {
 13610185                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 10186                try
 10187                {
 13610188                    _scope.AddAttribute("url", resourceUri);
 13610189                    _scope.Start();
 13610190                    using (Azure.Core.HttpMessage _message = UploadPagesFromUriAsync_CreateMessage(
 13610191                        pipeline,
 13610192                        resourceUri,
 13610193                        sourceUri,
 13610194                        sourceRange,
 13610195                        contentLength,
 13610196                        range,
 13610197                        version,
 13610198                        sourceContentHash,
 13610199                        sourceContentcrc64,
 13610200                        timeout,
 13610201                        encryptionKey,
 13610202                        encryptionKeySha256,
 13610203                        encryptionAlgorithm,
 13610204                        encryptionScope,
 13610205                        leaseId,
 13610206                        ifSequenceNumberLessThanOrEqualTo,
 13610207                        ifSequenceNumberLessThan,
 13610208                        ifSequenceNumberEqualTo,
 13610209                        ifModifiedSince,
 13610210                        ifUnmodifiedSince,
 13610211                        ifMatch,
 13610212                        ifNoneMatch,
 13610213                        ifTags,
 13610214                        sourceIfModifiedSince,
 13610215                        sourceIfUnmodifiedSince,
 13610216                        sourceIfMatch,
 13610217                        sourceIfNoneMatch,
 13610218                        requestId))
 10219                    {
 13610220                        if (async)
 10221                        {
 10222                            // Send the request asynchronously if we're being called via an async path
 6810223                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 10224                        }
 10225                        else
 10226                        {
 10227                            // Send the request synchronously through the API that blocks if we're being called via a sy
 10228                            // (this is safe because the Task will complete before the user can call Wait)
 6810229                            pipeline.Send(_message, cancellationToken);
 10230                        }
 13610231                        Azure.Response _response = _message.Response;
 13610232                        cancellationToken.ThrowIfCancellationRequested();
 13610233                        return UploadPagesFromUriAsync_CreateResponse(clientDiagnostics, _response);
 10234                    }
 10235                }
 5610236                catch (System.Exception ex)
 10237                {
 5610238                    _scope.Failed(ex);
 5610239                    throw;
 10240                }
 10241                finally
 10242                {
 13610243                    _scope.Dispose();
 10244                }
 8010245            }
 10246
 10247            /// <summary>
 10248            /// Create the PageBlob.UploadPagesFromUriAsync request.
 10249            /// </summary>
 10250            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10251            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10252            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 10253            /// <param name="sourceRange">Bytes of source data in the specified range. The length of this range should m
 10254            /// <param name="contentLength">The length of the request.</param>
 10255            /// <param name="range">The range of bytes to which the source range would be written. The range should be 5
 10256            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10257            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 10258            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 10259            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10260            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 10261            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 10262            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 10263            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 10264            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10265            /// <param name="ifSequenceNumberLessThanOrEqualTo">Specify this header value to operate only on a blob if i
 10266            /// <param name="ifSequenceNumberLessThan">Specify this header value to operate only on a blob if it has a s
 10267            /// <param name="ifSequenceNumberEqualTo">Specify this header value to operate only on a blob if it has the 
 10268            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10269            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10270            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10271            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10272            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10273            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 10274            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 10275            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 10276            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 10277            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10278            /// <returns>The PageBlob.UploadPagesFromUriAsync Message.</returns>
 10279            internal static Azure.Core.HttpMessage UploadPagesFromUriAsync_CreateMessage(
 10280                Azure.Core.Pipeline.HttpPipeline pipeline,
 10281                System.Uri resourceUri,
 10282                System.Uri sourceUri,
 10283                string sourceRange,
 10284                long contentLength,
 10285                string range,
 10286                string version,
 10287                byte[] sourceContentHash = default,
 10288                byte[] sourceContentcrc64 = default,
 10289                int? timeout = default,
 10290                string encryptionKey = default,
 10291                string encryptionKeySha256 = default,
 10292                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 10293                string encryptionScope = default,
 10294                string leaseId = default,
 10295                long? ifSequenceNumberLessThanOrEqualTo = default,
 10296                long? ifSequenceNumberLessThan = default,
 10297                long? ifSequenceNumberEqualTo = default,
 10298                System.DateTimeOffset? ifModifiedSince = default,
 10299                System.DateTimeOffset? ifUnmodifiedSince = default,
 10300                Azure.ETag? ifMatch = default,
 10301                Azure.ETag? ifNoneMatch = default,
 10302                string ifTags = default,
 10303                System.DateTimeOffset? sourceIfModifiedSince = default,
 10304                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 10305                Azure.ETag? sourceIfMatch = default,
 10306                Azure.ETag? sourceIfNoneMatch = default,
 10307                string requestId = default)
 10308            {
 10309                // Validation
 13610310                if (resourceUri == null)
 10311                {
 010312                    throw new System.ArgumentNullException(nameof(resourceUri));
 10313                }
 13610314                if (sourceUri == null)
 10315                {
 010316                    throw new System.ArgumentNullException(nameof(sourceUri));
 10317                }
 13610318                if (sourceRange == null)
 10319                {
 010320                    throw new System.ArgumentNullException(nameof(sourceRange));
 10321                }
 13610322                if (range == null)
 10323                {
 010324                    throw new System.ArgumentNullException(nameof(range));
 10325                }
 13610326                if (version == null)
 10327                {
 010328                    throw new System.ArgumentNullException(nameof(version));
 10329                }
 10330
 10331                // Create the request
 13610332                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 13610333                Azure.Core.Request _request = _message.Request;
 10334
 10335                // Set the endpoint
 13610336                _request.Method = Azure.Core.RequestMethod.Put;
 13610337                _request.Uri.Reset(resourceUri);
 13610338                _request.Uri.AppendQuery("comp", "page", escapeValue: false);
 010339                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 10340
 10341                // Add request headers
 13610342                _request.Headers.SetValue("x-ms-page-write", "update");
 13610343                _request.Headers.SetValue("x-ms-copy-source", sourceUri.AbsoluteUri);
 13610344                _request.Headers.SetValue("x-ms-source-range", sourceRange);
 13610345                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 13610346                _request.Headers.SetValue("x-ms-range", range);
 13610347                _request.Headers.SetValue("x-ms-version", version);
 14410348                if (sourceContentHash != null) { _request.Headers.SetValue("x-ms-source-content-md5", System.Convert.ToB
 010349                if (sourceContentcrc64 != null) { _request.Headers.SetValue("x-ms-source-content-crc64", System.Convert.
 14010350                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 14010351                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 14010352                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 14010353                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 14410354                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 14410355                if (ifSequenceNumberLessThanOrEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-le",
 14410356                if (ifSequenceNumberLessThan != null) { _request.Headers.SetValue("x-ms-if-sequence-number-lt", ifSequen
 14410357                if (ifSequenceNumberEqualTo != null) { _request.Headers.SetValue("x-ms-if-sequence-number-eq", ifSequenc
 14410358                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 14410359                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 14410360                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 14410361                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 14410362                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 14410363                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 14410364                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 14410365                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 14410366                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 010367                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 10368
 13610369                return _message;
 10370            }
 10371
 10372            /// <summary>
 10373            /// Create the PageBlob.UploadPagesFromUriAsync response or throw a failure exception.
 10374            /// </summary>
 10375            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 10376            /// <param name="response">The raw Response.</param>
 10377            /// <returns>The PageBlob.UploadPagesFromUriAsync Azure.Response{Azure.Storage.Blobs.Models.PageInfo}.</retu
 10378            internal static Azure.Response<Azure.Storage.Blobs.Models.PageInfo> UploadPagesFromUriAsync_CreateResponse(
 10379                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10380                Azure.Response response)
 10381            {
 10382                // Process the response
 13610383                switch (response.Status)
 10384                {
 10385                    case 201:
 10386                    {
 10387                        // Create the result
 8010388                        Azure.Storage.Blobs.Models.PageInfo _value = new Azure.Storage.Blobs.Models.PageInfo();
 10389
 10390                        // Get response headers
 10391                        string _header;
 8010392                        if (response.Headers.TryGetValue("ETag", out _header))
 10393                        {
 8010394                            _value.ETag = new Azure.ETag(_header);
 10395                        }
 8010396                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 10397                        {
 8010398                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 10399                        }
 8010400                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 10401                        {
 8010402                            _value.ContentHash = System.Convert.FromBase64String(_header);
 10403                        }
 8010404                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 10405                        {
 010406                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 10407                        }
 8010408                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 10409                        {
 8010410                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 10411                        }
 8010412                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 10413                        {
 410414                            _value.EncryptionKeySha256 = _header;
 10415                        }
 8010416                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 10417                        {
 410418                            _value.EncryptionScope = _header;
 10419                        }
 10420
 10421                        // Create the response
 8010422                        return Response.FromValue(_value, response);
 10423                    }
 10424                    case 304:
 10425                    {
 10426                        // Create the result
 810427                        Azure.Storage.Blobs.Models.ConditionNotMetError _value = new Azure.Storage.Blobs.Models.Conditio
 10428
 10429                        // Get response headers
 10430                        string _header;
 810431                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 10432                        {
 810433                            _value.ErrorCode = _header;
 10434                        }
 10435
 810436                        throw _value.CreateException(clientDiagnostics, response);
 10437                    }
 10438                    default:
 10439                    {
 10440                        // Create the result
 4810441                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4810442                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 10443
 4810444                        throw _value.CreateException(clientDiagnostics, response);
 10445                    }
 10446                }
 10447            }
 10448            #endregion PageBlob.UploadPagesFromUriAsync
 10449
 10450            #region PageBlob.GetPageRangesAsync
 10451            /// <summary>
 10452            /// The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a pag
 10453            /// </summary>
 10454            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 10455            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10456            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10457            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10458            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 10459            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10460            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 10461            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10462            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10463            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10464            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10465            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10466            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10467            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10468            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 10469            /// <param name="operationName">Operation name.</param>
 10470            /// <param name="cancellationToken">Cancellation token.</param>
 10471            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageRangesInfoInternal}</returns>
 10472            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageRangesInf
 10473                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10474                Azure.Core.Pipeline.HttpPipeline pipeline,
 10475                System.Uri resourceUri,
 10476                string version,
 10477                string snapshot = default,
 10478                int? timeout = default,
 10479                string range = default,
 10480                string leaseId = default,
 10481                System.DateTimeOffset? ifModifiedSince = default,
 10482                System.DateTimeOffset? ifUnmodifiedSince = default,
 10483                Azure.ETag? ifMatch = default,
 10484                Azure.ETag? ifNoneMatch = default,
 10485                string ifTags = default,
 10486                string requestId = default,
 10487                bool async = true,
 10488                string operationName = "PageBlobClient.GetPageRanges",
 10489                System.Threading.CancellationToken cancellationToken = default)
 10490            {
 6410491                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 10492                try
 10493                {
 6410494                    _scope.AddAttribute("url", resourceUri);
 6410495                    _scope.Start();
 6410496                    using (Azure.Core.HttpMessage _message = GetPageRangesAsync_CreateMessage(
 6410497                        pipeline,
 6410498                        resourceUri,
 6410499                        version,
 6410500                        snapshot,
 6410501                        timeout,
 6410502                        range,
 6410503                        leaseId,
 6410504                        ifModifiedSince,
 6410505                        ifUnmodifiedSince,
 6410506                        ifMatch,
 6410507                        ifNoneMatch,
 6410508                        ifTags,
 6410509                        requestId))
 10510                    {
 6410511                        if (async)
 10512                        {
 10513                            // Send the request asynchronously if we're being called via an async path
 3210514                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 10515                        }
 10516                        else
 10517                        {
 10518                            // Send the request synchronously through the API that blocks if we're being called via a sy
 10519                            // (this is safe because the Task will complete before the user can call Wait)
 3210520                            pipeline.Send(_message, cancellationToken);
 10521                        }
 6410522                        Azure.Response _response = _message.Response;
 6410523                        cancellationToken.ThrowIfCancellationRequested();
 6410524                        return GetPageRangesAsync_CreateResponse(clientDiagnostics, _response);
 10525                    }
 10526                }
 2010527                catch (System.Exception ex)
 10528                {
 2010529                    _scope.Failed(ex);
 2010530                    throw;
 10531                }
 10532                finally
 10533                {
 6410534                    _scope.Dispose();
 10535                }
 4410536            }
 10537
 10538            /// <summary>
 10539            /// Create the PageBlob.GetPageRangesAsync request.
 10540            /// </summary>
 10541            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10542            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10543            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10544            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 10545            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10546            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 10547            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10548            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10549            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10550            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10551            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10552            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10553            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10554            /// <returns>The PageBlob.GetPageRangesAsync Message.</returns>
 10555            internal static Azure.Core.HttpMessage GetPageRangesAsync_CreateMessage(
 10556                Azure.Core.Pipeline.HttpPipeline pipeline,
 10557                System.Uri resourceUri,
 10558                string version,
 10559                string snapshot = default,
 10560                int? timeout = default,
 10561                string range = default,
 10562                string leaseId = default,
 10563                System.DateTimeOffset? ifModifiedSince = default,
 10564                System.DateTimeOffset? ifUnmodifiedSince = default,
 10565                Azure.ETag? ifMatch = default,
 10566                Azure.ETag? ifNoneMatch = default,
 10567                string ifTags = default,
 10568                string requestId = default)
 10569            {
 10570                // Validation
 6410571                if (resourceUri == null)
 10572                {
 010573                    throw new System.ArgumentNullException(nameof(resourceUri));
 10574                }
 6410575                if (version == null)
 10576                {
 010577                    throw new System.ArgumentNullException(nameof(version));
 10578                }
 10579
 10580                // Create the request
 6410581                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 6410582                Azure.Core.Request _request = _message.Request;
 10583
 10584                // Set the endpoint
 6410585                _request.Method = Azure.Core.RequestMethod.Get;
 6410586                _request.Uri.Reset(resourceUri);
 6410587                _request.Uri.AppendQuery("comp", "pagelist", escapeValue: false);
 010588                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 010589                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 10590
 10591                // Add request headers
 6410592                _request.Headers.SetValue("x-ms-version", version);
 12810593                if (range != null) { _request.Headers.SetValue("x-ms-range", range); }
 7210594                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 7210595                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 7210596                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 7210597                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 7210598                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 7210599                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 010600                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 10601
 6410602                return _message;
 10603            }
 10604
 10605            /// <summary>
 10606            /// Create the PageBlob.GetPageRangesAsync response or throw a failure exception.
 10607            /// </summary>
 10608            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 10609            /// <param name="response">The raw Response.</param>
 10610            /// <returns>The PageBlob.GetPageRangesAsync Azure.Response{Azure.Storage.Blobs.Models.PageRangesInfoInterna
 10611            internal static Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfoInternal> GetPageRangesAsync_CreateR
 10612                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10613                Azure.Response response)
 10614            {
 10615                // Process the response
 6410616                switch (response.Status)
 10617                {
 10618                    case 200:
 10619                    {
 10620                        // Create the result
 3610621                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 3610622                        Azure.Storage.Blobs.Models.PageRangesInfoInternal _value = new Azure.Storage.Blobs.Models.PageRa
 3610623                        _value.Body = Azure.Storage.Blobs.Models.PageList.FromXml(_xml.Root);
 10624
 10625                        // Get response headers
 10626                        string _header;
 3610627                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 10628                        {
 3610629                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 10630                        }
 3610631                        if (response.Headers.TryGetValue("ETag", out _header))
 10632                        {
 3610633                            _value.ETag = new Azure.ETag(_header);
 10634                        }
 3610635                        if (response.Headers.TryGetValue("x-ms-blob-content-length", out _header))
 10636                        {
 3610637                            _value.BlobContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCul
 10638                        }
 10639
 10640                        // Create the response
 3610641                        return Response.FromValue(_value, response);
 10642                    }
 10643                    case 304:
 10644                    {
 810645                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.PageRangesInfoInternal>(response);
 10646                    }
 10647                    default:
 10648                    {
 10649                        // Create the result
 2010650                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 2010651                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 10652
 2010653                        throw _value.CreateException(clientDiagnostics, response);
 10654                    }
 10655                }
 10656            }
 10657            #endregion PageBlob.GetPageRangesAsync
 10658
 10659            #region PageBlob.GetPageRangesDiffAsync
 10660            /// <summary>
 10661            /// The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were chang
 10662            /// </summary>
 10663            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 10664            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10665            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10666            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10667            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 10668            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10669            /// <param name="prevsnapshot">Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a Dat
 10670            /// <param name="prevSnapshotUrl">Optional. This header is only supported in service versions 2019-04-19 and
 10671            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 10672            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10673            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10674            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10675            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10676            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10677            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10678            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10679            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 10680            /// <param name="operationName">Operation name.</param>
 10681            /// <param name="cancellationToken">Cancellation token.</param>
 10682            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageRangesInfoInternal}</returns>
 10683            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageRangesInf
 10684                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10685                Azure.Core.Pipeline.HttpPipeline pipeline,
 10686                System.Uri resourceUri,
 10687                string version,
 10688                string snapshot = default,
 10689                int? timeout = default,
 10690                string prevsnapshot = default,
 10691                System.Uri prevSnapshotUrl = default,
 10692                string range = default,
 10693                string leaseId = default,
 10694                System.DateTimeOffset? ifModifiedSince = default,
 10695                System.DateTimeOffset? ifUnmodifiedSince = default,
 10696                Azure.ETag? ifMatch = default,
 10697                Azure.ETag? ifNoneMatch = default,
 10698                string ifTags = default,
 10699                string requestId = default,
 10700                bool async = true,
 10701                string operationName = "PageBlobClient.GetPageRangesDiff",
 10702                System.Threading.CancellationToken cancellationToken = default)
 10703            {
 12010704                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 10705                try
 10706                {
 12010707                    _scope.AddAttribute("url", resourceUri);
 12010708                    _scope.Start();
 12010709                    using (Azure.Core.HttpMessage _message = GetPageRangesDiffAsync_CreateMessage(
 12010710                        pipeline,
 12010711                        resourceUri,
 12010712                        version,
 12010713                        snapshot,
 12010714                        timeout,
 12010715                        prevsnapshot,
 12010716                        prevSnapshotUrl,
 12010717                        range,
 12010718                        leaseId,
 12010719                        ifModifiedSince,
 12010720                        ifUnmodifiedSince,
 12010721                        ifMatch,
 12010722                        ifNoneMatch,
 12010723                        ifTags,
 12010724                        requestId))
 10725                    {
 12010726                        if (async)
 10727                        {
 10728                            // Send the request asynchronously if we're being called via an async path
 6010729                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 10730                        }
 10731                        else
 10732                        {
 10733                            // Send the request synchronously through the API that blocks if we're being called via a sy
 10734                            // (this is safe because the Task will complete before the user can call Wait)
 6010735                            pipeline.Send(_message, cancellationToken);
 10736                        }
 12010737                        Azure.Response _response = _message.Response;
 12010738                        cancellationToken.ThrowIfCancellationRequested();
 12010739                        return GetPageRangesDiffAsync_CreateResponse(clientDiagnostics, _response);
 10740                    }
 10741                }
 3610742                catch (System.Exception ex)
 10743                {
 3610744                    _scope.Failed(ex);
 3610745                    throw;
 10746                }
 10747                finally
 10748                {
 12010749                    _scope.Dispose();
 10750                }
 8410751            }
 10752
 10753            /// <summary>
 10754            /// Create the PageBlob.GetPageRangesDiffAsync request.
 10755            /// </summary>
 10756            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10757            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10758            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10759            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 10760            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10761            /// <param name="prevsnapshot">Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a Dat
 10762            /// <param name="prevSnapshotUrl">Optional. This header is only supported in service versions 2019-04-19 and
 10763            /// <param name="range">Return only the bytes of the blob in the specified range.</param>
 10764            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10765            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10766            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10767            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10768            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10769            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10770            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10771            /// <returns>The PageBlob.GetPageRangesDiffAsync Message.</returns>
 10772            internal static Azure.Core.HttpMessage GetPageRangesDiffAsync_CreateMessage(
 10773                Azure.Core.Pipeline.HttpPipeline pipeline,
 10774                System.Uri resourceUri,
 10775                string version,
 10776                string snapshot = default,
 10777                int? timeout = default,
 10778                string prevsnapshot = default,
 10779                System.Uri prevSnapshotUrl = default,
 10780                string range = default,
 10781                string leaseId = default,
 10782                System.DateTimeOffset? ifModifiedSince = default,
 10783                System.DateTimeOffset? ifUnmodifiedSince = default,
 10784                Azure.ETag? ifMatch = default,
 10785                Azure.ETag? ifNoneMatch = default,
 10786                string ifTags = default,
 10787                string requestId = default)
 10788            {
 10789                // Validation
 12010790                if (resourceUri == null)
 10791                {
 010792                    throw new System.ArgumentNullException(nameof(resourceUri));
 10793                }
 12010794                if (version == null)
 10795                {
 010796                    throw new System.ArgumentNullException(nameof(version));
 10797                }
 10798
 10799                // Create the request
 12010800                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 12010801                Azure.Core.Request _request = _message.Request;
 10802
 10803                // Set the endpoint
 12010804                _request.Method = Azure.Core.RequestMethod.Get;
 12010805                _request.Uri.Reset(resourceUri);
 12010806                _request.Uri.AppendQuery("comp", "pagelist", escapeValue: false);
 14010807                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 010808                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 18010809                if (prevsnapshot != null) { _request.Uri.AppendQuery("prevsnapshot", prevsnapshot); }
 10810
 10811                // Add request headers
 12010812                _request.Headers.SetValue("x-ms-version", version);
 17210813                if (prevSnapshotUrl != null) { _request.Headers.SetValue("x-ms-previous-snapshot-url", prevSnapshotUrl.A
 24010814                if (range != null) { _request.Headers.SetValue("x-ms-range", range); }
 13610815                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 13610816                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 13610817                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 13610818                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 13610819                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 12810820                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 010821                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 10822
 12010823                return _message;
 10824            }
 10825
 10826            /// <summary>
 10827            /// Create the PageBlob.GetPageRangesDiffAsync response or throw a failure exception.
 10828            /// </summary>
 10829            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 10830            /// <param name="response">The raw Response.</param>
 10831            /// <returns>The PageBlob.GetPageRangesDiffAsync Azure.Response{Azure.Storage.Blobs.Models.PageRangesInfoInt
 10832            internal static Azure.Response<Azure.Storage.Blobs.Models.PageRangesInfoInternal> GetPageRangesDiffAsync_Cre
 10833                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10834                Azure.Response response)
 10835            {
 10836                // Process the response
 12010837                switch (response.Status)
 10838                {
 10839                    case 200:
 10840                    {
 10841                        // Create the result
 6810842                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 6810843                        Azure.Storage.Blobs.Models.PageRangesInfoInternal _value = new Azure.Storage.Blobs.Models.PageRa
 6810844                        _value.Body = Azure.Storage.Blobs.Models.PageList.FromXml(_xml.Root);
 10845
 10846                        // Get response headers
 10847                        string _header;
 6810848                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 10849                        {
 6810850                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 10851                        }
 6810852                        if (response.Headers.TryGetValue("ETag", out _header))
 10853                        {
 6810854                            _value.ETag = new Azure.ETag(_header);
 10855                        }
 6810856                        if (response.Headers.TryGetValue("x-ms-blob-content-length", out _header))
 10857                        {
 6810858                            _value.BlobContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCul
 10859                        }
 10860
 10861                        // Create the response
 6810862                        return Response.FromValue(_value, response);
 10863                    }
 10864                    case 304:
 10865                    {
 1610866                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.PageRangesInfoInternal>(response);
 10867                    }
 10868                    default:
 10869                    {
 10870                        // Create the result
 3610871                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 3610872                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 10873
 3610874                        throw _value.CreateException(clientDiagnostics, response);
 10875                    }
 10876                }
 10877            }
 10878            #endregion PageBlob.GetPageRangesDiffAsync
 10879
 10880            #region PageBlob.ResizeAsync
 10881            /// <summary>
 10882            /// Resize the Blob
 10883            /// </summary>
 10884            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 10885            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10886            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10887            /// <param name="blobContentLength">This header specifies the maximum size for the page blob, up to 1 TB. Th
 10888            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10889            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10890            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10891            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 10892            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 10893            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 10894            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 10895            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10896            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10897            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10898            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10899            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10900            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10901            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 10902            /// <param name="operationName">Operation name.</param>
 10903            /// <param name="cancellationToken">Cancellation token.</param>
 10904            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageBlobInfo}</returns>
 10905            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo>
 10906                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 10907                Azure.Core.Pipeline.HttpPipeline pipeline,
 10908                System.Uri resourceUri,
 10909                long blobContentLength,
 10910                string version,
 10911                int? timeout = default,
 10912                string leaseId = default,
 10913                string encryptionKey = default,
 10914                string encryptionKeySha256 = default,
 10915                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 10916                string encryptionScope = default,
 10917                System.DateTimeOffset? ifModifiedSince = default,
 10918                System.DateTimeOffset? ifUnmodifiedSince = default,
 10919                Azure.ETag? ifMatch = default,
 10920                Azure.ETag? ifNoneMatch = default,
 10921                string ifTags = default,
 10922                string requestId = default,
 10923                bool async = true,
 10924                string operationName = "PageBlobClient.Resize",
 10925                System.Threading.CancellationToken cancellationToken = default)
 10926            {
 6810927                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 10928                try
 10929                {
 6810930                    _scope.AddAttribute("url", resourceUri);
 6810931                    _scope.Start();
 6810932                    using (Azure.Core.HttpMessage _message = ResizeAsync_CreateMessage(
 6810933                        pipeline,
 6810934                        resourceUri,
 6810935                        blobContentLength,
 6810936                        version,
 6810937                        timeout,
 6810938                        leaseId,
 6810939                        encryptionKey,
 6810940                        encryptionKeySha256,
 6810941                        encryptionAlgorithm,
 6810942                        encryptionScope,
 6810943                        ifModifiedSince,
 6810944                        ifUnmodifiedSince,
 6810945                        ifMatch,
 6810946                        ifNoneMatch,
 6810947                        ifTags,
 6810948                        requestId))
 10949                    {
 6810950                        if (async)
 10951                        {
 10952                            // Send the request asynchronously if we're being called via an async path
 3410953                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 10954                        }
 10955                        else
 10956                        {
 10957                            // Send the request synchronously through the API that blocks if we're being called via a sy
 10958                            // (this is safe because the Task will complete before the user can call Wait)
 3410959                            pipeline.Send(_message, cancellationToken);
 10960                        }
 6810961                        Azure.Response _response = _message.Response;
 6810962                        cancellationToken.ThrowIfCancellationRequested();
 6810963                        return ResizeAsync_CreateResponse(clientDiagnostics, _response);
 10964                    }
 10965                }
 2810966                catch (System.Exception ex)
 10967                {
 2810968                    _scope.Failed(ex);
 2810969                    throw;
 10970                }
 10971                finally
 10972                {
 6810973                    _scope.Dispose();
 10974                }
 4010975            }
 10976
 10977            /// <summary>
 10978            /// Create the PageBlob.ResizeAsync request.
 10979            /// </summary>
 10980            /// <param name="pipeline">The pipeline used for sending requests.</param>
 10981            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 10982            /// <param name="blobContentLength">This header specifies the maximum size for the page blob, up to 1 TB. Th
 10983            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 10984            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 10985            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 10986            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 10987            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 10988            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 10989            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 10990            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 10991            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 10992            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 10993            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 10994            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 10995            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 10996            /// <returns>The PageBlob.ResizeAsync Message.</returns>
 10997            internal static Azure.Core.HttpMessage ResizeAsync_CreateMessage(
 10998                Azure.Core.Pipeline.HttpPipeline pipeline,
 10999                System.Uri resourceUri,
 11000                long blobContentLength,
 11001                string version,
 11002                int? timeout = default,
 11003                string leaseId = default,
 11004                string encryptionKey = default,
 11005                string encryptionKeySha256 = default,
 11006                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 11007                string encryptionScope = default,
 11008                System.DateTimeOffset? ifModifiedSince = default,
 11009                System.DateTimeOffset? ifUnmodifiedSince = default,
 11010                Azure.ETag? ifMatch = default,
 11011                Azure.ETag? ifNoneMatch = default,
 11012                string ifTags = default,
 11013                string requestId = default)
 11014            {
 11015                // Validation
 6811016                if (resourceUri == null)
 11017                {
 011018                    throw new System.ArgumentNullException(nameof(resourceUri));
 11019                }
 6811020                if (version == null)
 11021                {
 011022                    throw new System.ArgumentNullException(nameof(version));
 11023                }
 11024
 11025                // Create the request
 6811026                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 6811027                Azure.Core.Request _request = _message.Request;
 11028
 11029                // Set the endpoint
 6811030                _request.Method = Azure.Core.RequestMethod.Put;
 6811031                _request.Uri.Reset(resourceUri);
 6811032                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 011033                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 11034
 11035                // Add request headers
 6811036                _request.Headers.SetValue("x-ms-blob-content-length", blobContentLength.ToString(System.Globalization.Cu
 6811037                _request.Headers.SetValue("x-ms-version", version);
 7611038                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 7211039                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 7211040                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 7211041                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 7211042                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 7611043                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 7611044                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 7611045                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 7611046                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 7611047                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 011048                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 11049
 6811050                return _message;
 11051            }
 11052
 11053            /// <summary>
 11054            /// Create the PageBlob.ResizeAsync response or throw a failure exception.
 11055            /// </summary>
 11056            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 11057            /// <param name="response">The raw Response.</param>
 11058            /// <returns>The PageBlob.ResizeAsync Azure.Response{Azure.Storage.Blobs.Models.PageBlobInfo}.</returns>
 11059            internal static Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo> ResizeAsync_CreateResponse(
 11060                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11061                Azure.Response response)
 11062            {
 11063                // Process the response
 6811064                switch (response.Status)
 11065                {
 11066                    case 200:
 11067                    {
 11068                        // Create the result
 4011069                        Azure.Storage.Blobs.Models.PageBlobInfo _value = new Azure.Storage.Blobs.Models.PageBlobInfo();
 11070
 11071                        // Get response headers
 11072                        string _header;
 4011073                        if (response.Headers.TryGetValue("ETag", out _header))
 11074                        {
 4011075                            _value.ETag = new Azure.ETag(_header);
 11076                        }
 4011077                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 11078                        {
 4011079                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 11080                        }
 4011081                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 11082                        {
 4011083                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 11084                        }
 11085
 11086                        // Create the response
 4011087                        return Response.FromValue(_value, response);
 11088                    }
 11089                    default:
 11090                    {
 11091                        // Create the result
 2811092                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 2811093                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 11094
 2811095                        throw _value.CreateException(clientDiagnostics, response);
 11096                    }
 11097                }
 11098            }
 11099            #endregion PageBlob.ResizeAsync
 11100
 11101            #region PageBlob.UpdateSequenceNumberAsync
 11102            /// <summary>
 11103            /// Update the sequence number of the blob
 11104            /// </summary>
 11105            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 11106            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11107            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11108            /// <param name="sequenceNumberAction">Required if the x-ms-blob-sequence-number header is set for the reque
 11109            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11110            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11111            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11112            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11113            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11114            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11115            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11116            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11117            /// <param name="blobSequenceNumber">Set for page blobs only. The sequence number is a user-controlled value
 11118            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11119            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 11120            /// <param name="operationName">Operation name.</param>
 11121            /// <param name="cancellationToken">Cancellation token.</param>
 11122            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.PageBlobInfo}</returns>
 11123            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo>
 11124                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11125                Azure.Core.Pipeline.HttpPipeline pipeline,
 11126                System.Uri resourceUri,
 11127                Azure.Storage.Blobs.Models.SequenceNumberAction sequenceNumberAction,
 11128                string version,
 11129                int? timeout = default,
 11130                string leaseId = default,
 11131                System.DateTimeOffset? ifModifiedSince = default,
 11132                System.DateTimeOffset? ifUnmodifiedSince = default,
 11133                Azure.ETag? ifMatch = default,
 11134                Azure.ETag? ifNoneMatch = default,
 11135                string ifTags = default,
 11136                long? blobSequenceNumber = default,
 11137                string requestId = default,
 11138                bool async = true,
 11139                string operationName = "PageBlobClient.UpdateSequenceNumber",
 11140                System.Threading.CancellationToken cancellationToken = default)
 11141            {
 6011142                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 11143                try
 11144                {
 6011145                    _scope.AddAttribute("url", resourceUri);
 6011146                    _scope.Start();
 6011147                    using (Azure.Core.HttpMessage _message = UpdateSequenceNumberAsync_CreateMessage(
 6011148                        pipeline,
 6011149                        resourceUri,
 6011150                        sequenceNumberAction,
 6011151                        version,
 6011152                        timeout,
 6011153                        leaseId,
 6011154                        ifModifiedSince,
 6011155                        ifUnmodifiedSince,
 6011156                        ifMatch,
 6011157                        ifNoneMatch,
 6011158                        ifTags,
 6011159                        blobSequenceNumber,
 6011160                        requestId))
 11161                    {
 6011162                        if (async)
 11163                        {
 11164                            // Send the request asynchronously if we're being called via an async path
 3011165                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 11166                        }
 11167                        else
 11168                        {
 11169                            // Send the request synchronously through the API that blocks if we're being called via a sy
 11170                            // (this is safe because the Task will complete before the user can call Wait)
 3011171                            pipeline.Send(_message, cancellationToken);
 11172                        }
 6011173                        Azure.Response _response = _message.Response;
 6011174                        cancellationToken.ThrowIfCancellationRequested();
 6011175                        return UpdateSequenceNumberAsync_CreateResponse(clientDiagnostics, _response);
 11176                    }
 11177                }
 2811178                catch (System.Exception ex)
 11179                {
 2811180                    _scope.Failed(ex);
 2811181                    throw;
 11182                }
 11183                finally
 11184                {
 6011185                    _scope.Dispose();
 11186                }
 3211187            }
 11188
 11189            /// <summary>
 11190            /// Create the PageBlob.UpdateSequenceNumberAsync request.
 11191            /// </summary>
 11192            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11193            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11194            /// <param name="sequenceNumberAction">Required if the x-ms-blob-sequence-number header is set for the reque
 11195            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11196            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11197            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11198            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11199            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11200            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11201            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11202            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11203            /// <param name="blobSequenceNumber">Set for page blobs only. The sequence number is a user-controlled value
 11204            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11205            /// <returns>The PageBlob.UpdateSequenceNumberAsync Message.</returns>
 11206            internal static Azure.Core.HttpMessage UpdateSequenceNumberAsync_CreateMessage(
 11207                Azure.Core.Pipeline.HttpPipeline pipeline,
 11208                System.Uri resourceUri,
 11209                Azure.Storage.Blobs.Models.SequenceNumberAction sequenceNumberAction,
 11210                string version,
 11211                int? timeout = default,
 11212                string leaseId = default,
 11213                System.DateTimeOffset? ifModifiedSince = default,
 11214                System.DateTimeOffset? ifUnmodifiedSince = default,
 11215                Azure.ETag? ifMatch = default,
 11216                Azure.ETag? ifNoneMatch = default,
 11217                string ifTags = default,
 11218                long? blobSequenceNumber = default,
 11219                string requestId = default)
 11220            {
 11221                // Validation
 6011222                if (resourceUri == null)
 11223                {
 011224                    throw new System.ArgumentNullException(nameof(resourceUri));
 11225                }
 6011226                if (version == null)
 11227                {
 011228                    throw new System.ArgumentNullException(nameof(version));
 11229                }
 11230
 11231                // Create the request
 6011232                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 6011233                Azure.Core.Request _request = _message.Request;
 11234
 11235                // Set the endpoint
 6011236                _request.Method = Azure.Core.RequestMethod.Put;
 6011237                _request.Uri.Reset(resourceUri);
 6011238                _request.Uri.AppendQuery("comp", "properties", escapeValue: false);
 011239                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 11240
 11241                // Add request headers
 6011242                _request.Headers.SetValue("x-ms-sequence-number-action", Azure.Storage.Blobs.BlobRestClient.Serializatio
 6011243                _request.Headers.SetValue("x-ms-version", version);
 6811244                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 6811245                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 6811246                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 6811247                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 6811248                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 6811249                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 12011250                if (blobSequenceNumber != null) { _request.Headers.SetValue("x-ms-blob-sequence-number", blobSequenceNum
 011251                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 11252
 6011253                return _message;
 11254            }
 11255
 11256            /// <summary>
 11257            /// Create the PageBlob.UpdateSequenceNumberAsync response or throw a failure exception.
 11258            /// </summary>
 11259            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 11260            /// <param name="response">The raw Response.</param>
 11261            /// <returns>The PageBlob.UpdateSequenceNumberAsync Azure.Response{Azure.Storage.Blobs.Models.PageBlobInfo}.
 11262            internal static Azure.Response<Azure.Storage.Blobs.Models.PageBlobInfo> UpdateSequenceNumberAsync_CreateResp
 11263                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11264                Azure.Response response)
 11265            {
 11266                // Process the response
 6011267                switch (response.Status)
 11268                {
 11269                    case 200:
 11270                    {
 11271                        // Create the result
 3211272                        Azure.Storage.Blobs.Models.PageBlobInfo _value = new Azure.Storage.Blobs.Models.PageBlobInfo();
 11273
 11274                        // Get response headers
 11275                        string _header;
 3211276                        if (response.Headers.TryGetValue("ETag", out _header))
 11277                        {
 3211278                            _value.ETag = new Azure.ETag(_header);
 11279                        }
 3211280                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 11281                        {
 3211282                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 11283                        }
 3211284                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 11285                        {
 3211286                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 11287                        }
 11288
 11289                        // Create the response
 3211290                        return Response.FromValue(_value, response);
 11291                    }
 11292                    default:
 11293                    {
 11294                        // Create the result
 2811295                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 2811296                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 11297
 2811298                        throw _value.CreateException(clientDiagnostics, response);
 11299                    }
 11300                }
 11301            }
 11302            #endregion PageBlob.UpdateSequenceNumberAsync
 11303
 11304            #region PageBlob.CopyIncrementalAsync
 11305            /// <summary>
 11306            /// The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. The
 11307            /// </summary>
 11308            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 11309            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11310            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11311            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 11312            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11313            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11314            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11315            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11316            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11317            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11318            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11319            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11320            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 11321            /// <param name="operationName">Operation name.</param>
 11322            /// <param name="cancellationToken">Cancellation token.</param>
 11323            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}</returns>
 11324            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo>
 11325                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11326                Azure.Core.Pipeline.HttpPipeline pipeline,
 11327                System.Uri resourceUri,
 11328                System.Uri copySource,
 11329                string version,
 11330                int? timeout = default,
 11331                System.DateTimeOffset? ifModifiedSince = default,
 11332                System.DateTimeOffset? ifUnmodifiedSince = default,
 11333                Azure.ETag? ifMatch = default,
 11334                Azure.ETag? ifNoneMatch = default,
 11335                string ifTags = default,
 11336                string requestId = default,
 11337                bool async = true,
 11338                string operationName = "PageBlobClient.CopyIncremental",
 11339                System.Threading.CancellationToken cancellationToken = default)
 11340            {
 11211341                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 11342                try
 11343                {
 11211344                    _scope.AddAttribute("url", resourceUri);
 11211345                    _scope.Start();
 11211346                    using (Azure.Core.HttpMessage _message = CopyIncrementalAsync_CreateMessage(
 11211347                        pipeline,
 11211348                        resourceUri,
 11211349                        copySource,
 11211350                        version,
 11211351                        timeout,
 11211352                        ifModifiedSince,
 11211353                        ifUnmodifiedSince,
 11211354                        ifMatch,
 11211355                        ifNoneMatch,
 11211356                        ifTags,
 11211357                        requestId))
 11358                    {
 11211359                        if (async)
 11360                        {
 11361                            // Send the request asynchronously if we're being called via an async path
 5611362                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 11363                        }
 11364                        else
 11365                        {
 11366                            // Send the request synchronously through the API that blocks if we're being called via a sy
 11367                            // (this is safe because the Task will complete before the user can call Wait)
 5611368                            pipeline.Send(_message, cancellationToken);
 11369                        }
 11211370                        Azure.Response _response = _message.Response;
 11211371                        cancellationToken.ThrowIfCancellationRequested();
 11211372                        return CopyIncrementalAsync_CreateResponse(clientDiagnostics, _response);
 11373                    }
 11374                }
 2811375                catch (System.Exception ex)
 11376                {
 2811377                    _scope.Failed(ex);
 2811378                    throw;
 11379                }
 11380                finally
 11381                {
 11211382                    _scope.Dispose();
 11383                }
 8411384            }
 11385
 11386            /// <summary>
 11387            /// Create the PageBlob.CopyIncrementalAsync request.
 11388            /// </summary>
 11389            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11390            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11391            /// <param name="copySource">Specifies the name of the source page blob snapshot. This value is a URL of up 
 11392            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11393            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11394            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11395            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11396            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11397            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11398            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11399            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11400            /// <returns>The PageBlob.CopyIncrementalAsync Message.</returns>
 11401            internal static Azure.Core.HttpMessage CopyIncrementalAsync_CreateMessage(
 11402                Azure.Core.Pipeline.HttpPipeline pipeline,
 11403                System.Uri resourceUri,
 11404                System.Uri copySource,
 11405                string version,
 11406                int? timeout = default,
 11407                System.DateTimeOffset? ifModifiedSince = default,
 11408                System.DateTimeOffset? ifUnmodifiedSince = default,
 11409                Azure.ETag? ifMatch = default,
 11410                Azure.ETag? ifNoneMatch = default,
 11411                string ifTags = default,
 11412                string requestId = default)
 11413            {
 11414                // Validation
 11211415                if (resourceUri == null)
 11416                {
 011417                    throw new System.ArgumentNullException(nameof(resourceUri));
 11418                }
 11211419                if (copySource == null)
 11420                {
 011421                    throw new System.ArgumentNullException(nameof(copySource));
 11422                }
 11211423                if (version == null)
 11424                {
 011425                    throw new System.ArgumentNullException(nameof(version));
 11426                }
 11427
 11428                // Create the request
 11211429                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 11211430                Azure.Core.Request _request = _message.Request;
 11431
 11432                // Set the endpoint
 11211433                _request.Method = Azure.Core.RequestMethod.Put;
 11211434                _request.Uri.Reset(resourceUri);
 11211435                _request.Uri.AppendQuery("comp", "incrementalcopy", escapeValue: false);
 011436                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 11437
 11438                // Add request headers
 11211439                _request.Headers.SetValue("x-ms-copy-source", copySource.AbsoluteUri);
 11211440                _request.Headers.SetValue("x-ms-version", version);
 12011441                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 12011442                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 12011443                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 12011444                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 12011445                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 011446                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 11447
 11211448                return _message;
 11449            }
 11450
 11451            /// <summary>
 11452            /// Create the PageBlob.CopyIncrementalAsync response or throw a failure exception.
 11453            /// </summary>
 11454            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 11455            /// <param name="response">The raw Response.</param>
 11456            /// <returns>The PageBlob.CopyIncrementalAsync Azure.Response{Azure.Storage.Blobs.Models.BlobCopyInfo}.</ret
 11457            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo> CopyIncrementalAsync_CreateResponse(
 11458                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11459                Azure.Response response)
 11460            {
 11461                // Process the response
 11211462                switch (response.Status)
 11463                {
 11464                    case 202:
 11465                    {
 11466                        // Create the result
 8411467                        Azure.Storage.Blobs.Models.BlobCopyInfo _value = new Azure.Storage.Blobs.Models.BlobCopyInfo();
 11468
 11469                        // Get response headers
 11470                        string _header;
 8411471                        if (response.Headers.TryGetValue("ETag", out _header))
 11472                        {
 8411473                            _value.ETag = new Azure.ETag(_header);
 11474                        }
 8411475                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 11476                        {
 8411477                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 11478                        }
 8411479                        if (response.Headers.TryGetValue("x-ms-copy-id", out _header))
 11480                        {
 8411481                            _value.CopyId = _header;
 11482                        }
 8411483                        if (response.Headers.TryGetValue("x-ms-copy-status", out _header))
 11484                        {
 8411485                            _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_header
 11486                        }
 11487
 11488                        // Create the response
 8411489                        return Response.FromValue(_value, response);
 11490                    }
 11491                    default:
 11492                    {
 11493                        // Create the result
 2811494                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 2811495                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 11496
 2811497                        throw _value.CreateException(clientDiagnostics, response);
 11498                    }
 11499                }
 11500            }
 11501            #endregion PageBlob.CopyIncrementalAsync
 11502        }
 11503        #endregion PageBlob operations
 11504
 11505        #region AppendBlob operations
 11506        /// <summary>
 11507        /// AppendBlob operations for Azure Blob Storage
 11508        /// </summary>
 11509        public static partial class AppendBlob
 11510        {
 11511            #region AppendBlob.CreateAsync
 11512            /// <summary>
 11513            /// The Create Append Blob operation creates a new append blob.
 11514            /// </summary>
 11515            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 11516            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11517            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11518            /// <param name="contentLength">The length of the request.</param>
 11519            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11520            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11521            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 11522            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 11523            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 11524            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 11525            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 11526            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 11527            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11528            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 11529            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 11530            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 11531            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 11532            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 11533            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11534            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11535            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11536            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11537            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11538            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11539            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 11540            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 11541            /// <param name="operationName">Operation name.</param>
 11542            /// <param name="cancellationToken">Cancellation token.</param>
 11543            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}</returns>
 11544            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContentIn
 11545                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11546                Azure.Core.Pipeline.HttpPipeline pipeline,
 11547                System.Uri resourceUri,
 11548                long contentLength,
 11549                string version,
 11550                int? timeout = default,
 11551                string blobContentType = default,
 11552                string blobContentEncoding = default,
 11553                string blobContentLanguage = default,
 11554                byte[] blobContentHash = default,
 11555                string blobCacheControl = default,
 11556                System.Collections.Generic.IDictionary<string, string> metadata = default,
 11557                string leaseId = default,
 11558                string blobContentDisposition = default,
 11559                string encryptionKey = default,
 11560                string encryptionKeySha256 = default,
 11561                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 11562                string encryptionScope = default,
 11563                System.DateTimeOffset? ifModifiedSince = default,
 11564                System.DateTimeOffset? ifUnmodifiedSince = default,
 11565                Azure.ETag? ifMatch = default,
 11566                Azure.ETag? ifNoneMatch = default,
 11567                string ifTags = default,
 11568                string requestId = default,
 11569                string blobTagsString = default,
 11570                bool async = true,
 11571                string operationName = "AppendBlobClient.Create",
 11572                System.Threading.CancellationToken cancellationToken = default)
 11573            {
 71611574                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 11575                try
 11576                {
 71611577                    _scope.AddAttribute("url", resourceUri);
 71611578                    _scope.Start();
 71611579                    using (Azure.Core.HttpMessage _message = CreateAsync_CreateMessage(
 71611580                        pipeline,
 71611581                        resourceUri,
 71611582                        contentLength,
 71611583                        version,
 71611584                        timeout,
 71611585                        blobContentType,
 71611586                        blobContentEncoding,
 71611587                        blobContentLanguage,
 71611588                        blobContentHash,
 71611589                        blobCacheControl,
 71611590                        metadata,
 71611591                        leaseId,
 71611592                        blobContentDisposition,
 71611593                        encryptionKey,
 71611594                        encryptionKeySha256,
 71611595                        encryptionAlgorithm,
 71611596                        encryptionScope,
 71611597                        ifModifiedSince,
 71611598                        ifUnmodifiedSince,
 71611599                        ifMatch,
 71611600                        ifNoneMatch,
 71611601                        ifTags,
 71611602                        requestId,
 71611603                        blobTagsString))
 11604                    {
 71611605                        if (async)
 11606                        {
 11607                            // Send the request asynchronously if we're being called via an async path
 36411608                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 11609                        }
 11610                        else
 11611                        {
 11612                            // Send the request synchronously through the API that blocks if we're being called via a sy
 11613                            // (this is safe because the Task will complete before the user can call Wait)
 35211614                            pipeline.Send(_message, cancellationToken);
 11615                        }
 71611616                        Azure.Response _response = _message.Response;
 71611617                        cancellationToken.ThrowIfCancellationRequested();
 71611618                        return CreateAsync_CreateResponse(clientDiagnostics, _response);
 11619                    }
 11620                }
 3611621                catch (System.Exception ex)
 11622                {
 3611623                    _scope.Failed(ex);
 3611624                    throw;
 11625                }
 11626                finally
 11627                {
 71611628                    _scope.Dispose();
 11629                }
 68011630            }
 11631
 11632            /// <summary>
 11633            /// Create the AppendBlob.CreateAsync request.
 11634            /// </summary>
 11635            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11636            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11637            /// <param name="contentLength">The length of the request.</param>
 11638            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11639            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11640            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 11641            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 11642            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 11643            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 11644            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 11645            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 11646            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11647            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 11648            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 11649            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 11650            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 11651            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 11652            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11653            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11654            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11655            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11656            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11657            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11658            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 11659            /// <returns>The AppendBlob.CreateAsync Message.</returns>
 11660            internal static Azure.Core.HttpMessage CreateAsync_CreateMessage(
 11661                Azure.Core.Pipeline.HttpPipeline pipeline,
 11662                System.Uri resourceUri,
 11663                long contentLength,
 11664                string version,
 11665                int? timeout = default,
 11666                string blobContentType = default,
 11667                string blobContentEncoding = default,
 11668                string blobContentLanguage = default,
 11669                byte[] blobContentHash = default,
 11670                string blobCacheControl = default,
 11671                System.Collections.Generic.IDictionary<string, string> metadata = default,
 11672                string leaseId = default,
 11673                string blobContentDisposition = default,
 11674                string encryptionKey = default,
 11675                string encryptionKeySha256 = default,
 11676                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 11677                string encryptionScope = default,
 11678                System.DateTimeOffset? ifModifiedSince = default,
 11679                System.DateTimeOffset? ifUnmodifiedSince = default,
 11680                Azure.ETag? ifMatch = default,
 11681                Azure.ETag? ifNoneMatch = default,
 11682                string ifTags = default,
 11683                string requestId = default,
 11684                string blobTagsString = default)
 11685            {
 11686                // Validation
 71611687                if (resourceUri == null)
 11688                {
 011689                    throw new System.ArgumentNullException(nameof(resourceUri));
 11690                }
 71611691                if (version == null)
 11692                {
 011693                    throw new System.ArgumentNullException(nameof(version));
 11694                }
 11695
 11696                // Create the request
 71611697                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 71611698                Azure.Core.Request _request = _message.Request;
 11699
 11700                // Set the endpoint
 71611701                _request.Method = Azure.Core.RequestMethod.Put;
 71611702                _request.Uri.Reset(resourceUri);
 011703                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 11704
 11705                // Add request headers
 71611706                _request.Headers.SetValue("x-ms-blob-type", "AppendBlob");
 71611707                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 71611708                _request.Headers.SetValue("x-ms-version", version);
 011709                if (blobContentType != null) { _request.Headers.SetValue("x-ms-blob-content-type", blobContentType); }
 011710                if (blobContentEncoding != null) { _request.Headers.SetValue("x-ms-blob-content-encoding", blobContentEn
 011711                if (blobContentLanguage != null) { _request.Headers.SetValue("x-ms-blob-content-language", blobContentLa
 011712                if (blobContentHash != null) { _request.Headers.SetValue("x-ms-blob-content-md5", System.Convert.ToBase6
 011713                if (blobCacheControl != null) { _request.Headers.SetValue("x-ms-blob-cache-control", blobCacheControl); 
 71611714                if (metadata != null) {
 12011715                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 11716                    {
 4811717                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 11718                    }
 11719                }
 72411720                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 011721                if (blobContentDisposition != null) { _request.Headers.SetValue("x-ms-blob-content-disposition", blobCon
 74011722                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 74011723                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 74011724                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 74811725                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 72411726                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 72411727                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 72411728                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 73611729                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 72411730                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 011731                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 74411732                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 11733
 71611734                return _message;
 11735            }
 11736
 11737            /// <summary>
 11738            /// Create the AppendBlob.CreateAsync response or throw a failure exception.
 11739            /// </summary>
 11740            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 11741            /// <param name="response">The raw Response.</param>
 11742            /// <returns>The AppendBlob.CreateAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}.</returns
 11743            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CreateAsync_CreateResponse(
 11744                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11745                Azure.Response response)
 11746            {
 11747                // Process the response
 71611748                switch (response.Status)
 11749                {
 11750                    case 201:
 11751                    {
 11752                        // Create the result
 68011753                        Azure.Storage.Blobs.Models.BlobContentInfo _value = new Azure.Storage.Blobs.Models.BlobContentIn
 11754
 11755                        // Get response headers
 11756                        string _header;
 68011757                        if (response.Headers.TryGetValue("ETag", out _header))
 11758                        {
 68011759                            _value.ETag = new Azure.ETag(_header);
 11760                        }
 68011761                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 11762                        {
 68011763                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 11764                        }
 68011765                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 11766                        {
 011767                            _value.ContentHash = System.Convert.FromBase64String(_header);
 11768                        }
 68011769                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 11770                        {
 14811771                            _value.VersionId = _header;
 11772                        }
 68011773                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 11774                        {
 2411775                            _value.EncryptionKeySha256 = _header;
 11776                        }
 68011777                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 11778                        {
 3211779                            _value.EncryptionScope = _header;
 11780                        }
 68011781                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 11782                        {
 011783                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 11784                        }
 11785
 11786                        // Create the response
 68011787                        return Response.FromValue(_value, response);
 11788                    }
 11789                    default:
 11790                    {
 11791                        // Create the result
 3611792                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 3611793                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 11794
 3611795                        throw _value.CreateException(clientDiagnostics, response);
 11796                    }
 11797                }
 11798            }
 11799            #endregion AppendBlob.CreateAsync
 11800
 11801            #region AppendBlob.AppendBlockAsync
 11802            /// <summary>
 11803            /// The Append Block operation commits a new block of data to the end of an existing append blob. The Append
 11804            /// </summary>
 11805            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 11806            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11807            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11808            /// <param name="body">Initial data</param>
 11809            /// <param name="contentLength">The length of the request.</param>
 11810            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11811            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11812            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 11813            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 11814            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11815            /// <param name="maxSize">Optional conditional header. The max length in bytes permitted for the append blob
 11816            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 11817            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 11818            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 11819            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 11820            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 11821            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11822            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11823            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11824            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11825            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11826            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11827            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 11828            /// <param name="operationName">Operation name.</param>
 11829            /// <param name="cancellationToken">Cancellation token.</param>
 11830            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobAppendInfo}</returns>
 11831            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInf
 11832                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 11833                Azure.Core.Pipeline.HttpPipeline pipeline,
 11834                System.Uri resourceUri,
 11835                System.IO.Stream body,
 11836                long contentLength,
 11837                string version,
 11838                int? timeout = default,
 11839                byte[] transactionalContentHash = default,
 11840                byte[] transactionalContentCrc64 = default,
 11841                string leaseId = default,
 11842                long? maxSize = default,
 11843                long? appendPosition = default,
 11844                string encryptionKey = default,
 11845                string encryptionKeySha256 = default,
 11846                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 11847                string encryptionScope = default,
 11848                System.DateTimeOffset? ifModifiedSince = default,
 11849                System.DateTimeOffset? ifUnmodifiedSince = default,
 11850                Azure.ETag? ifMatch = default,
 11851                Azure.ETag? ifNoneMatch = default,
 11852                string ifTags = default,
 11853                string requestId = default,
 11854                bool async = true,
 11855                string operationName = "AppendBlobClient.AppendBlock",
 11856                System.Threading.CancellationToken cancellationToken = default)
 11857            {
 22811858                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 11859                try
 11860                {
 22811861                    _scope.AddAttribute("url", resourceUri);
 22811862                    _scope.Start();
 22811863                    using (Azure.Core.HttpMessage _message = AppendBlockAsync_CreateMessage(
 22811864                        pipeline,
 22811865                        resourceUri,
 22811866                        body,
 22811867                        contentLength,
 22811868                        version,
 22811869                        timeout,
 22811870                        transactionalContentHash,
 22811871                        transactionalContentCrc64,
 22811872                        leaseId,
 22811873                        maxSize,
 22811874                        appendPosition,
 22811875                        encryptionKey,
 22811876                        encryptionKeySha256,
 22811877                        encryptionAlgorithm,
 22811878                        encryptionScope,
 22811879                        ifModifiedSince,
 22811880                        ifUnmodifiedSince,
 22811881                        ifMatch,
 22811882                        ifNoneMatch,
 22811883                        ifTags,
 22811884                        requestId))
 11885                    {
 22411886                        if (async)
 11887                        {
 11888                            // Send the request asynchronously if we're being called via an async path
 11611889                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 11890                        }
 11891                        else
 11892                        {
 11893                            // Send the request synchronously through the API that blocks if we're being called via a sy
 11894                            // (this is safe because the Task will complete before the user can call Wait)
 10811895                            pipeline.Send(_message, cancellationToken);
 11896                        }
 22411897                        Azure.Response _response = _message.Response;
 22411898                        cancellationToken.ThrowIfCancellationRequested();
 22411899                        return AppendBlockAsync_CreateResponse(clientDiagnostics, _response);
 11900                    }
 11901                }
 4411902                catch (System.Exception ex)
 11903                {
 4411904                    _scope.Failed(ex);
 4411905                    throw;
 11906                }
 11907                finally
 11908                {
 22811909                    _scope.Dispose();
 11910                }
 18411911            }
 11912
 11913            /// <summary>
 11914            /// Create the AppendBlob.AppendBlockAsync request.
 11915            /// </summary>
 11916            /// <param name="pipeline">The pipeline used for sending requests.</param>
 11917            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 11918            /// <param name="body">Initial data</param>
 11919            /// <param name="contentLength">The length of the request.</param>
 11920            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 11921            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 11922            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 11923            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 11924            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 11925            /// <param name="maxSize">Optional conditional header. The max length in bytes permitted for the append blob
 11926            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 11927            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 11928            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 11929            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 11930            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 11931            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 11932            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 11933            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 11934            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 11935            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 11936            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 11937            /// <returns>The AppendBlob.AppendBlockAsync Message.</returns>
 11938            internal static Azure.Core.HttpMessage AppendBlockAsync_CreateMessage(
 11939                Azure.Core.Pipeline.HttpPipeline pipeline,
 11940                System.Uri resourceUri,
 11941                System.IO.Stream body,
 11942                long contentLength,
 11943                string version,
 11944                int? timeout = default,
 11945                byte[] transactionalContentHash = default,
 11946                byte[] transactionalContentCrc64 = default,
 11947                string leaseId = default,
 11948                long? maxSize = default,
 11949                long? appendPosition = default,
 11950                string encryptionKey = default,
 11951                string encryptionKeySha256 = default,
 11952                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 11953                string encryptionScope = default,
 11954                System.DateTimeOffset? ifModifiedSince = default,
 11955                System.DateTimeOffset? ifUnmodifiedSince = default,
 11956                Azure.ETag? ifMatch = default,
 11957                Azure.ETag? ifNoneMatch = default,
 11958                string ifTags = default,
 11959                string requestId = default)
 11960            {
 11961                // Validation
 22811962                if (resourceUri == null)
 11963                {
 011964                    throw new System.ArgumentNullException(nameof(resourceUri));
 11965                }
 22811966                if (body == null)
 11967                {
 411968                    throw new System.ArgumentNullException(nameof(body));
 11969                }
 22411970                if (version == null)
 11971                {
 011972                    throw new System.ArgumentNullException(nameof(version));
 11973                }
 11974
 11975                // Create the request
 22411976                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 22411977                Azure.Core.Request _request = _message.Request;
 11978
 11979                // Set the endpoint
 22411980                _request.Method = Azure.Core.RequestMethod.Put;
 22411981                _request.Uri.Reset(resourceUri);
 22411982                _request.Uri.AppendQuery("comp", "appendblock", escapeValue: false);
 011983                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 11984
 11985                // Add request headers
 22411986                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 22411987                _request.Headers.SetValue("x-ms-version", version);
 23211988                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 011989                if (transactionalContentCrc64 != null) { _request.Headers.SetValue("x-ms-content-crc64", System.Convert.
 23211990                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 23211991                if (maxSize != null) { _request.Headers.SetValue("x-ms-blob-condition-maxsize", maxSize.Value.ToString(S
 23211992                if (appendPosition != null) { _request.Headers.SetValue("x-ms-blob-condition-appendpos", appendPosition.
 22811993                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 22811994                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 22811995                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 22811996                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 23211997                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 23211998                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 23211999                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 23212000                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 23212001                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 012002                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 12003
 12004                // Create the body
 22412005                _request.Content = Azure.Core.RequestContent.Create(body);
 12006
 22412007                return _message;
 12008            }
 12009
 12010            /// <summary>
 12011            /// Create the AppendBlob.AppendBlockAsync response or throw a failure exception.
 12012            /// </summary>
 12013            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 12014            /// <param name="response">The raw Response.</param>
 12015            /// <returns>The AppendBlob.AppendBlockAsync Azure.Response{Azure.Storage.Blobs.Models.BlobAppendInfo}.</ret
 12016            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInfo> AppendBlockAsync_CreateResponse(
 12017                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12018                Azure.Response response)
 12019            {
 12020                // Process the response
 22412021                switch (response.Status)
 12022                {
 12023                    case 201:
 12024                    {
 12025                        // Create the result
 18412026                        Azure.Storage.Blobs.Models.BlobAppendInfo _value = new Azure.Storage.Blobs.Models.BlobAppendInfo
 12027
 12028                        // Get response headers
 12029                        string _header;
 18412030                        if (response.Headers.TryGetValue("ETag", out _header))
 12031                        {
 18412032                            _value.ETag = new Azure.ETag(_header);
 12033                        }
 18412034                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 12035                        {
 18412036                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 12037                        }
 18412038                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 12039                        {
 412040                            _value.ContentHash = System.Convert.FromBase64String(_header);
 12041                        }
 18412042                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 12043                        {
 18012044                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 12045                        }
 18412046                        if (response.Headers.TryGetValue("x-ms-blob-append-offset", out _header))
 12047                        {
 18412048                            _value.BlobAppendOffset = _header;
 12049                        }
 18412050                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 12051                        {
 18412052                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 12053                        }
 18412054                        if (response.Headers.TryGetValue("x-ms-request-server-encrypted", out _header))
 12055                        {
 18412056                            _value.IsServerEncrypted = bool.Parse(_header);
 12057                        }
 18412058                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 12059                        {
 412060                            _value.EncryptionKeySha256 = _header;
 12061                        }
 18412062                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 12063                        {
 412064                            _value.EncryptionScope = _header;
 12065                        }
 12066
 12067                        // Create the response
 18412068                        return Response.FromValue(_value, response);
 12069                    }
 12070                    default:
 12071                    {
 12072                        // Create the result
 4012073                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4012074                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 12075
 4012076                        throw _value.CreateException(clientDiagnostics, response);
 12077                    }
 12078                }
 12079            }
 12080            #endregion AppendBlob.AppendBlockAsync
 12081
 12082            #region AppendBlob.AppendBlockFromUriAsync
 12083            /// <summary>
 12084            /// The Append Block operation commits a new block of data to the end of an existing append blob where the c
 12085            /// </summary>
 12086            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 12087            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12088            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12089            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 12090            /// <param name="contentLength">The length of the request.</param>
 12091            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12092            /// <param name="sourceRange">Bytes of source data in the specified range.</param>
 12093            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 12094            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 12095            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12096            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 12097            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 12098            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 12099            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 12100            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 12101            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12102            /// <param name="maxSize">Optional conditional header. The max length in bytes permitted for the append blob
 12103            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 12104            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12105            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12106            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12107            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12108            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 12109            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 12110            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 12111            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 12112            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 12113            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12114            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 12115            /// <param name="operationName">Operation name.</param>
 12116            /// <param name="cancellationToken">Cancellation token.</param>
 12117            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobAppendInfo}</returns>
 12118            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInf
 12119                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12120                Azure.Core.Pipeline.HttpPipeline pipeline,
 12121                System.Uri resourceUri,
 12122                System.Uri sourceUri,
 12123                long contentLength,
 12124                string version,
 12125                string sourceRange = default,
 12126                byte[] sourceContentHash = default,
 12127                byte[] sourceContentcrc64 = default,
 12128                int? timeout = default,
 12129                byte[] transactionalContentHash = default,
 12130                string encryptionKey = default,
 12131                string encryptionKeySha256 = default,
 12132                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 12133                string encryptionScope = default,
 12134                string leaseId = default,
 12135                long? maxSize = default,
 12136                long? appendPosition = default,
 12137                System.DateTimeOffset? ifModifiedSince = default,
 12138                System.DateTimeOffset? ifUnmodifiedSince = default,
 12139                Azure.ETag? ifMatch = default,
 12140                Azure.ETag? ifNoneMatch = default,
 12141                string ifTags = default,
 12142                System.DateTimeOffset? sourceIfModifiedSince = default,
 12143                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 12144                Azure.ETag? sourceIfMatch = default,
 12145                Azure.ETag? sourceIfNoneMatch = default,
 12146                string requestId = default,
 12147                bool async = true,
 12148                string operationName = "AppendBlobClient.AppendBlockFromUri",
 12149                System.Threading.CancellationToken cancellationToken = default)
 12150            {
 12812151                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 12152                try
 12153                {
 12812154                    _scope.AddAttribute("url", resourceUri);
 12812155                    _scope.Start();
 12812156                    using (Azure.Core.HttpMessage _message = AppendBlockFromUriAsync_CreateMessage(
 12812157                        pipeline,
 12812158                        resourceUri,
 12812159                        sourceUri,
 12812160                        contentLength,
 12812161                        version,
 12812162                        sourceRange,
 12812163                        sourceContentHash,
 12812164                        sourceContentcrc64,
 12812165                        timeout,
 12812166                        transactionalContentHash,
 12812167                        encryptionKey,
 12812168                        encryptionKeySha256,
 12812169                        encryptionAlgorithm,
 12812170                        encryptionScope,
 12812171                        leaseId,
 12812172                        maxSize,
 12812173                        appendPosition,
 12812174                        ifModifiedSince,
 12812175                        ifUnmodifiedSince,
 12812176                        ifMatch,
 12812177                        ifNoneMatch,
 12812178                        ifTags,
 12812179                        sourceIfModifiedSince,
 12812180                        sourceIfUnmodifiedSince,
 12812181                        sourceIfMatch,
 12812182                        sourceIfNoneMatch,
 12812183                        requestId))
 12184                    {
 12812185                        if (async)
 12186                        {
 12187                            // Send the request asynchronously if we're being called via an async path
 6412188                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 12189                        }
 12190                        else
 12191                        {
 12192                            // Send the request synchronously through the API that blocks if we're being called via a sy
 12193                            // (this is safe because the Task will complete before the user can call Wait)
 6412194                            pipeline.Send(_message, cancellationToken);
 12195                        }
 12812196                        Azure.Response _response = _message.Response;
 12812197                        cancellationToken.ThrowIfCancellationRequested();
 12812198                        return AppendBlockFromUriAsync_CreateResponse(clientDiagnostics, _response);
 12199                    }
 12200                }
 5212201                catch (System.Exception ex)
 12202                {
 5212203                    _scope.Failed(ex);
 5212204                    throw;
 12205                }
 12206                finally
 12207                {
 12812208                    _scope.Dispose();
 12209                }
 7612210            }
 12211
 12212            /// <summary>
 12213            /// Create the AppendBlob.AppendBlockFromUriAsync request.
 12214            /// </summary>
 12215            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12216            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12217            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 12218            /// <param name="contentLength">The length of the request.</param>
 12219            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12220            /// <param name="sourceRange">Bytes of source data in the specified range.</param>
 12221            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 12222            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 12223            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12224            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 12225            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 12226            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 12227            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 12228            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 12229            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12230            /// <param name="maxSize">Optional conditional header. The max length in bytes permitted for the append blob
 12231            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 12232            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12233            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12234            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12235            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12236            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 12237            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 12238            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 12239            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 12240            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 12241            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12242            /// <returns>The AppendBlob.AppendBlockFromUriAsync Message.</returns>
 12243            internal static Azure.Core.HttpMessage AppendBlockFromUriAsync_CreateMessage(
 12244                Azure.Core.Pipeline.HttpPipeline pipeline,
 12245                System.Uri resourceUri,
 12246                System.Uri sourceUri,
 12247                long contentLength,
 12248                string version,
 12249                string sourceRange = default,
 12250                byte[] sourceContentHash = default,
 12251                byte[] sourceContentcrc64 = default,
 12252                int? timeout = default,
 12253                byte[] transactionalContentHash = default,
 12254                string encryptionKey = default,
 12255                string encryptionKeySha256 = default,
 12256                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 12257                string encryptionScope = default,
 12258                string leaseId = default,
 12259                long? maxSize = default,
 12260                long? appendPosition = default,
 12261                System.DateTimeOffset? ifModifiedSince = default,
 12262                System.DateTimeOffset? ifUnmodifiedSince = default,
 12263                Azure.ETag? ifMatch = default,
 12264                Azure.ETag? ifNoneMatch = default,
 12265                string ifTags = default,
 12266                System.DateTimeOffset? sourceIfModifiedSince = default,
 12267                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 12268                Azure.ETag? sourceIfMatch = default,
 12269                Azure.ETag? sourceIfNoneMatch = default,
 12270                string requestId = default)
 12271            {
 12272                // Validation
 12812273                if (resourceUri == null)
 12274                {
 012275                    throw new System.ArgumentNullException(nameof(resourceUri));
 12276                }
 12812277                if (sourceUri == null)
 12278                {
 012279                    throw new System.ArgumentNullException(nameof(sourceUri));
 12280                }
 12812281                if (version == null)
 12282                {
 012283                    throw new System.ArgumentNullException(nameof(version));
 12284                }
 12285
 12286                // Create the request
 12812287                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 12812288                Azure.Core.Request _request = _message.Request;
 12289
 12290                // Set the endpoint
 12812291                _request.Method = Azure.Core.RequestMethod.Put;
 12812292                _request.Uri.Reset(resourceUri);
 12812293                _request.Uri.AppendQuery("comp", "appendblock", escapeValue: false);
 012294                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 12295
 12296                // Add request headers
 12812297                _request.Headers.SetValue("x-ms-copy-source", sourceUri.AbsoluteUri);
 12812298                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 12812299                _request.Headers.SetValue("x-ms-version", version);
 25612300                if (sourceRange != null) { _request.Headers.SetValue("x-ms-source-range", sourceRange); }
 13612301                if (sourceContentHash != null) { _request.Headers.SetValue("x-ms-source-content-md5", System.Convert.ToB
 012302                if (sourceContentcrc64 != null) { _request.Headers.SetValue("x-ms-source-content-crc64", System.Convert.
 012303                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 13212304                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 13212305                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 13212306                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 13212307                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 13612308                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 13612309                if (maxSize != null) { _request.Headers.SetValue("x-ms-blob-condition-maxsize", maxSize.Value.ToString(S
 13612310                if (appendPosition != null) { _request.Headers.SetValue("x-ms-blob-condition-appendpos", appendPosition.
 13612311                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 13612312                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 13612313                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 13612314                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 13612315                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 13612316                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 13612317                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 13612318                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 13612319                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 012320                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 12321
 12812322                return _message;
 12323            }
 12324
 12325            /// <summary>
 12326            /// Create the AppendBlob.AppendBlockFromUriAsync response or throw a failure exception.
 12327            /// </summary>
 12328            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 12329            /// <param name="response">The raw Response.</param>
 12330            /// <returns>The AppendBlob.AppendBlockFromUriAsync Azure.Response{Azure.Storage.Blobs.Models.BlobAppendInfo
 12331            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobAppendInfo> AppendBlockFromUriAsync_CreateResp
 12332                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12333                Azure.Response response)
 12334            {
 12335                // Process the response
 12812336                switch (response.Status)
 12337                {
 12338                    case 201:
 12339                    {
 12340                        // Create the result
 7612341                        Azure.Storage.Blobs.Models.BlobAppendInfo _value = new Azure.Storage.Blobs.Models.BlobAppendInfo
 12342
 12343                        // Get response headers
 12344                        string _header;
 7612345                        if (response.Headers.TryGetValue("ETag", out _header))
 12346                        {
 7612347                            _value.ETag = new Azure.ETag(_header);
 12348                        }
 7612349                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 12350                        {
 7612351                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 12352                        }
 7612353                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 12354                        {
 7212355                            _value.ContentHash = System.Convert.FromBase64String(_header);
 12356                        }
 7612357                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 12358                        {
 412359                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 12360                        }
 7612361                        if (response.Headers.TryGetValue("x-ms-blob-append-offset", out _header))
 12362                        {
 7612363                            _value.BlobAppendOffset = _header;
 12364                        }
 7612365                        if (response.Headers.TryGetValue("x-ms-blob-committed-block-count", out _header))
 12366                        {
 7612367                            _value.BlobCommittedBlockCount = int.Parse(_header, System.Globalization.CultureInfo.Invaria
 12368                        }
 7612369                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 12370                        {
 412371                            _value.EncryptionKeySha256 = _header;
 12372                        }
 7612373                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 12374                        {
 412375                            _value.EncryptionScope = _header;
 12376                        }
 7612377                        if (response.Headers.TryGetValue("x-ms-request-server-encrypted", out _header))
 12378                        {
 7612379                            _value.IsServerEncrypted = bool.Parse(_header);
 12380                        }
 12381
 12382                        // Create the response
 7612383                        return Response.FromValue(_value, response);
 12384                    }
 12385                    case 304:
 12386                    {
 12387                        // Create the result
 812388                        Azure.Storage.Blobs.Models.ConditionNotMetError _value = new Azure.Storage.Blobs.Models.Conditio
 12389
 12390                        // Get response headers
 12391                        string _header;
 812392                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 12393                        {
 812394                            _value.ErrorCode = _header;
 12395                        }
 12396
 812397                        throw _value.CreateException(clientDiagnostics, response);
 12398                    }
 12399                    default:
 12400                    {
 12401                        // Create the result
 4412402                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4412403                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 12404
 4412405                        throw _value.CreateException(clientDiagnostics, response);
 12406                    }
 12407                }
 12408            }
 12409            #endregion AppendBlob.AppendBlockFromUriAsync
 12410
 12411            #region AppendBlob.SealAsync
 12412            /// <summary>
 12413            /// The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version 2019-12
 12414            /// </summary>
 12415            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 12416            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12417            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12418            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12419            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12420            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12421            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12422            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12423            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12424            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12425            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12426            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 12427            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 12428            /// <param name="operationName">Operation name.</param>
 12429            /// <param name="cancellationToken">Cancellation token.</param>
 12430            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.AppendBlobSealInternal}</returns>
 12431            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.AppendBlobSea
 12432                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12433                Azure.Core.Pipeline.HttpPipeline pipeline,
 12434                System.Uri resourceUri,
 12435                string version,
 12436                int? timeout = default,
 12437                string requestId = default,
 12438                string leaseId = default,
 12439                System.DateTimeOffset? ifModifiedSince = default,
 12440                System.DateTimeOffset? ifUnmodifiedSince = default,
 12441                Azure.ETag? ifMatch = default,
 12442                Azure.ETag? ifNoneMatch = default,
 12443                long? appendPosition = default,
 12444                bool async = true,
 12445                string operationName = "AppendBlobClient.Seal",
 12446                System.Threading.CancellationToken cancellationToken = default)
 12447            {
 6012448                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 12449                try
 12450                {
 6012451                    _scope.AddAttribute("url", resourceUri);
 6012452                    _scope.Start();
 6012453                    using (Azure.Core.HttpMessage _message = SealAsync_CreateMessage(
 6012454                        pipeline,
 6012455                        resourceUri,
 6012456                        version,
 6012457                        timeout,
 6012458                        requestId,
 6012459                        leaseId,
 6012460                        ifModifiedSince,
 6012461                        ifUnmodifiedSince,
 6012462                        ifMatch,
 6012463                        ifNoneMatch,
 6012464                        appendPosition))
 12465                    {
 6012466                        if (async)
 12467                        {
 12468                            // Send the request asynchronously if we're being called via an async path
 3012469                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 12470                        }
 12471                        else
 12472                        {
 12473                            // Send the request synchronously through the API that blocks if we're being called via a sy
 12474                            // (this is safe because the Task will complete before the user can call Wait)
 3012475                            pipeline.Send(_message, cancellationToken);
 12476                        }
 6012477                        Azure.Response _response = _message.Response;
 6012478                        cancellationToken.ThrowIfCancellationRequested();
 6012479                        return SealAsync_CreateResponse(clientDiagnostics, _response);
 12480                    }
 12481                }
 2812482                catch (System.Exception ex)
 12483                {
 2812484                    _scope.Failed(ex);
 2812485                    throw;
 12486                }
 12487                finally
 12488                {
 6012489                    _scope.Dispose();
 12490                }
 3212491            }
 12492
 12493            /// <summary>
 12494            /// Create the AppendBlob.SealAsync request.
 12495            /// </summary>
 12496            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12497            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12498            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12499            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12500            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12501            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12502            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12503            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12504            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12505            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12506            /// <param name="appendPosition">Optional conditional header, used only for the Append Block operation. A nu
 12507            /// <returns>The AppendBlob.SealAsync Message.</returns>
 12508            internal static Azure.Core.HttpMessage SealAsync_CreateMessage(
 12509                Azure.Core.Pipeline.HttpPipeline pipeline,
 12510                System.Uri resourceUri,
 12511                string version,
 12512                int? timeout = default,
 12513                string requestId = default,
 12514                string leaseId = default,
 12515                System.DateTimeOffset? ifModifiedSince = default,
 12516                System.DateTimeOffset? ifUnmodifiedSince = default,
 12517                Azure.ETag? ifMatch = default,
 12518                Azure.ETag? ifNoneMatch = default,
 12519                long? appendPosition = default)
 12520            {
 12521                // Validation
 6012522                if (resourceUri == null)
 12523                {
 012524                    throw new System.ArgumentNullException(nameof(resourceUri));
 12525                }
 6012526                if (version == null)
 12527                {
 012528                    throw new System.ArgumentNullException(nameof(version));
 12529                }
 12530
 12531                // Create the request
 6012532                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 6012533                Azure.Core.Request _request = _message.Request;
 12534
 12535                // Set the endpoint
 6012536                _request.Method = Azure.Core.RequestMethod.Put;
 6012537                _request.Uri.Reset(resourceUri);
 6012538                _request.Uri.AppendQuery("comp", "seal", escapeValue: false);
 012539                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 12540
 12541                // Add request headers
 6012542                _request.Headers.SetValue("x-ms-version", version);
 012543                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 6812544                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 6812545                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 6812546                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 6812547                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 6812548                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 6812549                if (appendPosition != null) { _request.Headers.SetValue("x-ms-blob-condition-appendpos", appendPosition.
 12550
 6012551                return _message;
 12552            }
 12553
 12554            /// <summary>
 12555            /// Create the AppendBlob.SealAsync response or throw a failure exception.
 12556            /// </summary>
 12557            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 12558            /// <param name="response">The raw Response.</param>
 12559            /// <returns>The AppendBlob.SealAsync Azure.Response{Azure.Storage.Blobs.Models.AppendBlobSealInternal}.</re
 12560            internal static Azure.Response<Azure.Storage.Blobs.Models.AppendBlobSealInternal> SealAsync_CreateResponse(
 12561                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12562                Azure.Response response)
 12563            {
 12564                // Process the response
 6012565                switch (response.Status)
 12566                {
 12567                    case 200:
 12568                    {
 12569                        // Create the result
 3212570                        Azure.Storage.Blobs.Models.AppendBlobSealInternal _value = new Azure.Storage.Blobs.Models.Append
 12571
 12572                        // Get response headers
 12573                        string _header;
 3212574                        if (response.Headers.TryGetValue("ETag", out _header))
 12575                        {
 3212576                            _value.ETag = new Azure.ETag(_header);
 12577                        }
 3212578                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 12579                        {
 3212580                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 12581                        }
 3212582                        if (response.Headers.TryGetValue("x-ms-blob-sealed", out _header))
 12583                        {
 3212584                            _value.IsSealed = bool.Parse(_header);
 12585                        }
 12586
 12587                        // Create the response
 3212588                        return Response.FromValue(_value, response);
 12589                    }
 12590                    default:
 12591                    {
 12592                        // Create the result
 2812593                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 2812594                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 12595
 2812596                        throw _value.CreateException(clientDiagnostics, response);
 12597                    }
 12598                }
 12599            }
 12600            #endregion AppendBlob.SealAsync
 12601        }
 12602        #endregion AppendBlob operations
 12603
 12604        #region BlockBlob operations
 12605        /// <summary>
 12606        /// BlockBlob operations for Azure Blob Storage
 12607        /// </summary>
 12608        public static partial class BlockBlob
 12609        {
 12610            #region BlockBlob.UploadAsync
 12611            /// <summary>
 12612            /// The Upload Block Blob operation updates the content of an existing block blob. Updating an existing bloc
 12613            /// </summary>
 12614            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 12615            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12616            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12617            /// <param name="body">Initial data</param>
 12618            /// <param name="contentLength">The length of the request.</param>
 12619            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12620            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12621            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 12622            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 12623            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 12624            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 12625            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 12626            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 12627            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 12628            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12629            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 12630            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 12631            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 12632            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 12633            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 12634            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 12635            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12636            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12637            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12638            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12639            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 12640            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12641            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 12642            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 12643            /// <param name="operationName">Operation name.</param>
 12644            /// <param name="cancellationToken">Cancellation token.</param>
 12645            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}</returns>
 12646            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContentIn
 12647                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12648                Azure.Core.Pipeline.HttpPipeline pipeline,
 12649                System.Uri resourceUri,
 12650                System.IO.Stream body,
 12651                long contentLength,
 12652                string version,
 12653                int? timeout = default,
 12654                byte[] transactionalContentHash = default,
 12655                string blobContentType = default,
 12656                string blobContentEncoding = default,
 12657                string blobContentLanguage = default,
 12658                byte[] blobContentHash = default,
 12659                string blobCacheControl = default,
 12660                System.Collections.Generic.IDictionary<string, string> metadata = default,
 12661                string leaseId = default,
 12662                string blobContentDisposition = default,
 12663                string encryptionKey = default,
 12664                string encryptionKeySha256 = default,
 12665                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 12666                string encryptionScope = default,
 12667                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 12668                System.DateTimeOffset? ifModifiedSince = default,
 12669                System.DateTimeOffset? ifUnmodifiedSince = default,
 12670                Azure.ETag? ifMatch = default,
 12671                Azure.ETag? ifNoneMatch = default,
 12672                string ifTags = default,
 12673                string requestId = default,
 12674                string blobTagsString = default,
 12675                bool async = true,
 12676                string operationName = "BlockBlobClient.Upload",
 12677                System.Threading.CancellationToken cancellationToken = default)
 12678            {
 330012679                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 12680                try
 12681                {
 330012682                    _scope.AddAttribute("url", resourceUri);
 330012683                    _scope.Start();
 330012684                    using (Azure.Core.HttpMessage _message = UploadAsync_CreateMessage(
 330012685                        pipeline,
 330012686                        resourceUri,
 330012687                        body,
 330012688                        contentLength,
 330012689                        version,
 330012690                        timeout,
 330012691                        transactionalContentHash,
 330012692                        blobContentType,
 330012693                        blobContentEncoding,
 330012694                        blobContentLanguage,
 330012695                        blobContentHash,
 330012696                        blobCacheControl,
 330012697                        metadata,
 330012698                        leaseId,
 330012699                        blobContentDisposition,
 330012700                        encryptionKey,
 330012701                        encryptionKeySha256,
 330012702                        encryptionAlgorithm,
 330012703                        encryptionScope,
 330012704                        tier,
 330012705                        ifModifiedSince,
 330012706                        ifUnmodifiedSince,
 330012707                        ifMatch,
 330012708                        ifNoneMatch,
 330012709                        ifTags,
 330012710                        requestId,
 330012711                        blobTagsString))
 12712                    {
 330012713                        if (async)
 12714                        {
 12715                            // Send the request asynchronously if we're being called via an async path
 168212716                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 12717                        }
 12718                        else
 12719                        {
 12720                            // Send the request synchronously through the API that blocks if we're being called via a sy
 12721                            // (this is safe because the Task will complete before the user can call Wait)
 161812722                            pipeline.Send(_message, cancellationToken);
 12723                        }
 330012724                        Azure.Response _response = _message.Response;
 330012725                        cancellationToken.ThrowIfCancellationRequested();
 330012726                        return UploadAsync_CreateResponse(clientDiagnostics, _response);
 12727                    }
 12728                }
 4812729                catch (System.Exception ex)
 12730                {
 4812731                    _scope.Failed(ex);
 4812732                    throw;
 12733                }
 12734                finally
 12735                {
 330012736                    _scope.Dispose();
 12737                }
 325212738            }
 12739
 12740            /// <summary>
 12741            /// Create the BlockBlob.UploadAsync request.
 12742            /// </summary>
 12743            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12744            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12745            /// <param name="body">Initial data</param>
 12746            /// <param name="contentLength">The length of the request.</param>
 12747            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12748            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12749            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 12750            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 12751            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 12752            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 12753            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 12754            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 12755            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 12756            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12757            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 12758            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 12759            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 12760            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 12761            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 12762            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 12763            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 12764            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 12765            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 12766            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 12767            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 12768            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12769            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 12770            /// <returns>The BlockBlob.UploadAsync Message.</returns>
 12771            internal static Azure.Core.HttpMessage UploadAsync_CreateMessage(
 12772                Azure.Core.Pipeline.HttpPipeline pipeline,
 12773                System.Uri resourceUri,
 12774                System.IO.Stream body,
 12775                long contentLength,
 12776                string version,
 12777                int? timeout = default,
 12778                byte[] transactionalContentHash = default,
 12779                string blobContentType = default,
 12780                string blobContentEncoding = default,
 12781                string blobContentLanguage = default,
 12782                byte[] blobContentHash = default,
 12783                string blobCacheControl = default,
 12784                System.Collections.Generic.IDictionary<string, string> metadata = default,
 12785                string leaseId = default,
 12786                string blobContentDisposition = default,
 12787                string encryptionKey = default,
 12788                string encryptionKeySha256 = default,
 12789                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 12790                string encryptionScope = default,
 12791                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 12792                System.DateTimeOffset? ifModifiedSince = default,
 12793                System.DateTimeOffset? ifUnmodifiedSince = default,
 12794                Azure.ETag? ifMatch = default,
 12795                Azure.ETag? ifNoneMatch = default,
 12796                string ifTags = default,
 12797                string requestId = default,
 12798                string blobTagsString = default)
 12799            {
 12800                // Validation
 330012801                if (resourceUri == null)
 12802                {
 012803                    throw new System.ArgumentNullException(nameof(resourceUri));
 12804                }
 330012805                if (body == null)
 12806                {
 012807                    throw new System.ArgumentNullException(nameof(body));
 12808                }
 330012809                if (version == null)
 12810                {
 012811                    throw new System.ArgumentNullException(nameof(version));
 12812                }
 12813
 12814                // Create the request
 330012815                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 330012816                Azure.Core.Request _request = _message.Request;
 12817
 12818                // Set the endpoint
 330012819                _request.Method = Azure.Core.RequestMethod.Put;
 330012820                _request.Uri.Reset(resourceUri);
 012821                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 12822
 12823                // Add request headers
 330012824                _request.Headers.SetValue("x-ms-blob-type", "BlockBlob");
 330012825                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 330012826                _request.Headers.SetValue("x-ms-version", version);
 012827                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 012828                if (blobContentType != null) { _request.Headers.SetValue("x-ms-blob-content-type", blobContentType); }
 209612829                if (blobContentEncoding != null) { _request.Headers.SetValue("x-ms-blob-content-encoding", blobContentEn
 209612830                if (blobContentLanguage != null) { _request.Headers.SetValue("x-ms-blob-content-language", blobContentLa
 209612831                if (blobContentHash != null) { _request.Headers.SetValue("x-ms-blob-content-md5", System.Convert.ToBase6
 209612832                if (blobCacheControl != null) { _request.Headers.SetValue("x-ms-blob-cache-control", blobCacheControl); 
 330012833                if (metadata != null) {
 8012834                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 12835                    {
 3212836                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 12837                    }
 12838                }
 209612839                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 209612840                if (blobContentDisposition != null) { _request.Headers.SetValue("x-ms-blob-content-disposition", blobCon
 210412841                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 210412842                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 210412843                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 210412844                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 210012845                if (tier != null) { _request.Headers.SetValue("x-ms-access-tier", tier.ToString()); }
 210012846                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 210012847                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 210012848                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 465212849                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 210012850                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 012851                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 210412852                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 12853
 12854                // Create the body
 330012855                _request.Content = Azure.Core.RequestContent.Create(body);
 12856
 330012857                return _message;
 12858            }
 12859
 12860            /// <summary>
 12861            /// Create the BlockBlob.UploadAsync response or throw a failure exception.
 12862            /// </summary>
 12863            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 12864            /// <param name="response">The raw Response.</param>
 12865            /// <returns>The BlockBlob.UploadAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}.</returns>
 12866            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> UploadAsync_CreateResponse(
 12867                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12868                Azure.Response response)
 12869            {
 12870                // Process the response
 330012871                switch (response.Status)
 12872                {
 12873                    case 201:
 12874                    {
 12875                        // Create the result
 325212876                        Azure.Storage.Blobs.Models.BlobContentInfo _value = new Azure.Storage.Blobs.Models.BlobContentIn
 12877
 12878                        // Get response headers
 12879                        string _header;
 325212880                        if (response.Headers.TryGetValue("ETag", out _header))
 12881                        {
 325212882                            _value.ETag = new Azure.ETag(_header);
 12883                        }
 325212884                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 12885                        {
 325212886                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 12887                        }
 325212888                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 12889                        {
 325212890                            _value.ContentHash = System.Convert.FromBase64String(_header);
 12891                        }
 325212892                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 12893                        {
 75212894                            _value.VersionId = _header;
 12895                        }
 325212896                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 12897                        {
 1212898                            _value.EncryptionKeySha256 = _header;
 12899                        }
 325212900                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 12901                        {
 1212902                            _value.EncryptionScope = _header;
 12903                        }
 325212904                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 12905                        {
 012906                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 12907                        }
 12908
 12909                        // Create the response
 325212910                        return Response.FromValue(_value, response);
 12911                    }
 12912                    default:
 12913                    {
 12914                        // Create the result
 4812915                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 4812916                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 12917
 4812918                        throw _value.CreateException(clientDiagnostics, response);
 12919                    }
 12920                }
 12921            }
 12922            #endregion BlockBlob.UploadAsync
 12923
 12924            #region BlockBlob.StageBlockAsync
 12925            /// <summary>
 12926            /// The Stage Block operation creates a new block to be committed as part of a blob
 12927            /// </summary>
 12928            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 12929            /// <param name="pipeline">The pipeline used for sending requests.</param>
 12930            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 12931            /// <param name="blockId">A valid Base64 string value that identifies the block. Prior to encoding, the stri
 12932            /// <param name="contentLength">The length of the request.</param>
 12933            /// <param name="body">Initial data</param>
 12934            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 12935            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 12936            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 12937            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 12938            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 12939            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 12940            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 12941            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 12942            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 12943            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 12944            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 12945            /// <param name="operationName">Operation name.</param>
 12946            /// <param name="cancellationToken">Cancellation token.</param>
 12947            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlockInfo}</returns>
 12948            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>> S
 12949                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 12950                Azure.Core.Pipeline.HttpPipeline pipeline,
 12951                System.Uri resourceUri,
 12952                string blockId,
 12953                long contentLength,
 12954                System.IO.Stream body,
 12955                string version,
 12956                byte[] transactionalContentHash = default,
 12957                byte[] transactionalContentCrc64 = default,
 12958                int? timeout = default,
 12959                string leaseId = default,
 12960                string encryptionKey = default,
 12961                string encryptionKeySha256 = default,
 12962                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 12963                string encryptionScope = default,
 12964                string requestId = default,
 12965                bool async = true,
 12966                string operationName = "BlockBlobClient.StageBlock",
 12967                System.Threading.CancellationToken cancellationToken = default)
 12968            {
 117612969                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 12970                try
 12971                {
 117612972                    _scope.AddAttribute("url", resourceUri);
 117612973                    _scope.Start();
 117612974                    using (Azure.Core.HttpMessage _message = StageBlockAsync_CreateMessage(
 117612975                        pipeline,
 117612976                        resourceUri,
 117612977                        blockId,
 117612978                        contentLength,
 117612979                        body,
 117612980                        version,
 117612981                        transactionalContentHash,
 117612982                        transactionalContentCrc64,
 117612983                        timeout,
 117612984                        leaseId,
 117612985                        encryptionKey,
 117612986                        encryptionKeySha256,
 117612987                        encryptionAlgorithm,
 117612988                        encryptionScope,
 117612989                        requestId))
 12990                    {
 117612991                        if (async)
 12992                        {
 12993                            // Send the request asynchronously if we're being called via an async path
 105612994                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 12995                        }
 12996                        else
 12997                        {
 12998                            // Send the request synchronously through the API that blocks if we're being called via a sy
 12999                            // (this is safe because the Task will complete before the user can call Wait)
 12013000                            pipeline.Send(_message, cancellationToken);
 13001                        }
 117613002                        Azure.Response _response = _message.Response;
 117613003                        cancellationToken.ThrowIfCancellationRequested();
 117613004                        return StageBlockAsync_CreateResponse(clientDiagnostics, _response);
 13005                    }
 13006                }
 813007                catch (System.Exception ex)
 13008                {
 813009                    _scope.Failed(ex);
 813010                    throw;
 13011                }
 13012                finally
 13013                {
 117613014                    _scope.Dispose();
 13015                }
 116813016            }
 13017
 13018            /// <summary>
 13019            /// Create the BlockBlob.StageBlockAsync request.
 13020            /// </summary>
 13021            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13022            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13023            /// <param name="blockId">A valid Base64 string value that identifies the block. Prior to encoding, the stri
 13024            /// <param name="contentLength">The length of the request.</param>
 13025            /// <param name="body">Initial data</param>
 13026            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13027            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 13028            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 13029            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13030            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13031            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 13032            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 13033            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 13034            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 13035            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13036            /// <returns>The BlockBlob.StageBlockAsync Message.</returns>
 13037            internal static Azure.Core.HttpMessage StageBlockAsync_CreateMessage(
 13038                Azure.Core.Pipeline.HttpPipeline pipeline,
 13039                System.Uri resourceUri,
 13040                string blockId,
 13041                long contentLength,
 13042                System.IO.Stream body,
 13043                string version,
 13044                byte[] transactionalContentHash = default,
 13045                byte[] transactionalContentCrc64 = default,
 13046                int? timeout = default,
 13047                string leaseId = default,
 13048                string encryptionKey = default,
 13049                string encryptionKeySha256 = default,
 13050                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 13051                string encryptionScope = default,
 13052                string requestId = default)
 13053            {
 13054                // Validation
 117613055                if (resourceUri == null)
 13056                {
 013057                    throw new System.ArgumentNullException(nameof(resourceUri));
 13058                }
 117613059                if (blockId == null)
 13060                {
 013061                    throw new System.ArgumentNullException(nameof(blockId));
 13062                }
 117613063                if (body == null)
 13064                {
 013065                    throw new System.ArgumentNullException(nameof(body));
 13066                }
 117613067                if (version == null)
 13068                {
 013069                    throw new System.ArgumentNullException(nameof(version));
 13070                }
 13071
 13072                // Create the request
 117613073                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 117613074                Azure.Core.Request _request = _message.Request;
 13075
 13076                // Set the endpoint
 117613077                _request.Method = Azure.Core.RequestMethod.Put;
 117613078                _request.Uri.Reset(resourceUri);
 117613079                _request.Uri.AppendQuery("comp", "block", escapeValue: false);
 117613080                _request.Uri.AppendQuery("blockid", blockId);
 013081                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 13082
 13083                // Add request headers
 117613084                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 117613085                _request.Headers.SetValue("x-ms-version", version);
 013086                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 013087                if (transactionalContentCrc64 != null) { _request.Headers.SetValue("x-ms-content-crc64", System.Convert.
 118413088                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 118813089                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 118813090                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 118813091                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 118813092                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 013093                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 13094
 13095                // Create the body
 117613096                _request.Content = Azure.Core.RequestContent.Create(body);
 13097
 117613098                return _message;
 13099            }
 13100
 13101            /// <summary>
 13102            /// Create the BlockBlob.StageBlockAsync response or throw a failure exception.
 13103            /// </summary>
 13104            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 13105            /// <param name="response">The raw Response.</param>
 13106            /// <returns>The BlockBlob.StageBlockAsync Azure.Response{Azure.Storage.Blobs.Models.BlockInfo}.</returns>
 13107            internal static Azure.Response<Azure.Storage.Blobs.Models.BlockInfo> StageBlockAsync_CreateResponse(
 13108                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13109                Azure.Response response)
 13110            {
 13111                // Process the response
 117613112                switch (response.Status)
 13113                {
 13114                    case 201:
 13115                    {
 13116                        // Create the result
 116813117                        Azure.Storage.Blobs.Models.BlockInfo _value = new Azure.Storage.Blobs.Models.BlockInfo();
 13118
 13119                        // Get response headers
 13120                        string _header;
 116813121                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 13122                        {
 013123                            _value.ContentHash = System.Convert.FromBase64String(_header);
 13124                        }
 116813125                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 13126                        {
 116813127                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 13128                        }
 116813129                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 13130                        {
 1213131                            _value.EncryptionKeySha256 = _header;
 13132                        }
 116813133                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 13134                        {
 1213135                            _value.EncryptionScope = _header;
 13136                        }
 13137
 13138                        // Create the response
 116813139                        return Response.FromValue(_value, response);
 13140                    }
 13141                    default:
 13142                    {
 13143                        // Create the result
 813144                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 813145                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 13146
 813147                        throw _value.CreateException(clientDiagnostics, response);
 13148                    }
 13149                }
 13150            }
 13151            #endregion BlockBlob.StageBlockAsync
 13152
 13153            #region BlockBlob.StageBlockFromUriAsync
 13154            /// <summary>
 13155            /// The Stage Block operation creates a new block to be committed as part of a blob where the contents are r
 13156            /// </summary>
 13157            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 13158            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13159            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13160            /// <param name="blockId">A valid Base64 string value that identifies the block. Prior to encoding, the stri
 13161            /// <param name="contentLength">The length of the request.</param>
 13162            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 13163            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13164            /// <param name="sourceRange">Bytes of source data in the specified range.</param>
 13165            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 13166            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 13167            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13168            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 13169            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 13170            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 13171            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 13172            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13173            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 13174            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 13175            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 13176            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 13177            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13178            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 13179            /// <param name="operationName">Operation name.</param>
 13180            /// <param name="cancellationToken">Cancellation token.</param>
 13181            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlockInfo}</returns>
 13182            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>> S
 13183                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13184                Azure.Core.Pipeline.HttpPipeline pipeline,
 13185                System.Uri resourceUri,
 13186                string blockId,
 13187                long contentLength,
 13188                System.Uri sourceUri,
 13189                string version,
 13190                string sourceRange = default,
 13191                byte[] sourceContentHash = default,
 13192                byte[] sourceContentcrc64 = default,
 13193                int? timeout = default,
 13194                string encryptionKey = default,
 13195                string encryptionKeySha256 = default,
 13196                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 13197                string encryptionScope = default,
 13198                string leaseId = default,
 13199                System.DateTimeOffset? sourceIfModifiedSince = default,
 13200                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 13201                Azure.ETag? sourceIfMatch = default,
 13202                Azure.ETag? sourceIfNoneMatch = default,
 13203                string requestId = default,
 13204                bool async = true,
 13205                string operationName = "BlockBlobClient.StageBlockFromUri",
 13206                System.Threading.CancellationToken cancellationToken = default)
 13207            {
 7213208                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 13209                try
 13210                {
 7213211                    _scope.AddAttribute("url", resourceUri);
 7213212                    _scope.Start();
 7213213                    using (Azure.Core.HttpMessage _message = StageBlockFromUriAsync_CreateMessage(
 7213214                        pipeline,
 7213215                        resourceUri,
 7213216                        blockId,
 7213217                        contentLength,
 7213218                        sourceUri,
 7213219                        version,
 7213220                        sourceRange,
 7213221                        sourceContentHash,
 7213222                        sourceContentcrc64,
 7213223                        timeout,
 7213224                        encryptionKey,
 7213225                        encryptionKeySha256,
 7213226                        encryptionAlgorithm,
 7213227                        encryptionScope,
 7213228                        leaseId,
 7213229                        sourceIfModifiedSince,
 7213230                        sourceIfUnmodifiedSince,
 7213231                        sourceIfMatch,
 7213232                        sourceIfNoneMatch,
 7213233                        requestId))
 13234                    {
 7213235                        if (async)
 13236                        {
 13237                            // Send the request asynchronously if we're being called via an async path
 3613238                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 13239                        }
 13240                        else
 13241                        {
 13242                            // Send the request synchronously through the API that blocks if we're being called via a sy
 13243                            // (this is safe because the Task will complete before the user can call Wait)
 3613244                            pipeline.Send(_message, cancellationToken);
 13245                        }
 7213246                        Azure.Response _response = _message.Response;
 7213247                        cancellationToken.ThrowIfCancellationRequested();
 7213248                        return StageBlockFromUriAsync_CreateResponse(clientDiagnostics, _response);
 13249                    }
 13250                }
 2413251                catch (System.Exception ex)
 13252                {
 2413253                    _scope.Failed(ex);
 2413254                    throw;
 13255                }
 13256                finally
 13257                {
 7213258                    _scope.Dispose();
 13259                }
 4813260            }
 13261
 13262            /// <summary>
 13263            /// Create the BlockBlob.StageBlockFromUriAsync request.
 13264            /// </summary>
 13265            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13266            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13267            /// <param name="blockId">A valid Base64 string value that identifies the block. Prior to encoding, the stri
 13268            /// <param name="contentLength">The length of the request.</param>
 13269            /// <param name="sourceUri">Specify a URL to the copy source.</param>
 13270            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13271            /// <param name="sourceRange">Bytes of source data in the specified range.</param>
 13272            /// <param name="sourceContentHash">Specify the md5 calculated for the range of bytes that must be read from
 13273            /// <param name="sourceContentcrc64">Specify the crc64 calculated for the range of bytes that must be read f
 13274            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13275            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 13276            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 13277            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 13278            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 13279            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13280            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 13281            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 13282            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 13283            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 13284            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13285            /// <returns>The BlockBlob.StageBlockFromUriAsync Message.</returns>
 13286            internal static Azure.Core.HttpMessage StageBlockFromUriAsync_CreateMessage(
 13287                Azure.Core.Pipeline.HttpPipeline pipeline,
 13288                System.Uri resourceUri,
 13289                string blockId,
 13290                long contentLength,
 13291                System.Uri sourceUri,
 13292                string version,
 13293                string sourceRange = default,
 13294                byte[] sourceContentHash = default,
 13295                byte[] sourceContentcrc64 = default,
 13296                int? timeout = default,
 13297                string encryptionKey = default,
 13298                string encryptionKeySha256 = default,
 13299                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 13300                string encryptionScope = default,
 13301                string leaseId = default,
 13302                System.DateTimeOffset? sourceIfModifiedSince = default,
 13303                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 13304                Azure.ETag? sourceIfMatch = default,
 13305                Azure.ETag? sourceIfNoneMatch = default,
 13306                string requestId = default)
 13307            {
 13308                // Validation
 7213309                if (resourceUri == null)
 13310                {
 013311                    throw new System.ArgumentNullException(nameof(resourceUri));
 13312                }
 7213313                if (blockId == null)
 13314                {
 013315                    throw new System.ArgumentNullException(nameof(blockId));
 13316                }
 7213317                if (sourceUri == null)
 13318                {
 013319                    throw new System.ArgumentNullException(nameof(sourceUri));
 13320                }
 7213321                if (version == null)
 13322                {
 013323                    throw new System.ArgumentNullException(nameof(version));
 13324                }
 13325
 13326                // Create the request
 7213327                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 7213328                Azure.Core.Request _request = _message.Request;
 13329
 13330                // Set the endpoint
 7213331                _request.Method = Azure.Core.RequestMethod.Put;
 7213332                _request.Uri.Reset(resourceUri);
 7213333                _request.Uri.AppendQuery("comp", "block", escapeValue: false);
 7213334                _request.Uri.AppendQuery("blockid", blockId);
 013335                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 13336
 13337                // Add request headers
 7213338                _request.Headers.SetValue("Content-Length", contentLength.ToString(System.Globalization.CultureInfo.Inva
 7213339                _request.Headers.SetValue("x-ms-copy-source", sourceUri.AbsoluteUri);
 7213340                _request.Headers.SetValue("x-ms-version", version);
 14413341                if (sourceRange != null) { _request.Headers.SetValue("x-ms-source-range", sourceRange); }
 8013342                if (sourceContentHash != null) { _request.Headers.SetValue("x-ms-source-content-md5", System.Convert.ToB
 013343                if (sourceContentcrc64 != null) { _request.Headers.SetValue("x-ms-source-content-crc64", System.Convert.
 7613344                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 7613345                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 7613346                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 7613347                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 8013348                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 8013349                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 8013350                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 8013351                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 8013352                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 013353                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 13354
 7213355                return _message;
 13356            }
 13357
 13358            /// <summary>
 13359            /// Create the BlockBlob.StageBlockFromUriAsync response or throw a failure exception.
 13360            /// </summary>
 13361            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 13362            /// <param name="response">The raw Response.</param>
 13363            /// <returns>The BlockBlob.StageBlockFromUriAsync Azure.Response{Azure.Storage.Blobs.Models.BlockInfo}.</ret
 13364            internal static Azure.Response<Azure.Storage.Blobs.Models.BlockInfo> StageBlockFromUriAsync_CreateResponse(
 13365                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13366                Azure.Response response)
 13367            {
 13368                // Process the response
 7213369                switch (response.Status)
 13370                {
 13371                    case 201:
 13372                    {
 13373                        // Create the result
 4813374                        Azure.Storage.Blobs.Models.BlockInfo _value = new Azure.Storage.Blobs.Models.BlockInfo();
 13375
 13376                        // Get response headers
 13377                        string _header;
 4813378                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 13379                        {
 413380                            _value.ContentHash = System.Convert.FromBase64String(_header);
 13381                        }
 4813382                        if (response.Headers.TryGetValue("x-ms-content-crc64", out _header))
 13383                        {
 4413384                            _value.ContentCrc64 = System.Convert.FromBase64String(_header);
 13385                        }
 4813386                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 13387                        {
 413388                            _value.EncryptionKeySha256 = _header;
 13389                        }
 4813390                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 13391                        {
 413392                            _value.EncryptionScope = _header;
 13393                        }
 13394
 13395                        // Create the response
 4813396                        return Response.FromValue(_value, response);
 13397                    }
 13398                    case 304:
 13399                    {
 13400                        // Create the result
 813401                        Azure.Storage.Blobs.Models.ConditionNotMetError _value = new Azure.Storage.Blobs.Models.Conditio
 13402
 13403                        // Get response headers
 13404                        string _header;
 813405                        if (response.Headers.TryGetValue("x-ms-error-code", out _header))
 13406                        {
 813407                            _value.ErrorCode = _header;
 13408                        }
 13409
 813410                        throw _value.CreateException(clientDiagnostics, response);
 13411                    }
 13412                    default:
 13413                    {
 13414                        // Create the result
 1613415                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 1613416                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 13417
 1613418                        throw _value.CreateException(clientDiagnostics, response);
 13419                    }
 13420                }
 13421            }
 13422            #endregion BlockBlob.StageBlockFromUriAsync
 13423
 13424            #region BlockBlob.CommitBlockListAsync
 13425            /// <summary>
 13426            /// The Commit Block List operation writes a blob by specifying the list of block IDs that make up the blob.
 13427            /// </summary>
 13428            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 13429            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13430            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13431            /// <param name="blocks">A list of block IDs split between the committed block list, in the uncommitted bloc
 13432            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13433            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13434            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 13435            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 13436            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 13437            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 13438            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 13439            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 13440            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 13441            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 13442            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13443            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 13444            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 13445            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 13446            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 13447            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 13448            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 13449            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 13450            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 13451            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 13452            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 13453            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 13454            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13455            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 13456            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 13457            /// <param name="operationName">Operation name.</param>
 13458            /// <param name="cancellationToken">Cancellation token.</param>
 13459            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}</returns>
 13460            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.BlobContentIn
 13461                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13462                Azure.Core.Pipeline.HttpPipeline pipeline,
 13463                System.Uri resourceUri,
 13464                Azure.Storage.Blobs.Models.BlockLookupList blocks,
 13465                string version,
 13466                int? timeout = default,
 13467                string blobCacheControl = default,
 13468                string blobContentType = default,
 13469                string blobContentEncoding = default,
 13470                string blobContentLanguage = default,
 13471                byte[] blobContentHash = default,
 13472                byte[] transactionalContentHash = default,
 13473                byte[] transactionalContentCrc64 = default,
 13474                System.Collections.Generic.IDictionary<string, string> metadata = default,
 13475                string leaseId = default,
 13476                string blobContentDisposition = default,
 13477                string encryptionKey = default,
 13478                string encryptionKeySha256 = default,
 13479                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 13480                string encryptionScope = default,
 13481                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 13482                System.DateTimeOffset? ifModifiedSince = default,
 13483                System.DateTimeOffset? ifUnmodifiedSince = default,
 13484                Azure.ETag? ifMatch = default,
 13485                Azure.ETag? ifNoneMatch = default,
 13486                string ifTags = default,
 13487                string requestId = default,
 13488                string blobTagsString = default,
 13489                bool async = true,
 13490                string operationName = "BlockBlobClient.CommitBlockList",
 13491                System.Threading.CancellationToken cancellationToken = default)
 13492            {
 20013493                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 13494                try
 13495                {
 20013496                    _scope.AddAttribute("url", resourceUri);
 20013497                    _scope.Start();
 20013498                    using (Azure.Core.HttpMessage _message = CommitBlockListAsync_CreateMessage(
 20013499                        pipeline,
 20013500                        resourceUri,
 20013501                        blocks,
 20013502                        version,
 20013503                        timeout,
 20013504                        blobCacheControl,
 20013505                        blobContentType,
 20013506                        blobContentEncoding,
 20013507                        blobContentLanguage,
 20013508                        blobContentHash,
 20013509                        transactionalContentHash,
 20013510                        transactionalContentCrc64,
 20013511                        metadata,
 20013512                        leaseId,
 20013513                        blobContentDisposition,
 20013514                        encryptionKey,
 20013515                        encryptionKeySha256,
 20013516                        encryptionAlgorithm,
 20013517                        encryptionScope,
 20013518                        tier,
 20013519                        ifModifiedSince,
 20013520                        ifUnmodifiedSince,
 20013521                        ifMatch,
 20013522                        ifNoneMatch,
 20013523                        ifTags,
 20013524                        requestId,
 20013525                        blobTagsString))
 13526                    {
 20013527                        if (async)
 13528                        {
 13529                            // Send the request asynchronously if we're being called via an async path
 12813530                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 13531                        }
 13532                        else
 13533                        {
 13534                            // Send the request synchronously through the API that blocks if we're being called via a sy
 13535                            // (this is safe because the Task will complete before the user can call Wait)
 7213536                            pipeline.Send(_message, cancellationToken);
 13537                        }
 20013538                        Azure.Response _response = _message.Response;
 20013539                        cancellationToken.ThrowIfCancellationRequested();
 20013540                        return CommitBlockListAsync_CreateResponse(clientDiagnostics, _response);
 13541                    }
 13542                }
 3213543                catch (System.Exception ex)
 13544                {
 3213545                    _scope.Failed(ex);
 3213546                    throw;
 13547                }
 13548                finally
 13549                {
 20013550                    _scope.Dispose();
 13551                }
 16813552            }
 13553
 13554            /// <summary>
 13555            /// Create the BlockBlob.CommitBlockListAsync request.
 13556            /// </summary>
 13557            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13558            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13559            /// <param name="blocks">A list of block IDs split between the committed block list, in the uncommitted bloc
 13560            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13561            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13562            /// <param name="blobCacheControl">Optional. Sets the blob's cache control. If specified, this property is s
 13563            /// <param name="blobContentType">Optional. Sets the blob's content type. If specified, this property is sto
 13564            /// <param name="blobContentEncoding">Optional. Sets the blob's content encoding. If specified, this propert
 13565            /// <param name="blobContentLanguage">Optional. Set the blob's content language. If specified, this property
 13566            /// <param name="blobContentHash">Optional. An MD5 hash of the blob content. Note that this hash is not vali
 13567            /// <param name="transactionalContentHash">Specify the transactional md5 for the body, to be validated by th
 13568            /// <param name="transactionalContentCrc64">Specify the transactional crc64 for the body, to be validated by
 13569            /// <param name="metadata">Optional. Specifies a user-defined name-value pair associated with the blob. If n
 13570            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13571            /// <param name="blobContentDisposition">Optional. Sets the blob's Content-Disposition header.</param>
 13572            /// <param name="encryptionKey">Optional. Specifies the encryption key to use to encrypt the data provided i
 13573            /// <param name="encryptionKeySha256">The SHA-256 hash of the provided encryption key. Must be provided if t
 13574            /// <param name="encryptionAlgorithm">The algorithm used to produce the encryption key hash. Currently, the 
 13575            /// <param name="encryptionScope">Optional. Version 2019-07-07 and later.  Specifies the name of the encrypt
 13576            /// <param name="tier">Optional. Indicates the tier to be set on the blob.</param>
 13577            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 13578            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 13579            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 13580            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 13581            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 13582            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13583            /// <param name="blobTagsString">Optional. A URL encoded query param string which specifies the tags to be c
 13584            /// <returns>The BlockBlob.CommitBlockListAsync Message.</returns>
 13585            internal static Azure.Core.HttpMessage CommitBlockListAsync_CreateMessage(
 13586                Azure.Core.Pipeline.HttpPipeline pipeline,
 13587                System.Uri resourceUri,
 13588                Azure.Storage.Blobs.Models.BlockLookupList blocks,
 13589                string version,
 13590                int? timeout = default,
 13591                string blobCacheControl = default,
 13592                string blobContentType = default,
 13593                string blobContentEncoding = default,
 13594                string blobContentLanguage = default,
 13595                byte[] blobContentHash = default,
 13596                byte[] transactionalContentHash = default,
 13597                byte[] transactionalContentCrc64 = default,
 13598                System.Collections.Generic.IDictionary<string, string> metadata = default,
 13599                string leaseId = default,
 13600                string blobContentDisposition = default,
 13601                string encryptionKey = default,
 13602                string encryptionKeySha256 = default,
 13603                Azure.Storage.Blobs.Models.EncryptionAlgorithmType? encryptionAlgorithm = default,
 13604                string encryptionScope = default,
 13605                Azure.Storage.Blobs.Models.AccessTier? tier = default,
 13606                System.DateTimeOffset? ifModifiedSince = default,
 13607                System.DateTimeOffset? ifUnmodifiedSince = default,
 13608                Azure.ETag? ifMatch = default,
 13609                Azure.ETag? ifNoneMatch = default,
 13610                string ifTags = default,
 13611                string requestId = default,
 13612                string blobTagsString = default)
 13613            {
 13614                // Validation
 20013615                if (resourceUri == null)
 13616                {
 013617                    throw new System.ArgumentNullException(nameof(resourceUri));
 13618                }
 20013619                if (blocks == null)
 13620                {
 013621                    throw new System.ArgumentNullException(nameof(blocks));
 13622                }
 20013623                if (version == null)
 13624                {
 013625                    throw new System.ArgumentNullException(nameof(version));
 13626                }
 13627
 13628                // Create the request
 20013629                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 20013630                Azure.Core.Request _request = _message.Request;
 13631
 13632                // Set the endpoint
 20013633                _request.Method = Azure.Core.RequestMethod.Put;
 20013634                _request.Uri.Reset(resourceUri);
 20013635                _request.Uri.AppendQuery("comp", "blocklist", escapeValue: false);
 013636                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 13637
 13638                // Add request headers
 20013639                _request.Headers.SetValue("x-ms-version", version);
 20413640                if (blobCacheControl != null) { _request.Headers.SetValue("x-ms-blob-cache-control", blobCacheControl); 
 20413641                if (blobContentType != null) { _request.Headers.SetValue("x-ms-blob-content-type", blobContentType); }
 20413642                if (blobContentEncoding != null) { _request.Headers.SetValue("x-ms-blob-content-encoding", blobContentEn
 20413643                if (blobContentLanguage != null) { _request.Headers.SetValue("x-ms-blob-content-language", blobContentLa
 20413644                if (blobContentHash != null) { _request.Headers.SetValue("x-ms-blob-content-md5", System.Convert.ToBase6
 013645                if (transactionalContentHash != null) { _request.Headers.SetValue("Content-MD5", System.Convert.ToBase64
 013646                if (transactionalContentCrc64 != null) { _request.Headers.SetValue("x-ms-content-crc64", System.Convert.
 20013647                if (metadata != null) {
 4013648                    foreach (System.Collections.Generic.KeyValuePair<string, string> _pair in metadata)
 13649                    {
 1613650                        _request.Headers.SetValue("x-ms-meta-" + _pair.Key, _pair.Value);
 13651                    }
 13652                }
 20813653                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 20413654                if (blobContentDisposition != null) { _request.Headers.SetValue("x-ms-blob-content-disposition", blobCon
 20413655                if (encryptionKey != null) { _request.Headers.SetValue("x-ms-encryption-key", encryptionKey); }
 20413656                if (encryptionKeySha256 != null) { _request.Headers.SetValue("x-ms-encryption-key-sha256", encryptionKey
 20413657                if (encryptionAlgorithm != null) { _request.Headers.SetValue("x-ms-encryption-algorithm", Azure.Storage.
 20413658                if (encryptionScope != null) { _request.Headers.SetValue("x-ms-encryption-scope", encryptionScope); }
 20813659                if (tier != null) { _request.Headers.SetValue("x-ms-access-tier", tier.ToString()); }
 20813660                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 20813661                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 20813662                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 20813663                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 20813664                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 013665                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 20413666                if (blobTagsString != null) { _request.Headers.SetValue("x-ms-tags", blobTagsString); }
 13667
 13668                // Create the body
 20013669                System.Xml.Linq.XElement _body = Azure.Storage.Blobs.Models.BlockLookupList.ToXml(blocks, "BlockList", "
 20013670                string _text = _body.ToString(System.Xml.Linq.SaveOptions.DisableFormatting);
 20013671                _request.Headers.SetValue("Content-Type", "application/xml");
 20013672                _request.Headers.SetValue("Content-Length", _text.Length.ToString(System.Globalization.CultureInfo.Invar
 20013673                _request.Content = Azure.Core.RequestContent.Create(System.Text.Encoding.UTF8.GetBytes(_text));
 13674
 20013675                return _message;
 13676            }
 13677
 13678            /// <summary>
 13679            /// Create the BlockBlob.CommitBlockListAsync response or throw a failure exception.
 13680            /// </summary>
 13681            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 13682            /// <param name="response">The raw Response.</param>
 13683            /// <returns>The BlockBlob.CommitBlockListAsync Azure.Response{Azure.Storage.Blobs.Models.BlobContentInfo}.<
 13684            internal static Azure.Response<Azure.Storage.Blobs.Models.BlobContentInfo> CommitBlockListAsync_CreateRespon
 13685                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13686                Azure.Response response)
 13687            {
 13688                // Process the response
 20013689                switch (response.Status)
 13690                {
 13691                    case 201:
 13692                    {
 13693                        // Create the result
 16813694                        Azure.Storage.Blobs.Models.BlobContentInfo _value = new Azure.Storage.Blobs.Models.BlobContentIn
 13695
 13696                        // Get response headers
 13697                        string _header;
 16813698                        if (response.Headers.TryGetValue("ETag", out _header))
 13699                        {
 16813700                            _value.ETag = new Azure.ETag(_header);
 13701                        }
 16813702                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 13703                        {
 16813704                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 13705                        }
 16813706                        if (response.Headers.TryGetValue("Content-MD5", out _header))
 13707                        {
 013708                            _value.ContentHash = System.Convert.FromBase64String(_header);
 13709                        }
 16813710                        if (response.Headers.TryGetValue("x-ms-version-id", out _header))
 13711                        {
 8413712                            _value.VersionId = _header;
 13713                        }
 16813714                        if (response.Headers.TryGetValue("x-ms-encryption-key-sha256", out _header))
 13715                        {
 413716                            _value.EncryptionKeySha256 = _header;
 13717                        }
 16813718                        if (response.Headers.TryGetValue("x-ms-encryption-scope", out _header))
 13719                        {
 413720                            _value.EncryptionScope = _header;
 13721                        }
 16813722                        if (response.Headers.TryGetValue("x-ms-blob-sequence-number", out _header))
 13723                        {
 013724                            _value.BlobSequenceNumber = long.Parse(_header, System.Globalization.CultureInfo.InvariantCu
 13725                        }
 13726
 13727                        // Create the response
 16813728                        return Response.FromValue(_value, response);
 13729                    }
 13730                    default:
 13731                    {
 13732                        // Create the result
 3213733                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 3213734                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 13735
 3213736                        throw _value.CreateException(clientDiagnostics, response);
 13737                    }
 13738                }
 13739            }
 13740            #endregion BlockBlob.CommitBlockListAsync
 13741
 13742            #region BlockBlob.GetBlockListAsync
 13743            /// <summary>
 13744            /// The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blo
 13745            /// </summary>
 13746            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 13747            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13748            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13749            /// <param name="listType">Specifies whether to return the list of committed blocks, the list of uncommitted
 13750            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13751            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 13752            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13753            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13754            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 13755            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13756            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 13757            /// <param name="operationName">Operation name.</param>
 13758            /// <param name="cancellationToken">Cancellation token.</param>
 13759            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.GetBlockListOperation}</returns>
 13760            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.GetBlockListO
 13761                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13762                Azure.Core.Pipeline.HttpPipeline pipeline,
 13763                System.Uri resourceUri,
 13764                Azure.Storage.Blobs.Models.BlockListType listType,
 13765                string version,
 13766                string snapshot = default,
 13767                int? timeout = default,
 13768                string leaseId = default,
 13769                string ifTags = default,
 13770                string requestId = default,
 13771                bool async = true,
 13772                string operationName = "BlockBlobClient.GetBlockList",
 13773                System.Threading.CancellationToken cancellationToken = default)
 13774            {
 6813775                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 13776                try
 13777                {
 6813778                    _scope.AddAttribute("url", resourceUri);
 6813779                    _scope.Start();
 6813780                    using (Azure.Core.HttpMessage _message = GetBlockListAsync_CreateMessage(
 6813781                        pipeline,
 6813782                        resourceUri,
 6813783                        listType,
 6813784                        version,
 6813785                        snapshot,
 6813786                        timeout,
 6813787                        leaseId,
 6813788                        ifTags,
 6813789                        requestId))
 13790                    {
 6813791                        if (async)
 13792                        {
 13793                            // Send the request asynchronously if we're being called via an async path
 3413794                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 13795                        }
 13796                        else
 13797                        {
 13798                            // Send the request synchronously through the API that blocks if we're being called via a sy
 13799                            // (this is safe because the Task will complete before the user can call Wait)
 3413800                            pipeline.Send(_message, cancellationToken);
 13801                        }
 6813802                        Azure.Response _response = _message.Response;
 6813803                        cancellationToken.ThrowIfCancellationRequested();
 6813804                        return GetBlockListAsync_CreateResponse(clientDiagnostics, _response);
 13805                    }
 13806                }
 1213807                catch (System.Exception ex)
 13808                {
 1213809                    _scope.Failed(ex);
 1213810                    throw;
 13811                }
 13812                finally
 13813                {
 6813814                    _scope.Dispose();
 13815                }
 5613816            }
 13817
 13818            /// <summary>
 13819            /// Create the BlockBlob.GetBlockListAsync request.
 13820            /// </summary>
 13821            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13822            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13823            /// <param name="listType">Specifies whether to return the list of committed blocks, the list of uncommitted
 13824            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13825            /// <param name="snapshot">The snapshot parameter is an opaque DateTime value that, when present, specifies 
 13826            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13827            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13828            /// <param name="ifTags">Specify a SQL where clause on blob tags to operate only on blobs with a matching va
 13829            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13830            /// <returns>The BlockBlob.GetBlockListAsync Message.</returns>
 13831            internal static Azure.Core.HttpMessage GetBlockListAsync_CreateMessage(
 13832                Azure.Core.Pipeline.HttpPipeline pipeline,
 13833                System.Uri resourceUri,
 13834                Azure.Storage.Blobs.Models.BlockListType listType,
 13835                string version,
 13836                string snapshot = default,
 13837                int? timeout = default,
 13838                string leaseId = default,
 13839                string ifTags = default,
 13840                string requestId = default)
 13841            {
 13842                // Validation
 6813843                if (resourceUri == null)
 13844                {
 013845                    throw new System.ArgumentNullException(nameof(resourceUri));
 13846                }
 6813847                if (version == null)
 13848                {
 013849                    throw new System.ArgumentNullException(nameof(version));
 13850                }
 13851
 13852                // Create the request
 6813853                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 6813854                Azure.Core.Request _request = _message.Request;
 13855
 13856                // Set the endpoint
 6813857                _request.Method = Azure.Core.RequestMethod.Get;
 6813858                _request.Uri.Reset(resourceUri);
 6813859                _request.Uri.AppendQuery("comp", "blocklist", escapeValue: false);
 6813860                _request.Uri.AppendQuery("blocklisttype", Azure.Storage.Blobs.BlobRestClient.Serialization.ToString(list
 7213861                if (snapshot != null) { _request.Uri.AppendQuery("snapshot", snapshot); }
 013862                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 13863
 13864                // Add request headers
 6813865                _request.Headers.SetValue("x-ms-version", version);
 7613866                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 7613867                if (ifTags != null) { _request.Headers.SetValue("x-ms-if-tags", ifTags); }
 013868                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 13869
 6813870                return _message;
 13871            }
 13872
 13873            /// <summary>
 13874            /// Create the BlockBlob.GetBlockListAsync response or throw a failure exception.
 13875            /// </summary>
 13876            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 13877            /// <param name="response">The raw Response.</param>
 13878            /// <returns>The BlockBlob.GetBlockListAsync Azure.Response{Azure.Storage.Blobs.Models.GetBlockListOperation
 13879            internal static Azure.Response<Azure.Storage.Blobs.Models.GetBlockListOperation> GetBlockListAsync_CreateRes
 13880                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13881                Azure.Response response)
 13882            {
 13883                // Process the response
 6813884                switch (response.Status)
 13885                {
 13886                    case 200:
 13887                    {
 13888                        // Create the result
 5613889                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 5613890                        Azure.Storage.Blobs.Models.GetBlockListOperation _value = new Azure.Storage.Blobs.Models.GetBloc
 5613891                        _value.Body = Azure.Storage.Blobs.Models.BlockList.FromXml(_xml.Root);
 13892
 13893                        // Get response headers
 13894                        string _header;
 5613895                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 13896                        {
 4813897                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 13898                        }
 5613899                        if (response.Headers.TryGetValue("ETag", out _header))
 13900                        {
 4813901                            _value.ETag = new Azure.ETag(_header);
 13902                        }
 5613903                        if (response.Headers.TryGetValue("Content-Type", out _header))
 13904                        {
 5613905                            _value.ContentType = _header;
 13906                        }
 5613907                        if (response.Headers.TryGetValue("x-ms-blob-content-length", out _header))
 13908                        {
 4813909                            _value.BlobContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCul
 13910                        }
 13911
 13912                        // Create the response
 5613913                        return Response.FromValue(_value, response);
 13914                    }
 13915                    case 304:
 13916                    {
 013917                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.GetBlockListOperation>(response);
 13918                    }
 13919                    default:
 13920                    {
 13921                        // Create the result
 1213922                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 1213923                        Azure.Storage.Blobs.Models.StorageError _value = Azure.Storage.Blobs.Models.StorageError.FromXml
 13924
 1213925                        throw _value.CreateException(clientDiagnostics, response);
 13926                    }
 13927                }
 13928            }
 13929            #endregion BlockBlob.GetBlockListAsync
 13930        }
 13931        #endregion BlockBlob operations
 13932
 13933        #region Directory operations
 13934        /// <summary>
 13935        /// Directory operations for Azure Blob Storage
 13936        /// </summary>
 13937        public static partial class Directory
 13938        {
 13939            #region Directory.CreateAsync
 13940            /// <summary>
 13941            /// Create a directory. By default, the destination is overwritten and if the destination already exists and
 13942            /// </summary>
 13943            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 13944            /// <param name="pipeline">The pipeline used for sending requests.</param>
 13945            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 13946            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 13947            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 13948            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 13949            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 13950            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 13951            /// <param name="cacheControl">Cache control for given resource</param>
 13952            /// <param name="contentType">Content type for given resource</param>
 13953            /// <param name="contentEncoding">Content encoding for given resource</param>
 13954            /// <param name="contentLanguage">Content language for given resource</param>
 13955            /// <param name="contentDisposition">Content disposition for given resource</param>
 13956            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 13957            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 13958            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 13959            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 13960            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 13961            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 13962            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 13963            /// <param name="operationName">Operation name.</param>
 13964            /// <param name="cancellationToken">Cancellation token.</param>
 13965            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.DirectoryCreateResult}</returns>
 13966            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.DirectoryCrea
 13967                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 13968                Azure.Core.Pipeline.HttpPipeline pipeline,
 13969                System.Uri resourceUri,
 13970                string version,
 13971                int? timeout = default,
 13972                string directoryProperties = default,
 13973                string posixPermissions = default,
 13974                string posixUmask = default,
 13975                string cacheControl = default,
 13976                string contentType = default,
 13977                string contentEncoding = default,
 13978                string contentLanguage = default,
 13979                string contentDisposition = default,
 13980                string leaseId = default,
 13981                System.DateTimeOffset? ifModifiedSince = default,
 13982                System.DateTimeOffset? ifUnmodifiedSince = default,
 13983                Azure.ETag? ifMatch = default,
 13984                Azure.ETag? ifNoneMatch = default,
 13985                string requestId = default,
 13986                bool async = true,
 13987                string operationName = "DirectoryClient.Create",
 13988                System.Threading.CancellationToken cancellationToken = default)
 13989            {
 013990                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 13991                try
 13992                {
 013993                    _scope.AddAttribute("url", resourceUri);
 013994                    _scope.Start();
 013995                    using (Azure.Core.HttpMessage _message = CreateAsync_CreateMessage(
 013996                        pipeline,
 013997                        resourceUri,
 013998                        version,
 013999                        timeout,
 014000                        directoryProperties,
 014001                        posixPermissions,
 014002                        posixUmask,
 014003                        cacheControl,
 014004                        contentType,
 014005                        contentEncoding,
 014006                        contentLanguage,
 014007                        contentDisposition,
 014008                        leaseId,
 014009                        ifModifiedSince,
 014010                        ifUnmodifiedSince,
 014011                        ifMatch,
 014012                        ifNoneMatch,
 014013                        requestId))
 14014                    {
 014015                        if (async)
 14016                        {
 14017                            // Send the request asynchronously if we're being called via an async path
 014018                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 14019                        }
 14020                        else
 14021                        {
 14022                            // Send the request synchronously through the API that blocks if we're being called via a sy
 14023                            // (this is safe because the Task will complete before the user can call Wait)
 014024                            pipeline.Send(_message, cancellationToken);
 14025                        }
 014026                        Azure.Response _response = _message.Response;
 014027                        cancellationToken.ThrowIfCancellationRequested();
 014028                        return CreateAsync_CreateResponse(clientDiagnostics, _response);
 14029                    }
 14030                }
 014031                catch (System.Exception ex)
 14032                {
 014033                    _scope.Failed(ex);
 014034                    throw;
 14035                }
 14036                finally
 14037                {
 014038                    _scope.Dispose();
 14039                }
 014040            }
 14041
 14042            /// <summary>
 14043            /// Create the Directory.CreateAsync request.
 14044            /// </summary>
 14045            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14046            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14047            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14048            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14049            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 14050            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 14051            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 14052            /// <param name="cacheControl">Cache control for given resource</param>
 14053            /// <param name="contentType">Content type for given resource</param>
 14054            /// <param name="contentEncoding">Content encoding for given resource</param>
 14055            /// <param name="contentLanguage">Content language for given resource</param>
 14056            /// <param name="contentDisposition">Content disposition for given resource</param>
 14057            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14058            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14059            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14060            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14061            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14062            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14063            /// <returns>The Directory.CreateAsync Message.</returns>
 14064            internal static Azure.Core.HttpMessage CreateAsync_CreateMessage(
 14065                Azure.Core.Pipeline.HttpPipeline pipeline,
 14066                System.Uri resourceUri,
 14067                string version,
 14068                int? timeout = default,
 14069                string directoryProperties = default,
 14070                string posixPermissions = default,
 14071                string posixUmask = default,
 14072                string cacheControl = default,
 14073                string contentType = default,
 14074                string contentEncoding = default,
 14075                string contentLanguage = default,
 14076                string contentDisposition = default,
 14077                string leaseId = default,
 14078                System.DateTimeOffset? ifModifiedSince = default,
 14079                System.DateTimeOffset? ifUnmodifiedSince = default,
 14080                Azure.ETag? ifMatch = default,
 14081                Azure.ETag? ifNoneMatch = default,
 14082                string requestId = default)
 14083            {
 14084                // Validation
 014085                if (resourceUri == null)
 14086                {
 014087                    throw new System.ArgumentNullException(nameof(resourceUri));
 14088                }
 014089                if (version == null)
 14090                {
 014091                    throw new System.ArgumentNullException(nameof(version));
 14092                }
 14093
 14094                // Create the request
 014095                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 014096                Azure.Core.Request _request = _message.Request;
 14097
 14098                // Set the endpoint
 014099                _request.Method = Azure.Core.RequestMethod.Put;
 014100                _request.Uri.Reset(resourceUri);
 014101                _request.Uri.AppendQuery("resource", "directory", escapeValue: false);
 014102                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 14103
 14104                // Add request headers
 014105                _request.Headers.SetValue("x-ms-version", version);
 014106                if (directoryProperties != null) { _request.Headers.SetValue("x-ms-properties", directoryProperties); }
 014107                if (posixPermissions != null) { _request.Headers.SetValue("x-ms-permissions", posixPermissions); }
 014108                if (posixUmask != null) { _request.Headers.SetValue("x-ms-umask", posixUmask); }
 014109                if (cacheControl != null) { _request.Headers.SetValue("x-ms-cache-control", cacheControl); }
 014110                if (contentType != null) { _request.Headers.SetValue("x-ms-content-type", contentType); }
 014111                if (contentEncoding != null) { _request.Headers.SetValue("x-ms-content-encoding", contentEncoding); }
 014112                if (contentLanguage != null) { _request.Headers.SetValue("x-ms-content-language", contentLanguage); }
 014113                if (contentDisposition != null) { _request.Headers.SetValue("x-ms-content-disposition", contentDispositi
 014114                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 014115                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 014116                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 014117                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 014118                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 014119                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 14120
 014121                return _message;
 14122            }
 14123
 14124            /// <summary>
 14125            /// Create the Directory.CreateAsync response or throw a failure exception.
 14126            /// </summary>
 14127            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 14128            /// <param name="response">The raw Response.</param>
 14129            /// <returns>The Directory.CreateAsync Azure.Response{Azure.Storage.Blobs.Models.DirectoryCreateResult}.</re
 14130            internal static Azure.Response<Azure.Storage.Blobs.Models.DirectoryCreateResult> CreateAsync_CreateResponse(
 14131                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14132                Azure.Response response)
 14133            {
 14134                // Process the response
 014135                switch (response.Status)
 14136                {
 14137                    case 201:
 14138                    {
 14139                        // Create the result
 014140                        Azure.Storage.Blobs.Models.DirectoryCreateResult _value = new Azure.Storage.Blobs.Models.Directo
 14141
 14142                        // Get response headers
 14143                        string _header;
 014144                        if (response.Headers.TryGetValue("ETag", out _header))
 14145                        {
 014146                            _value.ETag = new Azure.ETag(_header);
 14147                        }
 014148                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 14149                        {
 014150                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 14151                        }
 014152                        if (response.Headers.TryGetValue("Content-Length", out _header))
 14153                        {
 014154                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 14155                        }
 14156
 14157                        // Create the response
 014158                        return Response.FromValue(_value, response);
 14159                    }
 14160                    default:
 14161                    {
 14162                        // Create the result
 014163                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 014164                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 14165
 014166                        throw _value.CreateException(clientDiagnostics, response);
 14167                    }
 14168                }
 14169            }
 14170            #endregion Directory.CreateAsync
 14171
 14172            #region Directory.RenameAsync
 14173            /// <summary>
 14174            /// Rename a directory. By default, the destination is overwritten and if the destination already exists and
 14175            /// </summary>
 14176            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 14177            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14178            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14179            /// <param name="renameSource">The file or directory to be renamed. The value must have the following format
 14180            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14181            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14182            /// <param name="marker">When renaming a directory, the number of paths that are renamed with each invocatio
 14183            /// <param name="pathRenameMode">Determines the behavior of the rename operation</param>
 14184            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 14185            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 14186            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 14187            /// <param name="cacheControl">Cache control for given resource</param>
 14188            /// <param name="contentType">Content type for given resource</param>
 14189            /// <param name="contentEncoding">Content encoding for given resource</param>
 14190            /// <param name="contentLanguage">Content language for given resource</param>
 14191            /// <param name="contentDisposition">Content disposition for given resource</param>
 14192            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14193            /// <param name="sourceLeaseId">A lease ID for the source path. If specified, the source path must have an a
 14194            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14195            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14196            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14197            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14198            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 14199            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 14200            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 14201            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 14202            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14203            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 14204            /// <param name="operationName">Operation name.</param>
 14205            /// <param name="cancellationToken">Cancellation token.</param>
 14206            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.DirectoryRenameResult}</returns>
 14207            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.DirectoryRena
 14208                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14209                Azure.Core.Pipeline.HttpPipeline pipeline,
 14210                System.Uri resourceUri,
 14211                string renameSource,
 14212                string version,
 14213                int? timeout = default,
 14214                string marker = default,
 14215                Azure.Storage.Blobs.Models.PathRenameMode? pathRenameMode = default,
 14216                string directoryProperties = default,
 14217                string posixPermissions = default,
 14218                string posixUmask = default,
 14219                string cacheControl = default,
 14220                string contentType = default,
 14221                string contentEncoding = default,
 14222                string contentLanguage = default,
 14223                string contentDisposition = default,
 14224                string leaseId = default,
 14225                string sourceLeaseId = default,
 14226                System.DateTimeOffset? ifModifiedSince = default,
 14227                System.DateTimeOffset? ifUnmodifiedSince = default,
 14228                Azure.ETag? ifMatch = default,
 14229                Azure.ETag? ifNoneMatch = default,
 14230                System.DateTimeOffset? sourceIfModifiedSince = default,
 14231                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 14232                Azure.ETag? sourceIfMatch = default,
 14233                Azure.ETag? sourceIfNoneMatch = default,
 14234                string requestId = default,
 14235                bool async = true,
 14236                string operationName = "DirectoryClient.Rename",
 14237                System.Threading.CancellationToken cancellationToken = default)
 14238            {
 014239                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 14240                try
 14241                {
 014242                    _scope.AddAttribute("url", resourceUri);
 014243                    _scope.Start();
 014244                    using (Azure.Core.HttpMessage _message = RenameAsync_CreateMessage(
 014245                        pipeline,
 014246                        resourceUri,
 014247                        renameSource,
 014248                        version,
 014249                        timeout,
 014250                        marker,
 014251                        pathRenameMode,
 014252                        directoryProperties,
 014253                        posixPermissions,
 014254                        posixUmask,
 014255                        cacheControl,
 014256                        contentType,
 014257                        contentEncoding,
 014258                        contentLanguage,
 014259                        contentDisposition,
 014260                        leaseId,
 014261                        sourceLeaseId,
 014262                        ifModifiedSince,
 014263                        ifUnmodifiedSince,
 014264                        ifMatch,
 014265                        ifNoneMatch,
 014266                        sourceIfModifiedSince,
 014267                        sourceIfUnmodifiedSince,
 014268                        sourceIfMatch,
 014269                        sourceIfNoneMatch,
 014270                        requestId))
 14271                    {
 014272                        if (async)
 14273                        {
 14274                            // Send the request asynchronously if we're being called via an async path
 014275                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 14276                        }
 14277                        else
 14278                        {
 14279                            // Send the request synchronously through the API that blocks if we're being called via a sy
 14280                            // (this is safe because the Task will complete before the user can call Wait)
 014281                            pipeline.Send(_message, cancellationToken);
 14282                        }
 014283                        Azure.Response _response = _message.Response;
 014284                        cancellationToken.ThrowIfCancellationRequested();
 014285                        return RenameAsync_CreateResponse(clientDiagnostics, _response);
 14286                    }
 14287                }
 014288                catch (System.Exception ex)
 14289                {
 014290                    _scope.Failed(ex);
 014291                    throw;
 14292                }
 14293                finally
 14294                {
 014295                    _scope.Dispose();
 14296                }
 014297            }
 14298
 14299            /// <summary>
 14300            /// Create the Directory.RenameAsync request.
 14301            /// </summary>
 14302            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14303            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14304            /// <param name="renameSource">The file or directory to be renamed. The value must have the following format
 14305            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14306            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14307            /// <param name="marker">When renaming a directory, the number of paths that are renamed with each invocatio
 14308            /// <param name="pathRenameMode">Determines the behavior of the rename operation</param>
 14309            /// <param name="directoryProperties">Optional.  User-defined properties to be stored with the file or direc
 14310            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 14311            /// <param name="posixUmask">Only valid if Hierarchical Namespace is enabled for the account. This umask res
 14312            /// <param name="cacheControl">Cache control for given resource</param>
 14313            /// <param name="contentType">Content type for given resource</param>
 14314            /// <param name="contentEncoding">Content encoding for given resource</param>
 14315            /// <param name="contentLanguage">Content language for given resource</param>
 14316            /// <param name="contentDisposition">Content disposition for given resource</param>
 14317            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14318            /// <param name="sourceLeaseId">A lease ID for the source path. If specified, the source path must have an a
 14319            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14320            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14321            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14322            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14323            /// <param name="sourceIfModifiedSince">Specify this header value to operate only on a blob if it has been m
 14324            /// <param name="sourceIfUnmodifiedSince">Specify this header value to operate only on a blob if it has not 
 14325            /// <param name="sourceIfMatch">Specify an ETag value to operate only on blobs with a matching value.</param
 14326            /// <param name="sourceIfNoneMatch">Specify an ETag value to operate only on blobs without a matching value.
 14327            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14328            /// <returns>The Directory.RenameAsync Message.</returns>
 14329            internal static Azure.Core.HttpMessage RenameAsync_CreateMessage(
 14330                Azure.Core.Pipeline.HttpPipeline pipeline,
 14331                System.Uri resourceUri,
 14332                string renameSource,
 14333                string version,
 14334                int? timeout = default,
 14335                string marker = default,
 14336                Azure.Storage.Blobs.Models.PathRenameMode? pathRenameMode = default,
 14337                string directoryProperties = default,
 14338                string posixPermissions = default,
 14339                string posixUmask = default,
 14340                string cacheControl = default,
 14341                string contentType = default,
 14342                string contentEncoding = default,
 14343                string contentLanguage = default,
 14344                string contentDisposition = default,
 14345                string leaseId = default,
 14346                string sourceLeaseId = default,
 14347                System.DateTimeOffset? ifModifiedSince = default,
 14348                System.DateTimeOffset? ifUnmodifiedSince = default,
 14349                Azure.ETag? ifMatch = default,
 14350                Azure.ETag? ifNoneMatch = default,
 14351                System.DateTimeOffset? sourceIfModifiedSince = default,
 14352                System.DateTimeOffset? sourceIfUnmodifiedSince = default,
 14353                Azure.ETag? sourceIfMatch = default,
 14354                Azure.ETag? sourceIfNoneMatch = default,
 14355                string requestId = default)
 14356            {
 14357                // Validation
 014358                if (resourceUri == null)
 14359                {
 014360                    throw new System.ArgumentNullException(nameof(resourceUri));
 14361                }
 014362                if (renameSource == null)
 14363                {
 014364                    throw new System.ArgumentNullException(nameof(renameSource));
 14365                }
 014366                if (version == null)
 14367                {
 014368                    throw new System.ArgumentNullException(nameof(version));
 14369                }
 14370
 14371                // Create the request
 014372                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 014373                Azure.Core.Request _request = _message.Request;
 14374
 14375                // Set the endpoint
 014376                _request.Method = Azure.Core.RequestMethod.Put;
 014377                _request.Uri.Reset(resourceUri);
 014378                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 014379                if (marker != null) { _request.Uri.AppendQuery("continuation", marker); }
 014380                if (pathRenameMode != null) { _request.Uri.AppendQuery("mode", Azure.Storage.Blobs.BlobRestClient.Serial
 14381
 14382                // Add request headers
 014383                _request.Headers.SetValue("x-ms-rename-source", renameSource);
 014384                _request.Headers.SetValue("x-ms-version", version);
 014385                if (directoryProperties != null) { _request.Headers.SetValue("x-ms-properties", directoryProperties); }
 014386                if (posixPermissions != null) { _request.Headers.SetValue("x-ms-permissions", posixPermissions); }
 014387                if (posixUmask != null) { _request.Headers.SetValue("x-ms-umask", posixUmask); }
 014388                if (cacheControl != null) { _request.Headers.SetValue("x-ms-cache-control", cacheControl); }
 014389                if (contentType != null) { _request.Headers.SetValue("x-ms-content-type", contentType); }
 014390                if (contentEncoding != null) { _request.Headers.SetValue("x-ms-content-encoding", contentEncoding); }
 014391                if (contentLanguage != null) { _request.Headers.SetValue("x-ms-content-language", contentLanguage); }
 014392                if (contentDisposition != null) { _request.Headers.SetValue("x-ms-content-disposition", contentDispositi
 014393                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 014394                if (sourceLeaseId != null) { _request.Headers.SetValue("x-ms-source-lease-id", sourceLeaseId); }
 014395                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 014396                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 014397                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 014398                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 014399                if (sourceIfModifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-modified-since", sourceIf
 014400                if (sourceIfUnmodifiedSince != null) { _request.Headers.SetValue("x-ms-source-if-unmodified-since", sour
 014401                if (sourceIfMatch != null) { _request.Headers.SetValue("x-ms-source-if-match", sourceIfMatch.Value.ToStr
 014402                if (sourceIfNoneMatch != null) { _request.Headers.SetValue("x-ms-source-if-none-match", sourceIfNoneMatc
 014403                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 14404
 014405                return _message;
 14406            }
 14407
 14408            /// <summary>
 14409            /// Create the Directory.RenameAsync response or throw a failure exception.
 14410            /// </summary>
 14411            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 14412            /// <param name="response">The raw Response.</param>
 14413            /// <returns>The Directory.RenameAsync Azure.Response{Azure.Storage.Blobs.Models.DirectoryRenameResult}.</re
 14414            internal static Azure.Response<Azure.Storage.Blobs.Models.DirectoryRenameResult> RenameAsync_CreateResponse(
 14415                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14416                Azure.Response response)
 14417            {
 14418                // Process the response
 014419                switch (response.Status)
 14420                {
 14421                    case 201:
 14422                    {
 14423                        // Create the result
 014424                        Azure.Storage.Blobs.Models.DirectoryRenameResult _value = new Azure.Storage.Blobs.Models.Directo
 14425
 14426                        // Get response headers
 14427                        string _header;
 014428                        if (response.Headers.TryGetValue("x-ms-continuation", out _header))
 14429                        {
 014430                            _value.Marker = _header;
 14431                        }
 014432                        if (response.Headers.TryGetValue("ETag", out _header))
 14433                        {
 014434                            _value.ETag = new Azure.ETag(_header);
 14435                        }
 014436                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 14437                        {
 014438                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 14439                        }
 014440                        if (response.Headers.TryGetValue("Content-Length", out _header))
 14441                        {
 014442                            _value.ContentLength = long.Parse(_header, System.Globalization.CultureInfo.InvariantCulture
 14443                        }
 14444
 14445                        // Create the response
 014446                        return Response.FromValue(_value, response);
 14447                    }
 14448                    default:
 14449                    {
 14450                        // Create the result
 014451                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 014452                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 14453
 014454                        throw _value.CreateException(clientDiagnostics, response);
 14455                    }
 14456                }
 14457            }
 14458            #endregion Directory.RenameAsync
 14459
 14460            #region Directory.DeleteAsync
 14461            /// <summary>
 14462            /// Deletes the directory
 14463            /// </summary>
 14464            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 14465            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14466            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14467            /// <param name="recursiveDirectoryDelete">If "true", all paths beneath the directory will be deleted. If "f
 14468            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14469            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14470            /// <param name="marker">When renaming a directory, the number of paths that are renamed with each invocatio
 14471            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14472            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14473            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14474            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14475            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14476            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14477            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 14478            /// <param name="operationName">Operation name.</param>
 14479            /// <param name="cancellationToken">Cancellation token.</param>
 14480            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.DirectoryDeleteResult}</returns>
 14481            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.DirectoryDele
 14482                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14483                Azure.Core.Pipeline.HttpPipeline pipeline,
 14484                System.Uri resourceUri,
 14485                bool recursiveDirectoryDelete,
 14486                string version,
 14487                int? timeout = default,
 14488                string marker = default,
 14489                string leaseId = default,
 14490                System.DateTimeOffset? ifModifiedSince = default,
 14491                System.DateTimeOffset? ifUnmodifiedSince = default,
 14492                Azure.ETag? ifMatch = default,
 14493                Azure.ETag? ifNoneMatch = default,
 14494                string requestId = default,
 14495                bool async = true,
 14496                string operationName = "DirectoryClient.Delete",
 14497                System.Threading.CancellationToken cancellationToken = default)
 14498            {
 014499                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 14500                try
 14501                {
 014502                    _scope.AddAttribute("url", resourceUri);
 014503                    _scope.Start();
 014504                    using (Azure.Core.HttpMessage _message = DeleteAsync_CreateMessage(
 014505                        pipeline,
 014506                        resourceUri,
 014507                        recursiveDirectoryDelete,
 014508                        version,
 014509                        timeout,
 014510                        marker,
 014511                        leaseId,
 014512                        ifModifiedSince,
 014513                        ifUnmodifiedSince,
 014514                        ifMatch,
 014515                        ifNoneMatch,
 014516                        requestId))
 14517                    {
 014518                        if (async)
 14519                        {
 14520                            // Send the request asynchronously if we're being called via an async path
 014521                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 14522                        }
 14523                        else
 14524                        {
 14525                            // Send the request synchronously through the API that blocks if we're being called via a sy
 14526                            // (this is safe because the Task will complete before the user can call Wait)
 014527                            pipeline.Send(_message, cancellationToken);
 14528                        }
 014529                        Azure.Response _response = _message.Response;
 014530                        cancellationToken.ThrowIfCancellationRequested();
 014531                        return DeleteAsync_CreateResponse(clientDiagnostics, _response);
 14532                    }
 14533                }
 014534                catch (System.Exception ex)
 14535                {
 014536                    _scope.Failed(ex);
 014537                    throw;
 14538                }
 14539                finally
 14540                {
 014541                    _scope.Dispose();
 14542                }
 014543            }
 14544
 14545            /// <summary>
 14546            /// Create the Directory.DeleteAsync request.
 14547            /// </summary>
 14548            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14549            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14550            /// <param name="recursiveDirectoryDelete">If "true", all paths beneath the directory will be deleted. If "f
 14551            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14552            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14553            /// <param name="marker">When renaming a directory, the number of paths that are renamed with each invocatio
 14554            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14555            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14556            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14557            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14558            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14559            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14560            /// <returns>The Directory.DeleteAsync Message.</returns>
 14561            internal static Azure.Core.HttpMessage DeleteAsync_CreateMessage(
 14562                Azure.Core.Pipeline.HttpPipeline pipeline,
 14563                System.Uri resourceUri,
 14564                bool recursiveDirectoryDelete,
 14565                string version,
 14566                int? timeout = default,
 14567                string marker = default,
 14568                string leaseId = default,
 14569                System.DateTimeOffset? ifModifiedSince = default,
 14570                System.DateTimeOffset? ifUnmodifiedSince = default,
 14571                Azure.ETag? ifMatch = default,
 14572                Azure.ETag? ifNoneMatch = default,
 14573                string requestId = default)
 14574            {
 14575                // Validation
 014576                if (resourceUri == null)
 14577                {
 014578                    throw new System.ArgumentNullException(nameof(resourceUri));
 14579                }
 014580                if (version == null)
 14581                {
 014582                    throw new System.ArgumentNullException(nameof(version));
 14583                }
 14584
 14585                // Create the request
 014586                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 014587                Azure.Core.Request _request = _message.Request;
 14588
 14589                // Set the endpoint
 014590                _request.Method = Azure.Core.RequestMethod.Delete;
 014591                _request.Uri.Reset(resourceUri);
 14592
 14593                #pragma warning disable CA1308 // Normalize strings to uppercase
 014594                _request.Uri.AppendQuery("recursive", recursiveDirectoryDelete.ToString(System.Globalization.CultureInfo
 14595                #pragma warning restore CA1308 // Normalize strings to uppercase
 14596
 014597                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 014598                if (marker != null) { _request.Uri.AppendQuery("continuation", marker); }
 14599
 14600                // Add request headers
 014601                _request.Headers.SetValue("x-ms-version", version);
 014602                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 014603                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 014604                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 014605                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 014606                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 014607                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 14608
 014609                return _message;
 14610            }
 14611
 14612            /// <summary>
 14613            /// Create the Directory.DeleteAsync response or throw a failure exception.
 14614            /// </summary>
 14615            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 14616            /// <param name="response">The raw Response.</param>
 14617            /// <returns>The Directory.DeleteAsync Azure.Response{Azure.Storage.Blobs.Models.DirectoryDeleteResult}.</re
 14618            internal static Azure.Response<Azure.Storage.Blobs.Models.DirectoryDeleteResult> DeleteAsync_CreateResponse(
 14619                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14620                Azure.Response response)
 14621            {
 14622                // Process the response
 014623                switch (response.Status)
 14624                {
 14625                    case 200:
 14626                    {
 14627                        // Create the result
 014628                        Azure.Storage.Blobs.Models.DirectoryDeleteResult _value = new Azure.Storage.Blobs.Models.Directo
 14629
 14630                        // Get response headers
 14631                        string _header;
 014632                        if (response.Headers.TryGetValue("x-ms-continuation", out _header))
 14633                        {
 014634                            _value.Marker = _header;
 14635                        }
 14636
 14637                        // Create the response
 014638                        return Response.FromValue(_value, response);
 14639                    }
 14640                    default:
 14641                    {
 14642                        // Create the result
 014643                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 014644                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 14645
 014646                        throw _value.CreateException(clientDiagnostics, response);
 14647                    }
 14648                }
 14649            }
 14650            #endregion Directory.DeleteAsync
 14651
 14652            #region Directory.SetAccessControlAsync
 14653            /// <summary>
 14654            /// Set the owner, group, permissions, or access control list for a directory.
 14655            /// </summary>
 14656            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 14657            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14658            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14659            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14660            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14661            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14662            /// <param name="owner">Optional. The owner of the blob or directory.</param>
 14663            /// <param name="group">Optional. The owning group of the blob or directory.</param>
 14664            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 14665            /// <param name="posixAcl">Sets POSIX access control rights on files and directories. The value is a comma-s
 14666            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14667            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14668            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14669            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14670            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14671            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 14672            /// <param name="operationName">Operation name.</param>
 14673            /// <param name="cancellationToken">Cancellation token.</param>
 14674            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.DirectorySetAccessControlResult}</returns>
 14675            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.DirectorySetA
 14676                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14677                Azure.Core.Pipeline.HttpPipeline pipeline,
 14678                System.Uri resourceUri,
 14679                string version,
 14680                int? timeout = default,
 14681                string leaseId = default,
 14682                string owner = default,
 14683                string group = default,
 14684                string posixPermissions = default,
 14685                string posixAcl = default,
 14686                Azure.ETag? ifMatch = default,
 14687                Azure.ETag? ifNoneMatch = default,
 14688                System.DateTimeOffset? ifModifiedSince = default,
 14689                System.DateTimeOffset? ifUnmodifiedSince = default,
 14690                string requestId = default,
 14691                bool async = true,
 14692                string operationName = "DirectoryClient.SetAccessControl",
 14693                System.Threading.CancellationToken cancellationToken = default)
 14694            {
 014695                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 14696                try
 14697                {
 014698                    _scope.AddAttribute("url", resourceUri);
 014699                    _scope.Start();
 014700                    using (Azure.Core.HttpMessage _message = SetAccessControlAsync_CreateMessage(
 014701                        pipeline,
 014702                        resourceUri,
 014703                        version,
 014704                        timeout,
 014705                        leaseId,
 014706                        owner,
 014707                        group,
 014708                        posixPermissions,
 014709                        posixAcl,
 014710                        ifMatch,
 014711                        ifNoneMatch,
 014712                        ifModifiedSince,
 014713                        ifUnmodifiedSince,
 014714                        requestId))
 14715                    {
 014716                        if (async)
 14717                        {
 14718                            // Send the request asynchronously if we're being called via an async path
 014719                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 14720                        }
 14721                        else
 14722                        {
 14723                            // Send the request synchronously through the API that blocks if we're being called via a sy
 14724                            // (this is safe because the Task will complete before the user can call Wait)
 014725                            pipeline.Send(_message, cancellationToken);
 14726                        }
 014727                        Azure.Response _response = _message.Response;
 014728                        cancellationToken.ThrowIfCancellationRequested();
 014729                        return SetAccessControlAsync_CreateResponse(clientDiagnostics, _response);
 14730                    }
 14731                }
 014732                catch (System.Exception ex)
 14733                {
 014734                    _scope.Failed(ex);
 014735                    throw;
 14736                }
 14737                finally
 14738                {
 014739                    _scope.Dispose();
 14740                }
 014741            }
 14742
 14743            /// <summary>
 14744            /// Create the Directory.SetAccessControlAsync request.
 14745            /// </summary>
 14746            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14747            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14748            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14749            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14750            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14751            /// <param name="owner">Optional. The owner of the blob or directory.</param>
 14752            /// <param name="group">Optional. The owning group of the blob or directory.</param>
 14753            /// <param name="posixPermissions">Optional and only valid if Hierarchical Namespace is enabled for the acco
 14754            /// <param name="posixAcl">Sets POSIX access control rights on files and directories. The value is a comma-s
 14755            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14756            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14757            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14758            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14759            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14760            /// <returns>The Directory.SetAccessControlAsync Message.</returns>
 14761            internal static Azure.Core.HttpMessage SetAccessControlAsync_CreateMessage(
 14762                Azure.Core.Pipeline.HttpPipeline pipeline,
 14763                System.Uri resourceUri,
 14764                string version,
 14765                int? timeout = default,
 14766                string leaseId = default,
 14767                string owner = default,
 14768                string group = default,
 14769                string posixPermissions = default,
 14770                string posixAcl = default,
 14771                Azure.ETag? ifMatch = default,
 14772                Azure.ETag? ifNoneMatch = default,
 14773                System.DateTimeOffset? ifModifiedSince = default,
 14774                System.DateTimeOffset? ifUnmodifiedSince = default,
 14775                string requestId = default)
 14776            {
 14777                // Validation
 014778                if (resourceUri == null)
 14779                {
 014780                    throw new System.ArgumentNullException(nameof(resourceUri));
 14781                }
 014782                if (version == null)
 14783                {
 014784                    throw new System.ArgumentNullException(nameof(version));
 14785                }
 14786
 14787                // Create the request
 014788                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 014789                Azure.Core.Request _request = _message.Request;
 14790
 14791                // Set the endpoint
 014792                _request.Method = Azure.Core.RequestMethod.Patch;
 014793                _request.Uri.Reset(resourceUri);
 014794                _request.Uri.AppendQuery("action", "setAccessControl", escapeValue: false);
 014795                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 14796
 14797                // Add request headers
 014798                _request.Headers.SetValue("x-ms-version", version);
 014799                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 014800                if (owner != null) { _request.Headers.SetValue("x-ms-owner", owner); }
 014801                if (group != null) { _request.Headers.SetValue("x-ms-group", group); }
 014802                if (posixPermissions != null) { _request.Headers.SetValue("x-ms-permissions", posixPermissions); }
 014803                if (posixAcl != null) { _request.Headers.SetValue("x-ms-acl", posixAcl); }
 014804                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 014805                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 014806                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 014807                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 014808                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 14809
 014810                return _message;
 14811            }
 14812
 14813            /// <summary>
 14814            /// Create the Directory.SetAccessControlAsync response or throw a failure exception.
 14815            /// </summary>
 14816            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 14817            /// <param name="response">The raw Response.</param>
 14818            /// <returns>The Directory.SetAccessControlAsync Azure.Response{Azure.Storage.Blobs.Models.DirectorySetAcces
 14819            internal static Azure.Response<Azure.Storage.Blobs.Models.DirectorySetAccessControlResult> SetAccessControlA
 14820                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14821                Azure.Response response)
 14822            {
 14823                // Process the response
 014824                switch (response.Status)
 14825                {
 14826                    case 200:
 14827                    {
 14828                        // Create the result
 014829                        Azure.Storage.Blobs.Models.DirectorySetAccessControlResult _value = new Azure.Storage.Blobs.Mode
 14830
 14831                        // Get response headers
 14832                        string _header;
 014833                        if (response.Headers.TryGetValue("ETag", out _header))
 14834                        {
 014835                            _value.ETag = new Azure.ETag(_header);
 14836                        }
 014837                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 14838                        {
 014839                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 14840                        }
 14841
 14842                        // Create the response
 014843                        return Response.FromValue(_value, response);
 14844                    }
 14845                    default:
 14846                    {
 14847                        // Create the result
 014848                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 014849                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 14850
 014851                        throw _value.CreateException(clientDiagnostics, response);
 14852                    }
 14853                }
 14854            }
 14855            #endregion Directory.SetAccessControlAsync
 14856
 14857            #region Directory.GetAccessControlAsync
 14858            /// <summary>
 14859            /// Get the owner, group, permissions, or access control list for a directory.
 14860            /// </summary>
 14861            /// <param name="clientDiagnostics">The ClientDiagnostics instance used for operation reporting.</param>
 14862            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14863            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14864            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14865            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14866            /// <param name="upn">Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true"
 14867            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14868            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14869            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14870            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14871            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14872            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14873            /// <param name="async">Whether to invoke the operation asynchronously.  The default value is true.</param>
 14874            /// <param name="operationName">Operation name.</param>
 14875            /// <param name="cancellationToken">Cancellation token.</param>
 14876            /// <returns>Azure.Response{Azure.Storage.Blobs.Models.DirectoryGetAccessControlResult}</returns>
 14877            public static async System.Threading.Tasks.ValueTask<Azure.Response<Azure.Storage.Blobs.Models.DirectoryGetA
 14878                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 14879                Azure.Core.Pipeline.HttpPipeline pipeline,
 14880                System.Uri resourceUri,
 14881                string version,
 14882                int? timeout = default,
 14883                bool? upn = default,
 14884                string leaseId = default,
 14885                Azure.ETag? ifMatch = default,
 14886                Azure.ETag? ifNoneMatch = default,
 14887                System.DateTimeOffset? ifModifiedSince = default,
 14888                System.DateTimeOffset? ifUnmodifiedSince = default,
 14889                string requestId = default,
 14890                bool async = true,
 14891                string operationName = "DirectoryClient.GetAccessControl",
 14892                System.Threading.CancellationToken cancellationToken = default)
 14893            {
 014894                Azure.Core.Pipeline.DiagnosticScope _scope = clientDiagnostics.CreateScope(operationName);
 14895                try
 14896                {
 014897                    _scope.AddAttribute("url", resourceUri);
 014898                    _scope.Start();
 014899                    using (Azure.Core.HttpMessage _message = GetAccessControlAsync_CreateMessage(
 014900                        pipeline,
 014901                        resourceUri,
 014902                        version,
 014903                        timeout,
 014904                        upn,
 014905                        leaseId,
 014906                        ifMatch,
 014907                        ifNoneMatch,
 014908                        ifModifiedSince,
 014909                        ifUnmodifiedSince,
 014910                        requestId))
 14911                    {
 014912                        if (async)
 14913                        {
 14914                            // Send the request asynchronously if we're being called via an async path
 014915                            await pipeline.SendAsync(_message, cancellationToken).ConfigureAwait(false);
 14916                        }
 14917                        else
 14918                        {
 14919                            // Send the request synchronously through the API that blocks if we're being called via a sy
 14920                            // (this is safe because the Task will complete before the user can call Wait)
 014921                            pipeline.Send(_message, cancellationToken);
 14922                        }
 014923                        Azure.Response _response = _message.Response;
 014924                        cancellationToken.ThrowIfCancellationRequested();
 014925                        return GetAccessControlAsync_CreateResponse(clientDiagnostics, _response);
 14926                    }
 14927                }
 014928                catch (System.Exception ex)
 14929                {
 014930                    _scope.Failed(ex);
 014931                    throw;
 14932                }
 14933                finally
 14934                {
 014935                    _scope.Dispose();
 14936                }
 014937            }
 14938
 14939            /// <summary>
 14940            /// Create the Directory.GetAccessControlAsync request.
 14941            /// </summary>
 14942            /// <param name="pipeline">The pipeline used for sending requests.</param>
 14943            /// <param name="resourceUri">The URL of the service account, container, or blob that is the targe of the de
 14944            /// <param name="version">Specifies the version of the operation to use for this request.</param>
 14945            /// <param name="timeout">The timeout parameter is expressed in seconds. For more information, see <a href="
 14946            /// <param name="upn">Optional. Valid only when Hierarchical Namespace is enabled for the account. If "true"
 14947            /// <param name="leaseId">If specified, the operation only succeeds if the resource's lease is active and ma
 14948            /// <param name="ifMatch">Specify an ETag value to operate only on blobs with a matching value.</param>
 14949            /// <param name="ifNoneMatch">Specify an ETag value to operate only on blobs without a matching value.</para
 14950            /// <param name="ifModifiedSince">Specify this header value to operate only on a blob if it has been modifie
 14951            /// <param name="ifUnmodifiedSince">Specify this header value to operate only on a blob if it has not been m
 14952            /// <param name="requestId">Provides a client-generated, opaque value with a 1 KB character limit that is re
 14953            /// <returns>The Directory.GetAccessControlAsync Message.</returns>
 14954            internal static Azure.Core.HttpMessage GetAccessControlAsync_CreateMessage(
 14955                Azure.Core.Pipeline.HttpPipeline pipeline,
 14956                System.Uri resourceUri,
 14957                string version,
 14958                int? timeout = default,
 14959                bool? upn = default,
 14960                string leaseId = default,
 14961                Azure.ETag? ifMatch = default,
 14962                Azure.ETag? ifNoneMatch = default,
 14963                System.DateTimeOffset? ifModifiedSince = default,
 14964                System.DateTimeOffset? ifUnmodifiedSince = default,
 14965                string requestId = default)
 14966            {
 14967                // Validation
 014968                if (resourceUri == null)
 14969                {
 014970                    throw new System.ArgumentNullException(nameof(resourceUri));
 14971                }
 014972                if (version == null)
 14973                {
 014974                    throw new System.ArgumentNullException(nameof(version));
 14975                }
 14976
 14977                // Create the request
 014978                Azure.Core.HttpMessage _message = pipeline.CreateMessage();
 014979                Azure.Core.Request _request = _message.Request;
 14980
 14981                // Set the endpoint
 014982                _request.Method = Azure.Core.RequestMethod.Head;
 014983                _request.Uri.Reset(resourceUri);
 014984                _request.Uri.AppendQuery("action", "getAccessControl", escapeValue: false);
 014985                if (timeout != null) { _request.Uri.AppendQuery("timeout", timeout.Value.ToString(System.Globalization.C
 014986                if (upn != null) {
 14987                #pragma warning disable CA1308 // Normalize strings to uppercase
 014988                _request.Uri.AppendQuery("upn", upn.Value.ToString(System.Globalization.CultureInfo.InvariantCulture).To
 14989                #pragma warning restore CA1308 // Normalize strings to uppercase
 14990                }
 14991
 14992                // Add request headers
 014993                _request.Headers.SetValue("x-ms-version", version);
 014994                if (leaseId != null) { _request.Headers.SetValue("x-ms-lease-id", leaseId); }
 014995                if (ifMatch != null) { _request.Headers.SetValue("If-Match", ifMatch.Value.ToString()); }
 014996                if (ifNoneMatch != null) { _request.Headers.SetValue("If-None-Match", ifNoneMatch.Value.ToString()); }
 014997                if (ifModifiedSince != null) { _request.Headers.SetValue("If-Modified-Since", ifModifiedSince.Value.ToSt
 014998                if (ifUnmodifiedSince != null) { _request.Headers.SetValue("If-Unmodified-Since", ifUnmodifiedSince.Valu
 014999                if (requestId != null) { _request.Headers.SetValue("x-ms-client-request-id", requestId); }
 15000
 015001                return _message;
 15002            }
 15003
 15004            /// <summary>
 15005            /// Create the Directory.GetAccessControlAsync response or throw a failure exception.
 15006            /// </summary>
 15007            /// <param name="clientDiagnostics">The ClientDiagnostics instance to use.</param>
 15008            /// <param name="response">The raw Response.</param>
 15009            /// <returns>The Directory.GetAccessControlAsync Azure.Response{Azure.Storage.Blobs.Models.DirectoryGetAcces
 15010            internal static Azure.Response<Azure.Storage.Blobs.Models.DirectoryGetAccessControlResult> GetAccessControlA
 15011                Azure.Core.Pipeline.ClientDiagnostics clientDiagnostics,
 15012                Azure.Response response)
 15013            {
 15014                // Process the response
 015015                switch (response.Status)
 15016                {
 15017                    case 200:
 15018                    {
 15019                        // Create the result
 015020                        Azure.Storage.Blobs.Models.DirectoryGetAccessControlResult _value = new Azure.Storage.Blobs.Mode
 15021
 15022                        // Get response headers
 15023                        string _header;
 015024                        if (response.Headers.TryGetValue("ETag", out _header))
 15025                        {
 015026                            _value.ETag = new Azure.ETag(_header);
 15027                        }
 015028                        if (response.Headers.TryGetValue("Last-Modified", out _header))
 15029                        {
 015030                            _value.LastModified = System.DateTimeOffset.Parse(_header, System.Globalization.CultureInfo.
 15031                        }
 015032                        if (response.Headers.TryGetValue("x-ms-owner", out _header))
 15033                        {
 015034                            _value.XMSOwner = _header;
 15035                        }
 015036                        if (response.Headers.TryGetValue("x-ms-group", out _header))
 15037                        {
 015038                            _value.XMSGroup = _header;
 15039                        }
 015040                        if (response.Headers.TryGetValue("x-ms-permissions", out _header))
 15041                        {
 015042                            _value.XMSPermissions = _header;
 15043                        }
 015044                        if (response.Headers.TryGetValue("x-ms-acl", out _header))
 15045                        {
 015046                            _value.XMSAcl = _header;
 15047                        }
 15048
 15049                        // Create the response
 015050                        return Response.FromValue(_value, response);
 15051                    }
 15052                    case 304:
 15053                    {
 015054                        return new Azure.NoBodyResponse<Azure.Storage.Blobs.Models.DirectoryGetAccessControlResult>(resp
 15055                    }
 15056                    default:
 15057                    {
 15058                        // Create the result
 015059                        System.Xml.Linq.XDocument _xml = System.Xml.Linq.XDocument.Load(response.ContentStream, System.X
 015060                        Azure.Storage.Blobs.Models.DataLakeStorageError _value = Azure.Storage.Blobs.Models.DataLakeStor
 15061
 015062                        throw _value.CreateException(clientDiagnostics, response);
 15063                    }
 15064                }
 15065            }
 15066            #endregion Directory.GetAccessControlAsync
 15067        }
 15068        #endregion Directory operations
 15069    }
 15070}
 15071#endregion Service
 15072
 15073#region Models
 15074#region enum strings AccessTier
 15075namespace Azure.Storage.Blobs.Models
 15076{
 15077    /// <summary>
 15078    /// Indicates the tier to be set on the blob.
 15079    /// </summary>
 15080    public readonly struct AccessTier : System.IEquatable<AccessTier>
 15081    {
 15082        /// <summary>
 15083        /// The AccessTier value.
 15084        /// </summary>
 15085        private readonly string _value;
 15086
 15087        /// <summary>
 15088        /// Initializes a new instance of the <see cref="AccessTier"/> structure.
 15089        /// </summary>
 15090        /// <param name="value">The string value of the instance.</param>
 15091        public AccessTier(string value) { _value = value ?? throw new System.ArgumentNullException(nameof(value)); }
 15092
 15093        /// <summary>
 15094        /// P4
 15095        /// </summary>
 15096        public static Azure.Storage.Blobs.Models.AccessTier P4 { get; } = new AccessTier(@"P4");
 15097
 15098        /// <summary>
 15099        /// P6
 15100        /// </summary>
 15101        public static Azure.Storage.Blobs.Models.AccessTier P6 { get; } = new AccessTier(@"P6");
 15102
 15103        /// <summary>
 15104        /// P10
 15105        /// </summary>
 15106        public static Azure.Storage.Blobs.Models.AccessTier P10 { get; } = new AccessTier(@"P10");
 15107
 15108        /// <summary>
 15109        /// P15
 15110        /// </summary>
 15111        public static Azure.Storage.Blobs.Models.AccessTier P15 { get; } = new AccessTier(@"P15");
 15112
 15113        /// <summary>
 15114        /// P20
 15115        /// </summary>
 15116        public static Azure.Storage.Blobs.Models.AccessTier P20 { get; } = new AccessTier(@"P20");
 15117
 15118        /// <summary>
 15119        /// P30
 15120        /// </summary>
 15121        public static Azure.Storage.Blobs.Models.AccessTier P30 { get; } = new AccessTier(@"P30");
 15122
 15123        /// <summary>
 15124        /// P40
 15125        /// </summary>
 15126        public static Azure.Storage.Blobs.Models.AccessTier P40 { get; } = new AccessTier(@"P40");
 15127
 15128        /// <summary>
 15129        /// P50
 15130        /// </summary>
 15131        public static Azure.Storage.Blobs.Models.AccessTier P50 { get; } = new AccessTier(@"P50");
 15132
 15133        /// <summary>
 15134        /// P60
 15135        /// </summary>
 15136        public static Azure.Storage.Blobs.Models.AccessTier P60 { get; } = new AccessTier(@"P60");
 15137
 15138        /// <summary>
 15139        /// P70
 15140        /// </summary>
 15141        public static Azure.Storage.Blobs.Models.AccessTier P70 { get; } = new AccessTier(@"P70");
 15142
 15143        /// <summary>
 15144        /// P80
 15145        /// </summary>
 15146        public static Azure.Storage.Blobs.Models.AccessTier P80 { get; } = new AccessTier(@"P80");
 15147
 15148        /// <summary>
 15149        /// Hot
 15150        /// </summary>
 15151        public static Azure.Storage.Blobs.Models.AccessTier Hot { get; } = new AccessTier(@"Hot");
 15152
 15153        /// <summary>
 15154        /// Cool
 15155        /// </summary>
 15156        public static Azure.Storage.Blobs.Models.AccessTier Cool { get; } = new AccessTier(@"Cool");
 15157
 15158        /// <summary>
 15159        /// Archive
 15160        /// </summary>
 15161        public static Azure.Storage.Blobs.Models.AccessTier Archive { get; } = new AccessTier(@"Archive");
 15162
 15163        /// <summary>
 15164        /// Determines if two <see cref="AccessTier"/> values are the same.
 15165        /// </summary>
 15166        /// <param name="left">The first <see cref="AccessTier"/> to compare.</param>
 15167        /// <param name="right">The second <see cref="AccessTier"/> to compare.</param>
 15168        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are the same; otherwise, false.</retur
 15169        public static bool operator ==(Azure.Storage.Blobs.Models.AccessTier left, Azure.Storage.Blobs.Models.AccessTier
 15170
 15171        /// <summary>
 15172        /// Determines if two <see cref="AccessTier"/> values are different.
 15173        /// </summary>
 15174        /// <param name="left">The first <see cref="AccessTier"/> to compare.</param>
 15175        /// <param name="right">The second <see cref="AccessTier"/> to compare.</param>
 15176        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are different; otherwise, false.</retu
 15177        public static bool operator !=(Azure.Storage.Blobs.Models.AccessTier left, Azure.Storage.Blobs.Models.AccessTier
 15178
 15179        /// <summary>
 15180        /// Converts a string to a <see cref="AccessTier"/>.
 15181        /// </summary>
 15182        /// <param name="value">The string value to convert.</param>
 15183        /// <returns>The AccessTier value.</returns>
 15184        public static implicit operator AccessTier(string value) => new Azure.Storage.Blobs.Models.AccessTier(value);
 15185
 15186        /// <summary>
 15187        /// Check if two <see cref="AccessTier"/> instances are equal.
 15188        /// </summary>
 15189        /// <param name="obj">The instance to compare to.</param>
 15190        /// <returns>True if they're equal, false otherwise.</returns>
 15191        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 15192        public override bool Equals(object obj) => obj is Azure.Storage.Blobs.Models.AccessTier other && Equals(other);
 15193
 15194        /// <summary>
 15195        /// Check if two <see cref="AccessTier"/> instances are equal.
 15196        /// </summary>
 15197        /// <param name="other">The instance to compare to.</param>
 15198        /// <returns>True if they're equal, false otherwise.</returns>
 15199        public bool Equals(Azure.Storage.Blobs.Models.AccessTier other) => string.Equals(_value, other._value, System.St
 15200
 15201        /// <summary>
 15202        /// Get a hash code for the <see cref="AccessTier"/>.
 15203        /// </summary>
 15204        /// <returns>Hash code for the AccessTier.</returns>
 15205        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 15206        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 15207
 15208        /// <summary>
 15209        /// Convert the <see cref="AccessTier"/> to a string.
 15210        /// </summary>
 15211        /// <returns>String representation of the AccessTier.</returns>
 15212        public override string ToString() => _value;
 15213    }
 15214}
 15215#endregion enum strings AccessTier
 15216
 15217#region class AccountInfo
 15218namespace Azure.Storage.Blobs.Models
 15219{
 15220    /// <summary>
 15221    /// AccountInfo
 15222    /// </summary>
 15223    public partial class AccountInfo
 15224    {
 15225        /// <summary>
 15226        /// Identifies the sku name of the account
 15227        /// </summary>
 15228        public Azure.Storage.Blobs.Models.SkuName SkuName { get; internal set; }
 15229
 15230        /// <summary>
 15231        /// Identifies the account kind
 15232        /// </summary>
 15233        public Azure.Storage.Blobs.Models.AccountKind AccountKind { get; internal set; }
 15234
 15235        /// <summary>
 15236        /// Prevent direct instantiation of AccountInfo instances.
 15237        /// You can use BlobsModelFactory.AccountInfo instead.
 15238        /// </summary>
 15239        internal AccountInfo() { }
 15240    }
 15241
 15242    /// <summary>
 15243    /// BlobsModelFactory provides utilities for mocking.
 15244    /// </summary>
 15245    public static partial class BlobsModelFactory
 15246    {
 15247        /// <summary>
 15248        /// Creates a new AccountInfo instance for mocking.
 15249        /// </summary>
 15250        public static AccountInfo AccountInfo(
 15251            Azure.Storage.Blobs.Models.SkuName skuName,
 15252            Azure.Storage.Blobs.Models.AccountKind accountKind)
 15253        {
 15254            return new AccountInfo()
 15255            {
 15256                SkuName = skuName,
 15257                AccountKind = accountKind,
 15258            };
 15259        }
 15260    }
 15261}
 15262#endregion class AccountInfo
 15263
 15264#region enum AccountKind
 15265namespace Azure.Storage.Blobs.Models
 15266{
 15267    /// <summary>
 15268    /// Identifies the account kind
 15269    /// </summary>
 15270    public enum AccountKind
 15271    {
 15272        /// <summary>
 15273        /// Storage
 15274        /// </summary>
 15275        Storage,
 15276
 15277        /// <summary>
 15278        /// BlobStorage
 15279        /// </summary>
 15280        BlobStorage,
 15281
 15282        /// <summary>
 15283        /// StorageV2
 15284        /// </summary>
 15285        StorageV2,
 15286
 15287        /// <summary>
 15288        /// FileStorage
 15289        /// </summary>
 15290        FileStorage,
 15291
 15292        /// <summary>
 15293        /// BlockBlobStorage
 15294        /// </summary>
 15295        BlockBlobStorage
 15296    }
 15297}
 15298#endregion enum AccountKind
 15299
 15300#region class AppendBlobSealInternal
 15301namespace Azure.Storage.Blobs.Models
 15302{
 15303    /// <summary>
 15304    /// AppendBlobSealInternal
 15305    /// </summary>
 15306    internal partial class AppendBlobSealInternal
 15307    {
 15308        /// <summary>
 15309        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 15310        /// </summary>
 15311        public Azure.ETag ETag { get; internal set; }
 15312
 15313        /// <summary>
 15314        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 15315        /// </summary>
 15316        public System.DateTimeOffset LastModified { get; internal set; }
 15317
 15318        /// <summary>
 15319        /// If this blob has been sealed
 15320        /// </summary>
 15321        public bool IsSealed { get; internal set; }
 15322
 15323        /// <summary>
 15324        /// Prevent direct instantiation of AppendBlobSealInternal instances.
 15325        /// You can use BlobsModelFactory.AppendBlobSealInternal instead.
 15326        /// </summary>
 15327        internal AppendBlobSealInternal() { }
 15328    }
 15329}
 15330#endregion class AppendBlobSealInternal
 15331
 15332#region enum ArchiveStatus
 15333namespace Azure.Storage.Blobs.Models
 15334{
 15335    /// <summary>
 15336    /// ArchiveStatus values
 15337    /// </summary>
 15338    #pragma warning disable CA1717 // Only FlagsAttribute enums should have plural names
 15339    public enum ArchiveStatus
 15340    #pragma warning restore CA1717 // Only FlagsAttribute enums should have plural names
 15341    {
 15342        /// <summary>
 15343        /// rehydrate-pending-to-hot
 15344        /// </summary>
 15345        RehydratePendingToHot,
 15346
 15347        /// <summary>
 15348        /// rehydrate-pending-to-cool
 15349        /// </summary>
 15350        RehydratePendingToCool
 15351    }
 15352}
 15353
 15354namespace Azure.Storage.Blobs
 15355{
 15356    internal static partial class BlobRestClient
 15357    {
 15358        public static partial class Serialization
 15359        {
 15360            public static string ToString(Azure.Storage.Blobs.Models.ArchiveStatus value)
 15361            {
 015362                return value switch
 015363                {
 015364                    Azure.Storage.Blobs.Models.ArchiveStatus.RehydratePendingToHot => "rehydrate-pending-to-hot",
 015365                    Azure.Storage.Blobs.Models.ArchiveStatus.RehydratePendingToCool => "rehydrate-pending-to-cool",
 015366                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 015367                };
 15368            }
 15369
 15370            public static Azure.Storage.Blobs.Models.ArchiveStatus ParseArchiveStatus(string value)
 15371            {
 1615372                return value switch
 1615373                {
 3215374                    "rehydrate-pending-to-hot" => Azure.Storage.Blobs.Models.ArchiveStatus.RehydratePendingToHot,
 015375                    "rehydrate-pending-to-cool" => Azure.Storage.Blobs.Models.ArchiveStatus.RehydratePendingToCool,
 015376                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 1615377                };
 15378            }
 15379        }
 15380    }
 15381}
 15382#endregion enum ArchiveStatus
 15383
 15384#region class BlobGetAccessControlResult
 15385namespace Azure.Storage.Blobs.Models
 15386{
 15387    /// <summary>
 15388    /// Blob GetAccessControlResult
 15389    /// </summary>
 15390    internal partial class BlobGetAccessControlResult
 15391    {
 15392        /// <summary>
 15393        /// An HTTP entity tag associated with the file or directory.
 15394        /// </summary>
 15395        public Azure.ETag ETag { get; internal set; }
 15396
 15397        /// <summary>
 15398        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 15399        /// </summary>
 15400        public System.DateTimeOffset LastModified { get; internal set; }
 15401
 15402        /// <summary>
 15403        /// The owner of the file or directory. Included in the response if Hierarchical Namespace is enabled for the ac
 15404        /// </summary>
 15405        public string XMSOwner { get; internal set; }
 15406
 15407        /// <summary>
 15408        /// The owning group of the file or directory. Included in the response if Hierarchical Namespace is enabled for
 15409        /// </summary>
 15410        public string XMSGroup { get; internal set; }
 15411
 15412        /// <summary>
 15413        /// The POSIX access permissions for the file owner, the file owning group, and others. Included in the response
 15414        /// </summary>
 15415        public string XMSPermissions { get; internal set; }
 15416
 15417        /// <summary>
 15418        /// The POSIX access control list for the file or directory.  Included in the response only if the action is "ge
 15419        /// </summary>
 15420        public string XMSAcl { get; internal set; }
 15421
 15422        /// <summary>
 15423        /// Prevent direct instantiation of BlobGetAccessControlResult instances.
 15424        /// You can use BlobsModelFactory.BlobGetAccessControlResult instead.
 15425        /// </summary>
 15426        internal BlobGetAccessControlResult() { }
 15427    }
 15428}
 15429#endregion class BlobGetAccessControlResult
 15430
 15431#region class BlobQueryResult
 15432namespace Azure.Storage.Blobs.Models
 15433{
 15434    /// <summary>
 15435    /// Blob QueryResult
 15436    /// </summary>
 15437    internal partial class BlobQueryResult
 15438    {
 15439        /// <summary>
 15440        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 15441        /// </summary>
 15442        public System.DateTimeOffset LastModified { get; internal set; }
 15443
 15444        /// <summary>
 15445        /// x-ms-meta
 15446        /// </summary>
 15447        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 15448
 15449        /// <summary>
 15450        /// The number of bytes present in the response body.
 15451        /// </summary>
 15452        public long ContentLength { get; internal set; }
 15453
 15454        /// <summary>
 15455        /// The media type of the body of the response. For Download Blob this is 'application/octet-stream'
 15456        /// </summary>
 15457        public string ContentType { get; internal set; }
 15458
 15459        /// <summary>
 15460        /// Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting
 15461        /// </summary>
 15462        public string ContentRange { get; internal set; }
 15463
 15464        /// <summary>
 15465        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 15466        /// </summary>
 15467        public Azure.ETag ETag { get; internal set; }
 15468
 15469        /// <summary>
 15470        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 15471        /// </summary>
 15472        #pragma warning disable CA1819 // Properties should not return arrays
 15473        public byte[] ContentHash { get; internal set; }
 15474        #pragma warning restore CA1819 // Properties should not return arrays
 15475
 15476        /// <summary>
 15477        /// This header returns the value that was specified for the Content-Encoding request header
 15478        /// </summary>
 15479        public string ContentEncoding { get; internal set; }
 15480
 15481        /// <summary>
 15482        /// This header is returned if it was previously specified for the blob.
 15483        /// </summary>
 15484        public string CacheControl { get; internal set; }
 15485
 15486        /// <summary>
 15487        /// This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content
 15488        /// </summary>
 15489        public string ContentDisposition { get; internal set; }
 15490
 15491        /// <summary>
 15492        /// This header returns the value that was specified for the Content-Language request header.
 15493        /// </summary>
 15494        public string ContentLanguage { get; internal set; }
 15495
 15496        /// <summary>
 15497        /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs
 15498        /// </summary>
 15499        public long BlobSequenceNumber { get; internal set; }
 15500
 15501        /// <summary>
 15502        /// The blob's type.
 15503        /// </summary>
 15504        public Azure.Storage.Blobs.Models.BlobType BlobType { get; internal set; }
 15505
 15506        /// <summary>
 15507        /// If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the re
 15508        /// </summary>
 15509        #pragma warning disable CA1819 // Properties should not return arrays
 15510        public byte[] ContentCrc64 { get; internal set; }
 15511        #pragma warning restore CA1819 // Properties should not return arrays
 15512
 15513        /// <summary>
 15514        /// Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This val
 15515        /// </summary>
 15516        public System.DateTimeOffset CopyCompletionTime { get; internal set; }
 15517
 15518        /// <summary>
 15519        /// Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal 
 15520        /// </summary>
 15521        public string CopyStatusDescription { get; internal set; }
 15522
 15523        /// <summary>
 15524        /// String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy ope
 15525        /// </summary>
 15526        public string CopyId { get; internal set; }
 15527
 15528        /// <summary>
 15529        /// Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operat
 15530        /// </summary>
 15531        public string CopyProgress { get; internal set; }
 15532
 15533        /// <summary>
 15534        /// URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operati
 15535        /// </summary>
 15536        public string CopySource { get; internal set; }
 15537
 15538        /// <summary>
 15539        /// State of the copy operation identified by x-ms-copy-id.
 15540        /// </summary>
 15541        public Azure.Storage.Blobs.Models.CopyStatus CopyStatus { get; internal set; }
 15542
 15543        /// <summary>
 15544        /// When a blob is leased, specifies whether the lease is of infinite or fixed duration.
 15545        /// </summary>
 15546        public Azure.Storage.Blobs.Models.LeaseDurationType LeaseDuration { get; internal set; }
 15547
 15548        /// <summary>
 15549        /// Lease state of the blob.
 15550        /// </summary>
 15551        public Azure.Storage.Blobs.Models.LeaseState LeaseState { get; internal set; }
 15552
 15553        /// <summary>
 15554        /// The current lease status of the blob.
 15555        /// </summary>
 15556        public Azure.Storage.Blobs.Models.LeaseStatus LeaseStatus { get; internal set; }
 15557
 15558        /// <summary>
 15559        /// Indicates that the service supports requests for partial blob content.
 15560        /// </summary>
 15561        public string AcceptRanges { get; internal set; }
 15562
 15563        /// <summary>
 15564        /// The number of committed blocks present in the blob. This header is returned only for append blobs.
 15565        /// </summary>
 15566        public int BlobCommittedBlockCount { get; internal set; }
 15567
 15568        /// <summary>
 15569        /// The value of this header is set to true if the blob data and application metadata are completely encrypted u
 15570        /// </summary>
 15571        public bool IsServerEncrypted { get; internal set; }
 15572
 15573        /// <summary>
 15574        /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob 
 15575        /// </summary>
 15576        public string EncryptionKeySha256 { get; internal set; }
 15577
 15578        /// <summary>
 15579        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 15580        /// </summary>
 15581        public string EncryptionScope { get; internal set; }
 15582
 15583        /// <summary>
 15584        /// If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header
 15585        /// </summary>
 15586        #pragma warning disable CA1819 // Properties should not return arrays
 15587        public byte[] BlobContentMD5 { get; internal set; }
 15588        #pragma warning restore CA1819 // Properties should not return arrays
 15589
 15590        /// <summary>
 15591        /// Body
 15592        /// </summary>
 15593        public System.IO.Stream Body { get; internal set; }
 15594
 15595        /// <summary>
 15596        /// Creates a new BlobQueryResult instance
 15597        /// </summary>
 15598        public BlobQueryResult()
 15599        {
 15600            Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase
 15601        }
 15602    }
 15603}
 15604#endregion class BlobQueryResult
 15605
 15606#region class BlobRenameResult
 15607namespace Azure.Storage.Blobs.Models
 15608{
 15609    /// <summary>
 15610    /// Blob RenameResult
 15611    /// </summary>
 15612    internal partial class BlobRenameResult
 15613    {
 15614        /// <summary>
 15615        /// An HTTP entity tag associated with the file or directory.
 15616        /// </summary>
 15617        public Azure.ETag ETag { get; internal set; }
 15618
 15619        /// <summary>
 15620        /// The data and time the file or directory was last modified.  Write operations on the file or directory update
 15621        /// </summary>
 15622        public System.DateTimeOffset LastModified { get; internal set; }
 15623
 15624        /// <summary>
 15625        /// The size of the resource in bytes.
 15626        /// </summary>
 15627        public long ContentLength { get; internal set; }
 15628
 15629        /// <summary>
 15630        /// Prevent direct instantiation of BlobRenameResult instances.
 15631        /// You can use BlobsModelFactory.BlobRenameResult instead.
 15632        /// </summary>
 15633        internal BlobRenameResult() { }
 15634    }
 15635}
 15636#endregion class BlobRenameResult
 15637
 15638#region class BlobSetAccessControlResult
 15639namespace Azure.Storage.Blobs.Models
 15640{
 15641    /// <summary>
 15642    /// Blob SetAccessControlResult
 15643    /// </summary>
 15644    internal partial class BlobSetAccessControlResult
 15645    {
 15646        /// <summary>
 15647        /// An HTTP entity tag associated with the file or directory.
 15648        /// </summary>
 15649        public Azure.ETag ETag { get; internal set; }
 15650
 15651        /// <summary>
 15652        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 15653        /// </summary>
 15654        public System.DateTimeOffset LastModified { get; internal set; }
 15655
 15656        /// <summary>
 15657        /// Prevent direct instantiation of BlobSetAccessControlResult instances.
 15658        /// You can use BlobsModelFactory.BlobSetAccessControlResult instead.
 15659        /// </summary>
 15660        internal BlobSetAccessControlResult() { }
 15661    }
 15662}
 15663#endregion class BlobSetAccessControlResult
 15664
 15665#region class BlobAccessPolicy
 15666namespace Azure.Storage.Blobs.Models
 15667{
 15668    /// <summary>
 15669    /// An Access policy
 15670    /// </summary>
 15671    public partial class BlobAccessPolicy
 15672    {
 15673        /// <summary>
 15674        /// the date-time the policy is active
 15675        /// </summary>
 15676        public System.DateTimeOffset? PolicyStartsOn { get; set; }
 15677
 15678        /// <summary>
 15679        /// the date-time the policy expires
 15680        /// </summary>
 15681        public System.DateTimeOffset? PolicyExpiresOn { get; set; }
 15682
 15683        /// <summary>
 15684        /// the permissions for the acl policy
 15685        /// </summary>
 15686        public string Permissions { get; set; }
 15687
 15688        /// <summary>
 15689        /// Creates a new BlobAccessPolicy instance
 15690        /// </summary>
 15691        public BlobAccessPolicy() { }
 15692
 15693        /// <summary>
 15694        /// Serialize a BlobAccessPolicy instance as XML.
 15695        /// </summary>
 15696        /// <param name="value">The BlobAccessPolicy instance to serialize.</param>
 15697        /// <param name="name">An optional name to use for the root element instead of "AccessPolicy".</param>
 15698        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 15699        /// <returns>The serialized XML element.</returns>
 15700        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobAccessPolicy value, string name = 
 15701        {
 15702            System.Diagnostics.Debug.Assert(value != null);
 15703            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 15704            if (value.PolicyStartsOn != null)
 15705            {
 15706                _element.Add(new System.Xml.Linq.XElement(
 15707                    System.Xml.Linq.XName.Get("Start", ""),
 15708                    value.PolicyStartsOn.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffZ", System.Globalization.C
 15709            }
 15710            if (value.PolicyExpiresOn != null)
 15711            {
 15712                _element.Add(new System.Xml.Linq.XElement(
 15713                    System.Xml.Linq.XName.Get("Expiry", ""),
 15714                    value.PolicyExpiresOn.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffZ", System.Globalization.
 15715            }
 15716            if (value.Permissions != null)
 15717            {
 15718                _element.Add(new System.Xml.Linq.XElement(
 15719                    System.Xml.Linq.XName.Get("Permission", ""),
 15720                    value.Permissions));
 15721            }
 15722            return _element;
 15723        }
 15724
 15725        /// <summary>
 15726        /// Deserializes XML into a new BlobAccessPolicy instance.
 15727        /// </summary>
 15728        /// <param name="element">The XML element to deserialize.</param>
 15729        /// <returns>A deserialized BlobAccessPolicy instance.</returns>
 15730        internal static Azure.Storage.Blobs.Models.BlobAccessPolicy FromXml(System.Xml.Linq.XElement element)
 15731        {
 15732            System.Diagnostics.Debug.Assert(element != null);
 15733            System.Xml.Linq.XElement _child;
 15734            Azure.Storage.Blobs.Models.BlobAccessPolicy _value = new Azure.Storage.Blobs.Models.BlobAccessPolicy();
 15735            _child = element.Element(System.Xml.Linq.XName.Get("Start", ""));
 15736            if (_child != null)
 15737            {
 15738                _value.PolicyStartsOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Invar
 15739            }
 15740            _child = element.Element(System.Xml.Linq.XName.Get("Expiry", ""));
 15741            if (_child != null)
 15742            {
 15743                _value.PolicyExpiresOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Inva
 15744            }
 15745            _child = element.Element(System.Xml.Linq.XName.Get("Permission", ""));
 15746            if (_child != null)
 15747            {
 15748                _value.Permissions = _child.Value;
 15749            }
 15750            CustomizeFromXml(element, _value);
 15751            return _value;
 15752        }
 15753
 15754        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobAccessPoli
 15755    }
 15756}
 15757#endregion class BlobAccessPolicy
 15758
 15759#region class BlobAnalyticsLogging
 15760namespace Azure.Storage.Blobs.Models
 15761{
 15762    /// <summary>
 15763    /// Azure Analytics Logging settings.
 15764    /// </summary>
 15765    public partial class BlobAnalyticsLogging
 15766    {
 15767        /// <summary>
 15768        /// The version of Storage Analytics to configure.
 15769        /// </summary>
 15770        public string Version { get; set; }
 15771
 15772        /// <summary>
 15773        /// Indicates whether all delete requests should be logged.
 15774        /// </summary>
 15775        public bool Delete { get; set; }
 15776
 15777        /// <summary>
 15778        /// Indicates whether all read requests should be logged.
 15779        /// </summary>
 15780        public bool Read { get; set; }
 15781
 15782        /// <summary>
 15783        /// Indicates whether all write requests should be logged.
 15784        /// </summary>
 15785        public bool Write { get; set; }
 15786
 15787        /// <summary>
 15788        /// the retention policy which determines how long the associated data should persist
 15789        /// </summary>
 15790        public Azure.Storage.Blobs.Models.BlobRetentionPolicy RetentionPolicy { get; set; }
 15791
 15792        /// <summary>
 15793        /// Creates a new BlobAnalyticsLogging instance
 15794        /// </summary>
 15795        public BlobAnalyticsLogging()
 15796            : this(false)
 15797        {
 15798        }
 15799
 15800        /// <summary>
 15801        /// Creates a new BlobAnalyticsLogging instance
 15802        /// </summary>
 15803        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 15804        internal BlobAnalyticsLogging(bool skipInitialization)
 15805        {
 15806            if (!skipInitialization)
 15807            {
 15808                RetentionPolicy = new Azure.Storage.Blobs.Models.BlobRetentionPolicy();
 15809            }
 15810        }
 15811
 15812        /// <summary>
 15813        /// Serialize a BlobAnalyticsLogging instance as XML.
 15814        /// </summary>
 15815        /// <param name="value">The BlobAnalyticsLogging instance to serialize.</param>
 15816        /// <param name="name">An optional name to use for the root element instead of "Logging".</param>
 15817        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 15818        /// <returns>The serialized XML element.</returns>
 15819        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobAnalyticsLogging value, string nam
 15820        {
 15821            System.Diagnostics.Debug.Assert(value != null);
 15822            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 15823            _element.Add(new System.Xml.Linq.XElement(
 15824                System.Xml.Linq.XName.Get("Version", ""),
 15825                value.Version));
 15826            _element.Add(new System.Xml.Linq.XElement(
 15827                System.Xml.Linq.XName.Get("Delete", ""),
 15828                #pragma warning disable CA1308 // Normalize strings to uppercase
 15829                value.Delete.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 15830                #pragma warning restore CA1308 // Normalize strings to uppercase
 15831            _element.Add(new System.Xml.Linq.XElement(
 15832                System.Xml.Linq.XName.Get("Read", ""),
 15833                #pragma warning disable CA1308 // Normalize strings to uppercase
 15834                value.Read.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 15835                #pragma warning restore CA1308 // Normalize strings to uppercase
 15836            _element.Add(new System.Xml.Linq.XElement(
 15837                System.Xml.Linq.XName.Get("Write", ""),
 15838                #pragma warning disable CA1308 // Normalize strings to uppercase
 15839                value.Write.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 15840                #pragma warning restore CA1308 // Normalize strings to uppercase
 15841            _element.Add(Azure.Storage.Blobs.Models.BlobRetentionPolicy.ToXml(value.RetentionPolicy, "RetentionPolicy", 
 15842            return _element;
 15843        }
 15844
 15845        /// <summary>
 15846        /// Deserializes XML into a new BlobAnalyticsLogging instance.
 15847        /// </summary>
 15848        /// <param name="element">The XML element to deserialize.</param>
 15849        /// <returns>A deserialized BlobAnalyticsLogging instance.</returns>
 15850        internal static Azure.Storage.Blobs.Models.BlobAnalyticsLogging FromXml(System.Xml.Linq.XElement element)
 15851        {
 15852            System.Diagnostics.Debug.Assert(element != null);
 15853            System.Xml.Linq.XElement _child;
 15854            Azure.Storage.Blobs.Models.BlobAnalyticsLogging _value = new Azure.Storage.Blobs.Models.BlobAnalyticsLogging
 15855            _child = element.Element(System.Xml.Linq.XName.Get("Version", ""));
 15856            if (_child != null)
 15857            {
 15858                _value.Version = _child.Value;
 15859            }
 15860            _child = element.Element(System.Xml.Linq.XName.Get("Delete", ""));
 15861            if (_child != null)
 15862            {
 15863                _value.Delete = bool.Parse(_child.Value);
 15864            }
 15865            _child = element.Element(System.Xml.Linq.XName.Get("Read", ""));
 15866            if (_child != null)
 15867            {
 15868                _value.Read = bool.Parse(_child.Value);
 15869            }
 15870            _child = element.Element(System.Xml.Linq.XName.Get("Write", ""));
 15871            if (_child != null)
 15872            {
 15873                _value.Write = bool.Parse(_child.Value);
 15874            }
 15875            _child = element.Element(System.Xml.Linq.XName.Get("RetentionPolicy", ""));
 15876            if (_child != null)
 15877            {
 15878                _value.RetentionPolicy = Azure.Storage.Blobs.Models.BlobRetentionPolicy.FromXml(_child);
 15879            }
 15880            CustomizeFromXml(element, _value);
 15881            return _value;
 15882        }
 15883
 15884        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobAnalyticsL
 15885    }
 15886}
 15887#endregion class BlobAnalyticsLogging
 15888
 15889#region class BlobAppendInfo
 15890namespace Azure.Storage.Blobs.Models
 15891{
 15892    /// <summary>
 15893    /// BlobAppendInfo
 15894    /// </summary>
 15895    public partial class BlobAppendInfo
 15896    {
 15897        /// <summary>
 15898        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 15899        /// </summary>
 15900        public Azure.ETag ETag { get; internal set; }
 15901
 15902        /// <summary>
 15903        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 15904        /// </summary>
 15905        public System.DateTimeOffset LastModified { get; internal set; }
 15906
 15907        /// <summary>
 15908        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 15909        /// </summary>
 15910        #pragma warning disable CA1819 // Properties should not return arrays
 15911        public byte[] ContentHash { get; internal set; }
 15912        #pragma warning restore CA1819 // Properties should not return arrays
 15913
 15914        /// <summary>
 15915        /// This header is returned so that the client can check for message content integrity. The value of this header
 15916        /// </summary>
 15917        #pragma warning disable CA1819 // Properties should not return arrays
 15918        public byte[] ContentCrc64 { get; internal set; }
 15919        #pragma warning restore CA1819 // Properties should not return arrays
 15920
 15921        /// <summary>
 15922        /// This response header is returned only for append operations. It returns the offset at which the block was co
 15923        /// </summary>
 15924        public string BlobAppendOffset { get; internal set; }
 15925
 15926        /// <summary>
 15927        /// The number of committed blocks present in the blob. This header is returned only for append blobs.
 15928        /// </summary>
 15929        public int BlobCommittedBlockCount { get; internal set; }
 15930
 15931        /// <summary>
 15932        /// The value of this header is set to true if the contents of the request are successfully encrypted using the 
 15933        /// </summary>
 15934        public bool IsServerEncrypted { get; internal set; }
 15935
 15936        /// <summary>
 15937        /// The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the bloc
 15938        /// </summary>
 15939        public string EncryptionKeySha256 { get; internal set; }
 15940
 15941        /// <summary>
 15942        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 15943        /// </summary>
 15944        public string EncryptionScope { get; internal set; }
 15945
 15946        /// <summary>
 15947        /// Prevent direct instantiation of BlobAppendInfo instances.
 15948        /// You can use BlobsModelFactory.BlobAppendInfo instead.
 15949        /// </summary>
 15950        internal BlobAppendInfo() { }
 15951    }
 15952
 15953    /// <summary>
 15954    /// BlobsModelFactory provides utilities for mocking.
 15955    /// </summary>
 15956    public static partial class BlobsModelFactory
 15957    {
 15958        /// <summary>
 15959        /// Creates a new BlobAppendInfo instance for mocking.
 15960        /// </summary>
 15961        public static BlobAppendInfo BlobAppendInfo(
 15962            Azure.ETag eTag,
 15963            System.DateTimeOffset lastModified,
 15964            byte[] contentHash,
 15965            byte[] contentCrc64,
 15966            string blobAppendOffset,
 15967            int blobCommittedBlockCount,
 15968            bool isServerEncrypted,
 15969            string encryptionKeySha256,
 15970            string encryptionScope)
 15971        {
 15972            return new BlobAppendInfo()
 15973            {
 15974                ETag = eTag,
 15975                LastModified = lastModified,
 15976                ContentHash = contentHash,
 15977                ContentCrc64 = contentCrc64,
 15978                BlobAppendOffset = blobAppendOffset,
 15979                BlobCommittedBlockCount = blobCommittedBlockCount,
 15980                IsServerEncrypted = isServerEncrypted,
 15981                EncryptionKeySha256 = encryptionKeySha256,
 15982                EncryptionScope = encryptionScope,
 15983            };
 15984        }
 15985    }
 15986}
 15987#endregion class BlobAppendInfo
 15988
 15989#region class BlobBatchResult
 15990namespace Azure.Storage.Blobs.Models
 15991{
 15992    /// <summary>
 15993    /// BlobBatchResult
 15994    /// </summary>
 15995    internal partial class BlobBatchResult
 15996    {
 15997        /// <summary>
 15998        /// The media type of the body of the response. For batch requests, this is multipart/mixed; boundary=batchrespo
 15999        /// </summary>
 16000        public string ContentType { get; internal set; }
 16001
 16002        /// <summary>
 16003        /// Content
 16004        /// </summary>
 16005        public System.IO.Stream Content { get; internal set; }
 16006
 16007        /// <summary>
 16008        /// Prevent direct instantiation of BlobBatchResult instances.
 16009        /// You can use BlobsModelFactory.BlobBatchResult instead.
 16010        /// </summary>
 16011        internal BlobBatchResult() { }
 16012    }
 16013}
 16014#endregion class BlobBatchResult
 16015
 16016#region struct BlobBlock
 16017namespace Azure.Storage.Blobs.Models
 16018{
 16019    /// <summary>
 16020    /// Represents a single block in a block blob.  It describes the block's ID and size.
 16021    /// </summary>
 16022    public readonly partial struct BlobBlock: System.IEquatable<BlobBlock>
 16023    {
 16024        /// <summary>
 16025        /// The base64 encoded block ID.
 16026        /// </summary>
 16027        public string Name { get; }
 16028
 16029        /// <summary>
 16030        /// The block size in bytes.
 16031        /// </summary>
 16032        public int Size { get; }
 16033
 16034        /// <summary>
 16035        /// Prevent direct instantiation of BlobBlock instances.
 16036        /// You can use BlobsModelFactory.BlobBlock instead.
 16037        /// </summary>
 16038        internal BlobBlock(
 16039            string name,
 16040            int size)
 16041            {
 16042                Name = name;
 16043                Size = size;
 16044            }
 16045
 16046        /// <summary>
 16047        /// Check if two BlobBlock instances are equal.
 16048        /// </summary>
 16049        /// <param name="other">The instance to compare to.</param>
 16050        /// <returns>True if they're equal, false otherwise.</returns>
 16051        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 16052        public bool Equals(BlobBlock other)
 16053        {
 16054            if (!System.StringComparer.Ordinal.Equals(Name, other.Name))
 16055            {
 16056                return false;
 16057            }
 16058            if (!Size.Equals(other.Size))
 16059            {
 16060                return false;
 16061            }
 16062
 16063            return true;
 16064        }
 16065
 16066        /// <summary>
 16067        /// Check if two BlobBlock instances are equal.
 16068        /// </summary>
 16069        /// <param name="obj">The instance to compare to.</param>
 16070        /// <returns>True if they're equal, false otherwise.</returns>
 16071        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 16072        public override bool Equals(object obj) => obj is BlobBlock && Equals((BlobBlock)obj);
 16073
 16074        /// <summary>
 16075        /// Get a hash code for the BlobBlock.
 16076        /// </summary>
 16077        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 16078        public override int GetHashCode()
 16079        {
 16080            var hashCode = new Azure.Core.HashCodeBuilder();
 16081            if (Name != null)
 16082            {
 16083                hashCode.Add(Name, System.StringComparer.Ordinal);
 16084            }
 16085            hashCode.Add(Size);
 16086
 16087            return hashCode.ToHashCode();
 16088        }
 16089
 16090        /// <summary>
 16091        /// Deserializes XML into a new BlobBlock instance.
 16092        /// </summary>
 16093        /// <param name="element">The XML element to deserialize.</param>
 16094        /// <returns>A deserialized BlobBlock instance.</returns>
 16095        internal static Azure.Storage.Blobs.Models.BlobBlock FromXml(System.Xml.Linq.XElement element)
 16096        {
 16097            System.Diagnostics.Debug.Assert(element != null);
 16098            System.Xml.Linq.XElement _child;
 16099            string name = default;
 16100            int size = default;
 16101            _child = element.Element(System.Xml.Linq.XName.Get("Name", ""));
 16102            if (_child != null)
 16103            {
 16104                name = _child.Value;
 16105            }
 16106            _child = element.Element(System.Xml.Linq.XName.Get("Size", ""));
 16107            if (_child != null)
 16108            {
 16109                size = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 16110            }
 16111            Azure.Storage.Blobs.Models.BlobBlock _value = new Azure.Storage.Blobs.Models.BlobBlock(name, size);
 16112            CustomizeFromXml(element, _value);
 16113            return _value;
 16114        }
 16115
 16116        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobBlock valu
 16117    }
 16118
 16119    /// <summary>
 16120    /// BlobsModelFactory provides utilities for mocking.
 16121    /// </summary>
 16122    public static partial class BlobsModelFactory
 16123    {
 16124        /// <summary>
 16125        /// Creates a new BlobBlock instance for mocking.
 16126        /// </summary>
 16127        public static BlobBlock BlobBlock(
 16128            string name,
 16129            int size)
 16130        {
 16131            return new BlobBlock(name, size);
 16132        }
 16133    }
 16134}
 16135#endregion struct BlobBlock
 16136
 16137#region class BlobContainerAccessPolicy
 16138namespace Azure.Storage.Blobs.Models
 16139{
 16140    /// <summary>
 16141    /// BlobContainerAccessPolicy
 16142    /// </summary>
 16143    public partial class BlobContainerAccessPolicy
 16144    {
 16145        /// <summary>
 16146        /// Indicated whether data in the container may be accessed publicly and the level of access
 16147        /// </summary>
 16148        public Azure.Storage.Blobs.Models.PublicAccessType BlobPublicAccess { get; internal set; }
 16149
 16150        /// <summary>
 16151        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 16152        /// </summary>
 16153        public Azure.ETag ETag { get; internal set; }
 16154
 16155        /// <summary>
 16156        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 16157        /// </summary>
 16158        public System.DateTimeOffset LastModified { get; internal set; }
 16159
 16160        /// <summary>
 16161        /// a collection of signed identifiers
 16162        /// </summary>
 16163        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> SignedIdentifiers
 16164
 16165        /// <summary>
 16166        /// Creates a new BlobContainerAccessPolicy instance
 16167        /// </summary>
 16168        public BlobContainerAccessPolicy()
 16169        {
 16170            SignedIdentifiers = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobSignedIdentifier>();
 16171        }
 16172    }
 16173
 16174    /// <summary>
 16175    /// BlobsModelFactory provides utilities for mocking.
 16176    /// </summary>
 16177    public static partial class BlobsModelFactory
 16178    {
 16179        /// <summary>
 16180        /// Creates a new BlobContainerAccessPolicy instance for mocking.
 16181        /// </summary>
 16182        public static BlobContainerAccessPolicy BlobContainerAccessPolicy(
 16183            Azure.Storage.Blobs.Models.PublicAccessType blobPublicAccess,
 16184            Azure.ETag eTag,
 16185            System.DateTimeOffset lastModified,
 16186            System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobSignedIdentifier> signedIdentifiers)
 16187        {
 16188            return new BlobContainerAccessPolicy()
 16189            {
 16190                BlobPublicAccess = blobPublicAccess,
 16191                ETag = eTag,
 16192                LastModified = lastModified,
 16193                SignedIdentifiers = signedIdentifiers,
 16194            };
 16195        }
 16196    }
 16197}
 16198#endregion class BlobContainerAccessPolicy
 16199
 16200#region class BlobContainerInfo
 16201namespace Azure.Storage.Blobs.Models
 16202{
 16203    /// <summary>
 16204    /// BlobContainerInfo
 16205    /// </summary>
 16206    public partial class BlobContainerInfo
 16207    {
 16208        /// <summary>
 16209        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 16210        /// </summary>
 16211        public Azure.ETag ETag { get; internal set; }
 16212
 16213        /// <summary>
 16214        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 16215        /// </summary>
 16216        public System.DateTimeOffset LastModified { get; internal set; }
 16217
 16218        /// <summary>
 16219        /// Prevent direct instantiation of BlobContainerInfo instances.
 16220        /// You can use BlobsModelFactory.BlobContainerInfo instead.
 16221        /// </summary>
 16222        internal BlobContainerInfo() { }
 16223    }
 16224
 16225    /// <summary>
 16226    /// BlobsModelFactory provides utilities for mocking.
 16227    /// </summary>
 16228    public static partial class BlobsModelFactory
 16229    {
 16230        /// <summary>
 16231        /// Creates a new BlobContainerInfo instance for mocking.
 16232        /// </summary>
 16233        public static BlobContainerInfo BlobContainerInfo(
 16234            Azure.ETag eTag,
 16235            System.DateTimeOffset lastModified)
 16236        {
 16237            return new BlobContainerInfo()
 16238            {
 16239                ETag = eTag,
 16240                LastModified = lastModified,
 16241            };
 16242        }
 16243    }
 16244}
 16245#endregion class BlobContainerInfo
 16246
 16247#region class BlobContainerItem
 16248namespace Azure.Storage.Blobs.Models
 16249{
 16250    /// <summary>
 16251    /// An Azure Storage container
 16252    /// </summary>
 16253    public partial class BlobContainerItem
 16254    {
 16255        /// <summary>
 16256        /// Name
 16257        /// </summary>
 16258        public string Name { get; internal set; }
 16259
 16260        /// <summary>
 16261        /// Deleted
 16262        /// </summary>
 16263        public bool? IsDeleted { get; internal set; }
 16264
 16265        /// <summary>
 16266        /// Version
 16267        /// </summary>
 16268        public string VersionId { get; internal set; }
 16269
 16270        /// <summary>
 16271        /// Properties of a container
 16272        /// </summary>
 16273        public Azure.Storage.Blobs.Models.BlobContainerProperties Properties { get; internal set; }
 16274
 16275        /// <summary>
 16276        /// Creates a new BlobContainerItem instance
 16277        /// </summary>
 16278        internal BlobContainerItem()
 16279            : this(false)
 16280        {
 16281        }
 16282
 16283        /// <summary>
 16284        /// Creates a new BlobContainerItem instance
 16285        /// </summary>
 16286        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 16287        internal BlobContainerItem(bool skipInitialization)
 16288        {
 16289            if (!skipInitialization)
 16290            {
 16291                Properties = new Azure.Storage.Blobs.Models.BlobContainerProperties();
 16292            }
 16293        }
 16294
 16295        /// <summary>
 16296        /// Deserializes XML into a new BlobContainerItem instance.
 16297        /// </summary>
 16298        /// <param name="element">The XML element to deserialize.</param>
 16299        /// <returns>A deserialized BlobContainerItem instance.</returns>
 16300        internal static Azure.Storage.Blobs.Models.BlobContainerItem FromXml(System.Xml.Linq.XElement element)
 16301        {
 16302            System.Diagnostics.Debug.Assert(element != null);
 16303            System.Xml.Linq.XElement _child;
 16304            Azure.Storage.Blobs.Models.BlobContainerItem _value = new Azure.Storage.Blobs.Models.BlobContainerItem(true)
 16305            _child = element.Element(System.Xml.Linq.XName.Get("Name", ""));
 16306            if (_child != null)
 16307            {
 16308                _value.Name = _child.Value;
 16309            }
 16310            _child = element.Element(System.Xml.Linq.XName.Get("Deleted", ""));
 16311            if (_child != null)
 16312            {
 16313                _value.IsDeleted = bool.Parse(_child.Value);
 16314            }
 16315            _child = element.Element(System.Xml.Linq.XName.Get("Version", ""));
 16316            if (_child != null)
 16317            {
 16318                _value.VersionId = _child.Value;
 16319            }
 16320            _child = element.Element(System.Xml.Linq.XName.Get("Properties", ""));
 16321            if (_child != null)
 16322            {
 16323                _value.Properties = Azure.Storage.Blobs.Models.BlobContainerProperties.FromXml(_child);
 16324            }
 16325            CustomizeFromXml(element, _value);
 16326            return _value;
 16327        }
 16328
 16329        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobContainerI
 16330    }
 16331
 16332    /// <summary>
 16333    /// BlobsModelFactory provides utilities for mocking.
 16334    /// </summary>
 16335    public static partial class BlobsModelFactory
 16336    {
 16337        /// <summary>
 16338        /// Creates a new BlobContainerItem instance for mocking.
 16339        /// </summary>
 16340        public static BlobContainerItem BlobContainerItem(
 16341            string name,
 16342            Azure.Storage.Blobs.Models.BlobContainerProperties properties,
 16343            bool? isDeleted = default,
 16344            string versionId = default)
 16345        {
 16346            return new BlobContainerItem()
 16347            {
 16348                Name = name,
 16349                Properties = properties,
 16350                IsDeleted = isDeleted,
 16351                VersionId = versionId,
 16352            };
 16353        }
 16354    }
 16355}
 16356#endregion class BlobContainerItem
 16357
 16358#region class BlobContainerProperties
 16359namespace Azure.Storage.Blobs.Models
 16360{
 16361    /// <summary>
 16362    /// Properties of a container
 16363    /// </summary>
 16364    public partial class BlobContainerProperties
 16365    {
 16366        /// <summary>
 16367        /// Last-Modified
 16368        /// </summary>
 16369        public System.DateTimeOffset LastModified { get; internal set; }
 16370
 16371        /// <summary>
 16372        /// LeaseStatus
 16373        /// </summary>
 16374        public Azure.Storage.Blobs.Models.LeaseStatus? LeaseStatus { get; internal set; }
 16375
 16376        /// <summary>
 16377        /// LeaseState
 16378        /// </summary>
 16379        public Azure.Storage.Blobs.Models.LeaseState? LeaseState { get; internal set; }
 16380
 16381        /// <summary>
 16382        /// LeaseDuration
 16383        /// </summary>
 16384        public Azure.Storage.Blobs.Models.LeaseDurationType? LeaseDuration { get; internal set; }
 16385
 16386        /// <summary>
 16387        /// PublicAccess
 16388        /// </summary>
 16389        public Azure.Storage.Blobs.Models.PublicAccessType? PublicAccess { get; internal set; }
 16390
 16391        /// <summary>
 16392        /// HasImmutabilityPolicy
 16393        /// </summary>
 16394        public bool? HasImmutabilityPolicy { get; internal set; }
 16395
 16396        /// <summary>
 16397        /// HasLegalHold
 16398        /// </summary>
 16399        public bool? HasLegalHold { get; internal set; }
 16400
 16401        /// <summary>
 16402        /// DefaultEncryptionScope
 16403        /// </summary>
 16404        public string DefaultEncryptionScope { get; internal set; }
 16405
 16406        /// <summary>
 16407        /// DenyEncryptionScopeOverride
 16408        /// </summary>
 16409        public bool? PreventEncryptionScopeOverride { get; internal set; }
 16410
 16411        /// <summary>
 16412        /// DeletedTime
 16413        /// </summary>
 16414        public System.DateTimeOffset? DeletedOn { get; internal set; }
 16415
 16416        /// <summary>
 16417        /// RemainingRetentionDays
 16418        /// </summary>
 16419        public int? RemainingRetentionDays { get; internal set; }
 16420
 16421        /// <summary>
 16422        /// ETag
 16423        /// </summary>
 16424        public Azure.ETag ETag { get; internal set; }
 16425
 16426        /// <summary>
 16427        /// Metadata
 16428        /// </summary>
 16429        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 16430
 16431        /// <summary>
 16432        /// Creates a new BlobContainerProperties instance
 16433        /// </summary>
 16434        internal BlobContainerProperties()
 16435            : this(false)
 16436        {
 16437        }
 16438
 16439        /// <summary>
 16440        /// Creates a new BlobContainerProperties instance
 16441        /// </summary>
 16442        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 16443        internal BlobContainerProperties(bool skipInitialization)
 16444        {
 16445            if (!skipInitialization)
 16446            {
 16447                Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnore
 16448            }
 16449        }
 16450
 16451        /// <summary>
 16452        /// Deserializes XML into a new BlobContainerProperties instance.
 16453        /// </summary>
 16454        /// <param name="element">The XML element to deserialize.</param>
 16455        /// <returns>A deserialized BlobContainerProperties instance.</returns>
 16456        internal static Azure.Storage.Blobs.Models.BlobContainerProperties FromXml(System.Xml.Linq.XElement element)
 16457        {
 16458            System.Diagnostics.Debug.Assert(element != null);
 16459            System.Xml.Linq.XElement _child;
 16460            Azure.Storage.Blobs.Models.BlobContainerProperties _value = new Azure.Storage.Blobs.Models.BlobContainerProp
 16461            _child = element.Element(System.Xml.Linq.XName.Get("Last-Modified", ""));
 16462            if (_child != null)
 16463            {
 16464                _value.LastModified = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Invaria
 16465            }
 16466            _child = element.Element(System.Xml.Linq.XName.Get("LeaseStatus", ""));
 16467            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 16468            {
 16469                _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_child.Value);
 16470            }
 16471            _child = element.Element(System.Xml.Linq.XName.Get("LeaseState", ""));
 16472            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 16473            {
 16474                _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_child.Value);
 16475            }
 16476            _child = element.Element(System.Xml.Linq.XName.Get("LeaseDuration", ""));
 16477            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 16478            {
 16479                _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationType(_child.Va
 16480            }
 16481            _child = element.Element(System.Xml.Linq.XName.Get("PublicAccess", ""));
 16482            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 16483            {
 16484                _value.PublicAccess = Azure.Storage.Blobs.BlobRestClient.Serialization.ParsePublicAccessType(_child?.Val
 16485            }
 16486            _child = element.Element(System.Xml.Linq.XName.Get("HasImmutabilityPolicy", ""));
 16487            if (_child != null)
 16488            {
 16489                _value.HasImmutabilityPolicy = bool.Parse(_child.Value);
 16490            }
 16491            _child = element.Element(System.Xml.Linq.XName.Get("HasLegalHold", ""));
 16492            if (_child != null)
 16493            {
 16494                _value.HasLegalHold = bool.Parse(_child.Value);
 16495            }
 16496            _child = element.Element(System.Xml.Linq.XName.Get("DefaultEncryptionScope", ""));
 16497            if (_child != null)
 16498            {
 16499                _value.DefaultEncryptionScope = _child.Value;
 16500            }
 16501            _child = element.Element(System.Xml.Linq.XName.Get("DenyEncryptionScopeOverride", ""));
 16502            if (_child != null)
 16503            {
 16504                _value.PreventEncryptionScopeOverride = bool.Parse(_child.Value);
 16505            }
 16506            _child = element.Element(System.Xml.Linq.XName.Get("DeletedTime", ""));
 16507            if (_child != null)
 16508            {
 16509                _value.DeletedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.InvariantC
 16510            }
 16511            _child = element.Element(System.Xml.Linq.XName.Get("RemainingRetentionDays", ""));
 16512            if (_child != null)
 16513            {
 16514                _value.RemainingRetentionDays = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCultur
 16515            }
 16516            _child = element.Element(System.Xml.Linq.XName.Get("Etag", ""));
 16517            if (_child != null)
 16518            {
 16519                _value.ETag = new Azure.ETag(_child.Value);
 16520            }
 16521            _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgn
 16522            _child = element.Element(System.Xml.Linq.XName.Get("Metadata", ""));
 16523            if (_child != null)
 16524            {
 16525                foreach (System.Xml.Linq.XElement _pair in _child.Elements())
 16526                {
 16527                    _value.Metadata[_pair.Name.LocalName] = _pair.Value;
 16528                }
 16529            }
 16530            CustomizeFromXml(element, _value);
 16531            return _value;
 16532        }
 16533
 16534        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobContainerP
 16535    }
 16536
 16537    /// <summary>
 16538    /// BlobsModelFactory provides utilities for mocking.
 16539    /// </summary>
 16540    public static partial class BlobsModelFactory
 16541    {
 16542        /// <summary>
 16543        /// Creates a new BlobContainerProperties instance for mocking.
 16544        /// </summary>
 16545        public static BlobContainerProperties BlobContainerProperties(
 16546            System.DateTimeOffset lastModified,
 16547            Azure.ETag eTag,
 16548            Azure.Storage.Blobs.Models.LeaseState? leaseState = default,
 16549            Azure.Storage.Blobs.Models.LeaseDurationType? leaseDuration = default,
 16550            Azure.Storage.Blobs.Models.PublicAccessType? publicAccess = default,
 16551            bool? hasImmutabilityPolicy = default,
 16552            Azure.Storage.Blobs.Models.LeaseStatus? leaseStatus = default,
 16553            string defaultEncryptionScope = default,
 16554            bool? preventEncryptionScopeOverride = default,
 16555            System.DateTimeOffset? deletedOn = default,
 16556            int? remainingRetentionDays = default,
 16557            System.Collections.Generic.IDictionary<string, string> metadata = default,
 16558            bool? hasLegalHold = default)
 16559        {
 16560            return new BlobContainerProperties()
 16561            {
 16562                LastModified = lastModified,
 16563                ETag = eTag,
 16564                LeaseState = leaseState,
 16565                LeaseDuration = leaseDuration,
 16566                PublicAccess = publicAccess,
 16567                HasImmutabilityPolicy = hasImmutabilityPolicy,
 16568                LeaseStatus = leaseStatus,
 16569                DefaultEncryptionScope = defaultEncryptionScope,
 16570                PreventEncryptionScopeOverride = preventEncryptionScopeOverride,
 16571                DeletedOn = deletedOn,
 16572                RemainingRetentionDays = remainingRetentionDays,
 16573                Metadata = metadata,
 16574                HasLegalHold = hasLegalHold,
 16575            };
 16576        }
 16577    }
 16578}
 16579#endregion class BlobContainerProperties
 16580
 16581#region class BlobContainersSegment
 16582namespace Azure.Storage.Blobs.Models
 16583{
 16584    /// <summary>
 16585    /// An enumeration of containers
 16586    /// </summary>
 16587    internal partial class BlobContainersSegment
 16588    {
 16589        /// <summary>
 16590        /// ServiceEndpoint
 16591        /// </summary>
 16592        public string ServiceEndpoint { get; internal set; }
 16593
 16594        /// <summary>
 16595        /// Prefix
 16596        /// </summary>
 16597        public string Prefix { get; internal set; }
 16598
 16599        /// <summary>
 16600        /// Marker
 16601        /// </summary>
 16602        public string Marker { get; internal set; }
 16603
 16604        /// <summary>
 16605        /// MaxResults
 16606        /// </summary>
 16607        public int? MaxResults { get; internal set; }
 16608
 16609        /// <summary>
 16610        /// NextMarker
 16611        /// </summary>
 16612        public string NextMarker { get; internal set; }
 16613
 16614        /// <summary>
 16615        /// BlobContainerItems
 16616        /// </summary>
 16617        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobContainerItem> BlobContainerItems {
 16618
 16619        /// <summary>
 16620        /// Creates a new BlobContainersSegment instance
 16621        /// </summary>
 16622        public BlobContainersSegment()
 16623            : this(false)
 16624        {
 16625        }
 16626
 16627        /// <summary>
 16628        /// Creates a new BlobContainersSegment instance
 16629        /// </summary>
 16630        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 16631        internal BlobContainersSegment(bool skipInitialization)
 16632        {
 16633            if (!skipInitialization)
 16634            {
 16635                BlobContainerItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobContainerItem>()
 16636            }
 16637        }
 16638
 16639        /// <summary>
 16640        /// Deserializes XML into a new BlobContainersSegment instance.
 16641        /// </summary>
 16642        /// <param name="element">The XML element to deserialize.</param>
 16643        /// <returns>A deserialized BlobContainersSegment instance.</returns>
 16644        internal static Azure.Storage.Blobs.Models.BlobContainersSegment FromXml(System.Xml.Linq.XElement element)
 16645        {
 16646            System.Diagnostics.Debug.Assert(element != null);
 16647            System.Xml.Linq.XElement _child;
 16648            System.Xml.Linq.XAttribute _attribute;
 16649            Azure.Storage.Blobs.Models.BlobContainersSegment _value = new Azure.Storage.Blobs.Models.BlobContainersSegme
 16650            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ServiceEndpoint", ""));
 16651            if (_attribute != null)
 16652            {
 16653                _value.ServiceEndpoint = _attribute.Value;
 16654            }
 16655            _child = element.Element(System.Xml.Linq.XName.Get("Prefix", ""));
 16656            if (_child != null)
 16657            {
 16658                _value.Prefix = _child.Value;
 16659            }
 16660            _child = element.Element(System.Xml.Linq.XName.Get("Marker", ""));
 16661            if (_child != null)
 16662            {
 16663                _value.Marker = _child.Value;
 16664            }
 16665            _child = element.Element(System.Xml.Linq.XName.Get("MaxResults", ""));
 16666            if (_child != null)
 16667            {
 16668                _value.MaxResults = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 16669            }
 16670            _child = element.Element(System.Xml.Linq.XName.Get("NextMarker", ""));
 16671            if (_child != null)
 16672            {
 16673                _value.NextMarker = _child.Value;
 16674            }
 16675            _child = element.Element(System.Xml.Linq.XName.Get("Containers", ""));
 16676            if (_child != null)
 16677            {
 16678                _value.BlobContainerItems = System.Linq.Enumerable.ToList(
 16679                    System.Linq.Enumerable.Select(
 16680                        _child.Elements(System.Xml.Linq.XName.Get("Container", "")),
 16681                        e => Azure.Storage.Blobs.Models.BlobContainerItem.FromXml(e)));
 16682            }
 16683            else
 16684            {
 16685                _value.BlobContainerItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobContainer
 16686            }
 16687            CustomizeFromXml(element, _value);
 16688            return _value;
 16689        }
 16690
 16691        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobContainers
 16692    }
 16693}
 16694#endregion class BlobContainersSegment
 16695
 16696#region class BlobContentInfo
 16697namespace Azure.Storage.Blobs.Models
 16698{
 16699    /// <summary>
 16700    /// BlobContentInfo
 16701    /// </summary>
 16702    public partial class BlobContentInfo
 16703    {
 16704        /// <summary>
 16705        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 16706        /// </summary>
 16707        public Azure.ETag ETag { get; internal set; }
 16708
 16709        /// <summary>
 16710        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 16711        /// </summary>
 16712        public System.DateTimeOffset LastModified { get; internal set; }
 16713
 16714        /// <summary>
 16715        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 16716        /// </summary>
 16717        #pragma warning disable CA1819 // Properties should not return arrays
 16718        public byte[] ContentHash { get; internal set; }
 16719        #pragma warning restore CA1819 // Properties should not return arrays
 16720
 16721        /// <summary>
 16722        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 16723        /// </summary>
 16724        public string VersionId { get; internal set; }
 16725
 16726        /// <summary>
 16727        /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob 
 16728        /// </summary>
 16729        public string EncryptionKeySha256 { get; internal set; }
 16730
 16731        /// <summary>
 16732        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 16733        /// </summary>
 16734        public string EncryptionScope { get; internal set; }
 16735
 16736        /// <summary>
 16737        /// The current sequence number for the page blob.  This is only returned for page blobs.
 16738        /// </summary>
 16739        public long BlobSequenceNumber { get; internal set; }
 16740
 16741        /// <summary>
 16742        /// Prevent direct instantiation of BlobContentInfo instances.
 16743        /// You can use BlobsModelFactory.BlobContentInfo instead.
 16744        /// </summary>
 16745        internal BlobContentInfo() { }
 16746    }
 16747
 16748    /// <summary>
 16749    /// BlobsModelFactory provides utilities for mocking.
 16750    /// </summary>
 16751    public static partial class BlobsModelFactory
 16752    {
 16753        /// <summary>
 16754        /// Creates a new BlobContentInfo instance for mocking.
 16755        /// </summary>
 16756        public static BlobContentInfo BlobContentInfo(
 16757            Azure.ETag eTag,
 16758            System.DateTimeOffset lastModified,
 16759            byte[] contentHash,
 16760            string versionId,
 16761            string encryptionKeySha256,
 16762            string encryptionScope,
 16763            long blobSequenceNumber)
 16764        {
 16765            return new BlobContentInfo()
 16766            {
 16767                ETag = eTag,
 16768                LastModified = lastModified,
 16769                ContentHash = contentHash,
 16770                VersionId = versionId,
 16771                EncryptionKeySha256 = encryptionKeySha256,
 16772                EncryptionScope = encryptionScope,
 16773                BlobSequenceNumber = blobSequenceNumber,
 16774            };
 16775        }
 16776    }
 16777}
 16778#endregion class BlobContentInfo
 16779
 16780#region class BlobCopyInfo
 16781namespace Azure.Storage.Blobs.Models
 16782{
 16783    /// <summary>
 16784    /// BlobCopyInfo
 16785    /// </summary>
 16786    public partial class BlobCopyInfo
 16787    {
 16788        /// <summary>
 16789        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 16790        /// </summary>
 16791        public Azure.ETag ETag { get; internal set; }
 16792
 16793        /// <summary>
 16794        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 16795        /// </summary>
 16796        public System.DateTimeOffset LastModified { get; internal set; }
 16797
 16798        /// <summary>
 16799        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 16800        /// </summary>
 16801        public string VersionId { get; internal set; }
 16802
 16803        /// <summary>
 16804        /// String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy ope
 16805        /// </summary>
 16806        public string CopyId { get; internal set; }
 16807
 16808        /// <summary>
 16809        /// State of the copy operation identified by x-ms-copy-id.
 16810        /// </summary>
 16811        public Azure.Storage.Blobs.Models.CopyStatus CopyStatus { get; internal set; }
 16812
 16813        /// <summary>
 16814        /// Prevent direct instantiation of BlobCopyInfo instances.
 16815        /// You can use BlobsModelFactory.BlobCopyInfo instead.
 16816        /// </summary>
 16817        internal BlobCopyInfo() { }
 16818    }
 16819
 16820    /// <summary>
 16821    /// BlobsModelFactory provides utilities for mocking.
 16822    /// </summary>
 16823    public static partial class BlobsModelFactory
 16824    {
 16825        /// <summary>
 16826        /// Creates a new BlobCopyInfo instance for mocking.
 16827        /// </summary>
 16828        public static BlobCopyInfo BlobCopyInfo(
 16829            Azure.ETag eTag,
 16830            System.DateTimeOffset lastModified,
 16831            string versionId,
 16832            string copyId,
 16833            Azure.Storage.Blobs.Models.CopyStatus copyStatus)
 16834        {
 16835            return new BlobCopyInfo()
 16836            {
 16837                ETag = eTag,
 16838                LastModified = lastModified,
 16839                VersionId = versionId,
 16840                CopyId = copyId,
 16841                CopyStatus = copyStatus,
 16842            };
 16843        }
 16844    }
 16845}
 16846#endregion class BlobCopyInfo
 16847
 16848#region class BlobCorsRule
 16849namespace Azure.Storage.Blobs.Models
 16850{
 16851    /// <summary>
 16852    /// CORS is an HTTP feature that enables a web application running under one domain to access resources in another d
 16853    /// </summary>
 16854    public partial class BlobCorsRule
 16855    {
 16856        /// <summary>
 16857        /// The origin domains that are permitted to make a request against the storage service via CORS. The origin dom
 16858        /// </summary>
 16859        public string AllowedOrigins { get; set; }
 16860
 16861        /// <summary>
 16862        /// The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separated)
 16863        /// </summary>
 16864        public string AllowedMethods { get; set; }
 16865
 16866        /// <summary>
 16867        /// the request headers that the origin domain may specify on the CORS request.
 16868        /// </summary>
 16869        public string AllowedHeaders { get; set; }
 16870
 16871        /// <summary>
 16872        /// The response headers that may be sent in the response to the CORS request and exposed by the browser to the 
 16873        /// </summary>
 16874        public string ExposedHeaders { get; set; }
 16875
 16876        /// <summary>
 16877        /// The maximum amount time that a browser should cache the preflight OPTIONS request.
 16878        /// </summary>
 16879        public int MaxAgeInSeconds { get; set; }
 16880
 16881        /// <summary>
 16882        /// Creates a new BlobCorsRule instance
 16883        /// </summary>
 16884        public BlobCorsRule() { }
 16885
 16886        /// <summary>
 16887        /// Serialize a BlobCorsRule instance as XML.
 16888        /// </summary>
 16889        /// <param name="value">The BlobCorsRule instance to serialize.</param>
 16890        /// <param name="name">An optional name to use for the root element instead of "CorsRule".</param>
 16891        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 16892        /// <returns>The serialized XML element.</returns>
 16893        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobCorsRule value, string name = "Cor
 16894        {
 16895            System.Diagnostics.Debug.Assert(value != null);
 16896            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 16897            _element.Add(new System.Xml.Linq.XElement(
 16898                System.Xml.Linq.XName.Get("AllowedOrigins", ""),
 16899                value.AllowedOrigins));
 16900            _element.Add(new System.Xml.Linq.XElement(
 16901                System.Xml.Linq.XName.Get("AllowedMethods", ""),
 16902                value.AllowedMethods));
 16903            _element.Add(new System.Xml.Linq.XElement(
 16904                System.Xml.Linq.XName.Get("AllowedHeaders", ""),
 16905                value.AllowedHeaders));
 16906            _element.Add(new System.Xml.Linq.XElement(
 16907                System.Xml.Linq.XName.Get("ExposedHeaders", ""),
 16908                value.ExposedHeaders));
 16909            _element.Add(new System.Xml.Linq.XElement(
 16910                System.Xml.Linq.XName.Get("MaxAgeInSeconds", ""),
 16911                value.MaxAgeInSeconds.ToString(System.Globalization.CultureInfo.InvariantCulture)));
 16912            return _element;
 16913        }
 16914
 16915        /// <summary>
 16916        /// Deserializes XML into a new BlobCorsRule instance.
 16917        /// </summary>
 16918        /// <param name="element">The XML element to deserialize.</param>
 16919        /// <returns>A deserialized BlobCorsRule instance.</returns>
 16920        internal static Azure.Storage.Blobs.Models.BlobCorsRule FromXml(System.Xml.Linq.XElement element)
 16921        {
 16922            System.Diagnostics.Debug.Assert(element != null);
 16923            System.Xml.Linq.XElement _child;
 16924            Azure.Storage.Blobs.Models.BlobCorsRule _value = new Azure.Storage.Blobs.Models.BlobCorsRule();
 16925            _child = element.Element(System.Xml.Linq.XName.Get("AllowedOrigins", ""));
 16926            if (_child != null)
 16927            {
 16928                _value.AllowedOrigins = _child.Value;
 16929            }
 16930            _child = element.Element(System.Xml.Linq.XName.Get("AllowedMethods", ""));
 16931            if (_child != null)
 16932            {
 16933                _value.AllowedMethods = _child.Value;
 16934            }
 16935            _child = element.Element(System.Xml.Linq.XName.Get("AllowedHeaders", ""));
 16936            if (_child != null)
 16937            {
 16938                _value.AllowedHeaders = _child.Value;
 16939            }
 16940            _child = element.Element(System.Xml.Linq.XName.Get("ExposedHeaders", ""));
 16941            if (_child != null)
 16942            {
 16943                _value.ExposedHeaders = _child.Value;
 16944            }
 16945            _child = element.Element(System.Xml.Linq.XName.Get("MaxAgeInSeconds", ""));
 16946            if (_child != null)
 16947            {
 16948                _value.MaxAgeInSeconds = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 16949            }
 16950            CustomizeFromXml(element, _value);
 16951            return _value;
 16952        }
 16953
 16954        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobCorsRule v
 16955    }
 16956}
 16957#endregion class BlobCorsRule
 16958
 16959#region enum strings BlobErrorCode
 16960namespace Azure.Storage.Blobs.Models
 16961{
 16962    /// <summary>
 16963    /// Error codes returned by the service
 16964    /// </summary>
 16965    public readonly struct BlobErrorCode : System.IEquatable<BlobErrorCode>
 16966    {
 16967        /// <summary>
 16968        /// The BlobErrorCode value.
 16969        /// </summary>
 16970        private readonly string _value;
 16971
 16972        /// <summary>
 16973        /// Initializes a new instance of the <see cref="BlobErrorCode"/> structure.
 16974        /// </summary>
 16975        /// <param name="value">The string value of the instance.</param>
 16976        public BlobErrorCode(string value) { _value = value ?? throw new System.ArgumentNullException(nameof(value)); }
 16977
 16978        /// <summary>
 16979        /// AccountAlreadyExists
 16980        /// </summary>
 16981        public static Azure.Storage.Blobs.Models.BlobErrorCode AccountAlreadyExists { get; } = new BlobErrorCode(@"Accou
 16982
 16983        /// <summary>
 16984        /// AccountBeingCreated
 16985        /// </summary>
 16986        public static Azure.Storage.Blobs.Models.BlobErrorCode AccountBeingCreated { get; } = new BlobErrorCode(@"Accoun
 16987
 16988        /// <summary>
 16989        /// AccountIsDisabled
 16990        /// </summary>
 16991        public static Azure.Storage.Blobs.Models.BlobErrorCode AccountIsDisabled { get; } = new BlobErrorCode(@"AccountI
 16992
 16993        /// <summary>
 16994        /// AuthenticationFailed
 16995        /// </summary>
 16996        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthenticationFailed { get; } = new BlobErrorCode(@"Authe
 16997
 16998        /// <summary>
 16999        /// AuthorizationFailure
 17000        /// </summary>
 17001        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationFailure { get; } = new BlobErrorCode(@"Autho
 17002
 17003        /// <summary>
 17004        /// ConditionHeadersNotSupported
 17005        /// </summary>
 17006        public static Azure.Storage.Blobs.Models.BlobErrorCode ConditionHeadersNotSupported { get; } = new BlobErrorCode
 17007
 17008        /// <summary>
 17009        /// ConditionNotMet
 17010        /// </summary>
 17011        public static Azure.Storage.Blobs.Models.BlobErrorCode ConditionNotMet { get; } = new BlobErrorCode(@"ConditionN
 17012
 17013        /// <summary>
 17014        /// EmptyMetadataKey
 17015        /// </summary>
 17016        public static Azure.Storage.Blobs.Models.BlobErrorCode EmptyMetadataKey { get; } = new BlobErrorCode(@"EmptyMeta
 17017
 17018        /// <summary>
 17019        /// InsufficientAccountPermissions
 17020        /// </summary>
 17021        public static Azure.Storage.Blobs.Models.BlobErrorCode InsufficientAccountPermissions { get; } = new BlobErrorCo
 17022
 17023        /// <summary>
 17024        /// InternalError
 17025        /// </summary>
 17026        public static Azure.Storage.Blobs.Models.BlobErrorCode InternalError { get; } = new BlobErrorCode(@"InternalErro
 17027
 17028        /// <summary>
 17029        /// InvalidAuthenticationInfo
 17030        /// </summary>
 17031        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidAuthenticationInfo { get; } = new BlobErrorCode(@"
 17032
 17033        /// <summary>
 17034        /// InvalidHeaderValue
 17035        /// </summary>
 17036        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidHeaderValue { get; } = new BlobErrorCode(@"Invalid
 17037
 17038        /// <summary>
 17039        /// InvalidHttpVerb
 17040        /// </summary>
 17041        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidHttpVerb { get; } = new BlobErrorCode(@"InvalidHtt
 17042
 17043        /// <summary>
 17044        /// InvalidInput
 17045        /// </summary>
 17046        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidInput { get; } = new BlobErrorCode(@"InvalidInput"
 17047
 17048        /// <summary>
 17049        /// InvalidMd5
 17050        /// </summary>
 17051        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidMd5 { get; } = new BlobErrorCode(@"InvalidMd5");
 17052
 17053        /// <summary>
 17054        /// InvalidMetadata
 17055        /// </summary>
 17056        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidMetadata { get; } = new BlobErrorCode(@"InvalidMet
 17057
 17058        /// <summary>
 17059        /// InvalidQueryParameterValue
 17060        /// </summary>
 17061        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidQueryParameterValue { get; } = new BlobErrorCode(@
 17062
 17063        /// <summary>
 17064        /// InvalidRange
 17065        /// </summary>
 17066        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidRange { get; } = new BlobErrorCode(@"InvalidRange"
 17067
 17068        /// <summary>
 17069        /// InvalidResourceName
 17070        /// </summary>
 17071        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidResourceName { get; } = new BlobErrorCode(@"Invali
 17072
 17073        /// <summary>
 17074        /// InvalidUri
 17075        /// </summary>
 17076        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidUri { get; } = new BlobErrorCode(@"InvalidUri");
 17077
 17078        /// <summary>
 17079        /// InvalidXmlDocument
 17080        /// </summary>
 17081        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidXmlDocument { get; } = new BlobErrorCode(@"Invalid
 17082
 17083        /// <summary>
 17084        /// InvalidXmlNodeValue
 17085        /// </summary>
 17086        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidXmlNodeValue { get; } = new BlobErrorCode(@"Invali
 17087
 17088        /// <summary>
 17089        /// Md5Mismatch
 17090        /// </summary>
 17091        public static Azure.Storage.Blobs.Models.BlobErrorCode Md5Mismatch { get; } = new BlobErrorCode(@"Md5Mismatch");
 17092
 17093        /// <summary>
 17094        /// MetadataTooLarge
 17095        /// </summary>
 17096        public static Azure.Storage.Blobs.Models.BlobErrorCode MetadataTooLarge { get; } = new BlobErrorCode(@"MetadataT
 17097
 17098        /// <summary>
 17099        /// MissingContentLengthHeader
 17100        /// </summary>
 17101        public static Azure.Storage.Blobs.Models.BlobErrorCode MissingContentLengthHeader { get; } = new BlobErrorCode(@
 17102
 17103        /// <summary>
 17104        /// MissingRequiredQueryParameter
 17105        /// </summary>
 17106        public static Azure.Storage.Blobs.Models.BlobErrorCode MissingRequiredQueryParameter { get; } = new BlobErrorCod
 17107
 17108        /// <summary>
 17109        /// MissingRequiredHeader
 17110        /// </summary>
 17111        public static Azure.Storage.Blobs.Models.BlobErrorCode MissingRequiredHeader { get; } = new BlobErrorCode(@"Miss
 17112
 17113        /// <summary>
 17114        /// MissingRequiredXmlNode
 17115        /// </summary>
 17116        public static Azure.Storage.Blobs.Models.BlobErrorCode MissingRequiredXmlNode { get; } = new BlobErrorCode(@"Mis
 17117
 17118        /// <summary>
 17119        /// MultipleConditionHeadersNotSupported
 17120        /// </summary>
 17121        public static Azure.Storage.Blobs.Models.BlobErrorCode MultipleConditionHeadersNotSupported { get; } = new BlobE
 17122
 17123        /// <summary>
 17124        /// OperationTimedOut
 17125        /// </summary>
 17126        public static Azure.Storage.Blobs.Models.BlobErrorCode OperationTimedOut { get; } = new BlobErrorCode(@"Operatio
 17127
 17128        /// <summary>
 17129        /// OutOfRangeInput
 17130        /// </summary>
 17131        public static Azure.Storage.Blobs.Models.BlobErrorCode OutOfRangeInput { get; } = new BlobErrorCode(@"OutOfRange
 17132
 17133        /// <summary>
 17134        /// OutOfRangeQueryParameterValue
 17135        /// </summary>
 17136        public static Azure.Storage.Blobs.Models.BlobErrorCode OutOfRangeQueryParameterValue { get; } = new BlobErrorCod
 17137
 17138        /// <summary>
 17139        /// RequestBodyTooLarge
 17140        /// </summary>
 17141        public static Azure.Storage.Blobs.Models.BlobErrorCode RequestBodyTooLarge { get; } = new BlobErrorCode(@"Reques
 17142
 17143        /// <summary>
 17144        /// ResourceTypeMismatch
 17145        /// </summary>
 17146        public static Azure.Storage.Blobs.Models.BlobErrorCode ResourceTypeMismatch { get; } = new BlobErrorCode(@"Resou
 17147
 17148        /// <summary>
 17149        /// RequestUrlFailedToParse
 17150        /// </summary>
 17151        public static Azure.Storage.Blobs.Models.BlobErrorCode RequestUrlFailedToParse { get; } = new BlobErrorCode(@"Re
 17152
 17153        /// <summary>
 17154        /// ResourceAlreadyExists
 17155        /// </summary>
 17156        public static Azure.Storage.Blobs.Models.BlobErrorCode ResourceAlreadyExists { get; } = new BlobErrorCode(@"Reso
 17157
 17158        /// <summary>
 17159        /// ResourceNotFound
 17160        /// </summary>
 17161        public static Azure.Storage.Blobs.Models.BlobErrorCode ResourceNotFound { get; } = new BlobErrorCode(@"ResourceN
 17162
 17163        /// <summary>
 17164        /// ServerBusy
 17165        /// </summary>
 17166        public static Azure.Storage.Blobs.Models.BlobErrorCode ServerBusy { get; } = new BlobErrorCode(@"ServerBusy");
 17167
 17168        /// <summary>
 17169        /// UnsupportedHeader
 17170        /// </summary>
 17171        public static Azure.Storage.Blobs.Models.BlobErrorCode UnsupportedHeader { get; } = new BlobErrorCode(@"Unsuppor
 17172
 17173        /// <summary>
 17174        /// UnsupportedXmlNode
 17175        /// </summary>
 17176        public static Azure.Storage.Blobs.Models.BlobErrorCode UnsupportedXmlNode { get; } = new BlobErrorCode(@"Unsuppo
 17177
 17178        /// <summary>
 17179        /// UnsupportedQueryParameter
 17180        /// </summary>
 17181        public static Azure.Storage.Blobs.Models.BlobErrorCode UnsupportedQueryParameter { get; } = new BlobErrorCode(@"
 17182
 17183        /// <summary>
 17184        /// UnsupportedHttpVerb
 17185        /// </summary>
 17186        public static Azure.Storage.Blobs.Models.BlobErrorCode UnsupportedHttpVerb { get; } = new BlobErrorCode(@"Unsupp
 17187
 17188        /// <summary>
 17189        /// AppendPositionConditionNotMet
 17190        /// </summary>
 17191        public static Azure.Storage.Blobs.Models.BlobErrorCode AppendPositionConditionNotMet { get; } = new BlobErrorCod
 17192
 17193        /// <summary>
 17194        /// BlobAlreadyExists
 17195        /// </summary>
 17196        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobAlreadyExists { get; } = new BlobErrorCode(@"BlobAlre
 17197
 17198        /// <summary>
 17199        /// BlobNotFound
 17200        /// </summary>
 17201        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobNotFound { get; } = new BlobErrorCode(@"BlobNotFound"
 17202
 17203        /// <summary>
 17204        /// BlobOverwritten
 17205        /// </summary>
 17206        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobOverwritten { get; } = new BlobErrorCode(@"BlobOverwr
 17207
 17208        /// <summary>
 17209        /// BlobTierInadequateForContentLength
 17210        /// </summary>
 17211        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobTierInadequateForContentLength { get; } = new BlobErr
 17212
 17213        /// <summary>
 17214        /// BlockCountExceedsLimit
 17215        /// </summary>
 17216        public static Azure.Storage.Blobs.Models.BlobErrorCode BlockCountExceedsLimit { get; } = new BlobErrorCode(@"Blo
 17217
 17218        /// <summary>
 17219        /// BlockListTooLong
 17220        /// </summary>
 17221        public static Azure.Storage.Blobs.Models.BlobErrorCode BlockListTooLong { get; } = new BlobErrorCode(@"BlockList
 17222
 17223        /// <summary>
 17224        /// CannotChangeToLowerTier
 17225        /// </summary>
 17226        public static Azure.Storage.Blobs.Models.BlobErrorCode CannotChangeToLowerTier { get; } = new BlobErrorCode(@"Ca
 17227
 17228        /// <summary>
 17229        /// CannotVerifyCopySource
 17230        /// </summary>
 17231        public static Azure.Storage.Blobs.Models.BlobErrorCode CannotVerifyCopySource { get; } = new BlobErrorCode(@"Can
 17232
 17233        /// <summary>
 17234        /// ContainerAlreadyExists
 17235        /// </summary>
 17236        public static Azure.Storage.Blobs.Models.BlobErrorCode ContainerAlreadyExists { get; } = new BlobErrorCode(@"Con
 17237
 17238        /// <summary>
 17239        /// ContainerBeingDeleted
 17240        /// </summary>
 17241        public static Azure.Storage.Blobs.Models.BlobErrorCode ContainerBeingDeleted { get; } = new BlobErrorCode(@"Cont
 17242
 17243        /// <summary>
 17244        /// ContainerDisabled
 17245        /// </summary>
 17246        public static Azure.Storage.Blobs.Models.BlobErrorCode ContainerDisabled { get; } = new BlobErrorCode(@"Containe
 17247
 17248        /// <summary>
 17249        /// ContainerNotFound
 17250        /// </summary>
 17251        public static Azure.Storage.Blobs.Models.BlobErrorCode ContainerNotFound { get; } = new BlobErrorCode(@"Containe
 17252
 17253        /// <summary>
 17254        /// ContentLengthLargerThanTierLimit
 17255        /// </summary>
 17256        public static Azure.Storage.Blobs.Models.BlobErrorCode ContentLengthLargerThanTierLimit { get; } = new BlobError
 17257
 17258        /// <summary>
 17259        /// CopyAcrossAccountsNotSupported
 17260        /// </summary>
 17261        public static Azure.Storage.Blobs.Models.BlobErrorCode CopyAcrossAccountsNotSupported { get; } = new BlobErrorCo
 17262
 17263        /// <summary>
 17264        /// CopyIdMismatch
 17265        /// </summary>
 17266        public static Azure.Storage.Blobs.Models.BlobErrorCode CopyIdMismatch { get; } = new BlobErrorCode(@"CopyIdMisma
 17267
 17268        /// <summary>
 17269        /// FeatureVersionMismatch
 17270        /// </summary>
 17271        public static Azure.Storage.Blobs.Models.BlobErrorCode FeatureVersionMismatch { get; } = new BlobErrorCode(@"Fea
 17272
 17273        /// <summary>
 17274        /// IncrementalCopyBlobMismatch
 17275        /// </summary>
 17276        public static Azure.Storage.Blobs.Models.BlobErrorCode IncrementalCopyBlobMismatch { get; } = new BlobErrorCode(
 17277
 17278        /// <summary>
 17279        /// IncrementalCopyOfEralierVersionSnapshotNotAllowed
 17280        /// </summary>
 17281        public static Azure.Storage.Blobs.Models.BlobErrorCode IncrementalCopyOfEralierVersionSnapshotNotAllowed { get; 
 17282
 17283        /// <summary>
 17284        /// IncrementalCopySourceMustBeSnapshot
 17285        /// </summary>
 17286        public static Azure.Storage.Blobs.Models.BlobErrorCode IncrementalCopySourceMustBeSnapshot { get; } = new BlobEr
 17287
 17288        /// <summary>
 17289        /// InfiniteLeaseDurationRequired
 17290        /// </summary>
 17291        public static Azure.Storage.Blobs.Models.BlobErrorCode InfiniteLeaseDurationRequired { get; } = new BlobErrorCod
 17292
 17293        /// <summary>
 17294        /// InvalidBlobOrBlock
 17295        /// </summary>
 17296        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidBlobOrBlock { get; } = new BlobErrorCode(@"Invalid
 17297
 17298        /// <summary>
 17299        /// InvalidBlobTier
 17300        /// </summary>
 17301        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidBlobTier { get; } = new BlobErrorCode(@"InvalidBlo
 17302
 17303        /// <summary>
 17304        /// InvalidBlobType
 17305        /// </summary>
 17306        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidBlobType { get; } = new BlobErrorCode(@"InvalidBlo
 17307
 17308        /// <summary>
 17309        /// InvalidBlockId
 17310        /// </summary>
 17311        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidBlockId { get; } = new BlobErrorCode(@"InvalidBloc
 17312
 17313        /// <summary>
 17314        /// InvalidBlockList
 17315        /// </summary>
 17316        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidBlockList { get; } = new BlobErrorCode(@"InvalidBl
 17317
 17318        /// <summary>
 17319        /// InvalidOperation
 17320        /// </summary>
 17321        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidOperation { get; } = new BlobErrorCode(@"InvalidOp
 17322
 17323        /// <summary>
 17324        /// InvalidPageRange
 17325        /// </summary>
 17326        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidPageRange { get; } = new BlobErrorCode(@"InvalidPa
 17327
 17328        /// <summary>
 17329        /// InvalidSourceBlobType
 17330        /// </summary>
 17331        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidSourceBlobType { get; } = new BlobErrorCode(@"Inva
 17332
 17333        /// <summary>
 17334        /// InvalidSourceBlobUrl
 17335        /// </summary>
 17336        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidSourceBlobUrl { get; } = new BlobErrorCode(@"Inval
 17337
 17338        /// <summary>
 17339        /// InvalidVersionForPageBlobOperation
 17340        /// </summary>
 17341        public static Azure.Storage.Blobs.Models.BlobErrorCode InvalidVersionForPageBlobOperation { get; } = new BlobErr
 17342
 17343        /// <summary>
 17344        /// LeaseAlreadyPresent
 17345        /// </summary>
 17346        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseAlreadyPresent { get; } = new BlobErrorCode(@"LeaseA
 17347
 17348        /// <summary>
 17349        /// LeaseAlreadyBroken
 17350        /// </summary>
 17351        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseAlreadyBroken { get; } = new BlobErrorCode(@"LeaseAl
 17352
 17353        /// <summary>
 17354        /// LeaseIdMismatchWithBlobOperation
 17355        /// </summary>
 17356        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIdMismatchWithBlobOperation { get; } = new BlobError
 17357
 17358        /// <summary>
 17359        /// LeaseIdMismatchWithContainerOperation
 17360        /// </summary>
 17361        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIdMismatchWithContainerOperation { get; } = new Blob
 17362
 17363        /// <summary>
 17364        /// LeaseIdMismatchWithLeaseOperation
 17365        /// </summary>
 17366        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIdMismatchWithLeaseOperation { get; } = new BlobErro
 17367
 17368        /// <summary>
 17369        /// LeaseIdMissing
 17370        /// </summary>
 17371        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIdMissing { get; } = new BlobErrorCode(@"LeaseIdMiss
 17372
 17373        /// <summary>
 17374        /// LeaseIsBreakingAndCannotBeAcquired
 17375        /// </summary>
 17376        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIsBreakingAndCannotBeAcquired { get; } = new BlobErr
 17377
 17378        /// <summary>
 17379        /// LeaseIsBreakingAndCannotBeChanged
 17380        /// </summary>
 17381        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIsBreakingAndCannotBeChanged { get; } = new BlobErro
 17382
 17383        /// <summary>
 17384        /// LeaseIsBrokenAndCannotBeRenewed
 17385        /// </summary>
 17386        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseIsBrokenAndCannotBeRenewed { get; } = new BlobErrorC
 17387
 17388        /// <summary>
 17389        /// LeaseLost
 17390        /// </summary>
 17391        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseLost { get; } = new BlobErrorCode(@"LeaseLost");
 17392
 17393        /// <summary>
 17394        /// LeaseNotPresentWithBlobOperation
 17395        /// </summary>
 17396        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseNotPresentWithBlobOperation { get; } = new BlobError
 17397
 17398        /// <summary>
 17399        /// LeaseNotPresentWithContainerOperation
 17400        /// </summary>
 17401        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseNotPresentWithContainerOperation { get; } = new Blob
 17402
 17403        /// <summary>
 17404        /// LeaseNotPresentWithLeaseOperation
 17405        /// </summary>
 17406        public static Azure.Storage.Blobs.Models.BlobErrorCode LeaseNotPresentWithLeaseOperation { get; } = new BlobErro
 17407
 17408        /// <summary>
 17409        /// MaxBlobSizeConditionNotMet
 17410        /// </summary>
 17411        public static Azure.Storage.Blobs.Models.BlobErrorCode MaxBlobSizeConditionNotMet { get; } = new BlobErrorCode(@
 17412
 17413        /// <summary>
 17414        /// NoAuthenticationInformation
 17415        /// </summary>
 17416        public static Azure.Storage.Blobs.Models.BlobErrorCode NoAuthenticationInformation { get; } = new BlobErrorCode(
 17417
 17418        /// <summary>
 17419        /// NoPendingCopyOperation
 17420        /// </summary>
 17421        public static Azure.Storage.Blobs.Models.BlobErrorCode NoPendingCopyOperation { get; } = new BlobErrorCode(@"NoP
 17422
 17423        /// <summary>
 17424        /// OperationNotAllowedOnIncrementalCopyBlob
 17425        /// </summary>
 17426        public static Azure.Storage.Blobs.Models.BlobErrorCode OperationNotAllowedOnIncrementalCopyBlob { get; } = new B
 17427
 17428        /// <summary>
 17429        /// PendingCopyOperation
 17430        /// </summary>
 17431        public static Azure.Storage.Blobs.Models.BlobErrorCode PendingCopyOperation { get; } = new BlobErrorCode(@"Pendi
 17432
 17433        /// <summary>
 17434        /// PreviousSnapshotCannotBeNewer
 17435        /// </summary>
 17436        public static Azure.Storage.Blobs.Models.BlobErrorCode PreviousSnapshotCannotBeNewer { get; } = new BlobErrorCod
 17437
 17438        /// <summary>
 17439        /// PreviousSnapshotNotFound
 17440        /// </summary>
 17441        public static Azure.Storage.Blobs.Models.BlobErrorCode PreviousSnapshotNotFound { get; } = new BlobErrorCode(@"P
 17442
 17443        /// <summary>
 17444        /// PreviousSnapshotOperationNotSupported
 17445        /// </summary>
 17446        public static Azure.Storage.Blobs.Models.BlobErrorCode PreviousSnapshotOperationNotSupported { get; } = new Blob
 17447
 17448        /// <summary>
 17449        /// SequenceNumberConditionNotMet
 17450        /// </summary>
 17451        public static Azure.Storage.Blobs.Models.BlobErrorCode SequenceNumberConditionNotMet { get; } = new BlobErrorCod
 17452
 17453        /// <summary>
 17454        /// SequenceNumberIncrementTooLarge
 17455        /// </summary>
 17456        public static Azure.Storage.Blobs.Models.BlobErrorCode SequenceNumberIncrementTooLarge { get; } = new BlobErrorC
 17457
 17458        /// <summary>
 17459        /// SnapshotCountExceeded
 17460        /// </summary>
 17461        public static Azure.Storage.Blobs.Models.BlobErrorCode SnapshotCountExceeded { get; } = new BlobErrorCode(@"Snap
 17462
 17463        /// <summary>
 17464        /// SnaphotOperationRateExceeded
 17465        /// </summary>
 17466        public static Azure.Storage.Blobs.Models.BlobErrorCode SnaphotOperationRateExceeded { get; } = new BlobErrorCode
 17467
 17468        /// <summary>
 17469        /// SnapshotsPresent
 17470        /// </summary>
 17471        public static Azure.Storage.Blobs.Models.BlobErrorCode SnapshotsPresent { get; } = new BlobErrorCode(@"Snapshots
 17472
 17473        /// <summary>
 17474        /// SourceConditionNotMet
 17475        /// </summary>
 17476        public static Azure.Storage.Blobs.Models.BlobErrorCode SourceConditionNotMet { get; } = new BlobErrorCode(@"Sour
 17477
 17478        /// <summary>
 17479        /// SystemInUse
 17480        /// </summary>
 17481        public static Azure.Storage.Blobs.Models.BlobErrorCode SystemInUse { get; } = new BlobErrorCode(@"SystemInUse");
 17482
 17483        /// <summary>
 17484        /// TargetConditionNotMet
 17485        /// </summary>
 17486        public static Azure.Storage.Blobs.Models.BlobErrorCode TargetConditionNotMet { get; } = new BlobErrorCode(@"Targ
 17487
 17488        /// <summary>
 17489        /// UnauthorizedBlobOverwrite
 17490        /// </summary>
 17491        public static Azure.Storage.Blobs.Models.BlobErrorCode UnauthorizedBlobOverwrite { get; } = new BlobErrorCode(@"
 17492
 17493        /// <summary>
 17494        /// BlobBeingRehydrated
 17495        /// </summary>
 17496        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobBeingRehydrated { get; } = new BlobErrorCode(@"BlobBe
 17497
 17498        /// <summary>
 17499        /// BlobArchived
 17500        /// </summary>
 17501        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobArchived { get; } = new BlobErrorCode(@"BlobArchived"
 17502
 17503        /// <summary>
 17504        /// BlobNotArchived
 17505        /// </summary>
 17506        public static Azure.Storage.Blobs.Models.BlobErrorCode BlobNotArchived { get; } = new BlobErrorCode(@"BlobNotArc
 17507
 17508        /// <summary>
 17509        /// AuthorizationSourceIPMismatch
 17510        /// </summary>
 17511        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationSourceIPMismatch { get; } = new BlobErrorCod
 17512
 17513        /// <summary>
 17514        /// AuthorizationProtocolMismatch
 17515        /// </summary>
 17516        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationProtocolMismatch { get; } = new BlobErrorCod
 17517
 17518        /// <summary>
 17519        /// AuthorizationPermissionMismatch
 17520        /// </summary>
 17521        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationPermissionMismatch { get; } = new BlobErrorC
 17522
 17523        /// <summary>
 17524        /// AuthorizationServiceMismatch
 17525        /// </summary>
 17526        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationServiceMismatch { get; } = new BlobErrorCode
 17527
 17528        /// <summary>
 17529        /// AuthorizationResourceTypeMismatch
 17530        /// </summary>
 17531        public static Azure.Storage.Blobs.Models.BlobErrorCode AuthorizationResourceTypeMismatch { get; } = new BlobErro
 17532
 17533        /// <summary>
 17534        /// Determines if two <see cref="BlobErrorCode"/> values are the same.
 17535        /// </summary>
 17536        /// <param name="left">The first <see cref="BlobErrorCode"/> to compare.</param>
 17537        /// <param name="right">The second <see cref="BlobErrorCode"/> to compare.</param>
 17538        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are the same; otherwise, false.</retur
 17539        public static bool operator ==(Azure.Storage.Blobs.Models.BlobErrorCode left, Azure.Storage.Blobs.Models.BlobErr
 17540
 17541        /// <summary>
 17542        /// Determines if two <see cref="BlobErrorCode"/> values are different.
 17543        /// </summary>
 17544        /// <param name="left">The first <see cref="BlobErrorCode"/> to compare.</param>
 17545        /// <param name="right">The second <see cref="BlobErrorCode"/> to compare.</param>
 17546        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are different; otherwise, false.</retu
 17547        public static bool operator !=(Azure.Storage.Blobs.Models.BlobErrorCode left, Azure.Storage.Blobs.Models.BlobErr
 17548
 17549        /// <summary>
 17550        /// Converts a string to a <see cref="BlobErrorCode"/>.
 17551        /// </summary>
 17552        /// <param name="value">The string value to convert.</param>
 17553        /// <returns>The BlobErrorCode value.</returns>
 17554        public static implicit operator BlobErrorCode(string value) => new Azure.Storage.Blobs.Models.BlobErrorCode(valu
 17555
 17556        /// <summary>
 17557        /// Check if two <see cref="BlobErrorCode"/> instances are equal.
 17558        /// </summary>
 17559        /// <param name="obj">The instance to compare to.</param>
 17560        /// <returns>True if they're equal, false otherwise.</returns>
 17561        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 17562        public override bool Equals(object obj) => obj is Azure.Storage.Blobs.Models.BlobErrorCode other && Equals(other
 17563
 17564        /// <summary>
 17565        /// Check if two <see cref="BlobErrorCode"/> instances are equal.
 17566        /// </summary>
 17567        /// <param name="other">The instance to compare to.</param>
 17568        /// <returns>True if they're equal, false otherwise.</returns>
 17569        public bool Equals(Azure.Storage.Blobs.Models.BlobErrorCode other) => string.Equals(_value, other._value, System
 17570
 17571        /// <summary>
 17572        /// Get a hash code for the <see cref="BlobErrorCode"/>.
 17573        /// </summary>
 17574        /// <returns>Hash code for the BlobErrorCode.</returns>
 17575        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 17576        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 17577
 17578        /// <summary>
 17579        /// Convert the <see cref="BlobErrorCode"/> to a string.
 17580        /// </summary>
 17581        /// <returns>String representation of the BlobErrorCode.</returns>
 17582        public override string ToString() => _value;
 17583    }
 17584}
 17585#endregion enum strings BlobErrorCode
 17586
 17587#region enum strings BlobExpiryOptions
 17588namespace Azure.Storage.Blobs.Models
 17589{
 17590    /// <summary>
 17591    /// Required. Indicates mode of the expiry time
 17592    /// </summary>
 17593    internal readonly struct BlobExpiryOptions : System.IEquatable<BlobExpiryOptions>
 17594    {
 17595        /// <summary>
 17596        /// The BlobExpiryOptions value.
 17597        /// </summary>
 17598        private readonly string _value;
 17599
 17600        /// <summary>
 17601        /// Initializes a new instance of the <see cref="BlobExpiryOptions"/> structure.
 17602        /// </summary>
 17603        /// <param name="value">The string value of the instance.</param>
 17604        public BlobExpiryOptions(string value) { _value = value ?? throw new System.ArgumentNullException(nameof(value))
 17605
 17606        /// <summary>
 17607        /// NeverExpire
 17608        /// </summary>
 17609        public static Azure.Storage.Blobs.Models.BlobExpiryOptions NeverExpire { get; } = new BlobExpiryOptions(@"NeverE
 17610
 17611        /// <summary>
 17612        /// RelativeToCreation
 17613        /// </summary>
 17614        public static Azure.Storage.Blobs.Models.BlobExpiryOptions RelativeToCreation { get; } = new BlobExpiryOptions(@
 17615
 17616        /// <summary>
 17617        /// RelativeToNow
 17618        /// </summary>
 17619        public static Azure.Storage.Blobs.Models.BlobExpiryOptions RelativeToNow { get; } = new BlobExpiryOptions(@"Rela
 17620
 17621        /// <summary>
 17622        /// Absolute
 17623        /// </summary>
 17624        public static Azure.Storage.Blobs.Models.BlobExpiryOptions Absolute { get; } = new BlobExpiryOptions(@"Absolute"
 17625
 17626        /// <summary>
 17627        /// Determines if two <see cref="BlobExpiryOptions"/> values are the same.
 17628        /// </summary>
 17629        /// <param name="left">The first <see cref="BlobExpiryOptions"/> to compare.</param>
 17630        /// <param name="right">The second <see cref="BlobExpiryOptions"/> to compare.</param>
 17631        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are the same; otherwise, false.</retur
 17632        public static bool operator ==(Azure.Storage.Blobs.Models.BlobExpiryOptions left, Azure.Storage.Blobs.Models.Blo
 17633
 17634        /// <summary>
 17635        /// Determines if two <see cref="BlobExpiryOptions"/> values are different.
 17636        /// </summary>
 17637        /// <param name="left">The first <see cref="BlobExpiryOptions"/> to compare.</param>
 17638        /// <param name="right">The second <see cref="BlobExpiryOptions"/> to compare.</param>
 17639        /// <returns>True if <paramref name="left"/> and <paramref name="right"/> are different; otherwise, false.</retu
 17640        public static bool operator !=(Azure.Storage.Blobs.Models.BlobExpiryOptions left, Azure.Storage.Blobs.Models.Blo
 17641
 17642        /// <summary>
 17643        /// Converts a string to a <see cref="BlobExpiryOptions"/>.
 17644        /// </summary>
 17645        /// <param name="value">The string value to convert.</param>
 17646        /// <returns>The BlobExpiryOptions value.</returns>
 17647        public static implicit operator BlobExpiryOptions(string value) => new Azure.Storage.Blobs.Models.BlobExpiryOpti
 17648
 17649        /// <summary>
 17650        /// Check if two <see cref="BlobExpiryOptions"/> instances are equal.
 17651        /// </summary>
 17652        /// <param name="obj">The instance to compare to.</param>
 17653        /// <returns>True if they're equal, false otherwise.</returns>
 17654        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 17655        public override bool Equals(object obj) => obj is Azure.Storage.Blobs.Models.BlobExpiryOptions other && Equals(o
 17656
 17657        /// <summary>
 17658        /// Check if two <see cref="BlobExpiryOptions"/> instances are equal.
 17659        /// </summary>
 17660        /// <param name="other">The instance to compare to.</param>
 17661        /// <returns>True if they're equal, false otherwise.</returns>
 17662        public bool Equals(Azure.Storage.Blobs.Models.BlobExpiryOptions other) => string.Equals(_value, other._value, Sy
 17663
 17664        /// <summary>
 17665        /// Get a hash code for the <see cref="BlobExpiryOptions"/>.
 17666        /// </summary>
 17667        /// <returns>Hash code for the BlobExpiryOptions.</returns>
 17668        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
 17669        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 17670
 17671        /// <summary>
 17672        /// Convert the <see cref="BlobExpiryOptions"/> to a string.
 17673        /// </summary>
 17674        /// <returns>String representation of the BlobExpiryOptions.</returns>
 17675        public override string ToString() => _value;
 17676    }
 17677}
 17678#endregion enum strings BlobExpiryOptions
 17679
 17680#region class BlobGeoReplication
 17681namespace Azure.Storage.Blobs.Models
 17682{
 17683    /// <summary>
 17684    /// Geo-Replication information for the Secondary Storage Service
 17685    /// </summary>
 17686    public partial class BlobGeoReplication
 17687    {
 17688        /// <summary>
 17689        /// The status of the secondary location
 17690        /// </summary>
 17691        public Azure.Storage.Blobs.Models.BlobGeoReplicationStatus Status { get; internal set; }
 17692
 17693        /// <summary>
 17694        /// A GMT date/time value, to the second. All primary writes preceding this value are guaranteed to be available
 17695        /// </summary>
 17696        public System.DateTimeOffset? LastSyncedOn { get; internal set; }
 17697
 17698        /// <summary>
 17699        /// Prevent direct instantiation of BlobGeoReplication instances.
 17700        /// You can use BlobsModelFactory.BlobGeoReplication instead.
 17701        /// </summary>
 17702        internal BlobGeoReplication() { }
 17703
 17704        /// <summary>
 17705        /// Deserializes XML into a new BlobGeoReplication instance.
 17706        /// </summary>
 17707        /// <param name="element">The XML element to deserialize.</param>
 17708        /// <returns>A deserialized BlobGeoReplication instance.</returns>
 17709        internal static Azure.Storage.Blobs.Models.BlobGeoReplication FromXml(System.Xml.Linq.XElement element)
 17710        {
 17711            System.Diagnostics.Debug.Assert(element != null);
 17712            System.Xml.Linq.XElement _child;
 17713            Azure.Storage.Blobs.Models.BlobGeoReplication _value = new Azure.Storage.Blobs.Models.BlobGeoReplication();
 17714            _child = element.Element(System.Xml.Linq.XName.Get("Status", ""));
 17715            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 17716            {
 17717                _value.Status = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobGeoReplicationStatus(_child.Va
 17718            }
 17719            _child = element.Element(System.Xml.Linq.XName.Get("LastSyncTime", ""));
 17720            if (_child != null)
 17721            {
 17722                _value.LastSyncedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Invaria
 17723            }
 17724            CustomizeFromXml(element, _value);
 17725            return _value;
 17726        }
 17727
 17728        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobGeoReplica
 17729    }
 17730
 17731    /// <summary>
 17732    /// BlobsModelFactory provides utilities for mocking.
 17733    /// </summary>
 17734    public static partial class BlobsModelFactory
 17735    {
 17736        /// <summary>
 17737        /// Creates a new BlobGeoReplication instance for mocking.
 17738        /// </summary>
 17739        public static BlobGeoReplication BlobGeoReplication(
 17740            Azure.Storage.Blobs.Models.BlobGeoReplicationStatus status,
 17741            System.DateTimeOffset? lastSyncedOn = default)
 17742        {
 17743            return new BlobGeoReplication()
 17744            {
 17745                Status = status,
 17746                LastSyncedOn = lastSyncedOn,
 17747            };
 17748        }
 17749    }
 17750}
 17751#endregion class BlobGeoReplication
 17752
 17753#region enum BlobGeoReplicationStatus
 17754namespace Azure.Storage.Blobs.Models
 17755{
 17756    /// <summary>
 17757    /// The status of the secondary location
 17758    /// </summary>
 17759    #pragma warning disable CA1717 // Only FlagsAttribute enums should have plural names
 17760    public enum BlobGeoReplicationStatus
 17761    #pragma warning restore CA1717 // Only FlagsAttribute enums should have plural names
 17762    {
 17763        /// <summary>
 17764        /// live
 17765        /// </summary>
 17766        Live,
 17767
 17768        /// <summary>
 17769        /// bootstrap
 17770        /// </summary>
 17771        Bootstrap,
 17772
 17773        /// <summary>
 17774        /// unavailable
 17775        /// </summary>
 17776        Unavailable
 17777    }
 17778}
 17779
 17780namespace Azure.Storage.Blobs
 17781{
 17782    internal static partial class BlobRestClient
 17783    {
 17784        public static partial class Serialization
 17785        {
 17786            public static string ToString(Azure.Storage.Blobs.Models.BlobGeoReplicationStatus value)
 17787            {
 017788                return value switch
 017789                {
 017790                    Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Live => "live",
 017791                    Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Bootstrap => "bootstrap",
 017792                    Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Unavailable => "unavailable",
 017793                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 017794                };
 17795            }
 17796
 17797            public static Azure.Storage.Blobs.Models.BlobGeoReplicationStatus ParseBlobGeoReplicationStatus(string value
 17798            {
 417799                return value switch
 417800                {
 817801                    "live" => Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Live,
 017802                    "bootstrap" => Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Bootstrap,
 017803                    "unavailable" => Azure.Storage.Blobs.Models.BlobGeoReplicationStatus.Unavailable,
 017804                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 417805                };
 17806            }
 17807        }
 17808    }
 17809}
 17810#endregion enum BlobGeoReplicationStatus
 17811
 17812#region class BlobInfo
 17813namespace Azure.Storage.Blobs.Models
 17814{
 17815    /// <summary>
 17816    /// BlobInfo
 17817    /// </summary>
 17818    public partial class BlobInfo
 17819    {
 17820        /// <summary>
 17821        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 17822        /// </summary>
 17823        public Azure.ETag ETag { get; internal set; }
 17824
 17825        /// <summary>
 17826        /// Returns the date and time the blob was last modified. Any operation that modifies the blob, including an upd
 17827        /// </summary>
 17828        public System.DateTimeOffset LastModified { get; internal set; }
 17829
 17830        /// <summary>
 17831        /// Prevent direct instantiation of BlobInfo instances.
 17832        /// You can use BlobsModelFactory.BlobInfo instead.
 17833        /// </summary>
 17834        internal BlobInfo() { }
 17835    }
 17836
 17837    /// <summary>
 17838    /// BlobsModelFactory provides utilities for mocking.
 17839    /// </summary>
 17840    public static partial class BlobsModelFactory
 17841    {
 17842        /// <summary>
 17843        /// Creates a new BlobInfo instance for mocking.
 17844        /// </summary>
 17845        public static BlobInfo BlobInfo(
 17846            Azure.ETag eTag,
 17847            System.DateTimeOffset lastModified)
 17848        {
 17849            return new BlobInfo()
 17850            {
 17851                ETag = eTag,
 17852                LastModified = lastModified,
 17853            };
 17854        }
 17855    }
 17856}
 17857#endregion class BlobInfo
 17858
 17859#region class BlobItemInternal
 17860namespace Azure.Storage.Blobs.Models
 17861{
 17862    /// <summary>
 17863    /// An Azure Storage blob
 17864    /// </summary>
 17865    internal partial class BlobItemInternal
 17866    {
 17867        /// <summary>
 17868        /// Name
 17869        /// </summary>
 17870        public string Name { get; internal set; }
 17871
 17872        /// <summary>
 17873        /// Deleted
 17874        /// </summary>
 17875        public bool Deleted { get; internal set; }
 17876
 17877        /// <summary>
 17878        /// Snapshot
 17879        /// </summary>
 17880        public string Snapshot { get; internal set; }
 17881
 17882        /// <summary>
 17883        /// VersionId
 17884        /// </summary>
 17885        public string VersionId { get; internal set; }
 17886
 17887        /// <summary>
 17888        /// IsCurrentVersion
 17889        /// </summary>
 17890        public bool? IsCurrentVersion { get; internal set; }
 17891
 17892        /// <summary>
 17893        /// Properties of a blob
 17894        /// </summary>
 17895        public Azure.Storage.Blobs.Models.BlobItemProperties Properties { get; internal set; }
 17896
 17897        /// <summary>
 17898        /// Metadata
 17899        /// </summary>
 17900        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 17901
 17902        /// <summary>
 17903        /// Blob tags
 17904        /// </summary>
 17905        public Azure.Storage.Blobs.Models.BlobTags BlobTags { get; internal set; }
 17906
 17907        /// <summary>
 17908        /// ObjectReplicationMetadata
 17909        /// </summary>
 17910        public System.Collections.Generic.IDictionary<string, string> ObjectReplicationMetadata { get; internal set; }
 17911
 17912        /// <summary>
 17913        /// Creates a new BlobItemInternal instance
 17914        /// </summary>
 17915        public BlobItemInternal()
 17916            : this(false)
 17917        {
 17918        }
 17919
 17920        /// <summary>
 17921        /// Creates a new BlobItemInternal instance
 17922        /// </summary>
 17923        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 17924        internal BlobItemInternal(bool skipInitialization)
 17925        {
 17926            if (!skipInitialization)
 17927            {
 17928                Properties = new Azure.Storage.Blobs.Models.BlobItemProperties();
 17929                Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnore
 17930                BlobTags = new Azure.Storage.Blobs.Models.BlobTags();
 17931                ObjectReplicationMetadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCompa
 17932            }
 17933        }
 17934
 17935        /// <summary>
 17936        /// Deserializes XML into a new BlobItemInternal instance.
 17937        /// </summary>
 17938        /// <param name="element">The XML element to deserialize.</param>
 17939        /// <returns>A deserialized BlobItemInternal instance.</returns>
 17940        internal static Azure.Storage.Blobs.Models.BlobItemInternal FromXml(System.Xml.Linq.XElement element)
 17941        {
 17942            System.Diagnostics.Debug.Assert(element != null);
 17943            System.Xml.Linq.XElement _child;
 17944            Azure.Storage.Blobs.Models.BlobItemInternal _value = new Azure.Storage.Blobs.Models.BlobItemInternal(true);
 17945            _child = element.Element(System.Xml.Linq.XName.Get("Name", ""));
 17946            if (_child != null)
 17947            {
 17948                _value.Name = _child.Value;
 17949            }
 17950            _child = element.Element(System.Xml.Linq.XName.Get("Deleted", ""));
 17951            if (_child != null)
 17952            {
 17953                _value.Deleted = bool.Parse(_child.Value);
 17954            }
 17955            _child = element.Element(System.Xml.Linq.XName.Get("Snapshot", ""));
 17956            if (_child != null)
 17957            {
 17958                _value.Snapshot = _child.Value;
 17959            }
 17960            _child = element.Element(System.Xml.Linq.XName.Get("VersionId", ""));
 17961            if (_child != null)
 17962            {
 17963                _value.VersionId = _child.Value;
 17964            }
 17965            _child = element.Element(System.Xml.Linq.XName.Get("IsCurrentVersion", ""));
 17966            if (_child != null)
 17967            {
 17968                _value.IsCurrentVersion = bool.Parse(_child.Value);
 17969            }
 17970            _child = element.Element(System.Xml.Linq.XName.Get("Properties", ""));
 17971            if (_child != null)
 17972            {
 17973                _value.Properties = Azure.Storage.Blobs.Models.BlobItemProperties.FromXml(_child);
 17974            }
 17975            _value.Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgn
 17976            _child = element.Element(System.Xml.Linq.XName.Get("Metadata", ""));
 17977            if (_child != null)
 17978            {
 17979                foreach (System.Xml.Linq.XElement _pair in _child.Elements())
 17980                {
 17981                    _value.Metadata[_pair.Name.LocalName] = _pair.Value;
 17982                }
 17983            }
 17984            _child = element.Element(System.Xml.Linq.XName.Get("Tags", ""));
 17985            if (_child != null)
 17986            {
 17987                _value.BlobTags = Azure.Storage.Blobs.Models.BlobTags.FromXml(_child);
 17988            }
 17989            _value.ObjectReplicationMetadata = new System.Collections.Generic.Dictionary<string, string>(System.StringCo
 17990            _child = element.Element(System.Xml.Linq.XName.Get("OrMetadata", ""));
 17991            if (_child != null)
 17992            {
 17993                foreach (System.Xml.Linq.XElement _pair in _child.Elements())
 17994                {
 17995                    _value.ObjectReplicationMetadata[_pair.Name.LocalName] = _pair.Value;
 17996                }
 17997            }
 17998            CustomizeFromXml(element, _value);
 17999            return _value;
 18000        }
 18001
 18002        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobItemIntern
 18003    }
 18004}
 18005#endregion class BlobItemInternal
 18006
 18007#region class BlobItemProperties
 18008namespace Azure.Storage.Blobs.Models
 18009{
 18010    /// <summary>
 18011    /// Properties of a blob
 18012    /// </summary>
 18013    public partial class BlobItemProperties
 18014    {
 18015        /// <summary>
 18016        /// Last-Modified
 18017        /// </summary>
 18018        public System.DateTimeOffset? LastModified { get; internal set; }
 18019
 18020        /// <summary>
 18021        /// Size in bytes
 18022        /// </summary>
 18023        public long? ContentLength { get; internal set; }
 18024
 18025        /// <summary>
 18026        /// Content-Type
 18027        /// </summary>
 18028        public string ContentType { get; internal set; }
 18029
 18030        /// <summary>
 18031        /// Content-Encoding
 18032        /// </summary>
 18033        public string ContentEncoding { get; internal set; }
 18034
 18035        /// <summary>
 18036        /// Content-Language
 18037        /// </summary>
 18038        public string ContentLanguage { get; internal set; }
 18039
 18040        /// <summary>
 18041        /// Content-MD5
 18042        /// </summary>
 18043        #pragma warning disable CA1819 // Properties should not return arrays
 18044        public byte[] ContentHash { get; internal set; }
 18045        #pragma warning restore CA1819 // Properties should not return arrays
 18046
 18047        /// <summary>
 18048        /// Content-Disposition
 18049        /// </summary>
 18050        public string ContentDisposition { get; internal set; }
 18051
 18052        /// <summary>
 18053        /// Cache-Control
 18054        /// </summary>
 18055        public string CacheControl { get; internal set; }
 18056
 18057        /// <summary>
 18058        /// x-ms-blob-sequence-number
 18059        /// </summary>
 18060        public long? BlobSequenceNumber { get; internal set; }
 18061
 18062        /// <summary>
 18063        /// BlobType
 18064        /// </summary>
 18065        public Azure.Storage.Blobs.Models.BlobType? BlobType { get; internal set; }
 18066
 18067        /// <summary>
 18068        /// LeaseStatus
 18069        /// </summary>
 18070        public Azure.Storage.Blobs.Models.LeaseStatus? LeaseStatus { get; internal set; }
 18071
 18072        /// <summary>
 18073        /// LeaseState
 18074        /// </summary>
 18075        public Azure.Storage.Blobs.Models.LeaseState? LeaseState { get; internal set; }
 18076
 18077        /// <summary>
 18078        /// LeaseDuration
 18079        /// </summary>
 18080        public Azure.Storage.Blobs.Models.LeaseDurationType? LeaseDuration { get; internal set; }
 18081
 18082        /// <summary>
 18083        /// CopyId
 18084        /// </summary>
 18085        public string CopyId { get; internal set; }
 18086
 18087        /// <summary>
 18088        /// CopyStatus
 18089        /// </summary>
 18090        public Azure.Storage.Blobs.Models.CopyStatus? CopyStatus { get; internal set; }
 18091
 18092        /// <summary>
 18093        /// CopySource
 18094        /// </summary>
 18095        public System.Uri CopySource { get; internal set; }
 18096
 18097        /// <summary>
 18098        /// CopyProgress
 18099        /// </summary>
 18100        public string CopyProgress { get; internal set; }
 18101
 18102        /// <summary>
 18103        /// CopyStatusDescription
 18104        /// </summary>
 18105        public string CopyStatusDescription { get; internal set; }
 18106
 18107        /// <summary>
 18108        /// ServerEncrypted
 18109        /// </summary>
 18110        public bool? ServerEncrypted { get; internal set; }
 18111
 18112        /// <summary>
 18113        /// IncrementalCopy
 18114        /// </summary>
 18115        public bool? IncrementalCopy { get; internal set; }
 18116
 18117        /// <summary>
 18118        /// DestinationSnapshot
 18119        /// </summary>
 18120        public string DestinationSnapshot { get; internal set; }
 18121
 18122        /// <summary>
 18123        /// RemainingRetentionDays
 18124        /// </summary>
 18125        public int? RemainingRetentionDays { get; internal set; }
 18126
 18127        /// <summary>
 18128        /// AccessTier
 18129        /// </summary>
 18130        public Azure.Storage.Blobs.Models.AccessTier? AccessTier { get; internal set; }
 18131
 18132        /// <summary>
 18133        /// AccessTierInferred
 18134        /// </summary>
 18135        public bool AccessTierInferred { get; internal set; }
 18136
 18137        /// <summary>
 18138        /// ArchiveStatus
 18139        /// </summary>
 18140        public Azure.Storage.Blobs.Models.ArchiveStatus? ArchiveStatus { get; internal set; }
 18141
 18142        /// <summary>
 18143        /// CustomerProvidedKeySha256
 18144        /// </summary>
 18145        public string CustomerProvidedKeySha256 { get; internal set; }
 18146
 18147        /// <summary>
 18148        /// The name of the encryption scope under which the blob is encrypted.
 18149        /// </summary>
 18150        public string EncryptionScope { get; internal set; }
 18151
 18152        /// <summary>
 18153        /// TagCount
 18154        /// </summary>
 18155        public long? TagCount { get; internal set; }
 18156
 18157        /// <summary>
 18158        /// Expiry-Time
 18159        /// </summary>
 18160        public System.DateTimeOffset? ExpiresOn { get; internal set; }
 18161
 18162        /// <summary>
 18163        /// Sealed
 18164        /// </summary>
 18165        public bool? IsSealed { get; internal set; }
 18166
 18167        /// <summary>
 18168        /// If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid va
 18169        /// </summary>
 18170        public Azure.Storage.Blobs.Models.RehydratePriority? RehydratePriority { get; internal set; }
 18171
 18172        /// <summary>
 18173        /// ETag
 18174        /// </summary>
 18175        public Azure.ETag? ETag { get; internal set; }
 18176
 18177        /// <summary>
 18178        /// CreatedOn
 18179        /// </summary>
 18180        public System.DateTimeOffset? CreatedOn { get; internal set; }
 18181
 18182        /// <summary>
 18183        /// CopyCompletedOn
 18184        /// </summary>
 18185        public System.DateTimeOffset? CopyCompletedOn { get; internal set; }
 18186
 18187        /// <summary>
 18188        /// DeletedOn
 18189        /// </summary>
 18190        public System.DateTimeOffset? DeletedOn { get; internal set; }
 18191
 18192        /// <summary>
 18193        /// AccessTierChangedOn
 18194        /// </summary>
 18195        public System.DateTimeOffset? AccessTierChangedOn { get; internal set; }
 18196
 18197        /// <summary>
 18198        /// Prevent direct instantiation of BlobItemProperties instances.
 18199        /// You can use BlobsModelFactory.BlobItemProperties instead.
 18200        /// </summary>
 18201        internal BlobItemProperties() { }
 18202
 18203        /// <summary>
 18204        /// Deserializes XML into a new BlobItemProperties instance.
 18205        /// </summary>
 18206        /// <param name="element">The XML element to deserialize.</param>
 18207        /// <returns>A deserialized BlobItemProperties instance.</returns>
 18208        internal static Azure.Storage.Blobs.Models.BlobItemProperties FromXml(System.Xml.Linq.XElement element)
 18209        {
 18210            System.Diagnostics.Debug.Assert(element != null);
 18211            System.Xml.Linq.XElement _child;
 18212            Azure.Storage.Blobs.Models.BlobItemProperties _value = new Azure.Storage.Blobs.Models.BlobItemProperties();
 18213            _child = element.Element(System.Xml.Linq.XName.Get("Last-Modified", ""));
 18214            if (_child != null)
 18215            {
 18216                _value.LastModified = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Invaria
 18217            }
 18218            _child = element.Element(System.Xml.Linq.XName.Get("Content-Length", ""));
 18219            if (_child != null)
 18220            {
 18221                _value.ContentLength = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 18222            }
 18223            _child = element.Element(System.Xml.Linq.XName.Get("Content-Type", ""));
 18224            if (_child != null)
 18225            {
 18226                _value.ContentType = _child.Value;
 18227            }
 18228            _child = element.Element(System.Xml.Linq.XName.Get("Content-Encoding", ""));
 18229            if (_child != null)
 18230            {
 18231                _value.ContentEncoding = _child.Value;
 18232            }
 18233            _child = element.Element(System.Xml.Linq.XName.Get("Content-Language", ""));
 18234            if (_child != null)
 18235            {
 18236                _value.ContentLanguage = _child.Value;
 18237            }
 18238            _child = element.Element(System.Xml.Linq.XName.Get("Content-MD5", ""));
 18239            if (_child != null)
 18240            {
 18241                _value.ContentHash = System.Convert.FromBase64String(_child.Value);
 18242            }
 18243            _child = element.Element(System.Xml.Linq.XName.Get("Content-Disposition", ""));
 18244            if (_child != null)
 18245            {
 18246                _value.ContentDisposition = _child.Value;
 18247            }
 18248            _child = element.Element(System.Xml.Linq.XName.Get("Cache-Control", ""));
 18249            if (_child != null)
 18250            {
 18251                _value.CacheControl = _child.Value;
 18252            }
 18253            _child = element.Element(System.Xml.Linq.XName.Get("x-ms-blob-sequence-number", ""));
 18254            if (_child != null)
 18255            {
 18256                _value.BlobSequenceNumber = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 18257            }
 18258            _child = element.Element(System.Xml.Linq.XName.Get("BlobType", ""));
 18259            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18260            {
 18261                _value.BlobType = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseBlobType(_child.Value);
 18262            }
 18263            _child = element.Element(System.Xml.Linq.XName.Get("LeaseStatus", ""));
 18264            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18265            {
 18266                _value.LeaseStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseStatus(_child.Value);
 18267            }
 18268            _child = element.Element(System.Xml.Linq.XName.Get("LeaseState", ""));
 18269            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18270            {
 18271                _value.LeaseState = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseState(_child.Value);
 18272            }
 18273            _child = element.Element(System.Xml.Linq.XName.Get("LeaseDuration", ""));
 18274            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18275            {
 18276                _value.LeaseDuration = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseLeaseDurationType(_child.Va
 18277            }
 18278            _child = element.Element(System.Xml.Linq.XName.Get("CopyId", ""));
 18279            if (_child != null)
 18280            {
 18281                _value.CopyId = _child.Value;
 18282            }
 18283            _child = element.Element(System.Xml.Linq.XName.Get("CopyStatus", ""));
 18284            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18285            {
 18286                _value.CopyStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseCopyStatus(_child.Value);
 18287            }
 18288            _child = element.Element(System.Xml.Linq.XName.Get("CopySource", ""));
 18289            if (_child != null)
 18290            {
 18291                _value.CopySource = new System.Uri(_child.Value);
 18292            }
 18293            _child = element.Element(System.Xml.Linq.XName.Get("CopyProgress", ""));
 18294            if (_child != null)
 18295            {
 18296                _value.CopyProgress = _child.Value;
 18297            }
 18298            _child = element.Element(System.Xml.Linq.XName.Get("CopyStatusDescription", ""));
 18299            if (_child != null)
 18300            {
 18301                _value.CopyStatusDescription = _child.Value;
 18302            }
 18303            _child = element.Element(System.Xml.Linq.XName.Get("ServerEncrypted", ""));
 18304            if (_child != null)
 18305            {
 18306                _value.ServerEncrypted = bool.Parse(_child.Value);
 18307            }
 18308            _child = element.Element(System.Xml.Linq.XName.Get("IncrementalCopy", ""));
 18309            if (_child != null)
 18310            {
 18311                _value.IncrementalCopy = bool.Parse(_child.Value);
 18312            }
 18313            _child = element.Element(System.Xml.Linq.XName.Get("DestinationSnapshot", ""));
 18314            if (_child != null)
 18315            {
 18316                _value.DestinationSnapshot = _child.Value;
 18317            }
 18318            _child = element.Element(System.Xml.Linq.XName.Get("RemainingRetentionDays", ""));
 18319            if (_child != null)
 18320            {
 18321                _value.RemainingRetentionDays = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCultur
 18322            }
 18323            _child = element.Element(System.Xml.Linq.XName.Get("AccessTier", ""));
 18324            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18325            {
 18326                _value.AccessTier = _child.Value;
 18327            }
 18328            _child = element.Element(System.Xml.Linq.XName.Get("AccessTierInferred", ""));
 18329            if (_child != null)
 18330            {
 18331                _value.AccessTierInferred = bool.Parse(_child.Value);
 18332            }
 18333            _child = element.Element(System.Xml.Linq.XName.Get("ArchiveStatus", ""));
 18334            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18335            {
 18336                _value.ArchiveStatus = Azure.Storage.Blobs.BlobRestClient.Serialization.ParseArchiveStatus(_child.Value)
 18337            }
 18338            _child = element.Element(System.Xml.Linq.XName.Get("CustomerProvidedKeySha256", ""));
 18339            if (_child != null)
 18340            {
 18341                _value.CustomerProvidedKeySha256 = _child.Value;
 18342            }
 18343            _child = element.Element(System.Xml.Linq.XName.Get("EncryptionScope", ""));
 18344            if (_child != null)
 18345            {
 18346                _value.EncryptionScope = _child.Value;
 18347            }
 18348            _child = element.Element(System.Xml.Linq.XName.Get("TagCount", ""));
 18349            if (_child != null)
 18350            {
 18351                _value.TagCount = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 18352            }
 18353            _child = element.Element(System.Xml.Linq.XName.Get("Expiry-Time", ""));
 18354            if (_child != null)
 18355            {
 18356                _value.ExpiresOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.InvariantC
 18357            }
 18358            _child = element.Element(System.Xml.Linq.XName.Get("Sealed", ""));
 18359            if (_child != null)
 18360            {
 18361                _value.IsSealed = bool.Parse(_child.Value);
 18362            }
 18363            _child = element.Element(System.Xml.Linq.XName.Get("RehydratePriority", ""));
 18364            if (_child != null && !string.IsNullOrEmpty(_child.Value))
 18365            {
 18366                _value.RehydratePriority = (Azure.Storage.Blobs.Models.RehydratePriority)System.Enum.Parse(typeof(Azure.
 18367            }
 18368            _child = element.Element(System.Xml.Linq.XName.Get("Etag", ""));
 18369            if (_child != null)
 18370            {
 18371                _value.ETag = new Azure.ETag(_child.Value);
 18372            }
 18373            _child = element.Element(System.Xml.Linq.XName.Get("Creation-Time", ""));
 18374            if (_child != null)
 18375            {
 18376                _value.CreatedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.InvariantC
 18377            }
 18378            _child = element.Element(System.Xml.Linq.XName.Get("CopyCompletionTime", ""));
 18379            if (_child != null)
 18380            {
 18381                _value.CopyCompletedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Inva
 18382            }
 18383            _child = element.Element(System.Xml.Linq.XName.Get("DeletedTime", ""));
 18384            if (_child != null)
 18385            {
 18386                _value.DeletedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.InvariantC
 18387            }
 18388            _child = element.Element(System.Xml.Linq.XName.Get("AccessTierChangeTime", ""));
 18389            if (_child != null)
 18390            {
 18391                _value.AccessTierChangedOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.
 18392            }
 18393            CustomizeFromXml(element, _value);
 18394            return _value;
 18395        }
 18396
 18397        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobItemProper
 18398    }
 18399
 18400    /// <summary>
 18401    /// BlobsModelFactory provides utilities for mocking.
 18402    /// </summary>
 18403    public static partial class BlobsModelFactory
 18404    {
 18405        /// <summary>
 18406        /// Creates a new BlobItemProperties instance for mocking.
 18407        /// </summary>
 18408        public static BlobItemProperties BlobItemProperties(
 18409            bool accessTierInferred,
 18410            bool? serverEncrypted = default,
 18411            string contentType = default,
 18412            string contentEncoding = default,
 18413            string contentLanguage = default,
 18414            byte[] contentHash = default,
 18415            string contentDisposition = default,
 18416            string cacheControl = default,
 18417            long? blobSequenceNumber = default,
 18418            Azure.Storage.Blobs.Models.BlobType? blobType = default,
 18419            Azure.Storage.Blobs.Models.LeaseStatus? leaseStatus = default,
 18420            Azure.Storage.Blobs.Models.LeaseState? leaseState = default,
 18421            Azure.Storage.Blobs.Models.LeaseDurationType? leaseDuration = default,
 18422            string copyId = default,
 18423            Azure.Storage.Blobs.Models.CopyStatus? copyStatus = default,
 18424            System.Uri copySource = default,
 18425            string copyProgress = default,
 18426            string copyStatusDescription = default,
 18427            long? contentLength = default,
 18428            bool? incrementalCopy = default,
 18429            string destinationSnapshot = default,
 18430            int? remainingRetentionDays = default,
 18431            Azure.Storage.Blobs.Models.AccessTier? accessTier = default,
 18432            System.DateTimeOffset? lastModified = default,
 18433            Azure.Storage.Blobs.Models.ArchiveStatus? archiveStatus = default,
 18434            string customerProvidedKeySha256 = default,
 18435            string encryptionScope = default,
 18436            long? tagCount = default,
 18437            System.DateTimeOffset? expiresOn = default,
 18438            bool? isSealed = default,
 18439            Azure.Storage.Blobs.Models.RehydratePriority? rehydratePriority = default,
 18440            Azure.ETag? eTag = default,
 18441            System.DateTimeOffset? createdOn = default,
 18442            System.DateTimeOffset? copyCompletedOn = default,
 18443            System.DateTimeOffset? deletedOn = default,
 18444            System.DateTimeOffset? accessTierChangedOn = default)
 18445        {
 18446            return new BlobItemProperties()
 18447            {
 18448                AccessTierInferred = accessTierInferred,
 18449                ServerEncrypted = serverEncrypted,
 18450                ContentType = contentType,
 18451                ContentEncoding = contentEncoding,
 18452                ContentLanguage = contentLanguage,
 18453                ContentHash = contentHash,
 18454                ContentDisposition = contentDisposition,
 18455                CacheControl = cacheControl,
 18456                BlobSequenceNumber = blobSequenceNumber,
 18457                BlobType = blobType,
 18458                LeaseStatus = leaseStatus,
 18459                LeaseState = leaseState,
 18460                LeaseDuration = leaseDuration,
 18461                CopyId = copyId,
 18462                CopyStatus = copyStatus,
 18463                CopySource = copySource,
 18464                CopyProgress = copyProgress,
 18465                CopyStatusDescription = copyStatusDescription,
 18466                ContentLength = contentLength,
 18467                IncrementalCopy = incrementalCopy,
 18468                DestinationSnapshot = destinationSnapshot,
 18469                RemainingRetentionDays = remainingRetentionDays,
 18470                AccessTier = accessTier,
 18471                LastModified = lastModified,
 18472                ArchiveStatus = archiveStatus,
 18473                CustomerProvidedKeySha256 = customerProvidedKeySha256,
 18474                EncryptionScope = encryptionScope,
 18475                TagCount = tagCount,
 18476                ExpiresOn = expiresOn,
 18477                IsSealed = isSealed,
 18478                RehydratePriority = rehydratePriority,
 18479                ETag = eTag,
 18480                CreatedOn = createdOn,
 18481                CopyCompletedOn = copyCompletedOn,
 18482                DeletedOn = deletedOn,
 18483                AccessTierChangedOn = accessTierChangedOn,
 18484            };
 18485        }
 18486    }
 18487}
 18488#endregion class BlobItemProperties
 18489
 18490#region class BlobLease
 18491namespace Azure.Storage.Blobs.Models
 18492{
 18493    /// <summary>
 18494    /// BlobLease
 18495    /// </summary>
 18496    public partial class BlobLease
 18497    {
 18498        /// <summary>
 18499        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 18500        /// </summary>
 18501        public Azure.ETag ETag { get; internal set; }
 18502
 18503        /// <summary>
 18504        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 18505        /// </summary>
 18506        public System.DateTimeOffset LastModified { get; internal set; }
 18507
 18508        /// <summary>
 18509        /// Uniquely identifies a container's or blob's lease
 18510        /// </summary>
 18511        public string LeaseId { get; internal set; }
 18512
 18513        /// <summary>
 18514        /// Prevent direct instantiation of BlobLease instances.
 18515        /// You can use BlobsModelFactory.BlobLease instead.
 18516        /// </summary>
 18517        internal BlobLease() { }
 18518    }
 18519
 18520    /// <summary>
 18521    /// BlobsModelFactory provides utilities for mocking.
 18522    /// </summary>
 18523    public static partial class BlobsModelFactory
 18524    {
 18525        /// <summary>
 18526        /// Creates a new BlobLease instance for mocking.
 18527        /// </summary>
 18528        public static BlobLease BlobLease(
 18529            Azure.ETag eTag,
 18530            System.DateTimeOffset lastModified,
 18531            string leaseId)
 18532        {
 18533            return new BlobLease()
 18534            {
 18535                ETag = eTag,
 18536                LastModified = lastModified,
 18537                LeaseId = leaseId,
 18538            };
 18539        }
 18540    }
 18541}
 18542#endregion class BlobLease
 18543
 18544#region class BlobMetrics
 18545namespace Azure.Storage.Blobs.Models
 18546{
 18547    /// <summary>
 18548    /// a summary of request statistics grouped by API in hour or minute aggregates for blobs
 18549    /// </summary>
 18550    public partial class BlobMetrics
 18551    {
 18552        /// <summary>
 18553        /// The version of Storage Analytics to configure.
 18554        /// </summary>
 18555        public string Version { get; set; }
 18556
 18557        /// <summary>
 18558        /// Indicates whether metrics are enabled for the Blob service.
 18559        /// </summary>
 18560        public bool Enabled { get; set; }
 18561
 18562        /// <summary>
 18563        /// the retention policy which determines how long the associated data should persist
 18564        /// </summary>
 18565        public Azure.Storage.Blobs.Models.BlobRetentionPolicy RetentionPolicy { get; set; }
 18566
 18567        /// <summary>
 18568        /// Indicates whether metrics should generate summary statistics for called API operations.
 18569        /// </summary>
 18570        public bool? IncludeApis { get; set; }
 18571
 18572        /// <summary>
 18573        /// Creates a new BlobMetrics instance
 18574        /// </summary>
 18575        public BlobMetrics()
 18576            : this(false)
 18577        {
 18578        }
 18579
 18580        /// <summary>
 18581        /// Creates a new BlobMetrics instance
 18582        /// </summary>
 18583        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 18584        internal BlobMetrics(bool skipInitialization)
 18585        {
 18586            if (!skipInitialization)
 18587            {
 18588                RetentionPolicy = new Azure.Storage.Blobs.Models.BlobRetentionPolicy();
 18589            }
 18590        }
 18591
 18592        /// <summary>
 18593        /// Serialize a BlobMetrics instance as XML.
 18594        /// </summary>
 18595        /// <param name="value">The BlobMetrics instance to serialize.</param>
 18596        /// <param name="name">An optional name to use for the root element instead of "Metrics".</param>
 18597        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 18598        /// <returns>The serialized XML element.</returns>
 18599        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobMetrics value, string name = "Metr
 18600        {
 18601            System.Diagnostics.Debug.Assert(value != null);
 18602            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 18603            if (value.Version != null)
 18604            {
 18605                _element.Add(new System.Xml.Linq.XElement(
 18606                    System.Xml.Linq.XName.Get("Version", ""),
 18607                    value.Version));
 18608            }
 18609            _element.Add(new System.Xml.Linq.XElement(
 18610                System.Xml.Linq.XName.Get("Enabled", ""),
 18611                #pragma warning disable CA1308 // Normalize strings to uppercase
 18612                value.Enabled.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 18613                #pragma warning restore CA1308 // Normalize strings to uppercase
 18614            if (value.RetentionPolicy != null)
 18615            {
 18616                _element.Add(Azure.Storage.Blobs.Models.BlobRetentionPolicy.ToXml(value.RetentionPolicy, "RetentionPolic
 18617            }
 18618            if (value.IncludeApis != null)
 18619            {
 18620                _element.Add(new System.Xml.Linq.XElement(
 18621                    System.Xml.Linq.XName.Get("IncludeAPIs", ""),
 18622                    #pragma warning disable CA1308 // Normalize strings to uppercase
 18623                    value.IncludeApis.Value.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant
 18624                    #pragma warning restore CA1308 // Normalize strings to uppercase
 18625            }
 18626            return _element;
 18627        }
 18628
 18629        /// <summary>
 18630        /// Deserializes XML into a new BlobMetrics instance.
 18631        /// </summary>
 18632        /// <param name="element">The XML element to deserialize.</param>
 18633        /// <returns>A deserialized BlobMetrics instance.</returns>
 18634        internal static Azure.Storage.Blobs.Models.BlobMetrics FromXml(System.Xml.Linq.XElement element)
 18635        {
 18636            System.Diagnostics.Debug.Assert(element != null);
 18637            System.Xml.Linq.XElement _child;
 18638            Azure.Storage.Blobs.Models.BlobMetrics _value = new Azure.Storage.Blobs.Models.BlobMetrics(true);
 18639            _child = element.Element(System.Xml.Linq.XName.Get("Version", ""));
 18640            if (_child != null)
 18641            {
 18642                _value.Version = _child.Value;
 18643            }
 18644            _child = element.Element(System.Xml.Linq.XName.Get("Enabled", ""));
 18645            if (_child != null)
 18646            {
 18647                _value.Enabled = bool.Parse(_child.Value);
 18648            }
 18649            _child = element.Element(System.Xml.Linq.XName.Get("RetentionPolicy", ""));
 18650            if (_child != null)
 18651            {
 18652                _value.RetentionPolicy = Azure.Storage.Blobs.Models.BlobRetentionPolicy.FromXml(_child);
 18653            }
 18654            _child = element.Element(System.Xml.Linq.XName.Get("IncludeAPIs", ""));
 18655            if (_child != null)
 18656            {
 18657                _value.IncludeApis = bool.Parse(_child.Value);
 18658            }
 18659            CustomizeFromXml(element, _value);
 18660            return _value;
 18661        }
 18662
 18663        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobMetrics va
 18664    }
 18665}
 18666#endregion class BlobMetrics
 18667
 18668#region class BlobPrefix
 18669namespace Azure.Storage.Blobs.Models
 18670{
 18671    /// <summary>
 18672    /// BlobPrefix
 18673    /// </summary>
 18674    internal partial class BlobPrefix
 18675    {
 18676        /// <summary>
 18677        /// Name
 18678        /// </summary>
 18679        public string Name { get; internal set; }
 18680
 18681        /// <summary>
 18682        /// Prevent direct instantiation of BlobPrefix instances.
 18683        /// You can use BlobsModelFactory.BlobPrefix instead.
 18684        /// </summary>
 18685        internal BlobPrefix() { }
 18686
 18687        /// <summary>
 18688        /// Deserializes XML into a new BlobPrefix instance.
 18689        /// </summary>
 18690        /// <param name="element">The XML element to deserialize.</param>
 18691        /// <returns>A deserialized BlobPrefix instance.</returns>
 18692        internal static Azure.Storage.Blobs.Models.BlobPrefix FromXml(System.Xml.Linq.XElement element)
 18693        {
 18694            System.Diagnostics.Debug.Assert(element != null);
 18695            System.Xml.Linq.XElement _child;
 18696            Azure.Storage.Blobs.Models.BlobPrefix _value = new Azure.Storage.Blobs.Models.BlobPrefix();
 18697            _child = element.Element(System.Xml.Linq.XName.Get("Name", ""));
 18698            if (_child != null)
 18699            {
 18700                _value.Name = _child.Value;
 18701            }
 18702            CustomizeFromXml(element, _value);
 18703            return _value;
 18704        }
 18705
 18706        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobPrefix val
 18707    }
 18708}
 18709#endregion class BlobPrefix
 18710
 18711#region class BlobPropertiesInternal
 18712namespace Azure.Storage.Blobs.Models
 18713{
 18714    /// <summary>
 18715    /// BlobPropertiesInternal
 18716    /// </summary>
 18717    internal partial class BlobPropertiesInternal
 18718    {
 18719        /// <summary>
 18720        /// Returns the date and time the blob was last modified. Any operation that modifies the blob, including an upd
 18721        /// </summary>
 18722        public System.DateTimeOffset LastModified { get; internal set; }
 18723
 18724        /// <summary>
 18725        /// Returns the date and time the blob was created.
 18726        /// </summary>
 18727        public System.DateTimeOffset CreatedOn { get; internal set; }
 18728
 18729        /// <summary>
 18730        /// x-ms-meta
 18731        /// </summary>
 18732        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 18733
 18734        /// <summary>
 18735        /// Optional. Only valid when Object Replication is enabled for the storage container and on the destination blo
 18736        /// </summary>
 18737        public string ObjectReplicationPolicyId { get; internal set; }
 18738
 18739        /// <summary>
 18740        /// Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of 
 18741        /// </summary>
 18742        public System.Collections.Generic.IDictionary<string, string> ObjectReplicationRules { get; internal set; }
 18743
 18744        /// <summary>
 18745        /// The blob's type.
 18746        /// </summary>
 18747        public Azure.Storage.Blobs.Models.BlobType BlobType { get; internal set; }
 18748
 18749        /// <summary>
 18750        /// Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This val
 18751        /// </summary>
 18752        public System.DateTimeOffset CopyCompletedOn { get; internal set; }
 18753
 18754        /// <summary>
 18755        /// Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal 
 18756        /// </summary>
 18757        public string CopyStatusDescription { get; internal set; }
 18758
 18759        /// <summary>
 18760        /// String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy ope
 18761        /// </summary>
 18762        public string CopyId { get; internal set; }
 18763
 18764        /// <summary>
 18765        /// Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operat
 18766        /// </summary>
 18767        public string CopyProgress { get; internal set; }
 18768
 18769        /// <summary>
 18770        /// URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operati
 18771        /// </summary>
 18772        public System.Uri CopySource { get; internal set; }
 18773
 18774        /// <summary>
 18775        /// State of the copy operation identified by x-ms-copy-id.
 18776        /// </summary>
 18777        public Azure.Storage.Blobs.Models.CopyStatus CopyStatus { get; internal set; }
 18778
 18779        /// <summary>
 18780        /// Included if the blob is incremental copy blob.
 18781        /// </summary>
 18782        public bool IsIncrementalCopy { get; internal set; }
 18783
 18784        /// <summary>
 18785        /// Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. 
 18786        /// </summary>
 18787        public string DestinationSnapshot { get; internal set; }
 18788
 18789        /// <summary>
 18790        /// When a blob is leased, specifies whether the lease is of infinite or fixed duration.
 18791        /// </summary>
 18792        public Azure.Storage.Blobs.Models.LeaseDurationType LeaseDuration { get; internal set; }
 18793
 18794        /// <summary>
 18795        /// Lease state of the blob.
 18796        /// </summary>
 18797        public Azure.Storage.Blobs.Models.LeaseState LeaseState { get; internal set; }
 18798
 18799        /// <summary>
 18800        /// The current lease status of the blob.
 18801        /// </summary>
 18802        public Azure.Storage.Blobs.Models.LeaseStatus LeaseStatus { get; internal set; }
 18803
 18804        /// <summary>
 18805        /// The number of bytes present in the response body.
 18806        /// </summary>
 18807        public long ContentLength { get; internal set; }
 18808
 18809        /// <summary>
 18810        /// The content type specified for the blob. The default content type is 'application/octet-stream'
 18811        /// </summary>
 18812        public string ContentType { get; internal set; }
 18813
 18814        /// <summary>
 18815        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 18816        /// </summary>
 18817        public Azure.ETag ETag { get; internal set; }
 18818
 18819        /// <summary>
 18820        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 18821        /// </summary>
 18822        #pragma warning disable CA1819 // Properties should not return arrays
 18823        public byte[] ContentHash { get; internal set; }
 18824        #pragma warning restore CA1819 // Properties should not return arrays
 18825
 18826        /// <summary>
 18827        /// This header returns the value that was specified for the Content-Encoding request header
 18828        /// </summary>
 18829        public string ContentEncoding { get; internal set; }
 18830
 18831        /// <summary>
 18832        /// This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content
 18833        /// </summary>
 18834        public string ContentDisposition { get; internal set; }
 18835
 18836        /// <summary>
 18837        /// This header returns the value that was specified for the Content-Language request header.
 18838        /// </summary>
 18839        public string ContentLanguage { get; internal set; }
 18840
 18841        /// <summary>
 18842        /// This header is returned if it was previously specified for the blob.
 18843        /// </summary>
 18844        public string CacheControl { get; internal set; }
 18845
 18846        /// <summary>
 18847        /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs
 18848        /// </summary>
 18849        public long BlobSequenceNumber { get; internal set; }
 18850
 18851        /// <summary>
 18852        /// Indicates that the service supports requests for partial blob content.
 18853        /// </summary>
 18854        public string AcceptRanges { get; internal set; }
 18855
 18856        /// <summary>
 18857        /// The number of committed blocks present in the blob. This header is returned only for append blobs.
 18858        /// </summary>
 18859        public int BlobCommittedBlockCount { get; internal set; }
 18860
 18861        /// <summary>
 18862        /// The value of this header is set to true if the blob data and application metadata are completely encrypted u
 18863        /// </summary>
 18864        public bool IsServerEncrypted { get; internal set; }
 18865
 18866        /// <summary>
 18867        /// The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the m
 18868        /// </summary>
 18869        public string EncryptionKeySha256 { get; internal set; }
 18870
 18871        /// <summary>
 18872        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 18873        /// </summary>
 18874        public string EncryptionScope { get; internal set; }
 18875
 18876        /// <summary>
 18877        /// The tier of page blob on a premium storage account or tier of block blob on blob storage LRS accounts. For a
 18878        /// </summary>
 18879        public string AccessTier { get; internal set; }
 18880
 18881        /// <summary>
 18882        /// For page blobs on a premium storage account only. If the access tier is not explicitly set on the blob, the 
 18883        /// </summary>
 18884        public bool AccessTierInferred { get; internal set; }
 18885
 18886        /// <summary>
 18887        /// For blob storage LRS accounts, valid values are rehydrate-pending-to-hot/rehydrate-pending-to-cool. If the b
 18888        /// </summary>
 18889        public string ArchiveStatus { get; internal set; }
 18890
 18891        /// <summary>
 18892        /// The time the tier was changed on the object. This is only returned if the tier on the block blob was ever se
 18893        /// </summary>
 18894        public System.DateTimeOffset AccessTierChangedOn { get; internal set; }
 18895
 18896        /// <summary>
 18897        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 18898        /// </summary>
 18899        public string VersionId { get; internal set; }
 18900
 18901        /// <summary>
 18902        /// The value of this header indicates whether version of this blob is a current version, see also x-ms-version-
 18903        /// </summary>
 18904        public bool IsCurrentVersion { get; internal set; }
 18905
 18906        /// <summary>
 18907        /// The number of tags associated with the blob
 18908        /// </summary>
 18909        public long TagCount { get; internal set; }
 18910
 18911        /// <summary>
 18912        /// The time this blob will expire.
 18913        /// </summary>
 18914        public System.DateTimeOffset ExpiresOn { get; internal set; }
 18915
 18916        /// <summary>
 18917        /// If this blob has been sealed
 18918        /// </summary>
 18919        public bool IsSealed { get; internal set; }
 18920
 18921        /// <summary>
 18922        /// If an object is in rehydrate pending state then this header is returned with priority of rehydrate. Valid va
 18923        /// </summary>
 18924        public string RehydratePriority { get; internal set; }
 18925
 18926        /// <summary>
 18927        /// Creates a new BlobPropertiesInternal instance
 18928        /// </summary>
 18929        public BlobPropertiesInternal()
 18930        {
 18931            Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase
 18932            ObjectReplicationRules = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.Ord
 18933        }
 18934    }
 18935}
 18936#endregion class BlobPropertiesInternal
 18937
 18938#region class BlobRetentionPolicy
 18939namespace Azure.Storage.Blobs.Models
 18940{
 18941    /// <summary>
 18942    /// the retention policy which determines how long the associated data should persist
 18943    /// </summary>
 18944    public partial class BlobRetentionPolicy
 18945    {
 18946        /// <summary>
 18947        /// Indicates whether a retention policy is enabled for the storage service
 18948        /// </summary>
 18949        public bool Enabled { get; set; }
 18950
 18951        /// <summary>
 18952        /// Indicates the number of days that metrics or logging or soft-deleted data should be retained. All data older
 18953        /// </summary>
 18954        public int? Days { get; set; }
 18955
 18956        /// <summary>
 18957        /// Creates a new BlobRetentionPolicy instance
 18958        /// </summary>
 18959        public BlobRetentionPolicy() { }
 18960
 18961        /// <summary>
 18962        /// Serialize a BlobRetentionPolicy instance as XML.
 18963        /// </summary>
 18964        /// <param name="value">The BlobRetentionPolicy instance to serialize.</param>
 18965        /// <param name="name">An optional name to use for the root element instead of "RetentionPolicy".</param>
 18966        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 18967        /// <returns>The serialized XML element.</returns>
 18968        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobRetentionPolicy value, string name
 18969        {
 18970            System.Diagnostics.Debug.Assert(value != null);
 18971            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 18972            _element.Add(new System.Xml.Linq.XElement(
 18973                System.Xml.Linq.XName.Get("Enabled", ""),
 18974                #pragma warning disable CA1308 // Normalize strings to uppercase
 18975                value.Enabled.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 18976                #pragma warning restore CA1308 // Normalize strings to uppercase
 18977            if (value.Days != null)
 18978            {
 18979                _element.Add(new System.Xml.Linq.XElement(
 18980                    System.Xml.Linq.XName.Get("Days", ""),
 18981                    value.Days.Value.ToString(System.Globalization.CultureInfo.InvariantCulture)));
 18982            }
 18983            return _element;
 18984        }
 18985
 18986        /// <summary>
 18987        /// Deserializes XML into a new BlobRetentionPolicy instance.
 18988        /// </summary>
 18989        /// <param name="element">The XML element to deserialize.</param>
 18990        /// <returns>A deserialized BlobRetentionPolicy instance.</returns>
 18991        internal static Azure.Storage.Blobs.Models.BlobRetentionPolicy FromXml(System.Xml.Linq.XElement element)
 18992        {
 18993            System.Diagnostics.Debug.Assert(element != null);
 18994            System.Xml.Linq.XElement _child;
 18995            Azure.Storage.Blobs.Models.BlobRetentionPolicy _value = new Azure.Storage.Blobs.Models.BlobRetentionPolicy()
 18996            _child = element.Element(System.Xml.Linq.XName.Get("Enabled", ""));
 18997            if (_child != null)
 18998            {
 18999                _value.Enabled = bool.Parse(_child.Value);
 19000            }
 19001            _child = element.Element(System.Xml.Linq.XName.Get("Days", ""));
 19002            if (_child != null)
 19003            {
 19004                _value.Days = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 19005            }
 19006            CustomizeFromXml(element, _value);
 19007            return _value;
 19008        }
 19009
 19010        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobRetentionP
 19011    }
 19012}
 19013#endregion class BlobRetentionPolicy
 19014
 19015#region class BlobServiceProperties
 19016namespace Azure.Storage.Blobs.Models
 19017{
 19018    /// <summary>
 19019    /// Storage Service Properties.
 19020    /// </summary>
 19021    public partial class BlobServiceProperties
 19022    {
 19023        /// <summary>
 19024        /// Azure Analytics Logging settings.
 19025        /// </summary>
 19026        public Azure.Storage.Blobs.Models.BlobAnalyticsLogging Logging { get; set; }
 19027
 19028        /// <summary>
 19029        /// a summary of request statistics grouped by API in hour or minute aggregates for blobs
 19030        /// </summary>
 19031        public Azure.Storage.Blobs.Models.BlobMetrics HourMetrics { get; set; }
 19032
 19033        /// <summary>
 19034        /// a summary of request statistics grouped by API in hour or minute aggregates for blobs
 19035        /// </summary>
 19036        public Azure.Storage.Blobs.Models.BlobMetrics MinuteMetrics { get; set; }
 19037
 19038        /// <summary>
 19039        /// The set of CORS rules.
 19040        /// </summary>
 19041        public System.Collections.Generic.IList<Azure.Storage.Blobs.Models.BlobCorsRule> Cors { get; set; }
 19042
 19043        /// <summary>
 19044        /// The default version to use for requests to the Blob service if an incoming request's version is not specifie
 19045        /// </summary>
 19046        public string DefaultServiceVersion { get; set; }
 19047
 19048        /// <summary>
 19049        /// the retention policy which determines how long the associated data should persist
 19050        /// </summary>
 19051        public Azure.Storage.Blobs.Models.BlobRetentionPolicy DeleteRetentionPolicy { get; set; }
 19052
 19053        /// <summary>
 19054        /// The properties that enable an account to host a static website
 19055        /// </summary>
 19056        public Azure.Storage.Blobs.Models.BlobStaticWebsite StaticWebsite { get; set; }
 19057
 19058        /// <summary>
 19059        /// Creates a new BlobServiceProperties instance
 19060        /// </summary>
 19061        public BlobServiceProperties()
 19062            : this(false)
 19063        {
 19064        }
 19065
 19066        /// <summary>
 19067        /// Creates a new BlobServiceProperties instance
 19068        /// </summary>
 19069        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19070        internal BlobServiceProperties(bool skipInitialization)
 19071        {
 19072            if (!skipInitialization)
 19073            {
 19074                Logging = new Azure.Storage.Blobs.Models.BlobAnalyticsLogging();
 19075                HourMetrics = new Azure.Storage.Blobs.Models.BlobMetrics();
 19076                MinuteMetrics = new Azure.Storage.Blobs.Models.BlobMetrics();
 19077                DeleteRetentionPolicy = new Azure.Storage.Blobs.Models.BlobRetentionPolicy();
 19078                StaticWebsite = new Azure.Storage.Blobs.Models.BlobStaticWebsite();
 19079            }
 19080        }
 19081
 19082        /// <summary>
 19083        /// Serialize a BlobServiceProperties instance as XML.
 19084        /// </summary>
 19085        /// <param name="value">The BlobServiceProperties instance to serialize.</param>
 19086        /// <param name="name">An optional name to use for the root element instead of "StorageServiceProperties".</para
 19087        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 19088        /// <returns>The serialized XML element.</returns>
 19089        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobServiceProperties value, string na
 19090        {
 19091            System.Diagnostics.Debug.Assert(value != null);
 19092            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 19093            if (value.Logging != null)
 19094            {
 19095                _element.Add(Azure.Storage.Blobs.Models.BlobAnalyticsLogging.ToXml(value.Logging, "Logging", ""));
 19096            }
 19097            if (value.HourMetrics != null)
 19098            {
 19099                _element.Add(Azure.Storage.Blobs.Models.BlobMetrics.ToXml(value.HourMetrics, "HourMetrics", ""));
 19100            }
 19101            if (value.MinuteMetrics != null)
 19102            {
 19103                _element.Add(Azure.Storage.Blobs.Models.BlobMetrics.ToXml(value.MinuteMetrics, "MinuteMetrics", ""));
 19104            }
 19105            if (value.Cors != null)
 19106            {
 19107                System.Xml.Linq.XElement _elements = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("Cors", ""))
 19108                foreach (Azure.Storage.Blobs.Models.BlobCorsRule _child in value.Cors)
 19109                {
 19110                    _elements.Add(Azure.Storage.Blobs.Models.BlobCorsRule.ToXml(_child));
 19111                }
 19112                _element.Add(_elements);
 19113            }
 19114            if (value.DefaultServiceVersion != null)
 19115            {
 19116                _element.Add(new System.Xml.Linq.XElement(
 19117                    System.Xml.Linq.XName.Get("DefaultServiceVersion", ""),
 19118                    value.DefaultServiceVersion));
 19119            }
 19120            if (value.DeleteRetentionPolicy != null)
 19121            {
 19122                _element.Add(Azure.Storage.Blobs.Models.BlobRetentionPolicy.ToXml(value.DeleteRetentionPolicy, "DeleteRe
 19123            }
 19124            if (value.StaticWebsite != null)
 19125            {
 19126                _element.Add(Azure.Storage.Blobs.Models.BlobStaticWebsite.ToXml(value.StaticWebsite, "StaticWebsite", ""
 19127            }
 19128            return _element;
 19129        }
 19130
 19131        /// <summary>
 19132        /// Deserializes XML into a new BlobServiceProperties instance.
 19133        /// </summary>
 19134        /// <param name="element">The XML element to deserialize.</param>
 19135        /// <returns>A deserialized BlobServiceProperties instance.</returns>
 19136        internal static Azure.Storage.Blobs.Models.BlobServiceProperties FromXml(System.Xml.Linq.XElement element)
 19137        {
 19138            System.Diagnostics.Debug.Assert(element != null);
 19139            System.Xml.Linq.XElement _child;
 19140            Azure.Storage.Blobs.Models.BlobServiceProperties _value = new Azure.Storage.Blobs.Models.BlobServiceProperti
 19141            _child = element.Element(System.Xml.Linq.XName.Get("Logging", ""));
 19142            if (_child != null)
 19143            {
 19144                _value.Logging = Azure.Storage.Blobs.Models.BlobAnalyticsLogging.FromXml(_child);
 19145            }
 19146            _child = element.Element(System.Xml.Linq.XName.Get("HourMetrics", ""));
 19147            if (_child != null)
 19148            {
 19149                _value.HourMetrics = Azure.Storage.Blobs.Models.BlobMetrics.FromXml(_child);
 19150            }
 19151            _child = element.Element(System.Xml.Linq.XName.Get("MinuteMetrics", ""));
 19152            if (_child != null)
 19153            {
 19154                _value.MinuteMetrics = Azure.Storage.Blobs.Models.BlobMetrics.FromXml(_child);
 19155            }
 19156            _child = element.Element(System.Xml.Linq.XName.Get("Cors", ""));
 19157            if (_child != null)
 19158            {
 19159                _value.Cors = System.Linq.Enumerable.ToList(
 19160                    System.Linq.Enumerable.Select(
 19161                        _child.Elements(System.Xml.Linq.XName.Get("CorsRule", "")),
 19162                        e => Azure.Storage.Blobs.Models.BlobCorsRule.FromXml(e)));
 19163            }
 19164            else
 19165            {
 19166                _value.Cors = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobCorsRule>();
 19167            }
 19168            _child = element.Element(System.Xml.Linq.XName.Get("DefaultServiceVersion", ""));
 19169            if (_child != null)
 19170            {
 19171                _value.DefaultServiceVersion = _child.Value;
 19172            }
 19173            _child = element.Element(System.Xml.Linq.XName.Get("DeleteRetentionPolicy", ""));
 19174            if (_child != null)
 19175            {
 19176                _value.DeleteRetentionPolicy = Azure.Storage.Blobs.Models.BlobRetentionPolicy.FromXml(_child);
 19177            }
 19178            _child = element.Element(System.Xml.Linq.XName.Get("StaticWebsite", ""));
 19179            if (_child != null)
 19180            {
 19181                _value.StaticWebsite = Azure.Storage.Blobs.Models.BlobStaticWebsite.FromXml(_child);
 19182            }
 19183            CustomizeFromXml(element, _value);
 19184            return _value;
 19185        }
 19186
 19187        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobServicePro
 19188    }
 19189}
 19190#endregion class BlobServiceProperties
 19191
 19192#region class BlobServiceStatistics
 19193namespace Azure.Storage.Blobs.Models
 19194{
 19195    /// <summary>
 19196    /// Statistics for the storage service.
 19197    /// </summary>
 19198    public partial class BlobServiceStatistics
 19199    {
 19200        /// <summary>
 19201        /// Geo-Replication information for the Secondary Storage Service
 19202        /// </summary>
 19203        public Azure.Storage.Blobs.Models.BlobGeoReplication GeoReplication { get; internal set; }
 19204
 19205        /// <summary>
 19206        /// Creates a new BlobServiceStatistics instance
 19207        /// </summary>
 19208        internal BlobServiceStatistics()
 19209            : this(false)
 19210        {
 19211        }
 19212
 19213        /// <summary>
 19214        /// Creates a new BlobServiceStatistics instance
 19215        /// </summary>
 19216        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19217        internal BlobServiceStatistics(bool skipInitialization)
 19218        {
 19219            if (!skipInitialization)
 19220            {
 19221                GeoReplication = new Azure.Storage.Blobs.Models.BlobGeoReplication();
 19222            }
 19223        }
 19224
 19225        /// <summary>
 19226        /// Deserializes XML into a new BlobServiceStatistics instance.
 19227        /// </summary>
 19228        /// <param name="element">The XML element to deserialize.</param>
 19229        /// <returns>A deserialized BlobServiceStatistics instance.</returns>
 19230        internal static Azure.Storage.Blobs.Models.BlobServiceStatistics FromXml(System.Xml.Linq.XElement element)
 19231        {
 19232            System.Diagnostics.Debug.Assert(element != null);
 19233            System.Xml.Linq.XElement _child;
 19234            Azure.Storage.Blobs.Models.BlobServiceStatistics _value = new Azure.Storage.Blobs.Models.BlobServiceStatisti
 19235            _child = element.Element(System.Xml.Linq.XName.Get("GeoReplication", ""));
 19236            if (_child != null)
 19237            {
 19238                _value.GeoReplication = Azure.Storage.Blobs.Models.BlobGeoReplication.FromXml(_child);
 19239            }
 19240            CustomizeFromXml(element, _value);
 19241            return _value;
 19242        }
 19243
 19244        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobServiceSta
 19245    }
 19246
 19247    /// <summary>
 19248    /// BlobsModelFactory provides utilities for mocking.
 19249    /// </summary>
 19250    public static partial class BlobsModelFactory
 19251    {
 19252        /// <summary>
 19253        /// Creates a new BlobServiceStatistics instance for mocking.
 19254        /// </summary>
 19255        public static BlobServiceStatistics BlobServiceStatistics(
 19256            Azure.Storage.Blobs.Models.BlobGeoReplication geoReplication = default)
 19257        {
 19258            return new BlobServiceStatistics()
 19259            {
 19260                GeoReplication = geoReplication,
 19261            };
 19262        }
 19263    }
 19264}
 19265#endregion class BlobServiceStatistics
 19266
 19267#region class BlobSetExpiryInternal
 19268namespace Azure.Storage.Blobs.Models
 19269{
 19270    /// <summary>
 19271    /// BlobSetExpiryInternal
 19272    /// </summary>
 19273    internal partial class BlobSetExpiryInternal
 19274    {
 19275        /// <summary>
 19276        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 19277        /// </summary>
 19278        public Azure.ETag ETag { get; internal set; }
 19279
 19280        /// <summary>
 19281        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 19282        /// </summary>
 19283        public System.DateTimeOffset LastModified { get; internal set; }
 19284
 19285        /// <summary>
 19286        /// Prevent direct instantiation of BlobSetExpiryInternal instances.
 19287        /// You can use BlobsModelFactory.BlobSetExpiryInternal instead.
 19288        /// </summary>
 19289        internal BlobSetExpiryInternal() { }
 19290    }
 19291}
 19292#endregion class BlobSetExpiryInternal
 19293
 19294#region class BlobSignedIdentifier
 19295namespace Azure.Storage.Blobs.Models
 19296{
 19297    /// <summary>
 19298    /// signed identifier
 19299    /// </summary>
 19300    public partial class BlobSignedIdentifier
 19301    {
 19302        /// <summary>
 19303        /// a unique id
 19304        /// </summary>
 19305        public string Id { get; set; }
 19306
 19307        /// <summary>
 19308        /// An Access policy
 19309        /// </summary>
 19310        public Azure.Storage.Blobs.Models.BlobAccessPolicy AccessPolicy { get; set; }
 19311
 19312        /// <summary>
 19313        /// Creates a new BlobSignedIdentifier instance
 19314        /// </summary>
 19315        public BlobSignedIdentifier()
 19316            : this(false)
 19317        {
 19318        }
 19319
 19320        /// <summary>
 19321        /// Creates a new BlobSignedIdentifier instance
 19322        /// </summary>
 19323        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19324        internal BlobSignedIdentifier(bool skipInitialization)
 19325        {
 19326            if (!skipInitialization)
 19327            {
 19328                AccessPolicy = new Azure.Storage.Blobs.Models.BlobAccessPolicy();
 19329            }
 19330        }
 19331
 19332        /// <summary>
 19333        /// Serialize a BlobSignedIdentifier instance as XML.
 19334        /// </summary>
 19335        /// <param name="value">The BlobSignedIdentifier instance to serialize.</param>
 19336        /// <param name="name">An optional name to use for the root element instead of "SignedIdentifier".</param>
 19337        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 19338        /// <returns>The serialized XML element.</returns>
 19339        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobSignedIdentifier value, string nam
 19340        {
 19341            System.Diagnostics.Debug.Assert(value != null);
 19342            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 19343            _element.Add(new System.Xml.Linq.XElement(
 19344                System.Xml.Linq.XName.Get("Id", ""),
 19345                value.Id));
 19346            _element.Add(Azure.Storage.Blobs.Models.BlobAccessPolicy.ToXml(value.AccessPolicy, "AccessPolicy", ""));
 19347            return _element;
 19348        }
 19349
 19350        /// <summary>
 19351        /// Deserializes XML into a new BlobSignedIdentifier instance.
 19352        /// </summary>
 19353        /// <param name="element">The XML element to deserialize.</param>
 19354        /// <returns>A deserialized BlobSignedIdentifier instance.</returns>
 19355        internal static Azure.Storage.Blobs.Models.BlobSignedIdentifier FromXml(System.Xml.Linq.XElement element)
 19356        {
 19357            System.Diagnostics.Debug.Assert(element != null);
 19358            System.Xml.Linq.XElement _child;
 19359            Azure.Storage.Blobs.Models.BlobSignedIdentifier _value = new Azure.Storage.Blobs.Models.BlobSignedIdentifier
 19360            _child = element.Element(System.Xml.Linq.XName.Get("Id", ""));
 19361            if (_child != null)
 19362            {
 19363                _value.Id = _child.Value;
 19364            }
 19365            _child = element.Element(System.Xml.Linq.XName.Get("AccessPolicy", ""));
 19366            if (_child != null)
 19367            {
 19368                _value.AccessPolicy = Azure.Storage.Blobs.Models.BlobAccessPolicy.FromXml(_child);
 19369            }
 19370            CustomizeFromXml(element, _value);
 19371            return _value;
 19372        }
 19373
 19374        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobSignedIden
 19375    }
 19376}
 19377#endregion class BlobSignedIdentifier
 19378
 19379#region class BlobSnapshotInfo
 19380namespace Azure.Storage.Blobs.Models
 19381{
 19382    /// <summary>
 19383    /// BlobSnapshotInfo
 19384    /// </summary>
 19385    public partial class BlobSnapshotInfo
 19386    {
 19387        /// <summary>
 19388        /// Uniquely identifies the snapshot and indicates the snapshot version. It may be used in subsequent requests t
 19389        /// </summary>
 19390        public string Snapshot { get; internal set; }
 19391
 19392        /// <summary>
 19393        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 19394        /// </summary>
 19395        public Azure.ETag ETag { get; internal set; }
 19396
 19397        /// <summary>
 19398        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 19399        /// </summary>
 19400        public System.DateTimeOffset LastModified { get; internal set; }
 19401
 19402        /// <summary>
 19403        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 19404        /// </summary>
 19405        public string VersionId { get; internal set; }
 19406
 19407        /// <summary>
 19408        /// True if the contents of the request are successfully encrypted using the specified algorithm, and false othe
 19409        /// </summary>
 19410        public bool IsServerEncrypted { get; internal set; }
 19411
 19412        /// <summary>
 19413        /// Prevent direct instantiation of BlobSnapshotInfo instances.
 19414        /// You can use BlobsModelFactory.BlobSnapshotInfo instead.
 19415        /// </summary>
 19416        internal BlobSnapshotInfo() { }
 19417    }
 19418
 19419    /// <summary>
 19420    /// BlobsModelFactory provides utilities for mocking.
 19421    /// </summary>
 19422    public static partial class BlobsModelFactory
 19423    {
 19424        /// <summary>
 19425        /// Creates a new BlobSnapshotInfo instance for mocking.
 19426        /// </summary>
 19427        public static BlobSnapshotInfo BlobSnapshotInfo(
 19428            string snapshot,
 19429            Azure.ETag eTag,
 19430            System.DateTimeOffset lastModified,
 19431            string versionId,
 19432            bool isServerEncrypted)
 19433        {
 19434            return new BlobSnapshotInfo()
 19435            {
 19436                Snapshot = snapshot,
 19437                ETag = eTag,
 19438                LastModified = lastModified,
 19439                VersionId = versionId,
 19440                IsServerEncrypted = isServerEncrypted,
 19441            };
 19442        }
 19443    }
 19444}
 19445#endregion class BlobSnapshotInfo
 19446
 19447#region class BlobStaticWebsite
 19448namespace Azure.Storage.Blobs.Models
 19449{
 19450    /// <summary>
 19451    /// The properties that enable an account to host a static website
 19452    /// </summary>
 19453    public partial class BlobStaticWebsite
 19454    {
 19455        /// <summary>
 19456        /// Indicates whether this account is hosting a static website
 19457        /// </summary>
 19458        public bool Enabled { get; set; }
 19459
 19460        /// <summary>
 19461        /// The default name of the index page under each directory
 19462        /// </summary>
 19463        public string IndexDocument { get; set; }
 19464
 19465        /// <summary>
 19466        /// The absolute path of the custom 404 page
 19467        /// </summary>
 19468        public string ErrorDocument404Path { get; set; }
 19469
 19470        /// <summary>
 19471        /// Absolute path of the default index page
 19472        /// </summary>
 19473        public string DefaultIndexDocumentPath { get; set; }
 19474
 19475        /// <summary>
 19476        /// Creates a new BlobStaticWebsite instance
 19477        /// </summary>
 19478        public BlobStaticWebsite() { }
 19479
 19480        /// <summary>
 19481        /// Serialize a BlobStaticWebsite instance as XML.
 19482        /// </summary>
 19483        /// <param name="value">The BlobStaticWebsite instance to serialize.</param>
 19484        /// <param name="name">An optional name to use for the root element instead of "StaticWebsite".</param>
 19485        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 19486        /// <returns>The serialized XML element.</returns>
 19487        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobStaticWebsite value, string name =
 19488        {
 19489            System.Diagnostics.Debug.Assert(value != null);
 19490            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 19491            _element.Add(new System.Xml.Linq.XElement(
 19492                System.Xml.Linq.XName.Get("Enabled", ""),
 19493                #pragma warning disable CA1308 // Normalize strings to uppercase
 19494                value.Enabled.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 19495                #pragma warning restore CA1308 // Normalize strings to uppercase
 19496            if (value.IndexDocument != null)
 19497            {
 19498                _element.Add(new System.Xml.Linq.XElement(
 19499                    System.Xml.Linq.XName.Get("IndexDocument", ""),
 19500                    value.IndexDocument));
 19501            }
 19502            if (value.ErrorDocument404Path != null)
 19503            {
 19504                _element.Add(new System.Xml.Linq.XElement(
 19505                    System.Xml.Linq.XName.Get("ErrorDocument404Path", ""),
 19506                    value.ErrorDocument404Path));
 19507            }
 19508            if (value.DefaultIndexDocumentPath != null)
 19509            {
 19510                _element.Add(new System.Xml.Linq.XElement(
 19511                    System.Xml.Linq.XName.Get("DefaultIndexDocumentPath", ""),
 19512                    value.DefaultIndexDocumentPath));
 19513            }
 19514            return _element;
 19515        }
 19516
 19517        /// <summary>
 19518        /// Deserializes XML into a new BlobStaticWebsite instance.
 19519        /// </summary>
 19520        /// <param name="element">The XML element to deserialize.</param>
 19521        /// <returns>A deserialized BlobStaticWebsite instance.</returns>
 19522        internal static Azure.Storage.Blobs.Models.BlobStaticWebsite FromXml(System.Xml.Linq.XElement element)
 19523        {
 19524            System.Diagnostics.Debug.Assert(element != null);
 19525            System.Xml.Linq.XElement _child;
 19526            Azure.Storage.Blobs.Models.BlobStaticWebsite _value = new Azure.Storage.Blobs.Models.BlobStaticWebsite();
 19527            _child = element.Element(System.Xml.Linq.XName.Get("Enabled", ""));
 19528            if (_child != null)
 19529            {
 19530                _value.Enabled = bool.Parse(_child.Value);
 19531            }
 19532            _child = element.Element(System.Xml.Linq.XName.Get("IndexDocument", ""));
 19533            if (_child != null)
 19534            {
 19535                _value.IndexDocument = _child.Value;
 19536            }
 19537            _child = element.Element(System.Xml.Linq.XName.Get("ErrorDocument404Path", ""));
 19538            if (_child != null)
 19539            {
 19540                _value.ErrorDocument404Path = _child.Value;
 19541            }
 19542            _child = element.Element(System.Xml.Linq.XName.Get("DefaultIndexDocumentPath", ""));
 19543            if (_child != null)
 19544            {
 19545                _value.DefaultIndexDocumentPath = _child.Value;
 19546            }
 19547            CustomizeFromXml(element, _value);
 19548            return _value;
 19549        }
 19550
 19551        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobStaticWebs
 19552    }
 19553}
 19554#endregion class BlobStaticWebsite
 19555
 19556#region class BlobTag
 19557namespace Azure.Storage.Blobs.Models
 19558{
 19559    /// <summary>
 19560    /// BlobTag
 19561    /// </summary>
 19562    internal partial class BlobTag
 19563    {
 19564        /// <summary>
 19565        /// Key
 19566        /// </summary>
 19567        public string Key { get; set; }
 19568
 19569        /// <summary>
 19570        /// Value
 19571        /// </summary>
 19572        public string Value { get; set; }
 19573
 19574        /// <summary>
 19575        /// Creates a new BlobTag instance
 19576        /// </summary>
 19577        public BlobTag() { }
 19578
 19579        /// <summary>
 19580        /// Serialize a BlobTag instance as XML.
 19581        /// </summary>
 19582        /// <param name="value">The BlobTag instance to serialize.</param>
 19583        /// <param name="name">An optional name to use for the root element instead of "Tag".</param>
 19584        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 19585        /// <returns>The serialized XML element.</returns>
 19586        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobTag value, string name = "Tag", st
 19587        {
 19588            System.Diagnostics.Debug.Assert(value != null);
 19589            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 19590            _element.Add(new System.Xml.Linq.XElement(
 19591                System.Xml.Linq.XName.Get("Key", ""),
 19592                value.Key));
 19593            _element.Add(new System.Xml.Linq.XElement(
 19594                System.Xml.Linq.XName.Get("Value", ""),
 19595                value.Value));
 19596            return _element;
 19597        }
 19598
 19599        /// <summary>
 19600        /// Deserializes XML into a new BlobTag instance.
 19601        /// </summary>
 19602        /// <param name="element">The XML element to deserialize.</param>
 19603        /// <returns>A deserialized BlobTag instance.</returns>
 19604        internal static Azure.Storage.Blobs.Models.BlobTag FromXml(System.Xml.Linq.XElement element)
 19605        {
 19606            System.Diagnostics.Debug.Assert(element != null);
 19607            System.Xml.Linq.XElement _child;
 19608            Azure.Storage.Blobs.Models.BlobTag _value = new Azure.Storage.Blobs.Models.BlobTag();
 19609            _child = element.Element(System.Xml.Linq.XName.Get("Key", ""));
 19610            if (_child != null)
 19611            {
 19612                _value.Key = _child.Value;
 19613            }
 19614            _child = element.Element(System.Xml.Linq.XName.Get("Value", ""));
 19615            if (_child != null)
 19616            {
 19617                _value.Value = _child.Value;
 19618            }
 19619            CustomizeFromXml(element, _value);
 19620            return _value;
 19621        }
 19622
 19623        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobTag value)
 19624    }
 19625}
 19626#endregion class BlobTag
 19627
 19628#region class BlobTags
 19629namespace Azure.Storage.Blobs.Models
 19630{
 19631    /// <summary>
 19632    /// Blob tags
 19633    /// </summary>
 19634    internal partial class BlobTags
 19635    {
 19636        /// <summary>
 19637        /// BlobTagSet
 19638        /// </summary>
 19639        public System.Collections.Generic.IList<Azure.Storage.Blobs.Models.BlobTag> BlobTagSet { get; internal set; }
 19640
 19641        /// <summary>
 19642        /// Creates a new BlobTags instance
 19643        /// </summary>
 19644        public BlobTags()
 19645            : this(false)
 19646        {
 19647        }
 19648
 19649        /// <summary>
 19650        /// Creates a new BlobTags instance
 19651        /// </summary>
 19652        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19653        internal BlobTags(bool skipInitialization)
 19654        {
 19655            if (!skipInitialization)
 19656            {
 19657                BlobTagSet = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobTag>();
 19658            }
 19659        }
 19660
 19661        /// <summary>
 19662        /// Serialize a BlobTags instance as XML.
 19663        /// </summary>
 19664        /// <param name="value">The BlobTags instance to serialize.</param>
 19665        /// <param name="name">An optional name to use for the root element instead of "Tags".</param>
 19666        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 19667        /// <returns>The serialized XML element.</returns>
 19668        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlobTags value, string name = "Tags", 
 19669        {
 19670            System.Diagnostics.Debug.Assert(value != null);
 19671            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 19672            System.Xml.Linq.XElement _elements = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("TagSet", ""));
 19673            foreach (Azure.Storage.Blobs.Models.BlobTag _child in value.BlobTagSet)
 19674            {
 19675                _elements.Add(Azure.Storage.Blobs.Models.BlobTag.ToXml(_child));
 19676            }
 19677            _element.Add(_elements);return _element;
 19678        }
 19679
 19680        /// <summary>
 19681        /// Deserializes XML into a new BlobTags instance.
 19682        /// </summary>
 19683        /// <param name="element">The XML element to deserialize.</param>
 19684        /// <returns>A deserialized BlobTags instance.</returns>
 19685        internal static Azure.Storage.Blobs.Models.BlobTags FromXml(System.Xml.Linq.XElement element)
 19686        {
 19687            System.Diagnostics.Debug.Assert(element != null);
 19688            System.Xml.Linq.XElement _child;
 19689            Azure.Storage.Blobs.Models.BlobTags _value = new Azure.Storage.Blobs.Models.BlobTags(true);
 19690            _child = element.Element(System.Xml.Linq.XName.Get("TagSet", ""));
 19691            if (_child != null)
 19692            {
 19693                _value.BlobTagSet = System.Linq.Enumerable.ToList(
 19694                    System.Linq.Enumerable.Select(
 19695                        _child.Elements(System.Xml.Linq.XName.Get("Tag", "")),
 19696                        e => Azure.Storage.Blobs.Models.BlobTag.FromXml(e)));
 19697            }
 19698            else
 19699            {
 19700                _value.BlobTagSet = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobTag>();
 19701            }
 19702            CustomizeFromXml(element, _value);
 19703            return _value;
 19704        }
 19705
 19706        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobTags value
 19707    }
 19708}
 19709#endregion class BlobTags
 19710
 19711#region enum BlobType
 19712namespace Azure.Storage.Blobs.Models
 19713{
 19714    /// <summary>
 19715    /// BlobType values
 19716    /// </summary>
 19717    public enum BlobType
 19718    {
 19719        /// <summary>
 19720        /// BlockBlob
 19721        /// </summary>
 19722        Block,
 19723
 19724        /// <summary>
 19725        /// PageBlob
 19726        /// </summary>
 19727        Page,
 19728
 19729        /// <summary>
 19730        /// AppendBlob
 19731        /// </summary>
 19732        Append
 19733    }
 19734}
 19735
 19736namespace Azure.Storage.Blobs
 19737{
 19738    internal static partial class BlobRestClient
 19739    {
 19740        public static partial class Serialization
 19741        {
 19742            public static string ToString(Azure.Storage.Blobs.Models.BlobType value)
 19743            {
 019744                return value switch
 019745                {
 019746                    Azure.Storage.Blobs.Models.BlobType.Block => "BlockBlob",
 019747                    Azure.Storage.Blobs.Models.BlobType.Page => "PageBlob",
 019748                    Azure.Storage.Blobs.Models.BlobType.Append => "AppendBlob",
 019749                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 019750                };
 19751            }
 19752
 19753            public static Azure.Storage.Blobs.Models.BlobType ParseBlobType(string value)
 19754            {
 1336819755                return value switch
 1336819756                {
 2583619757                    "BlockBlob" => Azure.Storage.Blobs.Models.BlobType.Block,
 199219758                    "PageBlob" => Azure.Storage.Blobs.Models.BlobType.Page,
 1307619759                    "AppendBlob" => Azure.Storage.Blobs.Models.BlobType.Append,
 019760                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 1336819761                };
 19762            }
 19763        }
 19764    }
 19765}
 19766#endregion enum BlobType
 19767
 19768#region class BlobsFlatSegment
 19769namespace Azure.Storage.Blobs.Models
 19770{
 19771    /// <summary>
 19772    /// An enumeration of blobs
 19773    /// </summary>
 19774    internal partial class BlobsFlatSegment
 19775    {
 19776        /// <summary>
 19777        /// ServiceEndpoint
 19778        /// </summary>
 19779        public string ServiceEndpoint { get; internal set; }
 19780
 19781        /// <summary>
 19782        /// ContainerName
 19783        /// </summary>
 19784        public string ContainerName { get; internal set; }
 19785
 19786        /// <summary>
 19787        /// Prefix
 19788        /// </summary>
 19789        public string Prefix { get; internal set; }
 19790
 19791        /// <summary>
 19792        /// Marker
 19793        /// </summary>
 19794        public string Marker { get; internal set; }
 19795
 19796        /// <summary>
 19797        /// MaxResults
 19798        /// </summary>
 19799        public int? MaxResults { get; internal set; }
 19800
 19801        /// <summary>
 19802        /// NextMarker
 19803        /// </summary>
 19804        public string NextMarker { get; internal set; }
 19805
 19806        /// <summary>
 19807        /// BlobItems
 19808        /// </summary>
 19809        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobItemInternal> BlobItems { get; inte
 19810
 19811        /// <summary>
 19812        /// Creates a new BlobsFlatSegment instance
 19813        /// </summary>
 19814        public BlobsFlatSegment()
 19815            : this(false)
 19816        {
 19817        }
 19818
 19819        /// <summary>
 19820        /// Creates a new BlobsFlatSegment instance
 19821        /// </summary>
 19822        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19823        internal BlobsFlatSegment(bool skipInitialization)
 19824        {
 19825            if (!skipInitialization)
 19826            {
 19827                BlobItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobItemInternal>();
 19828            }
 19829        }
 19830
 19831        /// <summary>
 19832        /// Deserializes XML into a new BlobsFlatSegment instance.
 19833        /// </summary>
 19834        /// <param name="element">The XML element to deserialize.</param>
 19835        /// <returns>A deserialized BlobsFlatSegment instance.</returns>
 19836        internal static Azure.Storage.Blobs.Models.BlobsFlatSegment FromXml(System.Xml.Linq.XElement element)
 19837        {
 19838            System.Diagnostics.Debug.Assert(element != null);
 19839            System.Xml.Linq.XElement _child;
 19840            System.Xml.Linq.XAttribute _attribute;
 19841            Azure.Storage.Blobs.Models.BlobsFlatSegment _value = new Azure.Storage.Blobs.Models.BlobsFlatSegment(true);
 19842            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ServiceEndpoint", ""));
 19843            if (_attribute != null)
 19844            {
 19845                _value.ServiceEndpoint = _attribute.Value;
 19846            }
 19847            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ContainerName", ""));
 19848            if (_attribute != null)
 19849            {
 19850                _value.ContainerName = _attribute.Value;
 19851            }
 19852            _child = element.Element(System.Xml.Linq.XName.Get("Prefix", ""));
 19853            if (_child != null)
 19854            {
 19855                _value.Prefix = _child.Value;
 19856            }
 19857            _child = element.Element(System.Xml.Linq.XName.Get("Marker", ""));
 19858            if (_child != null)
 19859            {
 19860                _value.Marker = _child.Value;
 19861            }
 19862            _child = element.Element(System.Xml.Linq.XName.Get("MaxResults", ""));
 19863            if (_child != null)
 19864            {
 19865                _value.MaxResults = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 19866            }
 19867            _child = element.Element(System.Xml.Linq.XName.Get("NextMarker", ""));
 19868            if (_child != null)
 19869            {
 19870                _value.NextMarker = _child.Value;
 19871            }
 19872            _child = element.Element(System.Xml.Linq.XName.Get("Blobs", ""));
 19873            if (_child != null)
 19874            {
 19875                _value.BlobItems = System.Linq.Enumerable.ToList(
 19876                    System.Linq.Enumerable.Select(
 19877                        _child.Elements(System.Xml.Linq.XName.Get("Blob", "")),
 19878                        e => Azure.Storage.Blobs.Models.BlobItemInternal.FromXml(e)));
 19879            }
 19880            else
 19881            {
 19882                _value.BlobItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobItemInternal>();
 19883            }
 19884            CustomizeFromXml(element, _value);
 19885            return _value;
 19886        }
 19887
 19888        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobsFlatSegme
 19889    }
 19890}
 19891#endregion class BlobsFlatSegment
 19892
 19893#region class BlobsHierarchySegment
 19894namespace Azure.Storage.Blobs.Models
 19895{
 19896    /// <summary>
 19897    /// An enumeration of blobs
 19898    /// </summary>
 19899    internal partial class BlobsHierarchySegment
 19900    {
 19901        /// <summary>
 19902        /// ServiceEndpoint
 19903        /// </summary>
 19904        public string ServiceEndpoint { get; internal set; }
 19905
 19906        /// <summary>
 19907        /// ContainerName
 19908        /// </summary>
 19909        public string ContainerName { get; internal set; }
 19910
 19911        /// <summary>
 19912        /// Prefix
 19913        /// </summary>
 19914        public string Prefix { get; internal set; }
 19915
 19916        /// <summary>
 19917        /// Marker
 19918        /// </summary>
 19919        public string Marker { get; internal set; }
 19920
 19921        /// <summary>
 19922        /// MaxResults
 19923        /// </summary>
 19924        public int? MaxResults { get; internal set; }
 19925
 19926        /// <summary>
 19927        /// Delimiter
 19928        /// </summary>
 19929        public string Delimiter { get; internal set; }
 19930
 19931        /// <summary>
 19932        /// NextMarker
 19933        /// </summary>
 19934        public string NextMarker { get; internal set; }
 19935
 19936        /// <summary>
 19937        /// BlobItems
 19938        /// </summary>
 19939        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobItemInternal> BlobItems { get; inte
 19940
 19941        /// <summary>
 19942        /// BlobPrefixes
 19943        /// </summary>
 19944        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobPrefix> BlobPrefixes { get; interna
 19945
 19946        /// <summary>
 19947        /// Creates a new BlobsHierarchySegment instance
 19948        /// </summary>
 19949        public BlobsHierarchySegment()
 19950            : this(false)
 19951        {
 19952        }
 19953
 19954        /// <summary>
 19955        /// Creates a new BlobsHierarchySegment instance
 19956        /// </summary>
 19957        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 19958        internal BlobsHierarchySegment(bool skipInitialization)
 19959        {
 19960            if (!skipInitialization)
 19961            {
 19962                BlobItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobItemInternal>();
 19963                BlobPrefixes = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobPrefix>();
 19964            }
 19965        }
 19966
 19967        /// <summary>
 19968        /// Deserializes XML into a new BlobsHierarchySegment instance.
 19969        /// </summary>
 19970        /// <param name="element">The XML element to deserialize.</param>
 19971        /// <returns>A deserialized BlobsHierarchySegment instance.</returns>
 19972        internal static Azure.Storage.Blobs.Models.BlobsHierarchySegment FromXml(System.Xml.Linq.XElement element)
 19973        {
 19974            System.Diagnostics.Debug.Assert(element != null);
 19975            System.Xml.Linq.XElement _child;
 19976            System.Xml.Linq.XAttribute _attribute;
 19977            Azure.Storage.Blobs.Models.BlobsHierarchySegment _value = new Azure.Storage.Blobs.Models.BlobsHierarchySegme
 19978            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ServiceEndpoint", ""));
 19979            if (_attribute != null)
 19980            {
 19981                _value.ServiceEndpoint = _attribute.Value;
 19982            }
 19983            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ContainerName", ""));
 19984            if (_attribute != null)
 19985            {
 19986                _value.ContainerName = _attribute.Value;
 19987            }
 19988            _child = element.Element(System.Xml.Linq.XName.Get("Prefix", ""));
 19989            if (_child != null)
 19990            {
 19991                _value.Prefix = _child.Value;
 19992            }
 19993            _child = element.Element(System.Xml.Linq.XName.Get("Marker", ""));
 19994            if (_child != null)
 19995            {
 19996                _value.Marker = _child.Value;
 19997            }
 19998            _child = element.Element(System.Xml.Linq.XName.Get("MaxResults", ""));
 19999            if (_child != null)
 20000            {
 20001                _value.MaxResults = int.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 20002            }
 20003            _child = element.Element(System.Xml.Linq.XName.Get("Delimiter", ""));
 20004            if (_child != null)
 20005            {
 20006                _value.Delimiter = _child.Value;
 20007            }
 20008            _child = element.Element(System.Xml.Linq.XName.Get("NextMarker", ""));
 20009            if (_child != null)
 20010            {
 20011                _value.NextMarker = _child.Value;
 20012            }
 20013            _child = element.Element(System.Xml.Linq.XName.Get("Blobs", ""));
 20014            if (_child != null)
 20015            {
 20016                _value.BlobItems = System.Linq.Enumerable.ToList(
 20017                    System.Linq.Enumerable.Select(
 20018                        _child.Elements(System.Xml.Linq.XName.Get("Blob", "")),
 20019                        e => Azure.Storage.Blobs.Models.BlobItemInternal.FromXml(e)));
 20020            }
 20021            else
 20022            {
 20023                _value.BlobItems = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobItemInternal>();
 20024            }
 20025            _child = element.Element(System.Xml.Linq.XName.Get("Blobs", ""));
 20026            if (_child != null)
 20027            {
 20028                _value.BlobPrefixes = System.Linq.Enumerable.ToList(
 20029                    System.Linq.Enumerable.Select(
 20030                        _child.Elements(System.Xml.Linq.XName.Get("BlobPrefix", "")),
 20031                        e => Azure.Storage.Blobs.Models.BlobPrefix.FromXml(e)));
 20032            }
 20033            else
 20034            {
 20035                _value.BlobPrefixes = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobPrefix>();
 20036            }
 20037            CustomizeFromXml(element, _value);
 20038            return _value;
 20039        }
 20040
 20041        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlobsHierarchy
 20042    }
 20043}
 20044#endregion class BlobsHierarchySegment
 20045
 20046#region class BlockInfo
 20047namespace Azure.Storage.Blobs.Models
 20048{
 20049    /// <summary>
 20050    /// BlockInfo
 20051    /// </summary>
 20052    public partial class BlockInfo
 20053    {
 20054        /// <summary>
 20055        /// This header is returned so that the client can check for message content integrity. The value of this header
 20056        /// </summary>
 20057        #pragma warning disable CA1819 // Properties should not return arrays
 20058        public byte[] ContentHash { get; internal set; }
 20059        #pragma warning restore CA1819 // Properties should not return arrays
 20060
 20061        /// <summary>
 20062        /// This header is returned so that the client can check for message content integrity. The value of this header
 20063        /// </summary>
 20064        #pragma warning disable CA1819 // Properties should not return arrays
 20065        public byte[] ContentCrc64 { get; internal set; }
 20066        #pragma warning restore CA1819 // Properties should not return arrays
 20067
 20068        /// <summary>
 20069        /// The SHA-256 hash of the encryption key used to encrypt the block. This header is only returned when the bloc
 20070        /// </summary>
 20071        public string EncryptionKeySha256 { get; internal set; }
 20072
 20073        /// <summary>
 20074        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 20075        /// </summary>
 20076        public string EncryptionScope { get; internal set; }
 20077
 20078        /// <summary>
 20079        /// Prevent direct instantiation of BlockInfo instances.
 20080        /// You can use BlobsModelFactory.BlockInfo instead.
 20081        /// </summary>
 20082        internal BlockInfo() { }
 20083    }
 20084
 20085    /// <summary>
 20086    /// BlobsModelFactory provides utilities for mocking.
 20087    /// </summary>
 20088    public static partial class BlobsModelFactory
 20089    {
 20090        /// <summary>
 20091        /// Creates a new BlockInfo instance for mocking.
 20092        /// </summary>
 20093        public static BlockInfo BlockInfo(
 20094            byte[] contentHash,
 20095            byte[] contentCrc64,
 20096            string encryptionKeySha256,
 20097            string encryptionScope)
 20098        {
 20099            return new BlockInfo()
 20100            {
 20101                ContentHash = contentHash,
 20102                ContentCrc64 = contentCrc64,
 20103                EncryptionKeySha256 = encryptionKeySha256,
 20104                EncryptionScope = encryptionScope,
 20105            };
 20106        }
 20107    }
 20108}
 20109#endregion class BlockInfo
 20110
 20111#region class BlockList
 20112namespace Azure.Storage.Blobs.Models
 20113{
 20114    /// <summary>
 20115    /// BlockList
 20116    /// </summary>
 20117    public partial class BlockList
 20118    {
 20119        /// <summary>
 20120        /// CommittedBlocks
 20121        /// </summary>
 20122        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobBlock> CommittedBlocks { get; inter
 20123
 20124        /// <summary>
 20125        /// UncommittedBlocks
 20126        /// </summary>
 20127        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobBlock> UncommittedBlocks { get; int
 20128
 20129        /// <summary>
 20130        /// Creates a new BlockList instance
 20131        /// </summary>
 20132        internal BlockList()
 20133            : this(false)
 20134        {
 20135        }
 20136
 20137        /// <summary>
 20138        /// Creates a new BlockList instance
 20139        /// </summary>
 20140        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 20141        internal BlockList(bool skipInitialization)
 20142        {
 20143            if (!skipInitialization)
 20144            {
 20145                CommittedBlocks = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobBlock>();
 20146                UncommittedBlocks = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobBlock>();
 20147            }
 20148        }
 20149
 20150        /// <summary>
 20151        /// Deserializes XML into a new BlockList instance.
 20152        /// </summary>
 20153        /// <param name="element">The XML element to deserialize.</param>
 20154        /// <returns>A deserialized BlockList instance.</returns>
 20155        internal static Azure.Storage.Blobs.Models.BlockList FromXml(System.Xml.Linq.XElement element)
 20156        {
 20157            System.Diagnostics.Debug.Assert(element != null);
 20158            System.Xml.Linq.XElement _child;
 20159            Azure.Storage.Blobs.Models.BlockList _value = new Azure.Storage.Blobs.Models.BlockList(true);
 20160            _child = element.Element(System.Xml.Linq.XName.Get("CommittedBlocks", ""));
 20161            if (_child != null)
 20162            {
 20163                _value.CommittedBlocks = System.Linq.Enumerable.ToList(
 20164                    System.Linq.Enumerable.Select(
 20165                        _child.Elements(System.Xml.Linq.XName.Get("Block", "")),
 20166                        e => Azure.Storage.Blobs.Models.BlobBlock.FromXml(e)));
 20167            }
 20168            else
 20169            {
 20170                _value.CommittedBlocks = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobBlock>();
 20171            }
 20172            _child = element.Element(System.Xml.Linq.XName.Get("UncommittedBlocks", ""));
 20173            if (_child != null)
 20174            {
 20175                _value.UncommittedBlocks = System.Linq.Enumerable.ToList(
 20176                    System.Linq.Enumerable.Select(
 20177                        _child.Elements(System.Xml.Linq.XName.Get("Block", "")),
 20178                        e => Azure.Storage.Blobs.Models.BlobBlock.FromXml(e)));
 20179            }
 20180            else
 20181            {
 20182                _value.UncommittedBlocks = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.BlobBlock>();
 20183            }
 20184            CustomizeFromXml(element, _value);
 20185            return _value;
 20186        }
 20187
 20188        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.BlockList valu
 20189    }
 20190
 20191    /// <summary>
 20192    /// BlobsModelFactory provides utilities for mocking.
 20193    /// </summary>
 20194    public static partial class BlobsModelFactory
 20195    {
 20196        /// <summary>
 20197        /// Creates a new BlockList instance for mocking.
 20198        /// </summary>
 20199        public static BlockList BlockList(
 20200            System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobBlock> committedBlocks = default,
 20201            System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.BlobBlock> uncommittedBlocks = default)
 20202        {
 20203            return new BlockList()
 20204            {
 20205                CommittedBlocks = committedBlocks,
 20206                UncommittedBlocks = uncommittedBlocks,
 20207            };
 20208        }
 20209    }
 20210}
 20211#endregion class BlockList
 20212
 20213#region enum BlockListType
 20214namespace Azure.Storage.Blobs.Models
 20215{
 20216    /// <summary>
 20217    /// Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together
 20218    /// </summary>
 20219    internal enum BlockListType
 20220    {
 20221        /// <summary>
 20222        /// committed
 20223        /// </summary>
 20224        Committed,
 20225
 20226        /// <summary>
 20227        /// uncommitted
 20228        /// </summary>
 20229        Uncommitted,
 20230
 20231        /// <summary>
 20232        /// all
 20233        /// </summary>
 20234        All
 20235    }
 20236}
 20237
 20238namespace Azure.Storage.Blobs
 20239{
 20240    internal static partial class BlobRestClient
 20241    {
 20242        public static partial class Serialization
 20243        {
 20244            public static string ToString(Azure.Storage.Blobs.Models.BlockListType value)
 20245            {
 6820246                return value switch
 6820247                {
 7220248                    Azure.Storage.Blobs.Models.BlockListType.Committed => "committed",
 7220249                    Azure.Storage.Blobs.Models.BlockListType.Uncommitted => "uncommitted",
 12820250                    Azure.Storage.Blobs.Models.BlockListType.All => "all",
 020251                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 6820252                };
 20253            }
 20254
 20255            public static Azure.Storage.Blobs.Models.BlockListType ParseBlockListType(string value)
 20256            {
 020257                return value switch
 020258                {
 020259                    "committed" => Azure.Storage.Blobs.Models.BlockListType.Committed,
 020260                    "uncommitted" => Azure.Storage.Blobs.Models.BlockListType.Uncommitted,
 020261                    "all" => Azure.Storage.Blobs.Models.BlockListType.All,
 020262                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 020263                };
 20264            }
 20265        }
 20266    }
 20267}
 20268#endregion enum BlockListType
 20269
 20270#region class BlockLookupList
 20271namespace Azure.Storage.Blobs.Models
 20272{
 20273    /// <summary>
 20274    /// A list of block IDs split between the committed block list, in the uncommitted block list, or in the uncommitted
 20275    /// </summary>
 20276    internal partial class BlockLookupList
 20277    {
 20278        /// <summary>
 20279        /// Committed
 20280        /// </summary>
 20281        public System.Collections.Generic.IList<string> Committed { get; internal set; }
 20282
 20283        /// <summary>
 20284        /// Uncommitted
 20285        /// </summary>
 20286        public System.Collections.Generic.IList<string> Uncommitted { get; internal set; }
 20287
 20288        /// <summary>
 20289        /// Latest
 20290        /// </summary>
 20291        public System.Collections.Generic.IList<string> Latest { get; internal set; }
 20292
 20293        /// <summary>
 20294        /// Creates a new BlockLookupList instance
 20295        /// </summary>
 20296        public BlockLookupList()
 20297        {
 20298            Committed = new System.Collections.Generic.List<string>();
 20299            Uncommitted = new System.Collections.Generic.List<string>();
 20300            Latest = new System.Collections.Generic.List<string>();
 20301        }
 20302
 20303        /// <summary>
 20304        /// Serialize a BlockLookupList instance as XML.
 20305        /// </summary>
 20306        /// <param name="value">The BlockLookupList instance to serialize.</param>
 20307        /// <param name="name">An optional name to use for the root element instead of "BlockList".</param>
 20308        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 20309        /// <returns>The serialized XML element.</returns>
 20310        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.BlockLookupList value, string name = "
 20311        {
 20312            System.Diagnostics.Debug.Assert(value != null);
 20313            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 20314            if (value.Committed != null)
 20315            {
 20316                foreach (string _child in value.Committed)
 20317                {
 20318                    _element.Add(new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("Committed", ""), _child));
 20319                }
 20320            }
 20321            if (value.Uncommitted != null)
 20322            {
 20323                foreach (string _child in value.Uncommitted)
 20324                {
 20325                    _element.Add(new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("Uncommitted", ""), _child));
 20326                }
 20327            }
 20328            if (value.Latest != null)
 20329            {
 20330                foreach (string _child in value.Latest)
 20331                {
 20332                    _element.Add(new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get("Latest", ""), _child));
 20333                }
 20334            }
 20335            return _element;
 20336        }
 20337    }
 20338}
 20339#endregion class BlockLookupList
 20340
 20341#region class BrokenLease
 20342namespace Azure.Storage.Blobs.Models
 20343{
 20344    /// <summary>
 20345    /// BrokenLease
 20346    /// </summary>
 20347    internal partial class BrokenLease
 20348    {
 20349        /// <summary>
 20350        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 20351        /// </summary>
 20352        public Azure.ETag ETag { get; internal set; }
 20353
 20354        /// <summary>
 20355        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 20356        /// </summary>
 20357        public System.DateTimeOffset LastModified { get; internal set; }
 20358
 20359        /// <summary>
 20360        /// Approximate time remaining in the lease period, in seconds.
 20361        /// </summary>
 20362        public int LeaseTime { get; internal set; }
 20363
 20364        /// <summary>
 20365        /// Prevent direct instantiation of BrokenLease instances.
 20366        /// You can use BlobsModelFactory.BrokenLease instead.
 20367        /// </summary>
 20368        internal BrokenLease() { }
 20369    }
 20370}
 20371#endregion class BrokenLease
 20372
 20373#region class ClearRange
 20374namespace Azure.Storage.Blobs.Models
 20375{
 20376    /// <summary>
 20377    /// ClearRange
 20378    /// </summary>
 20379    internal partial class ClearRange
 20380    {
 20381        /// <summary>
 20382        /// Start
 20383        /// </summary>
 20384        public long Start { get; internal set; }
 20385
 20386        /// <summary>
 20387        /// End
 20388        /// </summary>
 20389        public long End { get; internal set; }
 20390
 20391        /// <summary>
 20392        /// Prevent direct instantiation of ClearRange instances.
 20393        /// You can use BlobsModelFactory.ClearRange instead.
 20394        /// </summary>
 20395        internal ClearRange() { }
 20396
 20397        /// <summary>
 20398        /// Deserializes XML into a new ClearRange instance.
 20399        /// </summary>
 20400        /// <param name="element">The XML element to deserialize.</param>
 20401        /// <returns>A deserialized ClearRange instance.</returns>
 20402        internal static Azure.Storage.Blobs.Models.ClearRange FromXml(System.Xml.Linq.XElement element)
 20403        {
 20404            System.Diagnostics.Debug.Assert(element != null);
 20405            System.Xml.Linq.XElement _child;
 20406            Azure.Storage.Blobs.Models.ClearRange _value = new Azure.Storage.Blobs.Models.ClearRange();
 20407            _child = element.Element(System.Xml.Linq.XName.Get("Start", ""));
 20408            if (_child != null)
 20409            {
 20410                _value.Start = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 20411            }
 20412            _child = element.Element(System.Xml.Linq.XName.Get("End", ""));
 20413            if (_child != null)
 20414            {
 20415                _value.End = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 20416            }
 20417            CustomizeFromXml(element, _value);
 20418            return _value;
 20419        }
 20420
 20421        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.ClearRange val
 20422    }
 20423}
 20424#endregion class ClearRange
 20425
 20426#region class ConditionNotMetError
 20427namespace Azure.Storage.Blobs.Models
 20428{
 20429    /// <summary>
 20430    /// ConditionNotMetError
 20431    /// </summary>
 20432    internal partial class ConditionNotMetError
 20433    {
 20434        /// <summary>
 20435        /// x-ms-error-code
 20436        /// </summary>
 20437        public string ErrorCode { get; internal set; }
 20438
 20439        /// <summary>
 20440        /// Prevent direct instantiation of ConditionNotMetError instances.
 20441        /// You can use BlobsModelFactory.ConditionNotMetError instead.
 20442        /// </summary>
 20443        internal ConditionNotMetError() { }
 20444    }
 20445}
 20446#endregion class ConditionNotMetError
 20447
 20448#region enum CopyStatus
 20449namespace Azure.Storage.Blobs.Models
 20450{
 20451    /// <summary>
 20452    /// CopyStatus values
 20453    /// </summary>
 20454    #pragma warning disable CA1717 // Only FlagsAttribute enums should have plural names
 20455    public enum CopyStatus
 20456    #pragma warning restore CA1717 // Only FlagsAttribute enums should have plural names
 20457    {
 20458        /// <summary>
 20459        /// pending
 20460        /// </summary>
 20461        Pending,
 20462
 20463        /// <summary>
 20464        /// success
 20465        /// </summary>
 20466        Success,
 20467
 20468        /// <summary>
 20469        /// aborted
 20470        /// </summary>
 20471        Aborted,
 20472
 20473        /// <summary>
 20474        /// failed
 20475        /// </summary>
 20476        Failed
 20477    }
 20478}
 20479
 20480namespace Azure.Storage.Blobs
 20481{
 20482    internal static partial class BlobRestClient
 20483    {
 20484        public static partial class Serialization
 20485        {
 20486            public static string ToString(Azure.Storage.Blobs.Models.CopyStatus value)
 20487            {
 020488                return value switch
 020489                {
 020490                    Azure.Storage.Blobs.Models.CopyStatus.Pending => "pending",
 020491                    Azure.Storage.Blobs.Models.CopyStatus.Success => "success",
 020492                    Azure.Storage.Blobs.Models.CopyStatus.Aborted => "aborted",
 020493                    Azure.Storage.Blobs.Models.CopyStatus.Failed => "failed",
 020494                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 020495                };
 20496            }
 20497
 20498            public static Azure.Storage.Blobs.Models.CopyStatus ParseCopyStatus(string value)
 20499            {
 37220500                return value switch
 37220501                {
 46820502                    "pending" => Azure.Storage.Blobs.Models.CopyStatus.Pending,
 64820503                    "success" => Azure.Storage.Blobs.Models.CopyStatus.Success,
 020504                    "aborted" => Azure.Storage.Blobs.Models.CopyStatus.Aborted,
 020505                    "failed" => Azure.Storage.Blobs.Models.CopyStatus.Failed,
 020506                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 37220507                };
 20508            }
 20509        }
 20510    }
 20511}
 20512#endregion enum CopyStatus
 20513
 20514#region class DataLakeStorageError
 20515namespace Azure.Storage.Blobs.Models
 20516{
 20517    /// <summary>
 20518    /// DataLakeStorageError
 20519    /// </summary>
 20520    internal partial class DataLakeStorageError
 20521    {
 20522        /// <summary>
 20523        /// The service error response object.
 20524        /// </summary>
 20525        public Azure.Storage.Blobs.Models.DataLakeStorageErrorDetails DataLakeStorageErrorDetails { get; internal set; }
 20526
 20527        /// <summary>
 20528        /// Creates a new DataLakeStorageError instance
 20529        /// </summary>
 20530        public DataLakeStorageError()
 20531            : this(false)
 20532        {
 20533        }
 20534
 20535        /// <summary>
 20536        /// Creates a new DataLakeStorageError instance
 20537        /// </summary>
 20538        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 20539        internal DataLakeStorageError(bool skipInitialization)
 20540        {
 20541            if (!skipInitialization)
 20542            {
 20543                DataLakeStorageErrorDetails = new Azure.Storage.Blobs.Models.DataLakeStorageErrorDetails();
 20544            }
 20545        }
 20546
 20547        /// <summary>
 20548        /// Deserializes XML into a new DataLakeStorageError instance.
 20549        /// </summary>
 20550        /// <param name="element">The XML element to deserialize.</param>
 20551        /// <returns>A deserialized DataLakeStorageError instance.</returns>
 20552        internal static Azure.Storage.Blobs.Models.DataLakeStorageError FromXml(System.Xml.Linq.XElement element)
 20553        {
 20554            System.Diagnostics.Debug.Assert(element != null);
 20555            System.Xml.Linq.XElement _child;
 20556            Azure.Storage.Blobs.Models.DataLakeStorageError _value = new Azure.Storage.Blobs.Models.DataLakeStorageError
 20557            _child = element.Element(System.Xml.Linq.XName.Get("error", ""));
 20558            if (_child != null)
 20559            {
 20560                _value.DataLakeStorageErrorDetails = Azure.Storage.Blobs.Models.DataLakeStorageErrorDetails.FromXml(_chi
 20561            }
 20562            CustomizeFromXml(element, _value);
 20563            return _value;
 20564        }
 20565
 20566        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.DataLakeStorag
 20567    }
 20568}
 20569#endregion class DataLakeStorageError
 20570
 20571#region class DataLakeStorageErrorDetails
 20572namespace Azure.Storage.Blobs.Models
 20573{
 20574    /// <summary>
 20575    /// The service error response object.
 20576    /// </summary>
 20577    internal partial class DataLakeStorageErrorDetails
 20578    {
 20579        /// <summary>
 20580        /// The service error code.
 20581        /// </summary>
 20582        public string Code { get; internal set; }
 20583
 20584        /// <summary>
 20585        /// The service error message.
 20586        /// </summary>
 20587        public string Message { get; internal set; }
 20588
 20589        /// <summary>
 20590        /// Prevent direct instantiation of DataLakeStorageErrorDetails instances.
 20591        /// You can use BlobsModelFactory.DataLakeStorageErrorDetails instead.
 20592        /// </summary>
 20593        internal DataLakeStorageErrorDetails() { }
 20594
 20595        /// <summary>
 20596        /// Deserializes XML into a new DataLakeStorageErrorDetails instance.
 20597        /// </summary>
 20598        /// <param name="element">The XML element to deserialize.</param>
 20599        /// <returns>A deserialized DataLakeStorageErrorDetails instance.</returns>
 20600        internal static Azure.Storage.Blobs.Models.DataLakeStorageErrorDetails FromXml(System.Xml.Linq.XElement element)
 20601        {
 20602            System.Diagnostics.Debug.Assert(element != null);
 20603            System.Xml.Linq.XElement _child;
 20604            Azure.Storage.Blobs.Models.DataLakeStorageErrorDetails _value = new Azure.Storage.Blobs.Models.DataLakeStora
 20605            _child = element.Element(System.Xml.Linq.XName.Get("Code", ""));
 20606            if (_child != null)
 20607            {
 20608                _value.Code = _child.Value;
 20609            }
 20610            _child = element.Element(System.Xml.Linq.XName.Get("Message", ""));
 20611            if (_child != null)
 20612            {
 20613                _value.Message = _child.Value;
 20614            }
 20615            CustomizeFromXml(element, _value);
 20616            return _value;
 20617        }
 20618
 20619        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.DataLakeStorag
 20620    }
 20621}
 20622#endregion class DataLakeStorageErrorDetails
 20623
 20624#region enum DeleteSnapshotsOption
 20625namespace Azure.Storage.Blobs.Models
 20626{
 20627    /// <summary>
 20628    /// Required if the blob has associated snapshots. Specify one of the following two options: include: Delete the bas
 20629    /// </summary>
 20630    public enum DeleteSnapshotsOption
 20631    {
 20632        /// <summary>
 20633        /// none
 20634        /// </summary>
 20635        None,
 20636
 20637        /// <summary>
 20638        /// include
 20639        /// </summary>
 20640        IncludeSnapshots,
 20641
 20642        /// <summary>
 20643        /// only
 20644        /// </summary>
 20645        OnlySnapshots
 20646    }
 20647}
 20648
 20649namespace Azure.Storage.Blobs
 20650{
 20651    internal static partial class BlobRestClient
 20652    {
 20653        public static partial class Serialization
 20654        {
 20655            public static string ToString(Azure.Storage.Blobs.Models.DeleteSnapshotsOption value)
 20656            {
 420657                return value switch
 420658                {
 020659                    Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None => null,
 020660                    Azure.Storage.Blobs.Models.DeleteSnapshotsOption.IncludeSnapshots => "include",
 820661                    Azure.Storage.Blobs.Models.DeleteSnapshotsOption.OnlySnapshots => "only",
 020662                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 420663                };
 20664            }
 20665
 20666            public static Azure.Storage.Blobs.Models.DeleteSnapshotsOption ParseDeleteSnapshotsOption(string value)
 20667            {
 020668                return value switch
 020669                {
 020670                    null => Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None,
 020671                    "include" => Azure.Storage.Blobs.Models.DeleteSnapshotsOption.IncludeSnapshots,
 020672                    "only" => Azure.Storage.Blobs.Models.DeleteSnapshotsOption.OnlySnapshots,
 020673                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 020674                };
 20675            }
 20676        }
 20677    }
 20678}
 20679#endregion enum DeleteSnapshotsOption
 20680
 20681#region class DelimitedTextConfigurationInternal
 20682namespace Azure.Storage.Blobs.Models
 20683{
 20684    /// <summary>
 20685    /// delimited text configuration
 20686    /// </summary>
 20687    internal partial class DelimitedTextConfigurationInternal
 20688    {
 20689        /// <summary>
 20690        /// column separator
 20691        /// </summary>
 20692        public string ColumnSeparator { get; set; }
 20693
 20694        /// <summary>
 20695        /// field quote
 20696        /// </summary>
 20697        public string FieldQuote { get; set; }
 20698
 20699        /// <summary>
 20700        /// record separator
 20701        /// </summary>
 20702        public string RecordSeparator { get; set; }
 20703
 20704        /// <summary>
 20705        /// escape char
 20706        /// </summary>
 20707        public string EscapeChar { get; set; }
 20708
 20709        /// <summary>
 20710        /// has headers
 20711        /// </summary>
 20712        public bool HeadersPresent { get; set; }
 20713
 20714        /// <summary>
 20715        /// Creates a new DelimitedTextConfigurationInternal instance
 20716        /// </summary>
 20717        public DelimitedTextConfigurationInternal() { }
 20718
 20719        /// <summary>
 20720        /// Serialize a DelimitedTextConfigurationInternal instance as XML.
 20721        /// </summary>
 20722        /// <param name="value">The DelimitedTextConfigurationInternal instance to serialize.</param>
 20723        /// <param name="name">An optional name to use for the root element instead of "DelimitedTextConfiguration".</pa
 20724        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 20725        /// <returns>The serialized XML element.</returns>
 20726        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.DelimitedTextConfigurationInternal val
 20727        {
 20728            System.Diagnostics.Debug.Assert(value != null);
 20729            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 20730            _element.Add(new System.Xml.Linq.XElement(
 20731                System.Xml.Linq.XName.Get("ColumnSeparator", ""),
 20732                value.ColumnSeparator));
 20733            _element.Add(new System.Xml.Linq.XElement(
 20734                System.Xml.Linq.XName.Get("FieldQuote", ""),
 20735                value.FieldQuote));
 20736            _element.Add(new System.Xml.Linq.XElement(
 20737                System.Xml.Linq.XName.Get("RecordSeparator", ""),
 20738                value.RecordSeparator));
 20739            _element.Add(new System.Xml.Linq.XElement(
 20740                System.Xml.Linq.XName.Get("EscapeChar", ""),
 20741                value.EscapeChar));
 20742            _element.Add(new System.Xml.Linq.XElement(
 20743                System.Xml.Linq.XName.Get("HasHeaders", ""),
 20744                #pragma warning disable CA1308 // Normalize strings to uppercase
 20745                value.HeadersPresent.ToString(System.Globalization.CultureInfo.InvariantCulture).ToLowerInvariant()));
 20746                #pragma warning restore CA1308 // Normalize strings to uppercase
 20747            return _element;
 20748        }
 20749    }
 20750}
 20751#endregion class DelimitedTextConfigurationInternal
 20752
 20753#region class DirectoryCreateResult
 20754namespace Azure.Storage.Blobs.Models
 20755{
 20756    /// <summary>
 20757    /// Directory CreateResult
 20758    /// </summary>
 20759    internal partial class DirectoryCreateResult
 20760    {
 20761        /// <summary>
 20762        /// An HTTP entity tag associated with the file or directory.
 20763        /// </summary>
 20764        public Azure.ETag ETag { get; internal set; }
 20765
 20766        /// <summary>
 20767        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 20768        /// </summary>
 20769        public System.DateTimeOffset LastModified { get; internal set; }
 20770
 20771        /// <summary>
 20772        /// The size of the resource in bytes.
 20773        /// </summary>
 20774        public long ContentLength { get; internal set; }
 20775
 20776        /// <summary>
 20777        /// Prevent direct instantiation of DirectoryCreateResult instances.
 20778        /// You can use BlobsModelFactory.DirectoryCreateResult instead.
 20779        /// </summary>
 20780        internal DirectoryCreateResult() { }
 20781    }
 20782}
 20783#endregion class DirectoryCreateResult
 20784
 20785#region class DirectoryDeleteResult
 20786namespace Azure.Storage.Blobs.Models
 20787{
 20788    /// <summary>
 20789    /// Directory DeleteResult
 20790    /// </summary>
 20791    internal partial class DirectoryDeleteResult
 20792    {
 20793        /// <summary>
 20794        /// When renaming a directory, the number of paths that are renamed with each invocation is limited. If the numb
 20795        /// </summary>
 20796        public string Marker { get; internal set; }
 20797
 20798        /// <summary>
 20799        /// Prevent direct instantiation of DirectoryDeleteResult instances.
 20800        /// You can use BlobsModelFactory.DirectoryDeleteResult instead.
 20801        /// </summary>
 20802        internal DirectoryDeleteResult() { }
 20803    }
 20804}
 20805#endregion class DirectoryDeleteResult
 20806
 20807#region class DirectoryGetAccessControlResult
 20808namespace Azure.Storage.Blobs.Models
 20809{
 20810    /// <summary>
 20811    /// Directory GetAccessControlResult
 20812    /// </summary>
 20813    internal partial class DirectoryGetAccessControlResult
 20814    {
 20815        /// <summary>
 20816        /// An HTTP entity tag associated with the file or directory.
 20817        /// </summary>
 20818        public Azure.ETag ETag { get; internal set; }
 20819
 20820        /// <summary>
 20821        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 20822        /// </summary>
 20823        public System.DateTimeOffset LastModified { get; internal set; }
 20824
 20825        /// <summary>
 20826        /// The owner of the file or directory. Included in the response if Hierarchical Namespace is enabled for the ac
 20827        /// </summary>
 20828        public string XMSOwner { get; internal set; }
 20829
 20830        /// <summary>
 20831        /// The owning group of the file or directory. Included in the response if Hierarchical Namespace is enabled for
 20832        /// </summary>
 20833        public string XMSGroup { get; internal set; }
 20834
 20835        /// <summary>
 20836        /// The POSIX access permissions for the file owner, the file owning group, and others. Included in the response
 20837        /// </summary>
 20838        public string XMSPermissions { get; internal set; }
 20839
 20840        /// <summary>
 20841        /// The POSIX access control list for the file or directory.  Included in the response only if the action is "ge
 20842        /// </summary>
 20843        public string XMSAcl { get; internal set; }
 20844
 20845        /// <summary>
 20846        /// Prevent direct instantiation of DirectoryGetAccessControlResult instances.
 20847        /// You can use BlobsModelFactory.DirectoryGetAccessControlResult instead.
 20848        /// </summary>
 20849        internal DirectoryGetAccessControlResult() { }
 20850    }
 20851}
 20852#endregion class DirectoryGetAccessControlResult
 20853
 20854#region class DirectoryRenameResult
 20855namespace Azure.Storage.Blobs.Models
 20856{
 20857    /// <summary>
 20858    /// Directory RenameResult
 20859    /// </summary>
 20860    internal partial class DirectoryRenameResult
 20861    {
 20862        /// <summary>
 20863        /// When renaming a directory, the number of paths that are renamed with each invocation is limited. If the numb
 20864        /// </summary>
 20865        public string Marker { get; internal set; }
 20866
 20867        /// <summary>
 20868        /// An HTTP entity tag associated with the file or directory.
 20869        /// </summary>
 20870        public Azure.ETag ETag { get; internal set; }
 20871
 20872        /// <summary>
 20873        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 20874        /// </summary>
 20875        public System.DateTimeOffset LastModified { get; internal set; }
 20876
 20877        /// <summary>
 20878        /// The size of the resource in bytes.
 20879        /// </summary>
 20880        public long ContentLength { get; internal set; }
 20881
 20882        /// <summary>
 20883        /// Prevent direct instantiation of DirectoryRenameResult instances.
 20884        /// You can use BlobsModelFactory.DirectoryRenameResult instead.
 20885        /// </summary>
 20886        internal DirectoryRenameResult() { }
 20887    }
 20888}
 20889#endregion class DirectoryRenameResult
 20890
 20891#region class DirectorySetAccessControlResult
 20892namespace Azure.Storage.Blobs.Models
 20893{
 20894    /// <summary>
 20895    /// Directory SetAccessControlResult
 20896    /// </summary>
 20897    internal partial class DirectorySetAccessControlResult
 20898    {
 20899        /// <summary>
 20900        /// An HTTP entity tag associated with the file or directory.
 20901        /// </summary>
 20902        public Azure.ETag ETag { get; internal set; }
 20903
 20904        /// <summary>
 20905        /// The data and time the file or directory was last modified. Write operations on the file or directory update 
 20906        /// </summary>
 20907        public System.DateTimeOffset LastModified { get; internal set; }
 20908
 20909        /// <summary>
 20910        /// Prevent direct instantiation of DirectorySetAccessControlResult instances.
 20911        /// You can use BlobsModelFactory.DirectorySetAccessControlResult instead.
 20912        /// </summary>
 20913        internal DirectorySetAccessControlResult() { }
 20914    }
 20915}
 20916#endregion class DirectorySetAccessControlResult
 20917
 20918#region enum EncryptionAlgorithmType
 20919namespace Azure.Storage.Blobs.Models
 20920{
 20921    /// <summary>
 20922    /// The algorithm used to produce the encryption key hash. Currently, the only accepted value is "AES256". Must be p
 20923    /// </summary>
 20924    public enum EncryptionAlgorithmType
 20925    {
 20926        /// <summary>
 20927        /// AES256
 20928        /// </summary>
 20929        Aes256
 20930    }
 20931}
 20932
 20933namespace Azure.Storage.Blobs
 20934{
 20935    internal static partial class BlobRestClient
 20936    {
 20937        public static partial class Serialization
 20938        {
 20939            public static string ToString(Azure.Storage.Blobs.Models.EncryptionAlgorithmType value)
 20940            {
 10820941                return value switch
 10820942                {
 21620943                    Azure.Storage.Blobs.Models.EncryptionAlgorithmType.Aes256 => "AES256",
 020944                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 10820945                };
 20946            }
 20947
 20948            public static Azure.Storage.Blobs.Models.EncryptionAlgorithmType ParseEncryptionAlgorithmType(string value)
 20949            {
 020950                return value switch
 020951                {
 020952                    "AES256" => Azure.Storage.Blobs.Models.EncryptionAlgorithmType.Aes256,
 020953                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 020954                };
 20955            }
 20956        }
 20957    }
 20958}
 20959#endregion enum EncryptionAlgorithmType
 20960
 20961#region class FailureNoContent
 20962namespace Azure.Storage.Blobs.Models
 20963{
 20964    /// <summary>
 20965    /// FailureNoContent
 20966    /// </summary>
 20967    internal partial class FailureNoContent
 20968    {
 20969        /// <summary>
 20970        /// x-ms-error-code
 20971        /// </summary>
 20972        public string ErrorCode { get; internal set; }
 20973
 20974        /// <summary>
 20975        /// Prevent direct instantiation of FailureNoContent instances.
 20976        /// You can use BlobsModelFactory.FailureNoContent instead.
 20977        /// </summary>
 20978        internal FailureNoContent() { }
 20979    }
 20980}
 20981#endregion class FailureNoContent
 20982
 20983#region class FilterBlobItem
 20984namespace Azure.Storage.Blobs.Models
 20985{
 20986    /// <summary>
 20987    /// Blob info from a Filter Blobs API call
 20988    /// </summary>
 20989    internal partial class FilterBlobItem
 20990    {
 20991        /// <summary>
 20992        /// Name
 20993        /// </summary>
 20994        public string BlobName { get; internal set; }
 20995
 20996        /// <summary>
 20997        /// ContainerName
 20998        /// </summary>
 20999        public string BlobContainerName { get; internal set; }
 21000
 21001        /// <summary>
 21002        /// Prevent direct instantiation of FilterBlobItem instances.
 21003        /// You can use BlobsModelFactory.FilterBlobItem instead.
 21004        /// </summary>
 21005        internal FilterBlobItem() { }
 21006
 21007        /// <summary>
 21008        /// Deserializes XML into a new FilterBlobItem instance.
 21009        /// </summary>
 21010        /// <param name="element">The XML element to deserialize.</param>
 21011        /// <returns>A deserialized FilterBlobItem instance.</returns>
 21012        internal static Azure.Storage.Blobs.Models.FilterBlobItem FromXml(System.Xml.Linq.XElement element)
 21013        {
 21014            System.Diagnostics.Debug.Assert(element != null);
 21015            System.Xml.Linq.XElement _child;
 21016            Azure.Storage.Blobs.Models.FilterBlobItem _value = new Azure.Storage.Blobs.Models.FilterBlobItem();
 21017            _child = element.Element(System.Xml.Linq.XName.Get("Name", ""));
 21018            if (_child != null)
 21019            {
 21020                _value.BlobName = _child.Value;
 21021            }
 21022            _child = element.Element(System.Xml.Linq.XName.Get("ContainerName", ""));
 21023            if (_child != null)
 21024            {
 21025                _value.BlobContainerName = _child.Value;
 21026            }
 21027            CustomizeFromXml(element, _value);
 21028            return _value;
 21029        }
 21030
 21031        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.FilterBlobItem
 21032    }
 21033}
 21034#endregion class FilterBlobItem
 21035
 21036#region class FilterBlobSegment
 21037namespace Azure.Storage.Blobs.Models
 21038{
 21039    /// <summary>
 21040    /// The result of a Filter Blobs API call
 21041    /// </summary>
 21042    internal partial class FilterBlobSegment
 21043    {
 21044        /// <summary>
 21045        /// ServiceEndpoint
 21046        /// </summary>
 21047        public string ServiceEndpoint { get; internal set; }
 21048
 21049        /// <summary>
 21050        /// Where
 21051        /// </summary>
 21052        public string Where { get; internal set; }
 21053
 21054        /// <summary>
 21055        /// Blobs
 21056        /// </summary>
 21057        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.FilterBlobItem> Blobs { get; internal s
 21058
 21059        /// <summary>
 21060        /// NextMarker
 21061        /// </summary>
 21062        public string NextMarker { get; internal set; }
 21063
 21064        /// <summary>
 21065        /// Creates a new FilterBlobSegment instance
 21066        /// </summary>
 21067        public FilterBlobSegment()
 21068            : this(false)
 21069        {
 21070        }
 21071
 21072        /// <summary>
 21073        /// Creates a new FilterBlobSegment instance
 21074        /// </summary>
 21075        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 21076        internal FilterBlobSegment(bool skipInitialization)
 21077        {
 21078            if (!skipInitialization)
 21079            {
 21080                Blobs = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.FilterBlobItem>();
 21081            }
 21082        }
 21083
 21084        /// <summary>
 21085        /// Deserializes XML into a new FilterBlobSegment instance.
 21086        /// </summary>
 21087        /// <param name="element">The XML element to deserialize.</param>
 21088        /// <returns>A deserialized FilterBlobSegment instance.</returns>
 21089        internal static Azure.Storage.Blobs.Models.FilterBlobSegment FromXml(System.Xml.Linq.XElement element)
 21090        {
 21091            System.Diagnostics.Debug.Assert(element != null);
 21092            System.Xml.Linq.XElement _child;
 21093            System.Xml.Linq.XAttribute _attribute;
 21094            Azure.Storage.Blobs.Models.FilterBlobSegment _value = new Azure.Storage.Blobs.Models.FilterBlobSegment(true)
 21095            _attribute = element.Attribute(System.Xml.Linq.XName.Get("ServiceEndpoint", ""));
 21096            if (_attribute != null)
 21097            {
 21098                _value.ServiceEndpoint = _attribute.Value;
 21099            }
 21100            _child = element.Element(System.Xml.Linq.XName.Get("Where", ""));
 21101            if (_child != null)
 21102            {
 21103                _value.Where = _child.Value;
 21104            }
 21105            _child = element.Element(System.Xml.Linq.XName.Get("Blobs", ""));
 21106            if (_child != null)
 21107            {
 21108                _value.Blobs = System.Linq.Enumerable.ToList(
 21109                    System.Linq.Enumerable.Select(
 21110                        _child.Elements(System.Xml.Linq.XName.Get("Blob", "")),
 21111                        e => Azure.Storage.Blobs.Models.FilterBlobItem.FromXml(e)));
 21112            }
 21113            else
 21114            {
 21115                _value.Blobs = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.FilterBlobItem>();
 21116            }
 21117            _child = element.Element(System.Xml.Linq.XName.Get("NextMarker", ""));
 21118            if (_child != null)
 21119            {
 21120                _value.NextMarker = _child.Value;
 21121            }
 21122            CustomizeFromXml(element, _value);
 21123            return _value;
 21124        }
 21125
 21126        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.FilterBlobSegm
 21127    }
 21128}
 21129#endregion class FilterBlobSegment
 21130
 21131#region class FlattenedContainerItem
 21132namespace Azure.Storage.Blobs.Models
 21133{
 21134    /// <summary>
 21135    /// FlattenedContainerItem
 21136    /// </summary>
 21137    internal partial class FlattenedContainerItem
 21138    {
 21139        /// <summary>
 21140        /// x-ms-meta
 21141        /// </summary>
 21142        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 21143
 21144        /// <summary>
 21145        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 21146        /// </summary>
 21147        public Azure.ETag ETag { get; internal set; }
 21148
 21149        /// <summary>
 21150        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 21151        /// </summary>
 21152        public System.DateTimeOffset LastModified { get; internal set; }
 21153
 21154        /// <summary>
 21155        /// When a blob is leased, specifies whether the lease is of infinite or fixed duration.
 21156        /// </summary>
 21157        public Azure.Storage.Blobs.Models.LeaseDurationType LeaseDuration { get; internal set; }
 21158
 21159        /// <summary>
 21160        /// Lease state of the blob.
 21161        /// </summary>
 21162        public Azure.Storage.Blobs.Models.LeaseState LeaseState { get; internal set; }
 21163
 21164        /// <summary>
 21165        /// The current lease status of the blob.
 21166        /// </summary>
 21167        public Azure.Storage.Blobs.Models.LeaseStatus LeaseStatus { get; internal set; }
 21168
 21169        /// <summary>
 21170        /// Indicated whether data in the container may be accessed publicly and the level of access
 21171        /// </summary>
 21172        public Azure.Storage.Blobs.Models.PublicAccessType BlobPublicAccess { get; internal set; }
 21173
 21174        /// <summary>
 21175        /// Indicates whether the container has an immutability policy set on it.
 21176        /// </summary>
 21177        public bool HasImmutabilityPolicy { get; internal set; }
 21178
 21179        /// <summary>
 21180        /// Indicates whether the container has a legal hold.
 21181        /// </summary>
 21182        public bool HasLegalHold { get; internal set; }
 21183
 21184        /// <summary>
 21185        /// The default encryption scope for the container.
 21186        /// </summary>
 21187        public string DefaultEncryptionScope { get; internal set; }
 21188
 21189        /// <summary>
 21190        /// Indicates whether the container's default encryption scope can be overriden.
 21191        /// </summary>
 21192        public bool DenyEncryptionScopeOverride { get; internal set; }
 21193
 21194        /// <summary>
 21195        /// Creates a new FlattenedContainerItem instance
 21196        /// </summary>
 21197        public FlattenedContainerItem()
 21198        {
 21199            Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase
 21200        }
 21201    }
 21202}
 21203#endregion class FlattenedContainerItem
 21204
 21205#region class FlattenedDownloadProperties
 21206namespace Azure.Storage.Blobs.Models
 21207{
 21208    /// <summary>
 21209    /// FlattenedDownloadProperties
 21210    /// </summary>
 21211    internal partial class FlattenedDownloadProperties
 21212    {
 21213        /// <summary>
 21214        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 21215        /// </summary>
 21216        public System.DateTimeOffset LastModified { get; internal set; }
 21217
 21218        /// <summary>
 21219        /// x-ms-meta
 21220        /// </summary>
 21221        public System.Collections.Generic.IDictionary<string, string> Metadata { get; internal set; }
 21222
 21223        /// <summary>
 21224        /// Optional. Only valid when Object Replication is enabled for the storage container and on the destination blo
 21225        /// </summary>
 21226        public string ObjectReplicationPolicyId { get; internal set; }
 21227
 21228        /// <summary>
 21229        /// Optional. Only valid when Object Replication is enabled for the storage container and on the source blob of 
 21230        /// </summary>
 21231        public System.Collections.Generic.IDictionary<string, string> ObjectReplicationRules { get; internal set; }
 21232
 21233        /// <summary>
 21234        /// The number of bytes present in the response body.
 21235        /// </summary>
 21236        public long ContentLength { get; internal set; }
 21237
 21238        /// <summary>
 21239        /// The media type of the body of the response. For Download Blob this is 'application/octet-stream'
 21240        /// </summary>
 21241        public string ContentType { get; internal set; }
 21242
 21243        /// <summary>
 21244        /// Indicates the range of bytes returned in the event that the client requested a subset of the blob by setting
 21245        /// </summary>
 21246        public string ContentRange { get; internal set; }
 21247
 21248        /// <summary>
 21249        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 21250        /// </summary>
 21251        public Azure.ETag ETag { get; internal set; }
 21252
 21253        /// <summary>
 21254        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 21255        /// </summary>
 21256        #pragma warning disable CA1819 // Properties should not return arrays
 21257        public byte[] ContentHash { get; internal set; }
 21258        #pragma warning restore CA1819 // Properties should not return arrays
 21259
 21260        /// <summary>
 21261        /// This header returns the value that was specified for the Content-Encoding request header
 21262        /// </summary>
 21263        public string ContentEncoding { get; internal set; }
 21264
 21265        /// <summary>
 21266        /// This header is returned if it was previously specified for the blob.
 21267        /// </summary>
 21268        public string CacheControl { get; internal set; }
 21269
 21270        /// <summary>
 21271        /// This header returns the value that was specified for the 'x-ms-blob-content-disposition' header. The Content
 21272        /// </summary>
 21273        public string ContentDisposition { get; internal set; }
 21274
 21275        /// <summary>
 21276        /// This header returns the value that was specified for the Content-Language request header.
 21277        /// </summary>
 21278        public string ContentLanguage { get; internal set; }
 21279
 21280        /// <summary>
 21281        /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs
 21282        /// </summary>
 21283        public long BlobSequenceNumber { get; internal set; }
 21284
 21285        /// <summary>
 21286        /// The blob's type.
 21287        /// </summary>
 21288        public Azure.Storage.Blobs.Models.BlobType BlobType { get; internal set; }
 21289
 21290        /// <summary>
 21291        /// If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to true, then the re
 21292        /// </summary>
 21293        #pragma warning disable CA1819 // Properties should not return arrays
 21294        public byte[] ContentCrc64 { get; internal set; }
 21295        #pragma warning restore CA1819 // Properties should not return arrays
 21296
 21297        /// <summary>
 21298        /// Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This val
 21299        /// </summary>
 21300        public System.DateTimeOffset CopyCompletionTime { get; internal set; }
 21301
 21302        /// <summary>
 21303        /// Only appears when x-ms-copy-status is failed or pending. Describes the cause of the last fatal or non-fatal 
 21304        /// </summary>
 21305        public string CopyStatusDescription { get; internal set; }
 21306
 21307        /// <summary>
 21308        /// String identifier for this copy operation. Use with Get Blob Properties to check the status of this copy ope
 21309        /// </summary>
 21310        public string CopyId { get; internal set; }
 21311
 21312        /// <summary>
 21313        /// Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operat
 21314        /// </summary>
 21315        public string CopyProgress { get; internal set; }
 21316
 21317        /// <summary>
 21318        /// URL up to 2 KB in length that specifies the source blob or file used in the last attempted Copy Blob operati
 21319        /// </summary>
 21320        public System.Uri CopySource { get; internal set; }
 21321
 21322        /// <summary>
 21323        /// State of the copy operation identified by x-ms-copy-id.
 21324        /// </summary>
 21325        public Azure.Storage.Blobs.Models.CopyStatus CopyStatus { get; internal set; }
 21326
 21327        /// <summary>
 21328        /// When a blob is leased, specifies whether the lease is of infinite or fixed duration.
 21329        /// </summary>
 21330        public Azure.Storage.Blobs.Models.LeaseDurationType LeaseDuration { get; internal set; }
 21331
 21332        /// <summary>
 21333        /// Lease state of the blob.
 21334        /// </summary>
 21335        public Azure.Storage.Blobs.Models.LeaseState LeaseState { get; internal set; }
 21336
 21337        /// <summary>
 21338        /// The current lease status of the blob.
 21339        /// </summary>
 21340        public Azure.Storage.Blobs.Models.LeaseStatus LeaseStatus { get; internal set; }
 21341
 21342        /// <summary>
 21343        /// Indicates that the service supports requests for partial blob content.
 21344        /// </summary>
 21345        public string AcceptRanges { get; internal set; }
 21346
 21347        /// <summary>
 21348        /// The number of committed blocks present in the blob. This header is returned only for append blobs.
 21349        /// </summary>
 21350        public int BlobCommittedBlockCount { get; internal set; }
 21351
 21352        /// <summary>
 21353        /// The value of this header is set to true if the blob data and application metadata are completely encrypted u
 21354        /// </summary>
 21355        public bool IsServerEncrypted { get; internal set; }
 21356
 21357        /// <summary>
 21358        /// The SHA-256 hash of the encryption key used to encrypt the blob. This header is only returned when the blob 
 21359        /// </summary>
 21360        public string EncryptionKeySha256 { get; internal set; }
 21361
 21362        /// <summary>
 21363        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 21364        /// </summary>
 21365        public string EncryptionScope { get; internal set; }
 21366
 21367        /// <summary>
 21368        /// If the blob has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header
 21369        /// </summary>
 21370        #pragma warning disable CA1819 // Properties should not return arrays
 21371        public byte[] BlobContentHash { get; internal set; }
 21372        #pragma warning restore CA1819 // Properties should not return arrays
 21373
 21374        /// <summary>
 21375        /// The number of tags associated with the blob
 21376        /// </summary>
 21377        public long TagCount { get; internal set; }
 21378
 21379        /// <summary>
 21380        /// If this blob has been sealed
 21381        /// </summary>
 21382        public bool IsSealed { get; internal set; }
 21383
 21384        /// <summary>
 21385        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 21386        /// </summary>
 21387        public string VersionId { get; internal set; }
 21388
 21389        /// <summary>
 21390        /// Content
 21391        /// </summary>
 21392        public System.IO.Stream Content { get; internal set; }
 21393
 21394        /// <summary>
 21395        /// Creates a new FlattenedDownloadProperties instance
 21396        /// </summary>
 21397        public FlattenedDownloadProperties()
 21398        {
 21399            Metadata = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase
 21400            ObjectReplicationRules = new System.Collections.Generic.Dictionary<string, string>(System.StringComparer.Ord
 21401        }
 21402    }
 21403}
 21404#endregion class FlattenedDownloadProperties
 21405
 21406#region class GetBlockListOperation
 21407namespace Azure.Storage.Blobs.Models
 21408{
 21409    /// <summary>
 21410    /// GetBlockListOperation
 21411    /// </summary>
 21412    internal partial class GetBlockListOperation
 21413    {
 21414        /// <summary>
 21415        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 21416        /// </summary>
 21417        public System.DateTimeOffset LastModified { get; internal set; }
 21418
 21419        /// <summary>
 21420        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 21421        /// </summary>
 21422        public Azure.ETag ETag { get; internal set; }
 21423
 21424        /// <summary>
 21425        /// The media type of the body of the response. For Get Block List this is 'application/xml'
 21426        /// </summary>
 21427        public string ContentType { get; internal set; }
 21428
 21429        /// <summary>
 21430        /// The size of the blob in bytes.
 21431        /// </summary>
 21432        public long BlobContentLength { get; internal set; }
 21433
 21434        /// <summary>
 21435        /// Body
 21436        /// </summary>
 21437        public Azure.Storage.Blobs.Models.BlockList Body { get; internal set; }
 21438
 21439        /// <summary>
 21440        /// Creates a new GetBlockListOperation instance
 21441        /// </summary>
 21442        public GetBlockListOperation()
 21443        {
 21444            Body = new Azure.Storage.Blobs.Models.BlockList();
 21445        }
 21446    }
 21447}
 21448#endregion class GetBlockListOperation
 21449
 21450#region class JsonTextConfigurationInternal
 21451namespace Azure.Storage.Blobs.Models
 21452{
 21453    /// <summary>
 21454    /// json text configuration
 21455    /// </summary>
 21456    internal partial class JsonTextConfigurationInternal
 21457    {
 21458        /// <summary>
 21459        /// record separator
 21460        /// </summary>
 21461        public string RecordSeparator { get; set; }
 21462
 21463        /// <summary>
 21464        /// Creates a new JsonTextConfigurationInternal instance
 21465        /// </summary>
 21466        public JsonTextConfigurationInternal() { }
 21467
 21468        /// <summary>
 21469        /// Serialize a JsonTextConfigurationInternal instance as XML.
 21470        /// </summary>
 21471        /// <param name="value">The JsonTextConfigurationInternal instance to serialize.</param>
 21472        /// <param name="name">An optional name to use for the root element instead of "JsonTextConfiguration".</param>
 21473        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 21474        /// <returns>The serialized XML element.</returns>
 21475        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.JsonTextConfigurationInternal value, s
 21476        {
 21477            System.Diagnostics.Debug.Assert(value != null);
 21478            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 21479            _element.Add(new System.Xml.Linq.XElement(
 21480                System.Xml.Linq.XName.Get("RecordSeparator", ""),
 21481                value.RecordSeparator));
 21482            return _element;
 21483        }
 21484    }
 21485}
 21486#endregion class JsonTextConfigurationInternal
 21487
 21488#region class KeyInfo
 21489namespace Azure.Storage.Blobs.Models
 21490{
 21491    /// <summary>
 21492    /// Key information
 21493    /// </summary>
 21494    internal partial class KeyInfo
 21495    {
 21496        /// <summary>
 21497        /// The date-time the key is active in ISO 8601 UTC time
 21498        /// </summary>
 21499        public System.DateTimeOffset? StartsOn { get; set; }
 21500
 21501        /// <summary>
 21502        /// The date-time the key expires in ISO 8601 UTC time
 21503        /// </summary>
 21504        public System.DateTimeOffset ExpiresOn { get; set; }
 21505
 21506        /// <summary>
 21507        /// Creates a new KeyInfo instance
 21508        /// </summary>
 21509        public KeyInfo() { }
 21510
 21511        /// <summary>
 21512        /// Serialize a KeyInfo instance as XML.
 21513        /// </summary>
 21514        /// <param name="value">The KeyInfo instance to serialize.</param>
 21515        /// <param name="name">An optional name to use for the root element instead of "KeyInfo".</param>
 21516        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 21517        /// <returns>The serialized XML element.</returns>
 21518        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.KeyInfo value, string name = "KeyInfo"
 21519        {
 21520            System.Diagnostics.Debug.Assert(value != null);
 21521            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 21522            if (value.StartsOn != null)
 21523            {
 21524                _element.Add(new System.Xml.Linq.XElement(
 21525                    System.Xml.Linq.XName.Get("Start", ""),
 21526                    value.StartsOn.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ssZ", System.Globalization.CultureInfo.Inv
 21527            }
 21528            _element.Add(new System.Xml.Linq.XElement(
 21529                System.Xml.Linq.XName.Get("Expiry", ""),
 21530                value.ExpiresOn.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ssZ", System.Globalization.CultureInfo.InvariantCul
 21531            return _element;
 21532        }
 21533    }
 21534}
 21535#endregion class KeyInfo
 21536
 21537#region enum LeaseDurationType
 21538namespace Azure.Storage.Blobs.Models
 21539{
 21540    /// <summary>
 21541    /// LeaseDurationType values
 21542    /// </summary>
 21543    public enum LeaseDurationType
 21544    {
 21545        /// <summary>
 21546        /// infinite
 21547        /// </summary>
 21548        Infinite,
 21549
 21550        /// <summary>
 21551        /// fixed
 21552        /// </summary>
 21553        Fixed
 21554    }
 21555}
 21556
 21557namespace Azure.Storage.Blobs
 21558{
 21559    internal static partial class BlobRestClient
 21560    {
 21561        public static partial class Serialization
 21562        {
 21563            public static string ToString(Azure.Storage.Blobs.Models.LeaseDurationType value)
 21564            {
 021565                return value switch
 021566                {
 021567                    Azure.Storage.Blobs.Models.LeaseDurationType.Infinite => "infinite",
 021568                    Azure.Storage.Blobs.Models.LeaseDurationType.Fixed => "fixed",
 021569                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 021570                };
 21571            }
 21572
 21573            public static Azure.Storage.Blobs.Models.LeaseDurationType ParseLeaseDurationType(string value)
 21574            {
 7221575                return value switch
 7221576                {
 14421577                    "infinite" => Azure.Storage.Blobs.Models.LeaseDurationType.Infinite,
 021578                    "fixed" => Azure.Storage.Blobs.Models.LeaseDurationType.Fixed,
 021579                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 7221580                };
 21581            }
 21582        }
 21583    }
 21584}
 21585#endregion enum LeaseDurationType
 21586
 21587#region enum LeaseState
 21588namespace Azure.Storage.Blobs.Models
 21589{
 21590    /// <summary>
 21591    /// LeaseState values
 21592    /// </summary>
 21593    public enum LeaseState
 21594    {
 21595        /// <summary>
 21596        /// available
 21597        /// </summary>
 21598        Available,
 21599
 21600        /// <summary>
 21601        /// leased
 21602        /// </summary>
 21603        Leased,
 21604
 21605        /// <summary>
 21606        /// expired
 21607        /// </summary>
 21608        Expired,
 21609
 21610        /// <summary>
 21611        /// breaking
 21612        /// </summary>
 21613        Breaking,
 21614
 21615        /// <summary>
 21616        /// broken
 21617        /// </summary>
 21618        Broken
 21619    }
 21620}
 21621
 21622namespace Azure.Storage.Blobs
 21623{
 21624    internal static partial class BlobRestClient
 21625    {
 21626        public static partial class Serialization
 21627        {
 21628            public static string ToString(Azure.Storage.Blobs.Models.LeaseState value)
 21629            {
 021630                return value switch
 021631                {
 021632                    Azure.Storage.Blobs.Models.LeaseState.Available => "available",
 021633                    Azure.Storage.Blobs.Models.LeaseState.Leased => "leased",
 021634                    Azure.Storage.Blobs.Models.LeaseState.Expired => "expired",
 021635                    Azure.Storage.Blobs.Models.LeaseState.Breaking => "breaking",
 021636                    Azure.Storage.Blobs.Models.LeaseState.Broken => "broken",
 021637                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 021638                };
 21639            }
 21640
 21641            public static Azure.Storage.Blobs.Models.LeaseState ParseLeaseState(string value)
 21642            {
 3347621643                return value switch
 3347621644                {
 6686421645                    "available" => Azure.Storage.Blobs.Models.LeaseState.Available,
 2282821646                    "leased" => Azure.Storage.Blobs.Models.LeaseState.Leased,
 2086621647                    "expired" => Azure.Storage.Blobs.Models.LeaseState.Expired,
 021648                    "breaking" => Azure.Storage.Blobs.Models.LeaseState.Breaking,
 2276821649                    "broken" => Azure.Storage.Blobs.Models.LeaseState.Broken,
 021650                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 3347621651                };
 21652            }
 21653        }
 21654    }
 21655}
 21656#endregion enum LeaseState
 21657
 21658#region enum LeaseStatus
 21659namespace Azure.Storage.Blobs.Models
 21660{
 21661    /// <summary>
 21662    /// LeaseStatus values
 21663    /// </summary>
 21664    #pragma warning disable CA1717 // Only FlagsAttribute enums should have plural names
 21665    public enum LeaseStatus
 21666    #pragma warning restore CA1717 // Only FlagsAttribute enums should have plural names
 21667    {
 21668        /// <summary>
 21669        /// locked
 21670        /// </summary>
 21671        Locked,
 21672
 21673        /// <summary>
 21674        /// unlocked
 21675        /// </summary>
 21676        Unlocked
 21677    }
 21678}
 21679
 21680namespace Azure.Storage.Blobs
 21681{
 21682    internal static partial class BlobRestClient
 21683    {
 21684        public static partial class Serialization
 21685        {
 21686            public static string ToString(Azure.Storage.Blobs.Models.LeaseStatus value)
 21687            {
 021688                return value switch
 021689                {
 021690                    Azure.Storage.Blobs.Models.LeaseStatus.Locked => "locked",
 021691                    Azure.Storage.Blobs.Models.LeaseStatus.Unlocked => "unlocked",
 021692                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 021693                };
 21694            }
 21695
 21696            public static Azure.Storage.Blobs.Models.LeaseStatus ParseLeaseStatus(string value)
 21697            {
 3347621698                return value switch
 3347621699                {
 2282821700                    "locked" => Azure.Storage.Blobs.Models.LeaseStatus.Locked,
 6688021701                    "unlocked" => Azure.Storage.Blobs.Models.LeaseStatus.Unlocked,
 021702                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 3347621703                };
 21704            }
 21705        }
 21706    }
 21707}
 21708#endregion enum LeaseStatus
 21709
 21710#region enum ListBlobsIncludeItem
 21711namespace Azure.Storage.Blobs.Models
 21712{
 21713    /// <summary>
 21714    /// ListBlobsIncludeItem values
 21715    /// </summary>
 21716    internal enum ListBlobsIncludeItem
 21717    {
 21718        /// <summary>
 21719        /// copy
 21720        /// </summary>
 21721        Copy,
 21722
 21723        /// <summary>
 21724        /// deleted
 21725        /// </summary>
 21726        Deleted,
 21727
 21728        /// <summary>
 21729        /// metadata
 21730        /// </summary>
 21731        Metadata,
 21732
 21733        /// <summary>
 21734        /// snapshots
 21735        /// </summary>
 21736        Snapshots,
 21737
 21738        /// <summary>
 21739        /// uncommittedblobs
 21740        /// </summary>
 21741        Uncommittedblobs,
 21742
 21743        /// <summary>
 21744        /// versions
 21745        /// </summary>
 21746        Versions,
 21747
 21748        /// <summary>
 21749        /// tags
 21750        /// </summary>
 21751        Tags
 21752    }
 21753}
 21754
 21755namespace Azure.Storage.Blobs
 21756{
 21757    internal static partial class BlobRestClient
 21758    {
 21759        public static partial class Serialization
 21760        {
 21761            public static string ToString(Azure.Storage.Blobs.Models.ListBlobsIncludeItem value)
 21762            {
 8021763                return value switch
 8021764                {
 8421765                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Copy => "copy",
 9621766                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Deleted => "deleted",
 9821767                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Metadata => "metadata",
 9421768                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Snapshots => "snapshots",
 9221769                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Uncommittedblobs => "uncommittedblobs",
 8821770                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Versions => "versions",
 8821771                    Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Tags => "tags",
 021772                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 8021773                };
 21774            }
 21775
 21776            public static Azure.Storage.Blobs.Models.ListBlobsIncludeItem ParseListBlobsIncludeItem(string value)
 21777            {
 021778                return value switch
 021779                {
 021780                    "copy" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Copy,
 021781                    "deleted" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Deleted,
 021782                    "metadata" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Metadata,
 021783                    "snapshots" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Snapshots,
 021784                    "uncommittedblobs" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Uncommittedblobs,
 021785                    "versions" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Versions,
 021786                    "tags" => Azure.Storage.Blobs.Models.ListBlobsIncludeItem.Tags,
 021787                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 021788                };
 21789            }
 21790        }
 21791    }
 21792}
 21793#endregion enum ListBlobsIncludeItem
 21794
 21795#region enum ListContainersIncludeType
 21796namespace Azure.Storage.Blobs.Models
 21797{
 21798    /// <summary>
 21799    /// ListContainersIncludeType values
 21800    /// </summary>
 21801    internal enum ListContainersIncludeType
 21802    {
 21803        /// <summary>
 21804        /// metadata
 21805        /// </summary>
 21806        Metadata,
 21807
 21808        /// <summary>
 21809        /// deleted
 21810        /// </summary>
 21811        Deleted
 21812    }
 21813}
 21814
 21815namespace Azure.Storage.Blobs
 21816{
 21817    internal static partial class BlobRestClient
 21818    {
 21819        public static partial class Serialization
 21820        {
 21821            public static string ToString(Azure.Storage.Blobs.Models.ListContainersIncludeType value)
 21822            {
 821823                return value switch
 821824                {
 1621825                    Azure.Storage.Blobs.Models.ListContainersIncludeType.Metadata => "metadata",
 021826                    Azure.Storage.Blobs.Models.ListContainersIncludeType.Deleted => "deleted",
 021827                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 821828                };
 21829            }
 21830
 21831            public static Azure.Storage.Blobs.Models.ListContainersIncludeType ParseListContainersIncludeType(string val
 21832            {
 021833                return value switch
 021834                {
 021835                    "metadata" => Azure.Storage.Blobs.Models.ListContainersIncludeType.Metadata,
 021836                    "deleted" => Azure.Storage.Blobs.Models.ListContainersIncludeType.Deleted,
 021837                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 021838                };
 21839            }
 21840        }
 21841    }
 21842}
 21843#endregion enum ListContainersIncludeType
 21844
 21845#region class PageBlobInfo
 21846namespace Azure.Storage.Blobs.Models
 21847{
 21848    /// <summary>
 21849    /// PageBlobInfo
 21850    /// </summary>
 21851    public partial class PageBlobInfo
 21852    {
 21853        /// <summary>
 21854        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 21855        /// </summary>
 21856        public Azure.ETag ETag { get; internal set; }
 21857
 21858        /// <summary>
 21859        /// Returns the date and time the blob was last modified. Any operation that modifies the blob, including an upd
 21860        /// </summary>
 21861        public System.DateTimeOffset LastModified { get; internal set; }
 21862
 21863        /// <summary>
 21864        /// The current sequence number for the page blob.  This is only returned for page blobs.
 21865        /// </summary>
 21866        public long BlobSequenceNumber { get; internal set; }
 21867
 21868        /// <summary>
 21869        /// Prevent direct instantiation of PageBlobInfo instances.
 21870        /// You can use BlobsModelFactory.PageBlobInfo instead.
 21871        /// </summary>
 21872        internal PageBlobInfo() { }
 21873    }
 21874
 21875    /// <summary>
 21876    /// BlobsModelFactory provides utilities for mocking.
 21877    /// </summary>
 21878    public static partial class BlobsModelFactory
 21879    {
 21880        /// <summary>
 21881        /// Creates a new PageBlobInfo instance for mocking.
 21882        /// </summary>
 21883        public static PageBlobInfo PageBlobInfo(
 21884            Azure.ETag eTag,
 21885            System.DateTimeOffset lastModified,
 21886            long blobSequenceNumber)
 21887        {
 21888            return new PageBlobInfo()
 21889            {
 21890                ETag = eTag,
 21891                LastModified = lastModified,
 21892                BlobSequenceNumber = blobSequenceNumber,
 21893            };
 21894        }
 21895    }
 21896}
 21897#endregion class PageBlobInfo
 21898
 21899#region class PageInfo
 21900namespace Azure.Storage.Blobs.Models
 21901{
 21902    /// <summary>
 21903    /// PageInfo
 21904    /// </summary>
 21905    public partial class PageInfo
 21906    {
 21907        /// <summary>
 21908        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 21909        /// </summary>
 21910        public Azure.ETag ETag { get; internal set; }
 21911
 21912        /// <summary>
 21913        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 21914        /// </summary>
 21915        public System.DateTimeOffset LastModified { get; internal set; }
 21916
 21917        /// <summary>
 21918        /// If the blob has an MD5 hash and this operation is to read the full blob, this response header is returned so
 21919        /// </summary>
 21920        #pragma warning disable CA1819 // Properties should not return arrays
 21921        public byte[] ContentHash { get; internal set; }
 21922        #pragma warning restore CA1819 // Properties should not return arrays
 21923
 21924        /// <summary>
 21925        /// This header is returned so that the client can check for message content integrity. The value of this header
 21926        /// </summary>
 21927        #pragma warning disable CA1819 // Properties should not return arrays
 21928        public byte[] ContentCrc64 { get; internal set; }
 21929        #pragma warning restore CA1819 // Properties should not return arrays
 21930
 21931        /// <summary>
 21932        /// The current sequence number for the page blob.  This is only returned for page blobs.
 21933        /// </summary>
 21934        public long BlobSequenceNumber { get; internal set; }
 21935
 21936        /// <summary>
 21937        /// The SHA-256 hash of the encryption key used to encrypt the pages. This header is only returned when the page
 21938        /// </summary>
 21939        public string EncryptionKeySha256 { get; internal set; }
 21940
 21941        /// <summary>
 21942        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 21943        /// </summary>
 21944        public string EncryptionScope { get; internal set; }
 21945
 21946        /// <summary>
 21947        /// Prevent direct instantiation of PageInfo instances.
 21948        /// You can use BlobsModelFactory.PageInfo instead.
 21949        /// </summary>
 21950        internal PageInfo() { }
 21951    }
 21952
 21953    /// <summary>
 21954    /// BlobsModelFactory provides utilities for mocking.
 21955    /// </summary>
 21956    public static partial class BlobsModelFactory
 21957    {
 21958        /// <summary>
 21959        /// Creates a new PageInfo instance for mocking.
 21960        /// </summary>
 21961        public static PageInfo PageInfo(
 21962            Azure.ETag eTag,
 21963            System.DateTimeOffset lastModified,
 21964            byte[] contentHash,
 21965            byte[] contentCrc64,
 21966            long blobSequenceNumber,
 21967            string encryptionKeySha256,
 21968            string encryptionScope)
 21969        {
 21970            return new PageInfo()
 21971            {
 21972                ETag = eTag,
 21973                LastModified = lastModified,
 21974                ContentHash = contentHash,
 21975                ContentCrc64 = contentCrc64,
 21976                BlobSequenceNumber = blobSequenceNumber,
 21977                EncryptionKeySha256 = encryptionKeySha256,
 21978                EncryptionScope = encryptionScope,
 21979            };
 21980        }
 21981    }
 21982}
 21983#endregion class PageInfo
 21984
 21985#region class PageList
 21986namespace Azure.Storage.Blobs.Models
 21987{
 21988    /// <summary>
 21989    /// the list of pages
 21990    /// </summary>
 21991    internal partial class PageList
 21992    {
 21993        /// <summary>
 21994        /// PageRange
 21995        /// </summary>
 21996        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.PageRange> PageRange { get; internal se
 21997
 21998        /// <summary>
 21999        /// ClearRange
 22000        /// </summary>
 22001        public System.Collections.Generic.IEnumerable<Azure.Storage.Blobs.Models.ClearRange> ClearRange { get; internal 
 22002
 22003        /// <summary>
 22004        /// Creates a new PageList instance
 22005        /// </summary>
 22006        public PageList()
 22007            : this(false)
 22008        {
 22009        }
 22010
 22011        /// <summary>
 22012        /// Creates a new PageList instance
 22013        /// </summary>
 22014        /// <param name="skipInitialization">Whether to skip initializing nested objects.</param>
 22015        internal PageList(bool skipInitialization)
 22016        {
 22017            if (!skipInitialization)
 22018            {
 22019                PageRange = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.PageRange>();
 22020                ClearRange = new System.Collections.Generic.List<Azure.Storage.Blobs.Models.ClearRange>();
 22021            }
 22022        }
 22023
 22024        /// <summary>
 22025        /// Deserializes XML into a new PageList instance.
 22026        /// </summary>
 22027        /// <param name="element">The XML element to deserialize.</param>
 22028        /// <returns>A deserialized PageList instance.</returns>
 22029        internal static Azure.Storage.Blobs.Models.PageList FromXml(System.Xml.Linq.XElement element)
 22030        {
 22031            System.Diagnostics.Debug.Assert(element != null);
 22032            Azure.Storage.Blobs.Models.PageList _value = new Azure.Storage.Blobs.Models.PageList(true);
 22033            _value.PageRange = System.Linq.Enumerable.ToList(
 22034                System.Linq.Enumerable.Select(
 22035                    element.Elements(System.Xml.Linq.XName.Get("PageRange", "")),
 22036                    e => Azure.Storage.Blobs.Models.PageRange.FromXml(e)));
 22037            _value.ClearRange = System.Linq.Enumerable.ToList(
 22038                System.Linq.Enumerable.Select(
 22039                    element.Elements(System.Xml.Linq.XName.Get("ClearRange", "")),
 22040                    e => Azure.Storage.Blobs.Models.ClearRange.FromXml(e)));
 22041            CustomizeFromXml(element, _value);
 22042            return _value;
 22043        }
 22044
 22045        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.PageList value
 22046    }
 22047}
 22048#endregion class PageList
 22049
 22050#region struct PageRange
 22051namespace Azure.Storage.Blobs.Models
 22052{
 22053    /// <summary>
 22054    /// PageRange
 22055    /// </summary>
 22056    internal readonly partial struct PageRange: System.IEquatable<PageRange>
 22057    {
 22058        /// <summary>
 22059        /// Start
 22060        /// </summary>
 22061        public long Start { get; }
 22062
 22063        /// <summary>
 22064        /// End
 22065        /// </summary>
 22066        public long End { get; }
 22067
 22068        /// <summary>
 22069        /// Prevent direct instantiation of PageRange instances.
 22070        /// You can use BlobsModelFactory.PageRange instead.
 22071        /// </summary>
 22072        internal PageRange(
 22073            long start,
 22074            long end)
 22075            {
 22076                Start = start;
 22077                End = end;
 22078            }
 22079
 22080        /// <summary>
 22081        /// Check if two PageRange instances are equal.
 22082        /// </summary>
 22083        /// <param name="other">The instance to compare to.</param>
 22084        /// <returns>True if they're equal, false otherwise.</returns>
 22085        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 22086        public bool Equals(PageRange other)
 22087        {
 22088            if (!Start.Equals(other.Start))
 22089            {
 22090                return false;
 22091            }
 22092            if (!End.Equals(other.End))
 22093            {
 22094                return false;
 22095            }
 22096
 22097            return true;
 22098        }
 22099
 22100        /// <summary>
 22101        /// Check if two PageRange instances are equal.
 22102        /// </summary>
 22103        /// <param name="obj">The instance to compare to.</param>
 22104        /// <returns>True if they're equal, false otherwise.</returns>
 22105        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 22106        public override bool Equals(object obj) => obj is PageRange && Equals((PageRange)obj);
 22107
 22108        /// <summary>
 22109        /// Get a hash code for the PageRange.
 22110        /// </summary>
 22111        [System.ComponentModel.EditorBrowsable((System.ComponentModel.EditorBrowsableState.Never))]
 22112        public override int GetHashCode()
 22113        {
 22114            var hashCode = new Azure.Core.HashCodeBuilder();
 22115            hashCode.Add(Start);
 22116            hashCode.Add(End);
 22117
 22118            return hashCode.ToHashCode();
 22119        }
 22120
 22121        /// <summary>
 22122        /// Deserializes XML into a new PageRange instance.
 22123        /// </summary>
 22124        /// <param name="element">The XML element to deserialize.</param>
 22125        /// <returns>A deserialized PageRange instance.</returns>
 22126        internal static Azure.Storage.Blobs.Models.PageRange FromXml(System.Xml.Linq.XElement element)
 22127        {
 22128            System.Diagnostics.Debug.Assert(element != null);
 22129            System.Xml.Linq.XElement _child;
 22130            long start = default;
 22131            long end = default;
 22132            _child = element.Element(System.Xml.Linq.XName.Get("Start", ""));
 22133            if (_child != null)
 22134            {
 22135                start = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 22136            }
 22137            _child = element.Element(System.Xml.Linq.XName.Get("End", ""));
 22138            if (_child != null)
 22139            {
 22140                end = long.Parse(_child.Value, System.Globalization.CultureInfo.InvariantCulture);
 22141            }
 22142            Azure.Storage.Blobs.Models.PageRange _value = new Azure.Storage.Blobs.Models.PageRange(start, end);
 22143            CustomizeFromXml(element, _value);
 22144            return _value;
 22145        }
 22146
 22147        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.PageRange valu
 22148    }
 22149}
 22150#endregion struct PageRange
 22151
 22152#region class PageRangesInfoInternal
 22153namespace Azure.Storage.Blobs.Models
 22154{
 22155    /// <summary>
 22156    /// PageRangesInfoInternal
 22157    /// </summary>
 22158    internal partial class PageRangesInfoInternal
 22159    {
 22160        /// <summary>
 22161        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 22162        /// </summary>
 22163        public System.DateTimeOffset LastModified { get; internal set; }
 22164
 22165        /// <summary>
 22166        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 22167        /// </summary>
 22168        public Azure.ETag ETag { get; internal set; }
 22169
 22170        /// <summary>
 22171        /// The size of the blob in bytes.
 22172        /// </summary>
 22173        public long BlobContentLength { get; internal set; }
 22174
 22175        /// <summary>
 22176        /// the list of pages
 22177        /// </summary>
 22178        public Azure.Storage.Blobs.Models.PageList Body { get; internal set; }
 22179
 22180        /// <summary>
 22181        /// Creates a new PageRangesInfoInternal instance
 22182        /// </summary>
 22183        public PageRangesInfoInternal()
 22184        {
 22185            Body = new Azure.Storage.Blobs.Models.PageList();
 22186        }
 22187    }
 22188}
 22189#endregion class PageRangesInfoInternal
 22190
 22191#region enum PathRenameMode
 22192namespace Azure.Storage.Blobs.Models
 22193{
 22194    /// <summary>
 22195    /// Determines the behavior of the rename operation
 22196    /// </summary>
 22197    public enum PathRenameMode
 22198    {
 22199        /// <summary>
 22200        /// legacy
 22201        /// </summary>
 22202        Legacy,
 22203
 22204        /// <summary>
 22205        /// posix
 22206        /// </summary>
 22207        Posix
 22208    }
 22209}
 22210
 22211namespace Azure.Storage.Blobs
 22212{
 22213    internal static partial class BlobRestClient
 22214    {
 22215        public static partial class Serialization
 22216        {
 22217            public static string ToString(Azure.Storage.Blobs.Models.PathRenameMode value)
 22218            {
 022219                return value switch
 022220                {
 022221                    Azure.Storage.Blobs.Models.PathRenameMode.Legacy => "legacy",
 022222                    Azure.Storage.Blobs.Models.PathRenameMode.Posix => "posix",
 022223                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022224                };
 22225            }
 22226
 22227            public static Azure.Storage.Blobs.Models.PathRenameMode ParsePathRenameMode(string value)
 22228            {
 022229                return value switch
 022230                {
 022231                    "legacy" => Azure.Storage.Blobs.Models.PathRenameMode.Legacy,
 022232                    "posix" => Azure.Storage.Blobs.Models.PathRenameMode.Posix,
 022233                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022234                };
 22235            }
 22236        }
 22237    }
 22238}
 22239#endregion enum PathRenameMode
 22240
 22241#region enum PublicAccessType
 22242namespace Azure.Storage.Blobs.Models
 22243{
 22244    /// <summary>
 22245    /// Specifies whether data in the container may be accessed publicly and the level of access
 22246    /// </summary>
 22247    public enum PublicAccessType
 22248    {
 22249        /// <summary>
 22250        /// none
 22251        /// </summary>
 22252        None,
 22253
 22254        /// <summary>
 22255        /// container
 22256        /// </summary>
 22257        BlobContainer,
 22258
 22259        /// <summary>
 22260        /// blob
 22261        /// </summary>
 22262        Blob
 22263    }
 22264}
 22265
 22266namespace Azure.Storage.Blobs
 22267{
 22268    internal static partial class BlobRestClient
 22269    {
 22270        public static partial class Serialization
 22271        {
 22272            public static string ToString(Azure.Storage.Blobs.Models.PublicAccessType value)
 22273            {
 644222274                return value switch
 644222275                {
 022276                    Azure.Storage.Blobs.Models.PublicAccessType.None => null,
 1286422277                    Azure.Storage.Blobs.Models.PublicAccessType.BlobContainer => "container",
 636622278                    Azure.Storage.Blobs.Models.PublicAccessType.Blob => "blob",
 022279                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 644222280                };
 22281            }
 22282
 22283            public static Azure.Storage.Blobs.Models.PublicAccessType ParsePublicAccessType(string value)
 22284            {
 1994622285                return value switch
 1994622286                {
 022287                    null => Azure.Storage.Blobs.Models.PublicAccessType.None,
 3988422288                    "container" => Azure.Storage.Blobs.Models.PublicAccessType.BlobContainer,
 1995422289                    "blob" => Azure.Storage.Blobs.Models.PublicAccessType.Blob,
 022290                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 1994622291                };
 22292            }
 22293        }
 22294    }
 22295}
 22296#endregion enum PublicAccessType
 22297
 22298#region class QueryFormat
 22299namespace Azure.Storage.Blobs.Models
 22300{
 22301    /// <summary>
 22302    /// QueryFormat
 22303    /// </summary>
 22304    internal partial class QueryFormat
 22305    {
 22306        /// <summary>
 22307        /// The quick query format type.
 22308        /// </summary>
 22309        public Azure.Storage.Blobs.Models.QueryFormatType? Type { get; set; }
 22310
 22311        /// <summary>
 22312        /// delimited text configuration
 22313        /// </summary>
 22314        public Azure.Storage.Blobs.Models.DelimitedTextConfigurationInternal DelimitedTextConfiguration { get; set; }
 22315
 22316        /// <summary>
 22317        /// json text configuration
 22318        /// </summary>
 22319        public Azure.Storage.Blobs.Models.JsonTextConfigurationInternal JsonTextConfiguration { get; set; }
 22320
 22321        /// <summary>
 22322        /// Creates a new QueryFormat instance
 22323        /// </summary>
 22324        public QueryFormat()
 22325        {
 22326            DelimitedTextConfiguration = new Azure.Storage.Blobs.Models.DelimitedTextConfigurationInternal();
 22327            JsonTextConfiguration = new Azure.Storage.Blobs.Models.JsonTextConfigurationInternal();
 22328        }
 22329
 22330        /// <summary>
 22331        /// Serialize a QueryFormat instance as XML.
 22332        /// </summary>
 22333        /// <param name="value">The QueryFormat instance to serialize.</param>
 22334        /// <param name="name">An optional name to use for the root element instead of "QueryFormat".</param>
 22335        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 22336        /// <returns>The serialized XML element.</returns>
 22337        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.QueryFormat value, string name = "Quer
 22338        {
 22339            System.Diagnostics.Debug.Assert(value != null);
 22340            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 22341            if (value.Type != null)
 22342            {
 22343                _element.Add(new System.Xml.Linq.XElement(
 22344                    System.Xml.Linq.XName.Get("Type", ""),
 22345                    Azure.Storage.Blobs.BlobRestClient.Serialization.ToString(value.Type.Value)));
 22346            }
 22347            if (value.DelimitedTextConfiguration != null)
 22348            {
 22349                _element.Add(Azure.Storage.Blobs.Models.DelimitedTextConfigurationInternal.ToXml(value.DelimitedTextConf
 22350            }
 22351            if (value.JsonTextConfiguration != null)
 22352            {
 22353                _element.Add(Azure.Storage.Blobs.Models.JsonTextConfigurationInternal.ToXml(value.JsonTextConfiguration,
 22354            }
 22355            return _element;
 22356        }
 22357    }
 22358}
 22359#endregion class QueryFormat
 22360
 22361#region enum QueryFormatType
 22362namespace Azure.Storage.Blobs.Models
 22363{
 22364    /// <summary>
 22365    /// The quick query format type.
 22366    /// </summary>
 22367    internal enum QueryFormatType
 22368    {
 22369        /// <summary>
 22370        /// delimited
 22371        /// </summary>
 22372        Delimited,
 22373
 22374        /// <summary>
 22375        /// json
 22376        /// </summary>
 22377        Json
 22378    }
 22379}
 22380
 22381namespace Azure.Storage.Blobs
 22382{
 22383    internal static partial class BlobRestClient
 22384    {
 22385        public static partial class Serialization
 22386        {
 22387            public static string ToString(Azure.Storage.Blobs.Models.QueryFormatType value)
 22388            {
 022389                return value switch
 022390                {
 022391                    Azure.Storage.Blobs.Models.QueryFormatType.Delimited => "delimited",
 022392                    Azure.Storage.Blobs.Models.QueryFormatType.Json => "json",
 022393                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022394                };
 22395            }
 22396
 22397            public static Azure.Storage.Blobs.Models.QueryFormatType ParseQueryFormatType(string value)
 22398            {
 022399                return value switch
 022400                {
 022401                    "delimited" => Azure.Storage.Blobs.Models.QueryFormatType.Delimited,
 022402                    "json" => Azure.Storage.Blobs.Models.QueryFormatType.Json,
 022403                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022404                };
 22405            }
 22406        }
 22407    }
 22408}
 22409#endregion enum QueryFormatType
 22410
 22411#region class QueryRequest
 22412namespace Azure.Storage.Blobs.Models
 22413{
 22414    /// <summary>
 22415    /// the quick query body
 22416    /// </summary>
 22417    internal partial class QueryRequest
 22418    {
 22419        /// <summary>
 22420        /// the query type
 22421        /// </summary>
 22422        public string QueryType { get; set; }
 22423
 22424        /// <summary>
 22425        /// a query statement
 22426        /// </summary>
 22427        public string Expression { get; set; }
 22428
 22429        /// <summary>
 22430        /// InputSerialization
 22431        /// </summary>
 22432        public Azure.Storage.Blobs.Models.QuerySerialization InputSerialization { get; set; }
 22433
 22434        /// <summary>
 22435        /// OutputSerialization
 22436        /// </summary>
 22437        public Azure.Storage.Blobs.Models.QuerySerialization OutputSerialization { get; set; }
 22438
 22439        /// <summary>
 22440        /// Creates a new QueryRequest instance
 22441        /// </summary>
 22442        public QueryRequest()
 22443        {
 22444            InputSerialization = new Azure.Storage.Blobs.Models.QuerySerialization();
 22445            OutputSerialization = new Azure.Storage.Blobs.Models.QuerySerialization();
 22446        }
 22447
 22448        /// <summary>
 22449        /// Serialize a QueryRequest instance as XML.
 22450        /// </summary>
 22451        /// <param name="value">The QueryRequest instance to serialize.</param>
 22452        /// <param name="name">An optional name to use for the root element instead of "QueryRequest".</param>
 22453        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 22454        /// <returns>The serialized XML element.</returns>
 22455        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.QueryRequest value, string name = "Que
 22456        {
 22457            System.Diagnostics.Debug.Assert(value != null);
 22458            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 22459            _element.Add(new System.Xml.Linq.XElement(
 22460                System.Xml.Linq.XName.Get("QueryType", ""),
 22461                value.QueryType));
 22462            _element.Add(new System.Xml.Linq.XElement(
 22463                System.Xml.Linq.XName.Get("Expression", ""),
 22464                value.Expression));
 22465            if (value.InputSerialization != null)
 22466            {
 22467                _element.Add(Azure.Storage.Blobs.Models.QuerySerialization.ToXml(value.InputSerialization, "InputSeriali
 22468            }
 22469            if (value.OutputSerialization != null)
 22470            {
 22471                _element.Add(Azure.Storage.Blobs.Models.QuerySerialization.ToXml(value.OutputSerialization, "OutputSeria
 22472            }
 22473            return _element;
 22474        }
 22475    }
 22476}
 22477#endregion class QueryRequest
 22478
 22479#region class QuerySerialization
 22480namespace Azure.Storage.Blobs.Models
 22481{
 22482    /// <summary>
 22483    /// QuerySerialization
 22484    /// </summary>
 22485    internal partial class QuerySerialization
 22486    {
 22487        /// <summary>
 22488        /// Format
 22489        /// </summary>
 22490        public Azure.Storage.Blobs.Models.QueryFormat Format { get; set; }
 22491
 22492        /// <summary>
 22493        /// Creates a new QuerySerialization instance
 22494        /// </summary>
 22495        public QuerySerialization()
 22496        {
 22497            Format = new Azure.Storage.Blobs.Models.QueryFormat();
 22498        }
 22499
 22500        /// <summary>
 22501        /// Serialize a QuerySerialization instance as XML.
 22502        /// </summary>
 22503        /// <param name="value">The QuerySerialization instance to serialize.</param>
 22504        /// <param name="name">An optional name to use for the root element instead of "QuerySerialization".</param>
 22505        /// <param name="ns">An optional namespace to use for the root element instead of "".</param>
 22506        /// <returns>The serialized XML element.</returns>
 22507        internal static System.Xml.Linq.XElement ToXml(Azure.Storage.Blobs.Models.QuerySerialization value, string name 
 22508        {
 22509            System.Diagnostics.Debug.Assert(value != null);
 22510            System.Xml.Linq.XElement _element = new System.Xml.Linq.XElement(System.Xml.Linq.XName.Get(name, ns));
 22511            _element.Add(Azure.Storage.Blobs.Models.QueryFormat.ToXml(value.Format, "Format", ""));
 22512            return _element;
 22513        }
 22514    }
 22515}
 22516#endregion class QuerySerialization
 22517
 22518#region enum RehydratePriority
 22519namespace Azure.Storage.Blobs.Models
 22520{
 22521    /// <summary>
 22522    /// Optional: Indicates the priority with which to rehydrate an archived blob.
 22523    /// </summary>
 22524    public enum RehydratePriority
 22525    {
 22526        /// <summary>
 22527        /// High
 22528        /// </summary>
 22529        High,
 22530
 22531        /// <summary>
 22532        /// Standard
 22533        /// </summary>
 22534        Standard
 22535    }
 22536}
 22537#endregion enum RehydratePriority
 22538
 22539#region enum SequenceNumberAction
 22540namespace Azure.Storage.Blobs.Models
 22541{
 22542    /// <summary>
 22543    /// Required if the x-ms-blob-sequence-number header is set for the request. This property applies to page blobs onl
 22544    /// </summary>
 22545    public enum SequenceNumberAction
 22546    {
 22547        /// <summary>
 22548        /// max
 22549        /// </summary>
 22550        Max,
 22551
 22552        /// <summary>
 22553        /// update
 22554        /// </summary>
 22555        Update,
 22556
 22557        /// <summary>
 22558        /// increment
 22559        /// </summary>
 22560        Increment
 22561    }
 22562}
 22563
 22564namespace Azure.Storage.Blobs
 22565{
 22566    internal static partial class BlobRestClient
 22567    {
 22568        public static partial class Serialization
 22569        {
 22570            public static string ToString(Azure.Storage.Blobs.Models.SequenceNumberAction value)
 22571            {
 6022572                return value switch
 6022573                {
 022574                    Azure.Storage.Blobs.Models.SequenceNumberAction.Max => "max",
 12022575                    Azure.Storage.Blobs.Models.SequenceNumberAction.Update => "update",
 022576                    Azure.Storage.Blobs.Models.SequenceNumberAction.Increment => "increment",
 022577                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 6022578                };
 22579            }
 22580
 22581            public static Azure.Storage.Blobs.Models.SequenceNumberAction ParseSequenceNumberAction(string value)
 22582            {
 022583                return value switch
 022584                {
 022585                    "max" => Azure.Storage.Blobs.Models.SequenceNumberAction.Max,
 022586                    "update" => Azure.Storage.Blobs.Models.SequenceNumberAction.Update,
 022587                    "increment" => Azure.Storage.Blobs.Models.SequenceNumberAction.Increment,
 022588                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022589                };
 22590            }
 22591        }
 22592    }
 22593}
 22594#endregion enum SequenceNumberAction
 22595
 22596#region class SetHttpHeadersOperation
 22597namespace Azure.Storage.Blobs.Models
 22598{
 22599    /// <summary>
 22600    /// SetHttpHeadersOperation
 22601    /// </summary>
 22602    internal partial class SetHttpHeadersOperation
 22603    {
 22604        /// <summary>
 22605        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 22606        /// </summary>
 22607        public Azure.ETag ETag { get; internal set; }
 22608
 22609        /// <summary>
 22610        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 22611        /// </summary>
 22612        public System.DateTimeOffset LastModified { get; internal set; }
 22613
 22614        /// <summary>
 22615        /// The current sequence number for a page blob. This header is not returned for block blobs or append blobs
 22616        /// </summary>
 22617        public long BlobSequenceNumber { get; internal set; }
 22618
 22619        /// <summary>
 22620        /// Prevent direct instantiation of SetHttpHeadersOperation instances.
 22621        /// You can use BlobsModelFactory.SetHttpHeadersOperation instead.
 22622        /// </summary>
 22623        internal SetHttpHeadersOperation() { }
 22624    }
 22625}
 22626#endregion class SetHttpHeadersOperation
 22627
 22628#region class SetMetadataOperation
 22629namespace Azure.Storage.Blobs.Models
 22630{
 22631    /// <summary>
 22632    /// SetMetadataOperation
 22633    /// </summary>
 22634    internal partial class SetMetadataOperation
 22635    {
 22636        /// <summary>
 22637        /// The ETag contains a value that you can use to perform operations conditionally. If the request version is 20
 22638        /// </summary>
 22639        public Azure.ETag ETag { get; internal set; }
 22640
 22641        /// <summary>
 22642        /// Returns the date and time the container was last modified. Any operation that modifies the blob, including a
 22643        /// </summary>
 22644        public System.DateTimeOffset LastModified { get; internal set; }
 22645
 22646        /// <summary>
 22647        /// A DateTime value returned by the service that uniquely identifies the blob. The value of this header indicat
 22648        /// </summary>
 22649        public string VersionId { get; internal set; }
 22650
 22651        /// <summary>
 22652        /// The value of this header is set to true if the contents of the request are successfully encrypted using the 
 22653        /// </summary>
 22654        public bool IsServerEncrypted { get; internal set; }
 22655
 22656        /// <summary>
 22657        /// The SHA-256 hash of the encryption key used to encrypt the metadata. This header is only returned when the m
 22658        /// </summary>
 22659        public string EncryptionKeySha256 { get; internal set; }
 22660
 22661        /// <summary>
 22662        /// Returns the name of the encryption scope used to encrypt the blob contents and application metadata.  Note t
 22663        /// </summary>
 22664        public string EncryptionScope { get; internal set; }
 22665
 22666        /// <summary>
 22667        /// Prevent direct instantiation of SetMetadataOperation instances.
 22668        /// You can use BlobsModelFactory.SetMetadataOperation instead.
 22669        /// </summary>
 22670        internal SetMetadataOperation() { }
 22671    }
 22672}
 22673#endregion class SetMetadataOperation
 22674
 22675#region enum SkuName
 22676namespace Azure.Storage.Blobs.Models
 22677{
 22678    /// <summary>
 22679    /// Identifies the sku name of the account
 22680    /// </summary>
 22681    public enum SkuName
 22682    {
 22683        /// <summary>
 22684        /// Standard_LRS
 22685        /// </summary>
 22686        StandardLrs,
 22687
 22688        /// <summary>
 22689        /// Standard_GRS
 22690        /// </summary>
 22691        StandardGrs,
 22692
 22693        /// <summary>
 22694        /// Standard_RAGRS
 22695        /// </summary>
 22696        StandardRagrs,
 22697
 22698        /// <summary>
 22699        /// Standard_ZRS
 22700        /// </summary>
 22701        StandardZrs,
 22702
 22703        /// <summary>
 22704        /// Premium_LRS
 22705        /// </summary>
 22706        PremiumLrs
 22707    }
 22708}
 22709
 22710namespace Azure.Storage.Blobs
 22711{
 22712    internal static partial class BlobRestClient
 22713    {
 22714        public static partial class Serialization
 22715        {
 22716            public static string ToString(Azure.Storage.Blobs.Models.SkuName value)
 22717            {
 022718                return value switch
 022719                {
 022720                    Azure.Storage.Blobs.Models.SkuName.StandardLrs => "Standard_LRS",
 022721                    Azure.Storage.Blobs.Models.SkuName.StandardGrs => "Standard_GRS",
 022722                    Azure.Storage.Blobs.Models.SkuName.StandardRagrs => "Standard_RAGRS",
 022723                    Azure.Storage.Blobs.Models.SkuName.StandardZrs => "Standard_ZRS",
 022724                    Azure.Storage.Blobs.Models.SkuName.PremiumLrs => "Premium_LRS",
 022725                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 022726                };
 22727            }
 22728
 22729            public static Azure.Storage.Blobs.Models.SkuName ParseSkuName(string value)
 22730            {
 2022731                return value switch
 2022732                {
 022733                    "Standard_LRS" => Azure.Storage.Blobs.Models.SkuName.StandardLrs,
 822734                    "Standard_GRS" => Azure.Storage.Blobs.Models.SkuName.StandardGrs,
 3222735                    "Standard_RAGRS" => Azure.Storage.Blobs.Models.SkuName.StandardRagrs,
 022736                    "Standard_ZRS" => Azure.Storage.Blobs.Models.SkuName.StandardZrs,
 022737                    "Premium_LRS" => Azure.Storage.Blobs.Models.SkuName.PremiumLrs,
 022738                    _ => throw new System.ArgumentOutOfRangeException(nameof(value), value, "Unknown Azure.Storage.Blobs
 2022739                };
 22740            }
 22741        }
 22742    }
 22743}
 22744#endregion enum SkuName
 22745
 22746#region class StorageError
 22747namespace Azure.Storage.Blobs.Models
 22748{
 22749    /// <summary>
 22750    /// StorageError
 22751    /// </summary>
 22752    internal partial class StorageError
 22753    {
 22754        /// <summary>
 22755        /// Message
 22756        /// </summary>
 22757        public string Message { get; internal set; }
 22758
 22759        /// <summary>
 22760        /// Code
 22761        /// </summary>
 22762        public string Code { get; internal set; }
 22763
 22764        /// <summary>
 22765        /// Prevent direct instantiation of StorageError instances.
 22766        /// You can use BlobsModelFactory.StorageError instead.
 22767        /// </summary>
 22768        internal StorageError() { }
 22769
 22770        /// <summary>
 22771        /// Deserializes XML into a new StorageError instance.
 22772        /// </summary>
 22773        /// <param name="element">The XML element to deserialize.</param>
 22774        /// <returns>A deserialized StorageError instance.</returns>
 22775        internal static Azure.Storage.Blobs.Models.StorageError FromXml(System.Xml.Linq.XElement element)
 22776        {
 22777            System.Diagnostics.Debug.Assert(element != null);
 22778            System.Xml.Linq.XElement _child;
 22779            Azure.Storage.Blobs.Models.StorageError _value = new Azure.Storage.Blobs.Models.StorageError();
 22780            _child = element.Element(System.Xml.Linq.XName.Get("Message", ""));
 22781            if (_child != null)
 22782            {
 22783                _value.Message = _child.Value;
 22784            }
 22785            _child = element.Element(System.Xml.Linq.XName.Get("Code", ""));
 22786            if (_child != null)
 22787            {
 22788                _value.Code = _child.Value;
 22789            }
 22790            CustomizeFromXml(element, _value);
 22791            return _value;
 22792        }
 22793
 22794        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.StorageError v
 22795    }
 22796}
 22797#endregion class StorageError
 22798
 22799#region class UserDelegationKey
 22800namespace Azure.Storage.Blobs.Models
 22801{
 22802    /// <summary>
 22803    /// A user delegation key
 22804    /// </summary>
 22805    public partial class UserDelegationKey
 22806    {
 22807        /// <summary>
 22808        /// The Azure Active Directory object ID in GUID format.
 22809        /// </summary>
 22810        public string SignedObjectId { get; internal set; }
 22811
 22812        /// <summary>
 22813        /// The Azure Active Directory tenant ID in GUID format
 22814        /// </summary>
 22815        public string SignedTenantId { get; internal set; }
 22816
 22817        /// <summary>
 22818        /// Abbreviation of the Azure Storage service that accepts the key
 22819        /// </summary>
 22820        public string SignedService { get; internal set; }
 22821
 22822        /// <summary>
 22823        /// The service version that created the key
 22824        /// </summary>
 22825        public string SignedVersion { get; internal set; }
 22826
 22827        /// <summary>
 22828        /// The key as a base64 string
 22829        /// </summary>
 22830        public string Value { get; internal set; }
 22831
 22832        /// <summary>
 22833        /// The date-time the key expires
 22834        /// </summary>
 22835        public System.DateTimeOffset SignedExpiresOn { get; internal set; }
 22836
 22837        /// <summary>
 22838        /// The date-time the key is active
 22839        /// </summary>
 22840        public System.DateTimeOffset SignedStartsOn { get; internal set; }
 22841
 22842        /// <summary>
 22843        /// Prevent direct instantiation of UserDelegationKey instances.
 22844        /// You can use BlobsModelFactory.UserDelegationKey instead.
 22845        /// </summary>
 22846        internal UserDelegationKey() { }
 22847
 22848        /// <summary>
 22849        /// Deserializes XML into a new UserDelegationKey instance.
 22850        /// </summary>
 22851        /// <param name="element">The XML element to deserialize.</param>
 22852        /// <returns>A deserialized UserDelegationKey instance.</returns>
 22853        internal static Azure.Storage.Blobs.Models.UserDelegationKey FromXml(System.Xml.Linq.XElement element)
 22854        {
 22855            System.Diagnostics.Debug.Assert(element != null);
 22856            System.Xml.Linq.XElement _child;
 22857            Azure.Storage.Blobs.Models.UserDelegationKey _value = new Azure.Storage.Blobs.Models.UserDelegationKey();
 22858            _child = element.Element(System.Xml.Linq.XName.Get("SignedOid", ""));
 22859            if (_child != null)
 22860            {
 22861                _value.SignedObjectId = _child.Value;
 22862            }
 22863            _child = element.Element(System.Xml.Linq.XName.Get("SignedTid", ""));
 22864            if (_child != null)
 22865            {
 22866                _value.SignedTenantId = _child.Value;
 22867            }
 22868            _child = element.Element(System.Xml.Linq.XName.Get("SignedService", ""));
 22869            if (_child != null)
 22870            {
 22871                _value.SignedService = _child.Value;
 22872            }
 22873            _child = element.Element(System.Xml.Linq.XName.Get("SignedVersion", ""));
 22874            if (_child != null)
 22875            {
 22876                _value.SignedVersion = _child.Value;
 22877            }
 22878            _child = element.Element(System.Xml.Linq.XName.Get("Value", ""));
 22879            if (_child != null)
 22880            {
 22881                _value.Value = _child.Value;
 22882            }
 22883            _child = element.Element(System.Xml.Linq.XName.Get("SignedExpiry", ""));
 22884            if (_child != null)
 22885            {
 22886                _value.SignedExpiresOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Inva
 22887            }
 22888            _child = element.Element(System.Xml.Linq.XName.Get("SignedStart", ""));
 22889            if (_child != null)
 22890            {
 22891                _value.SignedStartsOn = System.DateTimeOffset.Parse(_child.Value, System.Globalization.CultureInfo.Invar
 22892            }
 22893            CustomizeFromXml(element, _value);
 22894            return _value;
 22895        }
 22896
 22897        static partial void CustomizeFromXml(System.Xml.Linq.XElement element, Azure.Storage.Blobs.Models.UserDelegation
 22898    }
 22899
 22900    /// <summary>
 22901    /// BlobsModelFactory provides utilities for mocking.
 22902    /// </summary>
 22903    public static partial class BlobsModelFactory
 22904    {
 22905        /// <summary>
 22906        /// Creates a new UserDelegationKey instance for mocking.
 22907        /// </summary>
 22908        public static UserDelegationKey UserDelegationKey(
 22909            string signedObjectId,
 22910            string signedTenantId,
 22911            string signedService,
 22912            string signedVersion,
 22913            string value,
 22914            System.DateTimeOffset signedExpiresOn,
 22915            System.DateTimeOffset signedStartsOn)
 22916        {
 22917            return new UserDelegationKey()
 22918            {
 22919                SignedObjectId = signedObjectId,
 22920                SignedTenantId = signedTenantId,
 22921                SignedService = signedService,
 22922                SignedVersion = signedVersion,
 22923                Value = value,
 22924                SignedExpiresOn = signedExpiresOn,
 22925                SignedStartsOn = signedStartsOn,
 22926            };
 22927        }
 22928    }
 22929}
 22930#endregion class UserDelegationKey
 22931#endregion Models
 22932

Methods/Properties

SetPropertiesAsync()
SetPropertiesAsync_CreateMessage(...)
SetPropertiesAsync_CreateResponse(...)
GetPropertiesAsync()
GetPropertiesAsync_CreateMessage(...)
GetPropertiesAsync_CreateResponse(...)
GetStatisticsAsync()
GetStatisticsAsync_CreateMessage(...)
GetStatisticsAsync_CreateResponse(...)
ListBlobContainersSegmentAsync()
ListBlobContainersSegmentAsync_CreateMessage(...)
ListBlobContainersSegmentAsync_CreateResponse(...)
GetUserDelegationKeyAsync()
GetUserDelegationKeyAsync_CreateMessage(...)
GetUserDelegationKeyAsync_CreateResponse(...)
GetAccountInfoAsync()
GetAccountInfoAsync_CreateMessage(...)
GetAccountInfoAsync_CreateResponse(...)
SubmitBatchAsync()
SubmitBatchAsync_CreateMessage(...)
SubmitBatchAsync_CreateResponse(...)
FilterBlobsAsync()
FilterBlobsAsync_CreateMessage(...)
FilterBlobsAsync_CreateResponse(...)
CreateAsync()
CreateAsync_CreateMessage(...)
CreateAsync_CreateResponse(...)
GetPropertiesAsync()
GetPropertiesAsync_CreateMessage(...)
GetPropertiesAsync_CreateResponse(...)
DeleteAsync()
DeleteAsync_CreateMessage(...)
DeleteAsync_CreateResponse(...)
SetMetadataAsync()
SetMetadataAsync_CreateMessage(...)
SetMetadataAsync_CreateResponse(...)
GetAccessPolicyAsync()
GetAccessPolicyAsync_CreateMessage(...)
GetAccessPolicyAsync_CreateResponse(...)
SetAccessPolicyAsync()
SetAccessPolicyAsync_CreateMessage(...)
SetAccessPolicyAsync_CreateResponse(...)
RestoreAsync()
RestoreAsync_CreateMessage(...)
RestoreAsync_CreateResponse(...)
AcquireLeaseAsync()
AcquireLeaseAsync_CreateMessage(...)
AcquireLeaseAsync_CreateResponse(...)
ReleaseLeaseAsync()
ReleaseLeaseAsync_CreateMessage(...)
ReleaseLeaseAsync_CreateResponse(...)
RenewLeaseAsync()
RenewLeaseAsync_CreateMessage(...)
RenewLeaseAsync_CreateResponse(...)
BreakLeaseAsync()
BreakLeaseAsync_CreateMessage(...)
BreakLeaseAsync_CreateResponse(...)
ChangeLeaseAsync()
ChangeLeaseAsync_CreateMessage(...)
ChangeLeaseAsync_CreateResponse(...)
ListBlobsFlatSegmentAsync()
ListBlobsFlatSegmentAsync_CreateMessage(...)
ListBlobsFlatSegmentAsync_CreateResponse(...)
ListBlobsHierarchySegmentAsync()
ListBlobsHierarchySegmentAsync_CreateMessage(...)
ListBlobsHierarchySegmentAsync_CreateResponse(...)
DownloadAsync()
DownloadAsync_CreateMessage(...)
DownloadAsync_CreateResponse(...)
GetPropertiesAsync()
GetPropertiesAsync_CreateMessage(...)
GetPropertiesAsync_CreateResponse(...)
DeleteAsync()
DeleteAsync_CreateMessage(...)
DeleteAsync_CreateResponse(...)
SetAccessControlAsync()
SetAccessControlAsync_CreateMessage(...)
SetAccessControlAsync_CreateResponse(...)
GetAccessControlAsync()
GetAccessControlAsync_CreateMessage(...)
GetAccessControlAsync_CreateResponse(...)
RenameAsync()
RenameAsync_CreateMessage(...)
RenameAsync_CreateResponse(...)
UndeleteAsync()
UndeleteAsync_CreateMessage(...)
UndeleteAsync_CreateResponse(...)
SetExpiryAsync()
SetExpiryAsync_CreateMessage(...)
SetExpiryAsync_CreateResponse(...)
SetHttpHeadersAsync()
SetHttpHeadersAsync_CreateMessage(...)
SetHttpHeadersAsync_CreateResponse(...)
SetMetadataAsync()
SetMetadataAsync_CreateMessage(...)
SetMetadataAsync_CreateResponse(...)
AcquireLeaseAsync()
AcquireLeaseAsync_CreateMessage(...)
AcquireLeaseAsync_CreateResponse(...)
ReleaseLeaseAsync()
ReleaseLeaseAsync_CreateMessage(...)
ReleaseLeaseAsync_CreateResponse(...)
RenewLeaseAsync()
RenewLeaseAsync_CreateMessage(...)
RenewLeaseAsync_CreateResponse(...)
ChangeLeaseAsync()
ChangeLeaseAsync_CreateMessage(...)
ChangeLeaseAsync_CreateResponse(...)
BreakLeaseAsync()
BreakLeaseAsync_CreateMessage(...)
BreakLeaseAsync_CreateResponse(...)
CreateSnapshotAsync()
CreateSnapshotAsync_CreateMessage(...)
CreateSnapshotAsync_CreateResponse(...)
StartCopyFromUriAsync()
StartCopyFromUriAsync_CreateMessage(...)
StartCopyFromUriAsync_CreateResponse(...)
CopyFromUriAsync()
CopyFromUriAsync_CreateMessage(...)
CopyFromUriAsync_CreateResponse(...)
AbortCopyFromUriAsync()
AbortCopyFromUriAsync_CreateMessage(...)
AbortCopyFromUriAsync_CreateResponse(...)
SetAccessTierAsync()
SetAccessTierAsync_CreateMessage(...)
SetAccessTierAsync_CreateResponse(...)
QueryAsync()
QueryAsync_CreateMessage(...)
QueryAsync_CreateResponse(...)
GetTagsAsync()
GetTagsAsync_CreateMessage(...)
GetTagsAsync_CreateResponse(...)
SetTagsAsync()
SetTagsAsync_CreateMessage(...)
SetTagsAsync_CreateResponse(...)
CreateAsync()
CreateAsync_CreateMessage(...)
CreateAsync_CreateResponse(...)
UploadPagesAsync()
UploadPagesAsync_CreateMessage(...)
UploadPagesAsync_CreateResponse(...)
ClearPagesAsync()
ClearPagesAsync_CreateMessage(...)
ClearPagesAsync_CreateResponse(...)
UploadPagesFromUriAsync()
UploadPagesFromUriAsync_CreateMessage(...)
UploadPagesFromUriAsync_CreateResponse(...)
GetPageRangesAsync()
GetPageRangesAsync_CreateMessage(...)
GetPageRangesAsync_CreateResponse(...)
GetPageRangesDiffAsync()
GetPageRangesDiffAsync_CreateMessage(...)
GetPageRangesDiffAsync_CreateResponse(...)
ResizeAsync()
ResizeAsync_CreateMessage(...)
ResizeAsync_CreateResponse(...)
UpdateSequenceNumberAsync()
UpdateSequenceNumberAsync_CreateMessage(...)
UpdateSequenceNumberAsync_CreateResponse(...)
CopyIncrementalAsync()
CopyIncrementalAsync_CreateMessage(...)
CopyIncrementalAsync_CreateResponse(...)
CreateAsync()
CreateAsync_CreateMessage(...)
CreateAsync_CreateResponse(...)
AppendBlockAsync()
AppendBlockAsync_CreateMessage(...)
AppendBlockAsync_CreateResponse(...)
AppendBlockFromUriAsync()
AppendBlockFromUriAsync_CreateMessage(...)
AppendBlockFromUriAsync_CreateResponse(...)
SealAsync()
SealAsync_CreateMessage(...)
SealAsync_CreateResponse(...)
UploadAsync()
UploadAsync_CreateMessage(...)
UploadAsync_CreateResponse(...)
StageBlockAsync()
StageBlockAsync_CreateMessage(...)
StageBlockAsync_CreateResponse(...)
StageBlockFromUriAsync()
StageBlockFromUriAsync_CreateMessage(...)
StageBlockFromUriAsync_CreateResponse(...)
CommitBlockListAsync()
CommitBlockListAsync_CreateMessage(...)
CommitBlockListAsync_CreateResponse(...)
GetBlockListAsync()
GetBlockListAsync_CreateMessage(...)
GetBlockListAsync_CreateResponse(...)
CreateAsync()
CreateAsync_CreateMessage(...)
CreateAsync_CreateResponse(...)
RenameAsync()
RenameAsync_CreateMessage(...)
RenameAsync_CreateResponse(...)
DeleteAsync()
DeleteAsync_CreateMessage(...)
DeleteAsync_CreateResponse(...)
SetAccessControlAsync()
SetAccessControlAsync_CreateMessage(...)
SetAccessControlAsync_CreateResponse(...)
GetAccessControlAsync()
GetAccessControlAsync_CreateMessage(...)
GetAccessControlAsync_CreateResponse(...)
ToString(...)
ParseArchiveStatus(...)
ToString(...)
ParseBlobGeoReplicationStatus(...)
ToString(...)
ParseBlobType(...)
ToString(...)
ParseBlockListType(...)
ToString(...)
ParseCopyStatus(...)
ToString(...)
ParseDeleteSnapshotsOption(...)
ToString(...)
ParseEncryptionAlgorithmType(...)
ToString(...)
ParseLeaseDurationType(...)
ToString(...)
ParseLeaseState(...)
ToString(...)
ParseLeaseStatus(...)
ToString(...)
ParseListBlobsIncludeItem(...)
ToString(...)
ParseListContainersIncludeType(...)
ToString(...)
ParsePathRenameMode(...)
ToString(...)
ParsePublicAccessType(...)
ToString(...)
ParseQueryFormatType(...)
ToString(...)
ParseSequenceNumberAction(...)
ToString(...)
ParseSkuName(...)