< Summary

Class:Azure.ResourceManager.Network.ExpressRouteCircuitConnectionsRestOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ExpressRouteCircuitConnectionsRestOperations.cs
Covered lines:0
Uncovered lines:262
Coverable lines:262
Total lines:587
Line coverage:0% (0 of 262)
Covered branches:0
Total branches:124
Branch coverage:0% (0 of 124)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
CreateDeleteRequest(...)-0%100%
DeleteAsync()-0%0%
Delete(...)-0%0%
CreateGetRequest(...)-0%100%
GetAsync()-0%0%
Get(...)-0%0%
CreateCreateOrUpdateRequest(...)-0%100%
CreateOrUpdateAsync()-0%0%
CreateOrUpdate(...)-0%0%
CreateListRequest(...)-0%100%
ListAsync()-0%0%
List(...)-0%0%
CreateListNextPageRequest(...)-0%100%
ListNextPageAsync()-0%0%
ListNextPage(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ExpressRouteCircuitConnectionsRestOperations.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.Network.Models;
 16
 17namespace Azure.ResourceManager.Network
 18{
 19    internal partial class ExpressRouteCircuitConnectionsRestOperations
 20    {
 21        private string subscriptionId;
 22        private Uri endpoint;
 23        private ClientDiagnostics _clientDiagnostics;
 24        private HttpPipeline _pipeline;
 25
 26        /// <summary> Initializes a new instance of ExpressRouteCircuitConnectionsRestOperations. </summary>
 27        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 28        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 29        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 30        /// <param name="endpoint"> server parameter. </param>
 31        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception
 032        public ExpressRouteCircuitConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, 
 33        {
 034            if (subscriptionId == null)
 35            {
 036                throw new ArgumentNullException(nameof(subscriptionId));
 37            }
 038            endpoint ??= new Uri("https://management.azure.com");
 39
 040            this.subscriptionId = subscriptionId;
 041            this.endpoint = endpoint;
 042            _clientDiagnostics = clientDiagnostics;
 043            _pipeline = pipeline;
 044        }
 45
 46        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string circuitName, string peeringName, strin
 47        {
 048            var message = _pipeline.CreateMessage();
 049            var request = message.Request;
 050            request.Method = RequestMethod.Delete;
 051            var uri = new RawRequestUriBuilder();
 052            uri.Reset(endpoint);
 053            uri.AppendPath("/subscriptions/", false);
 054            uri.AppendPath(subscriptionId, true);
 055            uri.AppendPath("/resourceGroups/", false);
 056            uri.AppendPath(resourceGroupName, true);
 057            uri.AppendPath("/providers/Microsoft.Network/expressRouteCircuits/", false);
 058            uri.AppendPath(circuitName, true);
 059            uri.AppendPath("/peerings/", false);
 060            uri.AppendPath(peeringName, true);
 061            uri.AppendPath("/connections/", false);
 062            uri.AppendPath(connectionName, true);
 063            uri.AppendQuery("api-version", "2020-04-01", true);
 064            request.Uri = uri;
 065            return message;
 66        }
 67
 68        /// <summary> Deletes the specified Express Route Circuit Connection from the specified express route circuit. <
 69        /// <param name="resourceGroupName"> The name of the resource group. </param>
 70        /// <param name="circuitName"> The name of the express route circuit. </param>
 71        /// <param name="peeringName"> The name of the peering. </param>
 72        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 73        /// <param name="cancellationToken"> The cancellation token to use. </param>
 74        public async Task<Response> DeleteAsync(string resourceGroupName, string circuitName, string peeringName, string
 75        {
 076            if (resourceGroupName == null)
 77            {
 078                throw new ArgumentNullException(nameof(resourceGroupName));
 79            }
 080            if (circuitName == null)
 81            {
 082                throw new ArgumentNullException(nameof(circuitName));
 83            }
 084            if (peeringName == null)
 85            {
 086                throw new ArgumentNullException(nameof(peeringName));
 87            }
 088            if (connectionName == null)
 89            {
 090                throw new ArgumentNullException(nameof(connectionName));
 91            }
 92
 093            using var message = CreateDeleteRequest(resourceGroupName, circuitName, peeringName, connectionName);
 094            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 095            switch (message.Response.Status)
 96            {
 97                case 200:
 98                case 202:
 99                case 204:
 0100                    return message.Response;
 101                default:
 0102                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 103            }
 0104        }
 105
 106        /// <summary> Deletes the specified Express Route Circuit Connection from the specified express route circuit. <
 107        /// <param name="resourceGroupName"> The name of the resource group. </param>
 108        /// <param name="circuitName"> The name of the express route circuit. </param>
 109        /// <param name="peeringName"> The name of the peering. </param>
 110        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 111        /// <param name="cancellationToken"> The cancellation token to use. </param>
 112        public Response Delete(string resourceGroupName, string circuitName, string peeringName, string connectionName, 
 113        {
 0114            if (resourceGroupName == null)
 115            {
 0116                throw new ArgumentNullException(nameof(resourceGroupName));
 117            }
 0118            if (circuitName == null)
 119            {
 0120                throw new ArgumentNullException(nameof(circuitName));
 121            }
 0122            if (peeringName == null)
 123            {
 0124                throw new ArgumentNullException(nameof(peeringName));
 125            }
 0126            if (connectionName == null)
 127            {
 0128                throw new ArgumentNullException(nameof(connectionName));
 129            }
 130
 0131            using var message = CreateDeleteRequest(resourceGroupName, circuitName, peeringName, connectionName);
 0132            _pipeline.Send(message, cancellationToken);
 0133            switch (message.Response.Status)
 134            {
 135                case 200:
 136                case 202:
 137                case 204:
 0138                    return message.Response;
 139                default:
 0140                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 141            }
 0142        }
 143
 144        internal HttpMessage CreateGetRequest(string resourceGroupName, string circuitName, string peeringName, string c
 145        {
 0146            var message = _pipeline.CreateMessage();
 0147            var request = message.Request;
 0148            request.Method = RequestMethod.Get;
 0149            var uri = new RawRequestUriBuilder();
 0150            uri.Reset(endpoint);
 0151            uri.AppendPath("/subscriptions/", false);
 0152            uri.AppendPath(subscriptionId, true);
 0153            uri.AppendPath("/resourceGroups/", false);
 0154            uri.AppendPath(resourceGroupName, true);
 0155            uri.AppendPath("/providers/Microsoft.Network/expressRouteCircuits/", false);
 0156            uri.AppendPath(circuitName, true);
 0157            uri.AppendPath("/peerings/", false);
 0158            uri.AppendPath(peeringName, true);
 0159            uri.AppendPath("/connections/", false);
 0160            uri.AppendPath(connectionName, true);
 0161            uri.AppendQuery("api-version", "2020-04-01", true);
 0162            request.Uri = uri;
 0163            return message;
 164        }
 165
 166        /// <summary> Gets the specified Express Route Circuit Connection from the specified express route circuit. </su
 167        /// <param name="resourceGroupName"> The name of the resource group. </param>
 168        /// <param name="circuitName"> The name of the express route circuit. </param>
 169        /// <param name="peeringName"> The name of the peering. </param>
 170        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 171        /// <param name="cancellationToken"> The cancellation token to use. </param>
 172        public async Task<Response<ExpressRouteCircuitConnection>> GetAsync(string resourceGroupName, string circuitName
 173        {
 0174            if (resourceGroupName == null)
 175            {
 0176                throw new ArgumentNullException(nameof(resourceGroupName));
 177            }
 0178            if (circuitName == null)
 179            {
 0180                throw new ArgumentNullException(nameof(circuitName));
 181            }
 0182            if (peeringName == null)
 183            {
 0184                throw new ArgumentNullException(nameof(peeringName));
 185            }
 0186            if (connectionName == null)
 187            {
 0188                throw new ArgumentNullException(nameof(connectionName));
 189            }
 190
 0191            using var message = CreateGetRequest(resourceGroupName, circuitName, peeringName, connectionName);
 0192            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0193            switch (message.Response.Status)
 194            {
 195                case 200:
 196                    {
 0197                        ExpressRouteCircuitConnection value = default;
 0198                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0199                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 200                        {
 0201                            value = null;
 202                        }
 203                        else
 204                        {
 0205                            value = ExpressRouteCircuitConnection.DeserializeExpressRouteCircuitConnection(document.Root
 206                        }
 0207                        return Response.FromValue(value, message.Response);
 208                    }
 209                default:
 0210                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 211            }
 0212        }
 213
 214        /// <summary> Gets the specified Express Route Circuit Connection from the specified express route circuit. </su
 215        /// <param name="resourceGroupName"> The name of the resource group. </param>
 216        /// <param name="circuitName"> The name of the express route circuit. </param>
 217        /// <param name="peeringName"> The name of the peering. </param>
 218        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 219        /// <param name="cancellationToken"> The cancellation token to use. </param>
 220        public Response<ExpressRouteCircuitConnection> Get(string resourceGroupName, string circuitName, string peeringN
 221        {
 0222            if (resourceGroupName == null)
 223            {
 0224                throw new ArgumentNullException(nameof(resourceGroupName));
 225            }
 0226            if (circuitName == null)
 227            {
 0228                throw new ArgumentNullException(nameof(circuitName));
 229            }
 0230            if (peeringName == null)
 231            {
 0232                throw new ArgumentNullException(nameof(peeringName));
 233            }
 0234            if (connectionName == null)
 235            {
 0236                throw new ArgumentNullException(nameof(connectionName));
 237            }
 238
 0239            using var message = CreateGetRequest(resourceGroupName, circuitName, peeringName, connectionName);
 0240            _pipeline.Send(message, cancellationToken);
 0241            switch (message.Response.Status)
 242            {
 243                case 200:
 244                    {
 0245                        ExpressRouteCircuitConnection value = default;
 0246                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0247                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 248                        {
 0249                            value = null;
 250                        }
 251                        else
 252                        {
 0253                            value = ExpressRouteCircuitConnection.DeserializeExpressRouteCircuitConnection(document.Root
 254                        }
 0255                        return Response.FromValue(value, message.Response);
 256                    }
 257                default:
 0258                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 259            }
 0260        }
 261
 262        internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string circuitName, string peeringNam
 263        {
 0264            var message = _pipeline.CreateMessage();
 0265            var request = message.Request;
 0266            request.Method = RequestMethod.Put;
 0267            var uri = new RawRequestUriBuilder();
 0268            uri.Reset(endpoint);
 0269            uri.AppendPath("/subscriptions/", false);
 0270            uri.AppendPath(subscriptionId, true);
 0271            uri.AppendPath("/resourceGroups/", false);
 0272            uri.AppendPath(resourceGroupName, true);
 0273            uri.AppendPath("/providers/Microsoft.Network/expressRouteCircuits/", false);
 0274            uri.AppendPath(circuitName, true);
 0275            uri.AppendPath("/peerings/", false);
 0276            uri.AppendPath(peeringName, true);
 0277            uri.AppendPath("/connections/", false);
 0278            uri.AppendPath(connectionName, true);
 0279            uri.AppendQuery("api-version", "2020-04-01", true);
 0280            request.Uri = uri;
 0281            request.Headers.Add("Content-Type", "application/json");
 0282            var content = new Utf8JsonRequestContent();
 0283            content.JsonWriter.WriteObjectValue(expressRouteCircuitConnectionParameters);
 0284            request.Content = content;
 0285            return message;
 286        }
 287
 288        /// <summary> Creates or updates a Express Route Circuit Connection in the specified express route circuits. </s
 289        /// <param name="resourceGroupName"> The name of the resource group. </param>
 290        /// <param name="circuitName"> The name of the express route circuit. </param>
 291        /// <param name="peeringName"> The name of the peering. </param>
 292        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 293        /// <param name="expressRouteCircuitConnectionParameters"> Parameters supplied to the create or update express r
 294        /// <param name="cancellationToken"> The cancellation token to use. </param>
 295        public async Task<Response> CreateOrUpdateAsync(string resourceGroupName, string circuitName, string peeringName
 296        {
 0297            if (resourceGroupName == null)
 298            {
 0299                throw new ArgumentNullException(nameof(resourceGroupName));
 300            }
 0301            if (circuitName == null)
 302            {
 0303                throw new ArgumentNullException(nameof(circuitName));
 304            }
 0305            if (peeringName == null)
 306            {
 0307                throw new ArgumentNullException(nameof(peeringName));
 308            }
 0309            if (connectionName == null)
 310            {
 0311                throw new ArgumentNullException(nameof(connectionName));
 312            }
 0313            if (expressRouteCircuitConnectionParameters == null)
 314            {
 0315                throw new ArgumentNullException(nameof(expressRouteCircuitConnectionParameters));
 316            }
 317
 0318            using var message = CreateCreateOrUpdateRequest(resourceGroupName, circuitName, peeringName, connectionName,
 0319            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0320            switch (message.Response.Status)
 321            {
 322                case 200:
 323                case 201:
 0324                    return message.Response;
 325                default:
 0326                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 327            }
 0328        }
 329
 330        /// <summary> Creates or updates a Express Route Circuit Connection in the specified express route circuits. </s
 331        /// <param name="resourceGroupName"> The name of the resource group. </param>
 332        /// <param name="circuitName"> The name of the express route circuit. </param>
 333        /// <param name="peeringName"> The name of the peering. </param>
 334        /// <param name="connectionName"> The name of the express route circuit connection. </param>
 335        /// <param name="expressRouteCircuitConnectionParameters"> Parameters supplied to the create or update express r
 336        /// <param name="cancellationToken"> The cancellation token to use. </param>
 337        public Response CreateOrUpdate(string resourceGroupName, string circuitName, string peeringName, string connecti
 338        {
 0339            if (resourceGroupName == null)
 340            {
 0341                throw new ArgumentNullException(nameof(resourceGroupName));
 342            }
 0343            if (circuitName == null)
 344            {
 0345                throw new ArgumentNullException(nameof(circuitName));
 346            }
 0347            if (peeringName == null)
 348            {
 0349                throw new ArgumentNullException(nameof(peeringName));
 350            }
 0351            if (connectionName == null)
 352            {
 0353                throw new ArgumentNullException(nameof(connectionName));
 354            }
 0355            if (expressRouteCircuitConnectionParameters == null)
 356            {
 0357                throw new ArgumentNullException(nameof(expressRouteCircuitConnectionParameters));
 358            }
 359
 0360            using var message = CreateCreateOrUpdateRequest(resourceGroupName, circuitName, peeringName, connectionName,
 0361            _pipeline.Send(message, cancellationToken);
 0362            switch (message.Response.Status)
 363            {
 364                case 200:
 365                case 201:
 0366                    return message.Response;
 367                default:
 0368                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 369            }
 0370        }
 371
 372        internal HttpMessage CreateListRequest(string resourceGroupName, string circuitName, string peeringName)
 373        {
 0374            var message = _pipeline.CreateMessage();
 0375            var request = message.Request;
 0376            request.Method = RequestMethod.Get;
 0377            var uri = new RawRequestUriBuilder();
 0378            uri.Reset(endpoint);
 0379            uri.AppendPath("/subscriptions/", false);
 0380            uri.AppendPath(subscriptionId, true);
 0381            uri.AppendPath("/resourceGroups/", false);
 0382            uri.AppendPath(resourceGroupName, true);
 0383            uri.AppendPath("/providers/Microsoft.Network/expressRouteCircuits/", false);
 0384            uri.AppendPath(circuitName, true);
 0385            uri.AppendPath("/peerings/", false);
 0386            uri.AppendPath(peeringName, true);
 0387            uri.AppendPath("/connections", false);
 0388            uri.AppendQuery("api-version", "2020-04-01", true);
 0389            request.Uri = uri;
 0390            return message;
 391        }
 392
 393        /// <summary> Gets all global reach connections associated with a private peering in an express route circuit. <
 394        /// <param name="resourceGroupName"> The name of the resource group. </param>
 395        /// <param name="circuitName"> The name of the circuit. </param>
 396        /// <param name="peeringName"> The name of the peering. </param>
 397        /// <param name="cancellationToken"> The cancellation token to use. </param>
 398        public async Task<Response<ExpressRouteCircuitConnectionListResult>> ListAsync(string resourceGroupName, string 
 399        {
 0400            if (resourceGroupName == null)
 401            {
 0402                throw new ArgumentNullException(nameof(resourceGroupName));
 403            }
 0404            if (circuitName == null)
 405            {
 0406                throw new ArgumentNullException(nameof(circuitName));
 407            }
 0408            if (peeringName == null)
 409            {
 0410                throw new ArgumentNullException(nameof(peeringName));
 411            }
 412
 0413            using var message = CreateListRequest(resourceGroupName, circuitName, peeringName);
 0414            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0415            switch (message.Response.Status)
 416            {
 417                case 200:
 418                    {
 0419                        ExpressRouteCircuitConnectionListResult value = default;
 0420                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0421                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 422                        {
 0423                            value = null;
 424                        }
 425                        else
 426                        {
 0427                            value = ExpressRouteCircuitConnectionListResult.DeserializeExpressRouteCircuitConnectionList
 428                        }
 0429                        return Response.FromValue(value, message.Response);
 430                    }
 431                default:
 0432                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 433            }
 0434        }
 435
 436        /// <summary> Gets all global reach connections associated with a private peering in an express route circuit. <
 437        /// <param name="resourceGroupName"> The name of the resource group. </param>
 438        /// <param name="circuitName"> The name of the circuit. </param>
 439        /// <param name="peeringName"> The name of the peering. </param>
 440        /// <param name="cancellationToken"> The cancellation token to use. </param>
 441        public Response<ExpressRouteCircuitConnectionListResult> List(string resourceGroupName, string circuitName, stri
 442        {
 0443            if (resourceGroupName == null)
 444            {
 0445                throw new ArgumentNullException(nameof(resourceGroupName));
 446            }
 0447            if (circuitName == null)
 448            {
 0449                throw new ArgumentNullException(nameof(circuitName));
 450            }
 0451            if (peeringName == null)
 452            {
 0453                throw new ArgumentNullException(nameof(peeringName));
 454            }
 455
 0456            using var message = CreateListRequest(resourceGroupName, circuitName, peeringName);
 0457            _pipeline.Send(message, cancellationToken);
 0458            switch (message.Response.Status)
 459            {
 460                case 200:
 461                    {
 0462                        ExpressRouteCircuitConnectionListResult value = default;
 0463                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0464                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 465                        {
 0466                            value = null;
 467                        }
 468                        else
 469                        {
 0470                            value = ExpressRouteCircuitConnectionListResult.DeserializeExpressRouteCircuitConnectionList
 471                        }
 0472                        return Response.FromValue(value, message.Response);
 473                    }
 474                default:
 0475                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 476            }
 0477        }
 478
 479        internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string circuitName, st
 480        {
 0481            var message = _pipeline.CreateMessage();
 0482            var request = message.Request;
 0483            request.Method = RequestMethod.Get;
 0484            var uri = new RawRequestUriBuilder();
 0485            uri.Reset(endpoint);
 0486            uri.AppendRawNextLink(nextLink, false);
 0487            request.Uri = uri;
 0488            return message;
 489        }
 490
 491        /// <summary> Gets all global reach connections associated with a private peering in an express route circuit. <
 492        /// <param name="nextLink"> The URL to the next page of results. </param>
 493        /// <param name="resourceGroupName"> The name of the resource group. </param>
 494        /// <param name="circuitName"> The name of the circuit. </param>
 495        /// <param name="peeringName"> The name of the peering. </param>
 496        /// <param name="cancellationToken"> The cancellation token to use. </param>
 497        public async Task<Response<ExpressRouteCircuitConnectionListResult>> ListNextPageAsync(string nextLink, string r
 498        {
 0499            if (nextLink == null)
 500            {
 0501                throw new ArgumentNullException(nameof(nextLink));
 502            }
 0503            if (resourceGroupName == null)
 504            {
 0505                throw new ArgumentNullException(nameof(resourceGroupName));
 506            }
 0507            if (circuitName == null)
 508            {
 0509                throw new ArgumentNullException(nameof(circuitName));
 510            }
 0511            if (peeringName == null)
 512            {
 0513                throw new ArgumentNullException(nameof(peeringName));
 514            }
 515
 0516            using var message = CreateListNextPageRequest(nextLink, resourceGroupName, circuitName, peeringName);
 0517            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0518            switch (message.Response.Status)
 519            {
 520                case 200:
 521                    {
 0522                        ExpressRouteCircuitConnectionListResult value = default;
 0523                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0524                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 525                        {
 0526                            value = null;
 527                        }
 528                        else
 529                        {
 0530                            value = ExpressRouteCircuitConnectionListResult.DeserializeExpressRouteCircuitConnectionList
 531                        }
 0532                        return Response.FromValue(value, message.Response);
 533                    }
 534                default:
 0535                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 536            }
 0537        }
 538
 539        /// <summary> Gets all global reach connections associated with a private peering in an express route circuit. <
 540        /// <param name="nextLink"> The URL to the next page of results. </param>
 541        /// <param name="resourceGroupName"> The name of the resource group. </param>
 542        /// <param name="circuitName"> The name of the circuit. </param>
 543        /// <param name="peeringName"> The name of the peering. </param>
 544        /// <param name="cancellationToken"> The cancellation token to use. </param>
 545        public Response<ExpressRouteCircuitConnectionListResult> ListNextPage(string nextLink, string resourceGroupName,
 546        {
 0547            if (nextLink == null)
 548            {
 0549                throw new ArgumentNullException(nameof(nextLink));
 550            }
 0551            if (resourceGroupName == null)
 552            {
 0553                throw new ArgumentNullException(nameof(resourceGroupName));
 554            }
 0555            if (circuitName == null)
 556            {
 0557                throw new ArgumentNullException(nameof(circuitName));
 558            }
 0559            if (peeringName == null)
 560            {
 0561                throw new ArgumentNullException(nameof(peeringName));
 562            }
 563
 0564            using var message = CreateListNextPageRequest(nextLink, resourceGroupName, circuitName, peeringName);
 0565            _pipeline.Send(message, cancellationToken);
 0566            switch (message.Response.Status)
 567            {
 568                case 200:
 569                    {
 0570                        ExpressRouteCircuitConnectionListResult value = default;
 0571                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0572                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 573                        {
 0574                            value = null;
 575                        }
 576                        else
 577                        {
 0578                            value = ExpressRouteCircuitConnectionListResult.DeserializeExpressRouteCircuitConnectionList
 579                        }
 0580                        return Response.FromValue(value, message.Response);
 581                    }
 582                default:
 0583                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 584            }
 0585        }
 586    }
 587}