< Summary

Class:Azure.ResourceManager.Storage.QueueRestOperations
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\QueueRestOperations.cs
Covered lines:0
Uncovered lines:309
Coverable lines:309
Total lines:690
Line coverage:0% (0 of 309)
Covered branches:0
Total branches:130
Branch coverage:0% (0 of 130)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
CreateCreateRequest(...)-0%100%
CreateAsync()-0%0%
Create(...)-0%0%
CreateUpdateRequest(...)-0%100%
UpdateAsync()-0%0%
Update(...)-0%0%
CreateGetRequest(...)-0%100%
GetAsync()-0%0%
Get(...)-0%0%
CreateDeleteRequest(...)-0%100%
DeleteAsync()-0%0%
Delete(...)-0%0%
CreateListRequest(...)-0%0%
ListAsync()-0%0%
List(...)-0%0%
CreateListNextPageRequest(...)-0%100%
ListNextPageAsync()-0%0%
ListNextPage(...)-0%0%

File(s)

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

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Text.Json;
 10using System.Threading;
 11using System.Threading.Tasks;
 12using Azure;
 13using Azure.Core;
 14using Azure.Core.Pipeline;
 15using Azure.ResourceManager.Storage.Models;
 16
 17namespace Azure.ResourceManager.Storage
 18{
 19    internal partial class QueueRestOperations
 20    {
 21        private string subscriptionId;
 22        private Uri endpoint;
 23        private string apiVersion;
 24        private ClientDiagnostics _clientDiagnostics;
 25        private HttpPipeline _pipeline;
 26
 27        /// <summary> Initializes a new instance of QueueRestOperations. </summary>
 28        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 29        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 30        /// <param name="subscriptionId"> The ID of the target subscription. </param>
 31        /// <param name="endpoint"> server parameter. </param>
 32        /// <param name="apiVersion"> Api Version. </param>
 33        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception
 034        public QueueRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Ur
 35        {
 036            if (subscriptionId == null)
 37            {
 038                throw new ArgumentNullException(nameof(subscriptionId));
 39            }
 040            endpoint ??= new Uri("https://management.azure.com");
 041            if (apiVersion == null)
 42            {
 043                throw new ArgumentNullException(nameof(apiVersion));
 44            }
 45
 046            this.subscriptionId = subscriptionId;
 047            this.endpoint = endpoint;
 048            this.apiVersion = apiVersion;
 049            _clientDiagnostics = clientDiagnostics;
 050            _pipeline = pipeline;
 051        }
 52
 53        internal HttpMessage CreateCreateRequest(string resourceGroupName, string accountName, string queueName, Storage
 54        {
 055            var message = _pipeline.CreateMessage();
 056            var request = message.Request;
 057            request.Method = RequestMethod.Put;
 058            var uri = new RawRequestUriBuilder();
 059            uri.Reset(endpoint);
 060            uri.AppendPath("/subscriptions/", false);
 061            uri.AppendPath(subscriptionId, true);
 062            uri.AppendPath("/resourceGroups/", false);
 063            uri.AppendPath(resourceGroupName, true);
 064            uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false);
 065            uri.AppendPath(accountName, true);
 066            uri.AppendPath("/queueServices/default/queues/", false);
 067            uri.AppendPath(queueName, true);
 068            uri.AppendQuery("api-version", apiVersion, true);
 069            request.Uri = uri;
 070            request.Headers.Add("Content-Type", "application/json");
 071            var content = new Utf8JsonRequestContent();
 072            content.JsonWriter.WriteObjectValue(queue);
 073            request.Content = content;
 074            return message;
 75        }
 76
 77        /// <summary> Creates a new queue with the specified queue name, under the specified account. </summary>
 78        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 79        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 80        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 81        /// <param name="queue"> Queue properties and metadata to be created with. </param>
 82        /// <param name="cancellationToken"> The cancellation token to use. </param>
 83        public async Task<Response<StorageQueue>> CreateAsync(string resourceGroupName, string accountName, string queue
 84        {
 085            if (resourceGroupName == null)
 86            {
 087                throw new ArgumentNullException(nameof(resourceGroupName));
 88            }
 089            if (accountName == null)
 90            {
 091                throw new ArgumentNullException(nameof(accountName));
 92            }
 093            if (queueName == null)
 94            {
 095                throw new ArgumentNullException(nameof(queueName));
 96            }
 097            if (queue == null)
 98            {
 099                throw new ArgumentNullException(nameof(queue));
 100            }
 101
 0102            using var message = CreateCreateRequest(resourceGroupName, accountName, queueName, queue);
 0103            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0104            switch (message.Response.Status)
 105            {
 106                case 200:
 107                    {
 0108                        StorageQueue value = default;
 0109                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0110                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 111                        {
 0112                            value = null;
 113                        }
 114                        else
 115                        {
 0116                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 117                        }
 0118                        return Response.FromValue(value, message.Response);
 119                    }
 120                default:
 0121                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 122            }
 0123        }
 124
 125        /// <summary> Creates a new queue with the specified queue name, under the specified account. </summary>
 126        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 127        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 128        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 129        /// <param name="queue"> Queue properties and metadata to be created with. </param>
 130        /// <param name="cancellationToken"> The cancellation token to use. </param>
 131        public Response<StorageQueue> Create(string resourceGroupName, string accountName, string queueName, StorageQueu
 132        {
 0133            if (resourceGroupName == null)
 134            {
 0135                throw new ArgumentNullException(nameof(resourceGroupName));
 136            }
 0137            if (accountName == null)
 138            {
 0139                throw new ArgumentNullException(nameof(accountName));
 140            }
 0141            if (queueName == null)
 142            {
 0143                throw new ArgumentNullException(nameof(queueName));
 144            }
 0145            if (queue == null)
 146            {
 0147                throw new ArgumentNullException(nameof(queue));
 148            }
 149
 0150            using var message = CreateCreateRequest(resourceGroupName, accountName, queueName, queue);
 0151            _pipeline.Send(message, cancellationToken);
 0152            switch (message.Response.Status)
 153            {
 154                case 200:
 155                    {
 0156                        StorageQueue value = default;
 0157                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0158                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 159                        {
 0160                            value = null;
 161                        }
 162                        else
 163                        {
 0164                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 165                        }
 0166                        return Response.FromValue(value, message.Response);
 167                    }
 168                default:
 0169                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 170            }
 0171        }
 172
 173        internal HttpMessage CreateUpdateRequest(string resourceGroupName, string accountName, string queueName, Storage
 174        {
 0175            var message = _pipeline.CreateMessage();
 0176            var request = message.Request;
 0177            request.Method = RequestMethod.Patch;
 0178            var uri = new RawRequestUriBuilder();
 0179            uri.Reset(endpoint);
 0180            uri.AppendPath("/subscriptions/", false);
 0181            uri.AppendPath(subscriptionId, true);
 0182            uri.AppendPath("/resourceGroups/", false);
 0183            uri.AppendPath(resourceGroupName, true);
 0184            uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false);
 0185            uri.AppendPath(accountName, true);
 0186            uri.AppendPath("/queueServices/default/queues/", false);
 0187            uri.AppendPath(queueName, true);
 0188            uri.AppendQuery("api-version", apiVersion, true);
 0189            request.Uri = uri;
 0190            request.Headers.Add("Content-Type", "application/json");
 0191            var content = new Utf8JsonRequestContent();
 0192            content.JsonWriter.WriteObjectValue(queue);
 0193            request.Content = content;
 0194            return message;
 195        }
 196
 197        /// <summary> Creates a new queue with the specified queue name, under the specified account. </summary>
 198        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 199        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 200        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 201        /// <param name="queue"> Queue properties and metadata to be created with. </param>
 202        /// <param name="cancellationToken"> The cancellation token to use. </param>
 203        public async Task<Response<StorageQueue>> UpdateAsync(string resourceGroupName, string accountName, string queue
 204        {
 0205            if (resourceGroupName == null)
 206            {
 0207                throw new ArgumentNullException(nameof(resourceGroupName));
 208            }
 0209            if (accountName == null)
 210            {
 0211                throw new ArgumentNullException(nameof(accountName));
 212            }
 0213            if (queueName == null)
 214            {
 0215                throw new ArgumentNullException(nameof(queueName));
 216            }
 0217            if (queue == null)
 218            {
 0219                throw new ArgumentNullException(nameof(queue));
 220            }
 221
 0222            using var message = CreateUpdateRequest(resourceGroupName, accountName, queueName, queue);
 0223            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0224            switch (message.Response.Status)
 225            {
 226                case 200:
 227                    {
 0228                        StorageQueue value = default;
 0229                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0230                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 231                        {
 0232                            value = null;
 233                        }
 234                        else
 235                        {
 0236                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 237                        }
 0238                        return Response.FromValue(value, message.Response);
 239                    }
 240                default:
 0241                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 242            }
 0243        }
 244
 245        /// <summary> Creates a new queue with the specified queue name, under the specified account. </summary>
 246        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 247        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 248        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 249        /// <param name="queue"> Queue properties and metadata to be created with. </param>
 250        /// <param name="cancellationToken"> The cancellation token to use. </param>
 251        public Response<StorageQueue> Update(string resourceGroupName, string accountName, string queueName, StorageQueu
 252        {
 0253            if (resourceGroupName == null)
 254            {
 0255                throw new ArgumentNullException(nameof(resourceGroupName));
 256            }
 0257            if (accountName == null)
 258            {
 0259                throw new ArgumentNullException(nameof(accountName));
 260            }
 0261            if (queueName == null)
 262            {
 0263                throw new ArgumentNullException(nameof(queueName));
 264            }
 0265            if (queue == null)
 266            {
 0267                throw new ArgumentNullException(nameof(queue));
 268            }
 269
 0270            using var message = CreateUpdateRequest(resourceGroupName, accountName, queueName, queue);
 0271            _pipeline.Send(message, cancellationToken);
 0272            switch (message.Response.Status)
 273            {
 274                case 200:
 275                    {
 0276                        StorageQueue value = default;
 0277                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0278                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 279                        {
 0280                            value = null;
 281                        }
 282                        else
 283                        {
 0284                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 285                        }
 0286                        return Response.FromValue(value, message.Response);
 287                    }
 288                default:
 0289                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 290            }
 0291        }
 292
 293        internal HttpMessage CreateGetRequest(string resourceGroupName, string accountName, string queueName)
 294        {
 0295            var message = _pipeline.CreateMessage();
 0296            var request = message.Request;
 0297            request.Method = RequestMethod.Get;
 0298            var uri = new RawRequestUriBuilder();
 0299            uri.Reset(endpoint);
 0300            uri.AppendPath("/subscriptions/", false);
 0301            uri.AppendPath(subscriptionId, true);
 0302            uri.AppendPath("/resourceGroups/", false);
 0303            uri.AppendPath(resourceGroupName, true);
 0304            uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false);
 0305            uri.AppendPath(accountName, true);
 0306            uri.AppendPath("/queueServices/default/queues/", false);
 0307            uri.AppendPath(queueName, true);
 0308            uri.AppendQuery("api-version", apiVersion, true);
 0309            request.Uri = uri;
 0310            return message;
 311        }
 312
 313        /// <summary> Gets the queue with the specified queue name, under the specified account if it exists. </summary>
 314        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 315        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 316        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 317        /// <param name="cancellationToken"> The cancellation token to use. </param>
 318        public async Task<Response<StorageQueue>> GetAsync(string resourceGroupName, string accountName, string queueNam
 319        {
 0320            if (resourceGroupName == null)
 321            {
 0322                throw new ArgumentNullException(nameof(resourceGroupName));
 323            }
 0324            if (accountName == null)
 325            {
 0326                throw new ArgumentNullException(nameof(accountName));
 327            }
 0328            if (queueName == null)
 329            {
 0330                throw new ArgumentNullException(nameof(queueName));
 331            }
 332
 0333            using var message = CreateGetRequest(resourceGroupName, accountName, queueName);
 0334            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0335            switch (message.Response.Status)
 336            {
 337                case 200:
 338                    {
 0339                        StorageQueue value = default;
 0340                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0341                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 342                        {
 0343                            value = null;
 344                        }
 345                        else
 346                        {
 0347                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 348                        }
 0349                        return Response.FromValue(value, message.Response);
 350                    }
 351                default:
 0352                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 353            }
 0354        }
 355
 356        /// <summary> Gets the queue with the specified queue name, under the specified account if it exists. </summary>
 357        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 358        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 359        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 360        /// <param name="cancellationToken"> The cancellation token to use. </param>
 361        public Response<StorageQueue> Get(string resourceGroupName, string accountName, string queueName, CancellationTo
 362        {
 0363            if (resourceGroupName == null)
 364            {
 0365                throw new ArgumentNullException(nameof(resourceGroupName));
 366            }
 0367            if (accountName == null)
 368            {
 0369                throw new ArgumentNullException(nameof(accountName));
 370            }
 0371            if (queueName == null)
 372            {
 0373                throw new ArgumentNullException(nameof(queueName));
 374            }
 375
 0376            using var message = CreateGetRequest(resourceGroupName, accountName, queueName);
 0377            _pipeline.Send(message, cancellationToken);
 0378            switch (message.Response.Status)
 379            {
 380                case 200:
 381                    {
 0382                        StorageQueue value = default;
 0383                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0384                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 385                        {
 0386                            value = null;
 387                        }
 388                        else
 389                        {
 0390                            value = StorageQueue.DeserializeStorageQueue(document.RootElement);
 391                        }
 0392                        return Response.FromValue(value, message.Response);
 393                    }
 394                default:
 0395                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 396            }
 0397        }
 398
 399        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string accountName, string queueName)
 400        {
 0401            var message = _pipeline.CreateMessage();
 0402            var request = message.Request;
 0403            request.Method = RequestMethod.Delete;
 0404            var uri = new RawRequestUriBuilder();
 0405            uri.Reset(endpoint);
 0406            uri.AppendPath("/subscriptions/", false);
 0407            uri.AppendPath(subscriptionId, true);
 0408            uri.AppendPath("/resourceGroups/", false);
 0409            uri.AppendPath(resourceGroupName, true);
 0410            uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false);
 0411            uri.AppendPath(accountName, true);
 0412            uri.AppendPath("/queueServices/default/queues/", false);
 0413            uri.AppendPath(queueName, true);
 0414            uri.AppendQuery("api-version", apiVersion, true);
 0415            request.Uri = uri;
 0416            return message;
 417        }
 418
 419        /// <summary> Deletes the queue with the specified queue name, under the specified account if it exists. </summa
 420        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 421        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 422        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 423        /// <param name="cancellationToken"> The cancellation token to use. </param>
 424        public async Task<Response> DeleteAsync(string resourceGroupName, string accountName, string queueName, Cancella
 425        {
 0426            if (resourceGroupName == null)
 427            {
 0428                throw new ArgumentNullException(nameof(resourceGroupName));
 429            }
 0430            if (accountName == null)
 431            {
 0432                throw new ArgumentNullException(nameof(accountName));
 433            }
 0434            if (queueName == null)
 435            {
 0436                throw new ArgumentNullException(nameof(queueName));
 437            }
 438
 0439            using var message = CreateDeleteRequest(resourceGroupName, accountName, queueName);
 0440            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0441            switch (message.Response.Status)
 442            {
 443                case 204:
 0444                    return message.Response;
 445                default:
 0446                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 447            }
 0448        }
 449
 450        /// <summary> Deletes the queue with the specified queue name, under the specified account if it exists. </summa
 451        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 452        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 453        /// <param name="queueName"> A queue name must be unique within a storage account and must be between 3 and 63 c
 454        /// <param name="cancellationToken"> The cancellation token to use. </param>
 455        public Response Delete(string resourceGroupName, string accountName, string queueName, CancellationToken cancell
 456        {
 0457            if (resourceGroupName == null)
 458            {
 0459                throw new ArgumentNullException(nameof(resourceGroupName));
 460            }
 0461            if (accountName == null)
 462            {
 0463                throw new ArgumentNullException(nameof(accountName));
 464            }
 0465            if (queueName == null)
 466            {
 0467                throw new ArgumentNullException(nameof(queueName));
 468            }
 469
 0470            using var message = CreateDeleteRequest(resourceGroupName, accountName, queueName);
 0471            _pipeline.Send(message, cancellationToken);
 0472            switch (message.Response.Status)
 473            {
 474                case 204:
 0475                    return message.Response;
 476                default:
 0477                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 478            }
 0479        }
 480
 481        internal HttpMessage CreateListRequest(string resourceGroupName, string accountName, string maxpagesize, string 
 482        {
 0483            var message = _pipeline.CreateMessage();
 0484            var request = message.Request;
 0485            request.Method = RequestMethod.Get;
 0486            var uri = new RawRequestUriBuilder();
 0487            uri.Reset(endpoint);
 0488            uri.AppendPath("/subscriptions/", false);
 0489            uri.AppendPath(subscriptionId, true);
 0490            uri.AppendPath("/resourceGroups/", false);
 0491            uri.AppendPath(resourceGroupName, true);
 0492            uri.AppendPath("/providers/Microsoft.Storage/storageAccounts/", false);
 0493            uri.AppendPath(accountName, true);
 0494            uri.AppendPath("/queueServices/default/queues", false);
 0495            uri.AppendQuery("api-version", apiVersion, true);
 0496            if (maxpagesize != null)
 497            {
 0498                uri.AppendQuery("$maxpagesize", maxpagesize, true);
 499            }
 0500            if (filter != null)
 501            {
 0502                uri.AppendQuery("$filter", filter, true);
 503            }
 0504            request.Uri = uri;
 0505            return message;
 506        }
 507
 508        /// <summary> Gets a list of all the queues under the specified storage account. </summary>
 509        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 510        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 511        /// <param name="maxpagesize"> Optional, a maximum number of queues that should be included in a list queue resp
 512        /// <param name="filter"> Optional, When specified, only the queues with a name starting with the given filter w
 513        /// <param name="cancellationToken"> The cancellation token to use. </param>
 514        public async Task<Response<ListQueueResource>> ListAsync(string resourceGroupName, string accountName, string ma
 515        {
 0516            if (resourceGroupName == null)
 517            {
 0518                throw new ArgumentNullException(nameof(resourceGroupName));
 519            }
 0520            if (accountName == null)
 521            {
 0522                throw new ArgumentNullException(nameof(accountName));
 523            }
 524
 0525            using var message = CreateListRequest(resourceGroupName, accountName, maxpagesize, filter);
 0526            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0527            switch (message.Response.Status)
 528            {
 529                case 200:
 530                    {
 0531                        ListQueueResource value = default;
 0532                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0533                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 534                        {
 0535                            value = null;
 536                        }
 537                        else
 538                        {
 0539                            value = ListQueueResource.DeserializeListQueueResource(document.RootElement);
 540                        }
 0541                        return Response.FromValue(value, message.Response);
 542                    }
 543                default:
 0544                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 545            }
 0546        }
 547
 548        /// <summary> Gets a list of all the queues under the specified storage account. </summary>
 549        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 550        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 551        /// <param name="maxpagesize"> Optional, a maximum number of queues that should be included in a list queue resp
 552        /// <param name="filter"> Optional, When specified, only the queues with a name starting with the given filter w
 553        /// <param name="cancellationToken"> The cancellation token to use. </param>
 554        public Response<ListQueueResource> List(string resourceGroupName, string accountName, string maxpagesize = null,
 555        {
 0556            if (resourceGroupName == null)
 557            {
 0558                throw new ArgumentNullException(nameof(resourceGroupName));
 559            }
 0560            if (accountName == null)
 561            {
 0562                throw new ArgumentNullException(nameof(accountName));
 563            }
 564
 0565            using var message = CreateListRequest(resourceGroupName, accountName, maxpagesize, filter);
 0566            _pipeline.Send(message, cancellationToken);
 0567            switch (message.Response.Status)
 568            {
 569                case 200:
 570                    {
 0571                        ListQueueResource value = default;
 0572                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0573                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 574                        {
 0575                            value = null;
 576                        }
 577                        else
 578                        {
 0579                            value = ListQueueResource.DeserializeListQueueResource(document.RootElement);
 580                        }
 0581                        return Response.FromValue(value, message.Response);
 582                    }
 583                default:
 0584                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 585            }
 0586        }
 587
 588        internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string accountName, st
 589        {
 0590            var message = _pipeline.CreateMessage();
 0591            var request = message.Request;
 0592            request.Method = RequestMethod.Get;
 0593            var uri = new RawRequestUriBuilder();
 0594            uri.Reset(endpoint);
 0595            uri.AppendRawNextLink(nextLink, false);
 0596            request.Uri = uri;
 0597            return message;
 598        }
 599
 600        /// <summary> Gets a list of all the queues under the specified storage account. </summary>
 601        /// <param name="nextLink"> The URL to the next page of results. </param>
 602        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 603        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 604        /// <param name="maxpagesize"> Optional, a maximum number of queues that should be included in a list queue resp
 605        /// <param name="filter"> Optional, When specified, only the queues with a name starting with the given filter w
 606        /// <param name="cancellationToken"> The cancellation token to use. </param>
 607        public async Task<Response<ListQueueResource>> ListNextPageAsync(string nextLink, string resourceGroupName, stri
 608        {
 0609            if (nextLink == null)
 610            {
 0611                throw new ArgumentNullException(nameof(nextLink));
 612            }
 0613            if (resourceGroupName == null)
 614            {
 0615                throw new ArgumentNullException(nameof(resourceGroupName));
 616            }
 0617            if (accountName == null)
 618            {
 0619                throw new ArgumentNullException(nameof(accountName));
 620            }
 621
 0622            using var message = CreateListNextPageRequest(nextLink, resourceGroupName, accountName, maxpagesize, filter)
 0623            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0624            switch (message.Response.Status)
 625            {
 626                case 200:
 627                    {
 0628                        ListQueueResource value = default;
 0629                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0630                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 631                        {
 0632                            value = null;
 633                        }
 634                        else
 635                        {
 0636                            value = ListQueueResource.DeserializeListQueueResource(document.RootElement);
 637                        }
 0638                        return Response.FromValue(value, message.Response);
 639                    }
 640                default:
 0641                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 642            }
 0643        }
 644
 645        /// <summary> Gets a list of all the queues under the specified storage account. </summary>
 646        /// <param name="nextLink"> The URL to the next page of results. </param>
 647        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 648        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 649        /// <param name="maxpagesize"> Optional, a maximum number of queues that should be included in a list queue resp
 650        /// <param name="filter"> Optional, When specified, only the queues with a name starting with the given filter w
 651        /// <param name="cancellationToken"> The cancellation token to use. </param>
 652        public Response<ListQueueResource> ListNextPage(string nextLink, string resourceGroupName, string accountName, s
 653        {
 0654            if (nextLink == null)
 655            {
 0656                throw new ArgumentNullException(nameof(nextLink));
 657            }
 0658            if (resourceGroupName == null)
 659            {
 0660                throw new ArgumentNullException(nameof(resourceGroupName));
 661            }
 0662            if (accountName == null)
 663            {
 0664                throw new ArgumentNullException(nameof(accountName));
 665            }
 666
 0667            using var message = CreateListNextPageRequest(nextLink, resourceGroupName, accountName, maxpagesize, filter)
 0668            _pipeline.Send(message, cancellationToken);
 0669            switch (message.Response.Status)
 670            {
 671                case 200:
 672                    {
 0673                        ListQueueResource value = default;
 0674                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0675                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 676                        {
 0677                            value = null;
 678                        }
 679                        else
 680                        {
 0681                            value = ListQueueResource.DeserializeListQueueResource(document.RootElement);
 682                        }
 0683                        return Response.FromValue(value, message.Response);
 684                    }
 685                default:
 0686                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 687            }
 0688        }
 689    }
 690}