< Summary

Class:Azure.ResourceManager.Network.NetworkInterfacesRestOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\NetworkInterfacesRestOperations.cs
Covered lines:295
Uncovered lines:517
Coverable lines:812
Total lines:1791
Line coverage:36.3% (295 of 812)
Covered branches:73
Total branches:348
Branch coverage:20.9% (73 of 348)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-88.89%50%
CreateDeleteRequest(...)-100%100%
DeleteAsync()-70%50%
Delete(...)-70%50%
CreateGetRequest(...)-100%100%
GetAsync()-73.33%50%
Get(...)-73.33%50%
CreateCreateOrUpdateRequest(...)-100%100%
CreateOrUpdateAsync()-75%62.5%
CreateOrUpdate(...)-75%62.5%
CreateUpdateTagsRequest(...)-0%100%
UpdateTagsAsync()-0%0%
UpdateTags(...)-0%0%
CreateListAllRequest()-100%100%
ListAllAsync()-81.82%50%
ListAll(...)-81.82%50%
CreateListRequest(...)-100%100%
ListAsync()-76.92%50%
List(...)-76.92%50%
CreateGetEffectiveRouteTableRequest(...)-0%100%
GetEffectiveRouteTableAsync()-0%0%
GetEffectiveRouteTable(...)-0%0%
CreateListEffectiveNetworkSecurityGroupsRequest(...)-0%100%
ListEffectiveNetworkSecurityGroupsAsync()-0%0%
ListEffectiveNetworkSecurityGroups(...)-0%0%
CreateListVirtualMachineScaleSetVMNetworkInterfacesRequest(...)-100%100%
ListVirtualMachineScaleSetVMNetworkInterfacesAsync()-70.59%50%
ListVirtualMachineScaleSetVMNetworkInterfaces(...)-70.59%50%
CreateListVirtualMachineScaleSetNetworkInterfacesRequest(...)-100%100%
ListVirtualMachineScaleSetNetworkInterfacesAsync()-73.33%50%
ListVirtualMachineScaleSetNetworkInterfaces(...)-73.33%50%
CreateGetVirtualMachineScaleSetNetworkInterfaceRequest(...)-95%50%
GetVirtualMachineScaleSetNetworkInterfaceAsync()-68.42%50%
GetVirtualMachineScaleSetNetworkInterface(...)-68.42%50%
CreateListVirtualMachineScaleSetIpConfigurationsRequest(...)-0%0%
ListVirtualMachineScaleSetIpConfigurationsAsync()-0%0%
ListVirtualMachineScaleSetIpConfigurations(...)-0%0%
CreateGetVirtualMachineScaleSetIpConfigurationRequest(...)-0%0%
GetVirtualMachineScaleSetIpConfigurationAsync()-0%0%
GetVirtualMachineScaleSetIpConfiguration(...)-0%0%
CreateListAllNextPageRequest(...)-0%100%
ListAllNextPageAsync()-0%0%
ListAllNextPage(...)-0%0%
CreateListNextPageRequest(...)-0%100%
ListNextPageAsync()-0%0%
ListNextPage(...)-0%0%
CreateListVirtualMachineScaleSetVMNetworkInterfacesNextPageRequest(...)-0%100%
ListVirtualMachineScaleSetVMNetworkInterfacesNextPageAsync()-0%0%
ListVirtualMachineScaleSetVMNetworkInterfacesNextPage(...)-0%0%
CreateListVirtualMachineScaleSetNetworkInterfacesNextPageRequest(...)-0%100%
ListVirtualMachineScaleSetNetworkInterfacesNextPageAsync()-0%0%
ListVirtualMachineScaleSetNetworkInterfacesNextPage(...)-0%0%
CreateListVirtualMachineScaleSetIpConfigurationsNextPageRequest(...)-0%100%
ListVirtualMachineScaleSetIpConfigurationsNextPageAsync()-0%0%
ListVirtualMachineScaleSetIpConfigurationsNextPage(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\NetworkInterfacesRestOperations.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 NetworkInterfacesRestOperations
 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 NetworkInterfacesRestOperations. </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
 52432        public NetworkInterfacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscr
 33        {
 52434            if (subscriptionId == null)
 35            {
 036                throw new ArgumentNullException(nameof(subscriptionId));
 37            }
 52438            endpoint ??= new Uri("https://management.azure.com");
 39
 52440            this.subscriptionId = subscriptionId;
 52441            this.endpoint = endpoint;
 52442            _clientDiagnostics = clientDiagnostics;
 52443            _pipeline = pipeline;
 52444        }
 45
 46        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string networkInterfaceName)
 47        {
 12848            var message = _pipeline.CreateMessage();
 12849            var request = message.Request;
 12850            request.Method = RequestMethod.Delete;
 12851            var uri = new RawRequestUriBuilder();
 12852            uri.Reset(endpoint);
 12853            uri.AppendPath("/subscriptions/", false);
 12854            uri.AppendPath(subscriptionId, true);
 12855            uri.AppendPath("/resourceGroups/", false);
 12856            uri.AppendPath(resourceGroupName, true);
 12857            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 12858            uri.AppendPath(networkInterfaceName, true);
 12859            uri.AppendQuery("api-version", "2020-04-01", true);
 12860            request.Uri = uri;
 12861            return message;
 62        }
 63
 64        /// <summary> Deletes the specified network interface. </summary>
 65        /// <param name="resourceGroupName"> The name of the resource group. </param>
 66        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 67        /// <param name="cancellationToken"> The cancellation token to use. </param>
 68        public async Task<Response> DeleteAsync(string resourceGroupName, string networkInterfaceName, CancellationToken
 69        {
 3270            if (resourceGroupName == null)
 71            {
 072                throw new ArgumentNullException(nameof(resourceGroupName));
 73            }
 3274            if (networkInterfaceName == null)
 75            {
 076                throw new ArgumentNullException(nameof(networkInterfaceName));
 77            }
 78
 3279            using var message = CreateDeleteRequest(resourceGroupName, networkInterfaceName);
 3280            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 3281            switch (message.Response.Status)
 82            {
 83                case 200:
 84                case 202:
 85                case 204:
 3286                    return message.Response;
 87                default:
 088                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 89            }
 3290        }
 91
 92        /// <summary> Deletes the specified network interface. </summary>
 93        /// <param name="resourceGroupName"> The name of the resource group. </param>
 94        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 95        /// <param name="cancellationToken"> The cancellation token to use. </param>
 96        public Response Delete(string resourceGroupName, string networkInterfaceName, CancellationToken cancellationToke
 97        {
 3298            if (resourceGroupName == null)
 99            {
 0100                throw new ArgumentNullException(nameof(resourceGroupName));
 101            }
 32102            if (networkInterfaceName == null)
 103            {
 0104                throw new ArgumentNullException(nameof(networkInterfaceName));
 105            }
 106
 32107            using var message = CreateDeleteRequest(resourceGroupName, networkInterfaceName);
 32108            _pipeline.Send(message, cancellationToken);
 32109            switch (message.Response.Status)
 110            {
 111                case 200:
 112                case 202:
 113                case 204:
 32114                    return message.Response;
 115                default:
 0116                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 117            }
 32118        }
 119
 120        internal HttpMessage CreateGetRequest(string resourceGroupName, string networkInterfaceName, string expand)
 121        {
 92122            var message = _pipeline.CreateMessage();
 92123            var request = message.Request;
 92124            request.Method = RequestMethod.Get;
 92125            var uri = new RawRequestUriBuilder();
 92126            uri.Reset(endpoint);
 92127            uri.AppendPath("/subscriptions/", false);
 92128            uri.AppendPath(subscriptionId, true);
 92129            uri.AppendPath("/resourceGroups/", false);
 92130            uri.AppendPath(resourceGroupName, true);
 92131            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 92132            uri.AppendPath(networkInterfaceName, true);
 92133            uri.AppendQuery("api-version", "2020-04-01", true);
 92134            if (expand != null)
 135            {
 4136                uri.AppendQuery("$expand", expand, true);
 137            }
 92138            request.Uri = uri;
 92139            return message;
 140        }
 141
 142        /// <summary> Gets information about the specified network interface. </summary>
 143        /// <param name="resourceGroupName"> The name of the resource group. </param>
 144        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 145        /// <param name="expand"> Expands referenced resources. </param>
 146        /// <param name="cancellationToken"> The cancellation token to use. </param>
 147        public async Task<Response<NetworkInterface>> GetAsync(string resourceGroupName, string networkInterfaceName, st
 148        {
 46149            if (resourceGroupName == null)
 150            {
 0151                throw new ArgumentNullException(nameof(resourceGroupName));
 152            }
 46153            if (networkInterfaceName == null)
 154            {
 0155                throw new ArgumentNullException(nameof(networkInterfaceName));
 156            }
 157
 46158            using var message = CreateGetRequest(resourceGroupName, networkInterfaceName, expand);
 46159            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 46160            switch (message.Response.Status)
 161            {
 162                case 200:
 163                    {
 46164                        NetworkInterface value = default;
 46165                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 46166                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 167                        {
 0168                            value = null;
 169                        }
 170                        else
 171                        {
 46172                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 173                        }
 46174                        return Response.FromValue(value, message.Response);
 175                    }
 176                default:
 0177                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 178            }
 46179        }
 180
 181        /// <summary> Gets information about the specified network interface. </summary>
 182        /// <param name="resourceGroupName"> The name of the resource group. </param>
 183        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 184        /// <param name="expand"> Expands referenced resources. </param>
 185        /// <param name="cancellationToken"> The cancellation token to use. </param>
 186        public Response<NetworkInterface> Get(string resourceGroupName, string networkInterfaceName, string expand = nul
 187        {
 46188            if (resourceGroupName == null)
 189            {
 0190                throw new ArgumentNullException(nameof(resourceGroupName));
 191            }
 46192            if (networkInterfaceName == null)
 193            {
 0194                throw new ArgumentNullException(nameof(networkInterfaceName));
 195            }
 196
 46197            using var message = CreateGetRequest(resourceGroupName, networkInterfaceName, expand);
 46198            _pipeline.Send(message, cancellationToken);
 46199            switch (message.Response.Status)
 200            {
 201                case 200:
 202                    {
 46203                        NetworkInterface value = default;
 46204                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 46205                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 206                        {
 0207                            value = null;
 208                        }
 209                        else
 210                        {
 46211                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 212                        }
 46213                        return Response.FromValue(value, message.Response);
 214                    }
 215                default:
 0216                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 217            }
 46218        }
 219
 220        internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string networkInterfaceName, NetworkI
 221        {
 188222            var message = _pipeline.CreateMessage();
 188223            var request = message.Request;
 188224            request.Method = RequestMethod.Put;
 188225            var uri = new RawRequestUriBuilder();
 188226            uri.Reset(endpoint);
 188227            uri.AppendPath("/subscriptions/", false);
 188228            uri.AppendPath(subscriptionId, true);
 188229            uri.AppendPath("/resourceGroups/", false);
 188230            uri.AppendPath(resourceGroupName, true);
 188231            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 188232            uri.AppendPath(networkInterfaceName, true);
 188233            uri.AppendQuery("api-version", "2020-04-01", true);
 188234            request.Uri = uri;
 188235            request.Headers.Add("Content-Type", "application/json");
 188236            var content = new Utf8JsonRequestContent();
 188237            content.JsonWriter.WriteObjectValue(parameters);
 188238            request.Content = content;
 188239            return message;
 240        }
 241
 242        /// <summary> Creates or updates a network interface. </summary>
 243        /// <param name="resourceGroupName"> The name of the resource group. </param>
 244        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 245        /// <param name="parameters"> Parameters supplied to the create or update network interface operation. </param>
 246        /// <param name="cancellationToken"> The cancellation token to use. </param>
 247        public async Task<Response> CreateOrUpdateAsync(string resourceGroupName, string networkInterfaceName, NetworkIn
 248        {
 48249            if (resourceGroupName == null)
 250            {
 0251                throw new ArgumentNullException(nameof(resourceGroupName));
 252            }
 48253            if (networkInterfaceName == null)
 254            {
 0255                throw new ArgumentNullException(nameof(networkInterfaceName));
 256            }
 48257            if (parameters == null)
 258            {
 0259                throw new ArgumentNullException(nameof(parameters));
 260            }
 261
 48262            using var message = CreateCreateOrUpdateRequest(resourceGroupName, networkInterfaceName, parameters);
 48263            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 48264            switch (message.Response.Status)
 265            {
 266                case 200:
 267                case 201:
 46268                    return message.Response;
 269                default:
 2270                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 271            }
 46272        }
 273
 274        /// <summary> Creates or updates a network interface. </summary>
 275        /// <param name="resourceGroupName"> The name of the resource group. </param>
 276        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 277        /// <param name="parameters"> Parameters supplied to the create or update network interface operation. </param>
 278        /// <param name="cancellationToken"> The cancellation token to use. </param>
 279        public Response CreateOrUpdate(string resourceGroupName, string networkInterfaceName, NetworkInterface parameter
 280        {
 48281            if (resourceGroupName == null)
 282            {
 0283                throw new ArgumentNullException(nameof(resourceGroupName));
 284            }
 48285            if (networkInterfaceName == null)
 286            {
 0287                throw new ArgumentNullException(nameof(networkInterfaceName));
 288            }
 48289            if (parameters == null)
 290            {
 0291                throw new ArgumentNullException(nameof(parameters));
 292            }
 293
 48294            using var message = CreateCreateOrUpdateRequest(resourceGroupName, networkInterfaceName, parameters);
 48295            _pipeline.Send(message, cancellationToken);
 48296            switch (message.Response.Status)
 297            {
 298                case 200:
 299                case 201:
 46300                    return message.Response;
 301                default:
 2302                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 303            }
 46304        }
 305
 306        internal HttpMessage CreateUpdateTagsRequest(string resourceGroupName, string networkInterfaceName, TagsObject p
 307        {
 0308            var message = _pipeline.CreateMessage();
 0309            var request = message.Request;
 0310            request.Method = RequestMethod.Patch;
 0311            var uri = new RawRequestUriBuilder();
 0312            uri.Reset(endpoint);
 0313            uri.AppendPath("/subscriptions/", false);
 0314            uri.AppendPath(subscriptionId, true);
 0315            uri.AppendPath("/resourceGroups/", false);
 0316            uri.AppendPath(resourceGroupName, true);
 0317            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 0318            uri.AppendPath(networkInterfaceName, true);
 0319            uri.AppendQuery("api-version", "2020-04-01", true);
 0320            request.Uri = uri;
 0321            request.Headers.Add("Content-Type", "application/json");
 0322            var content = new Utf8JsonRequestContent();
 0323            content.JsonWriter.WriteObjectValue(parameters);
 0324            request.Content = content;
 0325            return message;
 326        }
 327
 328        /// <summary> Updates a network interface tags. </summary>
 329        /// <param name="resourceGroupName"> The name of the resource group. </param>
 330        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 331        /// <param name="parameters"> Parameters supplied to update network interface tags. </param>
 332        /// <param name="cancellationToken"> The cancellation token to use. </param>
 333        public async Task<Response<NetworkInterface>> UpdateTagsAsync(string resourceGroupName, string networkInterfaceN
 334        {
 0335            if (resourceGroupName == null)
 336            {
 0337                throw new ArgumentNullException(nameof(resourceGroupName));
 338            }
 0339            if (networkInterfaceName == null)
 340            {
 0341                throw new ArgumentNullException(nameof(networkInterfaceName));
 342            }
 0343            if (parameters == null)
 344            {
 0345                throw new ArgumentNullException(nameof(parameters));
 346            }
 347
 0348            using var message = CreateUpdateTagsRequest(resourceGroupName, networkInterfaceName, parameters);
 0349            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0350            switch (message.Response.Status)
 351            {
 352                case 200:
 353                    {
 0354                        NetworkInterface value = default;
 0355                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0356                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 357                        {
 0358                            value = null;
 359                        }
 360                        else
 361                        {
 0362                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 363                        }
 0364                        return Response.FromValue(value, message.Response);
 365                    }
 366                default:
 0367                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 368            }
 0369        }
 370
 371        /// <summary> Updates a network interface tags. </summary>
 372        /// <param name="resourceGroupName"> The name of the resource group. </param>
 373        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 374        /// <param name="parameters"> Parameters supplied to update network interface tags. </param>
 375        /// <param name="cancellationToken"> The cancellation token to use. </param>
 376        public Response<NetworkInterface> UpdateTags(string resourceGroupName, string networkInterfaceName, TagsObject p
 377        {
 0378            if (resourceGroupName == null)
 379            {
 0380                throw new ArgumentNullException(nameof(resourceGroupName));
 381            }
 0382            if (networkInterfaceName == null)
 383            {
 0384                throw new ArgumentNullException(nameof(networkInterfaceName));
 385            }
 0386            if (parameters == null)
 387            {
 0388                throw new ArgumentNullException(nameof(parameters));
 389            }
 390
 0391            using var message = CreateUpdateTagsRequest(resourceGroupName, networkInterfaceName, parameters);
 0392            _pipeline.Send(message, cancellationToken);
 0393            switch (message.Response.Status)
 394            {
 395                case 200:
 396                    {
 0397                        NetworkInterface value = default;
 0398                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0399                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 400                        {
 0401                            value = null;
 402                        }
 403                        else
 404                        {
 0405                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 406                        }
 0407                        return Response.FromValue(value, message.Response);
 408                    }
 409                default:
 0410                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 411            }
 0412        }
 413
 414        internal HttpMessage CreateListAllRequest()
 415        {
 12416            var message = _pipeline.CreateMessage();
 12417            var request = message.Request;
 12418            request.Method = RequestMethod.Get;
 12419            var uri = new RawRequestUriBuilder();
 12420            uri.Reset(endpoint);
 12421            uri.AppendPath("/subscriptions/", false);
 12422            uri.AppendPath(subscriptionId, true);
 12423            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces", false);
 12424            uri.AppendQuery("api-version", "2020-04-01", true);
 12425            request.Uri = uri;
 12426            return message;
 427        }
 428
 429        /// <summary> Gets all network interfaces in a subscription. </summary>
 430        /// <param name="cancellationToken"> The cancellation token to use. </param>
 431        public async Task<Response<NetworkInterfaceListResult>> ListAllAsync(CancellationToken cancellationToken = defau
 432        {
 6433            using var message = CreateListAllRequest();
 6434            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 6435            switch (message.Response.Status)
 436            {
 437                case 200:
 438                    {
 6439                        NetworkInterfaceListResult value = default;
 6440                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 6441                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 442                        {
 0443                            value = null;
 444                        }
 445                        else
 446                        {
 6447                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 448                        }
 6449                        return Response.FromValue(value, message.Response);
 450                    }
 451                default:
 0452                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 453            }
 6454        }
 455
 456        /// <summary> Gets all network interfaces in a subscription. </summary>
 457        /// <param name="cancellationToken"> The cancellation token to use. </param>
 458        public Response<NetworkInterfaceListResult> ListAll(CancellationToken cancellationToken = default)
 459        {
 6460            using var message = CreateListAllRequest();
 6461            _pipeline.Send(message, cancellationToken);
 6462            switch (message.Response.Status)
 463            {
 464                case 200:
 465                    {
 6466                        NetworkInterfaceListResult value = default;
 6467                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 6468                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 469                        {
 0470                            value = null;
 471                        }
 472                        else
 473                        {
 6474                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 475                        }
 6476                        return Response.FromValue(value, message.Response);
 477                    }
 478                default:
 0479                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 480            }
 6481        }
 482
 483        internal HttpMessage CreateListRequest(string resourceGroupName)
 484        {
 44485            var message = _pipeline.CreateMessage();
 44486            var request = message.Request;
 44487            request.Method = RequestMethod.Get;
 44488            var uri = new RawRequestUriBuilder();
 44489            uri.Reset(endpoint);
 44490            uri.AppendPath("/subscriptions/", false);
 44491            uri.AppendPath(subscriptionId, true);
 44492            uri.AppendPath("/resourceGroups/", false);
 44493            uri.AppendPath(resourceGroupName, true);
 44494            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces", false);
 44495            uri.AppendQuery("api-version", "2020-04-01", true);
 44496            request.Uri = uri;
 44497            return message;
 498        }
 499
 500        /// <summary> Gets all network interfaces in a resource group. </summary>
 501        /// <param name="resourceGroupName"> The name of the resource group. </param>
 502        /// <param name="cancellationToken"> The cancellation token to use. </param>
 503        public async Task<Response<NetworkInterfaceListResult>> ListAsync(string resourceGroupName, CancellationToken ca
 504        {
 22505            if (resourceGroupName == null)
 506            {
 0507                throw new ArgumentNullException(nameof(resourceGroupName));
 508            }
 509
 22510            using var message = CreateListRequest(resourceGroupName);
 22511            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 22512            switch (message.Response.Status)
 513            {
 514                case 200:
 515                    {
 22516                        NetworkInterfaceListResult value = default;
 22517                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 22518                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 519                        {
 0520                            value = null;
 521                        }
 522                        else
 523                        {
 22524                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 525                        }
 22526                        return Response.FromValue(value, message.Response);
 527                    }
 528                default:
 0529                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 530            }
 22531        }
 532
 533        /// <summary> Gets all network interfaces in a resource group. </summary>
 534        /// <param name="resourceGroupName"> The name of the resource group. </param>
 535        /// <param name="cancellationToken"> The cancellation token to use. </param>
 536        public Response<NetworkInterfaceListResult> List(string resourceGroupName, CancellationToken cancellationToken =
 537        {
 22538            if (resourceGroupName == null)
 539            {
 0540                throw new ArgumentNullException(nameof(resourceGroupName));
 541            }
 542
 22543            using var message = CreateListRequest(resourceGroupName);
 22544            _pipeline.Send(message, cancellationToken);
 22545            switch (message.Response.Status)
 546            {
 547                case 200:
 548                    {
 22549                        NetworkInterfaceListResult value = default;
 22550                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 22551                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 552                        {
 0553                            value = null;
 554                        }
 555                        else
 556                        {
 22557                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 558                        }
 22559                        return Response.FromValue(value, message.Response);
 560                    }
 561                default:
 0562                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 563            }
 22564        }
 565
 566        internal HttpMessage CreateGetEffectiveRouteTableRequest(string resourceGroupName, string networkInterfaceName)
 567        {
 0568            var message = _pipeline.CreateMessage();
 0569            var request = message.Request;
 0570            request.Method = RequestMethod.Post;
 0571            var uri = new RawRequestUriBuilder();
 0572            uri.Reset(endpoint);
 0573            uri.AppendPath("/subscriptions/", false);
 0574            uri.AppendPath(subscriptionId, true);
 0575            uri.AppendPath("/resourceGroups/", false);
 0576            uri.AppendPath(resourceGroupName, true);
 0577            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 0578            uri.AppendPath(networkInterfaceName, true);
 0579            uri.AppendPath("/effectiveRouteTable", false);
 0580            uri.AppendQuery("api-version", "2020-04-01", true);
 0581            request.Uri = uri;
 0582            return message;
 583        }
 584
 585        /// <summary> Gets all route tables applied to a network interface. </summary>
 586        /// <param name="resourceGroupName"> The name of the resource group. </param>
 587        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 588        /// <param name="cancellationToken"> The cancellation token to use. </param>
 589        public async Task<Response> GetEffectiveRouteTableAsync(string resourceGroupName, string networkInterfaceName, C
 590        {
 0591            if (resourceGroupName == null)
 592            {
 0593                throw new ArgumentNullException(nameof(resourceGroupName));
 594            }
 0595            if (networkInterfaceName == null)
 596            {
 0597                throw new ArgumentNullException(nameof(networkInterfaceName));
 598            }
 599
 0600            using var message = CreateGetEffectiveRouteTableRequest(resourceGroupName, networkInterfaceName);
 0601            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0602            switch (message.Response.Status)
 603            {
 604                case 200:
 605                case 202:
 0606                    return message.Response;
 607                default:
 0608                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 609            }
 0610        }
 611
 612        /// <summary> Gets all route tables applied to a network interface. </summary>
 613        /// <param name="resourceGroupName"> The name of the resource group. </param>
 614        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 615        /// <param name="cancellationToken"> The cancellation token to use. </param>
 616        public Response GetEffectiveRouteTable(string resourceGroupName, string networkInterfaceName, CancellationToken 
 617        {
 0618            if (resourceGroupName == null)
 619            {
 0620                throw new ArgumentNullException(nameof(resourceGroupName));
 621            }
 0622            if (networkInterfaceName == null)
 623            {
 0624                throw new ArgumentNullException(nameof(networkInterfaceName));
 625            }
 626
 0627            using var message = CreateGetEffectiveRouteTableRequest(resourceGroupName, networkInterfaceName);
 0628            _pipeline.Send(message, cancellationToken);
 0629            switch (message.Response.Status)
 630            {
 631                case 200:
 632                case 202:
 0633                    return message.Response;
 634                default:
 0635                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 636            }
 0637        }
 638
 639        internal HttpMessage CreateListEffectiveNetworkSecurityGroupsRequest(string resourceGroupName, string networkInt
 640        {
 0641            var message = _pipeline.CreateMessage();
 0642            var request = message.Request;
 0643            request.Method = RequestMethod.Post;
 0644            var uri = new RawRequestUriBuilder();
 0645            uri.Reset(endpoint);
 0646            uri.AppendPath("/subscriptions/", false);
 0647            uri.AppendPath(subscriptionId, true);
 0648            uri.AppendPath("/resourceGroups/", false);
 0649            uri.AppendPath(resourceGroupName, true);
 0650            uri.AppendPath("/providers/Microsoft.Network/networkInterfaces/", false);
 0651            uri.AppendPath(networkInterfaceName, true);
 0652            uri.AppendPath("/effectiveNetworkSecurityGroups", false);
 0653            uri.AppendQuery("api-version", "2020-04-01", true);
 0654            request.Uri = uri;
 0655            return message;
 656        }
 657
 658        /// <summary> Gets all network security groups applied to a network interface. </summary>
 659        /// <param name="resourceGroupName"> The name of the resource group. </param>
 660        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 661        /// <param name="cancellationToken"> The cancellation token to use. </param>
 662        public async Task<Response> ListEffectiveNetworkSecurityGroupsAsync(string resourceGroupName, string networkInte
 663        {
 0664            if (resourceGroupName == null)
 665            {
 0666                throw new ArgumentNullException(nameof(resourceGroupName));
 667            }
 0668            if (networkInterfaceName == null)
 669            {
 0670                throw new ArgumentNullException(nameof(networkInterfaceName));
 671            }
 672
 0673            using var message = CreateListEffectiveNetworkSecurityGroupsRequest(resourceGroupName, networkInterfaceName)
 0674            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0675            switch (message.Response.Status)
 676            {
 677                case 200:
 678                case 202:
 0679                    return message.Response;
 680                default:
 0681                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 682            }
 0683        }
 684
 685        /// <summary> Gets all network security groups applied to a network interface. </summary>
 686        /// <param name="resourceGroupName"> The name of the resource group. </param>
 687        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 688        /// <param name="cancellationToken"> The cancellation token to use. </param>
 689        public Response ListEffectiveNetworkSecurityGroups(string resourceGroupName, string networkInterfaceName, Cancel
 690        {
 0691            if (resourceGroupName == null)
 692            {
 0693                throw new ArgumentNullException(nameof(resourceGroupName));
 694            }
 0695            if (networkInterfaceName == null)
 696            {
 0697                throw new ArgumentNullException(nameof(networkInterfaceName));
 698            }
 699
 0700            using var message = CreateListEffectiveNetworkSecurityGroupsRequest(resourceGroupName, networkInterfaceName)
 0701            _pipeline.Send(message, cancellationToken);
 0702            switch (message.Response.Status)
 703            {
 704                case 200:
 705                case 202:
 0706                    return message.Response;
 707                default:
 0708                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 709            }
 0710        }
 711
 712        internal HttpMessage CreateListVirtualMachineScaleSetVMNetworkInterfacesRequest(string resourceGroupName, string
 713        {
 4714            var message = _pipeline.CreateMessage();
 4715            var request = message.Request;
 4716            request.Method = RequestMethod.Get;
 4717            var uri = new RawRequestUriBuilder();
 4718            uri.Reset(endpoint);
 4719            uri.AppendPath("/subscriptions/", false);
 4720            uri.AppendPath(subscriptionId, true);
 4721            uri.AppendPath("/resourceGroups/", false);
 4722            uri.AppendPath(resourceGroupName, true);
 4723            uri.AppendPath("/providers/microsoft.Compute/virtualMachineScaleSets/", false);
 4724            uri.AppendPath(virtualMachineScaleSetName, true);
 4725            uri.AppendPath("/virtualMachines/", false);
 4726            uri.AppendPath(virtualmachineIndex, true);
 4727            uri.AppendPath("/networkInterfaces", false);
 4728            uri.AppendQuery("api-version", "2018-10-01", true);
 4729            request.Uri = uri;
 4730            return message;
 731        }
 732
 733        /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
 734        /// <param name="resourceGroupName"> The name of the resource group. </param>
 735        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 736        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 737        /// <param name="cancellationToken"> The cancellation token to use. </param>
 738        public async Task<Response<NetworkInterfaceListResult>> ListVirtualMachineScaleSetVMNetworkInterfacesAsync(strin
 739        {
 2740            if (resourceGroupName == null)
 741            {
 0742                throw new ArgumentNullException(nameof(resourceGroupName));
 743            }
 2744            if (virtualMachineScaleSetName == null)
 745            {
 0746                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 747            }
 2748            if (virtualmachineIndex == null)
 749            {
 0750                throw new ArgumentNullException(nameof(virtualmachineIndex));
 751            }
 752
 2753            using var message = CreateListVirtualMachineScaleSetVMNetworkInterfacesRequest(resourceGroupName, virtualMac
 2754            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2755            switch (message.Response.Status)
 756            {
 757                case 200:
 758                    {
 2759                        NetworkInterfaceListResult value = default;
 2760                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2761                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 762                        {
 0763                            value = null;
 764                        }
 765                        else
 766                        {
 2767                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 768                        }
 2769                        return Response.FromValue(value, message.Response);
 770                    }
 771                default:
 0772                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 773            }
 2774        }
 775
 776        /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
 777        /// <param name="resourceGroupName"> The name of the resource group. </param>
 778        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 779        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 780        /// <param name="cancellationToken"> The cancellation token to use. </param>
 781        public Response<NetworkInterfaceListResult> ListVirtualMachineScaleSetVMNetworkInterfaces(string resourceGroupNa
 782        {
 2783            if (resourceGroupName == null)
 784            {
 0785                throw new ArgumentNullException(nameof(resourceGroupName));
 786            }
 2787            if (virtualMachineScaleSetName == null)
 788            {
 0789                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 790            }
 2791            if (virtualmachineIndex == null)
 792            {
 0793                throw new ArgumentNullException(nameof(virtualmachineIndex));
 794            }
 795
 2796            using var message = CreateListVirtualMachineScaleSetVMNetworkInterfacesRequest(resourceGroupName, virtualMac
 2797            _pipeline.Send(message, cancellationToken);
 2798            switch (message.Response.Status)
 799            {
 800                case 200:
 801                    {
 2802                        NetworkInterfaceListResult value = default;
 2803                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2804                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 805                        {
 0806                            value = null;
 807                        }
 808                        else
 809                        {
 2810                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 811                        }
 2812                        return Response.FromValue(value, message.Response);
 813                    }
 814                default:
 0815                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 816            }
 2817        }
 818
 819        internal HttpMessage CreateListVirtualMachineScaleSetNetworkInterfacesRequest(string resourceGroupName, string v
 820        {
 4821            var message = _pipeline.CreateMessage();
 4822            var request = message.Request;
 4823            request.Method = RequestMethod.Get;
 4824            var uri = new RawRequestUriBuilder();
 4825            uri.Reset(endpoint);
 4826            uri.AppendPath("/subscriptions/", false);
 4827            uri.AppendPath(subscriptionId, true);
 4828            uri.AppendPath("/resourceGroups/", false);
 4829            uri.AppendPath(resourceGroupName, true);
 4830            uri.AppendPath("/providers/microsoft.Compute/virtualMachineScaleSets/", false);
 4831            uri.AppendPath(virtualMachineScaleSetName, true);
 4832            uri.AppendPath("/networkInterfaces", false);
 4833            uri.AppendQuery("api-version", "2018-10-01", true);
 4834            request.Uri = uri;
 4835            return message;
 836        }
 837
 838        /// <summary> Gets all network interfaces in a virtual machine scale set. </summary>
 839        /// <param name="resourceGroupName"> The name of the resource group. </param>
 840        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 841        /// <param name="cancellationToken"> The cancellation token to use. </param>
 842        public async Task<Response<NetworkInterfaceListResult>> ListVirtualMachineScaleSetNetworkInterfacesAsync(string 
 843        {
 2844            if (resourceGroupName == null)
 845            {
 0846                throw new ArgumentNullException(nameof(resourceGroupName));
 847            }
 2848            if (virtualMachineScaleSetName == null)
 849            {
 0850                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 851            }
 852
 2853            using var message = CreateListVirtualMachineScaleSetNetworkInterfacesRequest(resourceGroupName, virtualMachi
 2854            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2855            switch (message.Response.Status)
 856            {
 857                case 200:
 858                    {
 2859                        NetworkInterfaceListResult value = default;
 2860                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2861                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 862                        {
 0863                            value = null;
 864                        }
 865                        else
 866                        {
 2867                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 868                        }
 2869                        return Response.FromValue(value, message.Response);
 870                    }
 871                default:
 0872                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 873            }
 2874        }
 875
 876        /// <summary> Gets all network interfaces in a virtual machine scale set. </summary>
 877        /// <param name="resourceGroupName"> The name of the resource group. </param>
 878        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 879        /// <param name="cancellationToken"> The cancellation token to use. </param>
 880        public Response<NetworkInterfaceListResult> ListVirtualMachineScaleSetNetworkInterfaces(string resourceGroupName
 881        {
 2882            if (resourceGroupName == null)
 883            {
 0884                throw new ArgumentNullException(nameof(resourceGroupName));
 885            }
 2886            if (virtualMachineScaleSetName == null)
 887            {
 0888                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 889            }
 890
 2891            using var message = CreateListVirtualMachineScaleSetNetworkInterfacesRequest(resourceGroupName, virtualMachi
 2892            _pipeline.Send(message, cancellationToken);
 2893            switch (message.Response.Status)
 894            {
 895                case 200:
 896                    {
 2897                        NetworkInterfaceListResult value = default;
 2898                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2899                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 900                        {
 0901                            value = null;
 902                        }
 903                        else
 904                        {
 2905                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 906                        }
 2907                        return Response.FromValue(value, message.Response);
 908                    }
 909                default:
 0910                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 911            }
 2912        }
 913
 914        internal HttpMessage CreateGetVirtualMachineScaleSetNetworkInterfaceRequest(string resourceGroupName, string vir
 915        {
 4916            var message = _pipeline.CreateMessage();
 4917            var request = message.Request;
 4918            request.Method = RequestMethod.Get;
 4919            var uri = new RawRequestUriBuilder();
 4920            uri.Reset(endpoint);
 4921            uri.AppendPath("/subscriptions/", false);
 4922            uri.AppendPath(subscriptionId, true);
 4923            uri.AppendPath("/resourceGroups/", false);
 4924            uri.AppendPath(resourceGroupName, true);
 4925            uri.AppendPath("/providers/microsoft.Compute/virtualMachineScaleSets/", false);
 4926            uri.AppendPath(virtualMachineScaleSetName, true);
 4927            uri.AppendPath("/virtualMachines/", false);
 4928            uri.AppendPath(virtualmachineIndex, true);
 4929            uri.AppendPath("/networkInterfaces/", false);
 4930            uri.AppendPath(networkInterfaceName, true);
 4931            uri.AppendQuery("api-version", "2018-10-01", true);
 4932            if (expand != null)
 933            {
 0934                uri.AppendQuery("$expand", expand, true);
 935            }
 4936            request.Uri = uri;
 4937            return message;
 938        }
 939
 940        /// <summary> Get the specified network interface in a virtual machine scale set. </summary>
 941        /// <param name="resourceGroupName"> The name of the resource group. </param>
 942        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 943        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 944        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 945        /// <param name="expand"> Expands referenced resources. </param>
 946        /// <param name="cancellationToken"> The cancellation token to use. </param>
 947        public async Task<Response<NetworkInterface>> GetVirtualMachineScaleSetNetworkInterfaceAsync(string resourceGrou
 948        {
 2949            if (resourceGroupName == null)
 950            {
 0951                throw new ArgumentNullException(nameof(resourceGroupName));
 952            }
 2953            if (virtualMachineScaleSetName == null)
 954            {
 0955                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 956            }
 2957            if (virtualmachineIndex == null)
 958            {
 0959                throw new ArgumentNullException(nameof(virtualmachineIndex));
 960            }
 2961            if (networkInterfaceName == null)
 962            {
 0963                throw new ArgumentNullException(nameof(networkInterfaceName));
 964            }
 965
 2966            using var message = CreateGetVirtualMachineScaleSetNetworkInterfaceRequest(resourceGroupName, virtualMachine
 2967            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2968            switch (message.Response.Status)
 969            {
 970                case 200:
 971                    {
 2972                        NetworkInterface value = default;
 2973                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2974                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 975                        {
 0976                            value = null;
 977                        }
 978                        else
 979                        {
 2980                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 981                        }
 2982                        return Response.FromValue(value, message.Response);
 983                    }
 984                default:
 0985                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 986            }
 2987        }
 988
 989        /// <summary> Get the specified network interface in a virtual machine scale set. </summary>
 990        /// <param name="resourceGroupName"> The name of the resource group. </param>
 991        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 992        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 993        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 994        /// <param name="expand"> Expands referenced resources. </param>
 995        /// <param name="cancellationToken"> The cancellation token to use. </param>
 996        public Response<NetworkInterface> GetVirtualMachineScaleSetNetworkInterface(string resourceGroupName, string vir
 997        {
 2998            if (resourceGroupName == null)
 999            {
 01000                throw new ArgumentNullException(nameof(resourceGroupName));
 1001            }
 21002            if (virtualMachineScaleSetName == null)
 1003            {
 01004                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1005            }
 21006            if (virtualmachineIndex == null)
 1007            {
 01008                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1009            }
 21010            if (networkInterfaceName == null)
 1011            {
 01012                throw new ArgumentNullException(nameof(networkInterfaceName));
 1013            }
 1014
 21015            using var message = CreateGetVirtualMachineScaleSetNetworkInterfaceRequest(resourceGroupName, virtualMachine
 21016            _pipeline.Send(message, cancellationToken);
 21017            switch (message.Response.Status)
 1018            {
 1019                case 200:
 1020                    {
 21021                        NetworkInterface value = default;
 21022                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 21023                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1024                        {
 01025                            value = null;
 1026                        }
 1027                        else
 1028                        {
 21029                            value = NetworkInterface.DeserializeNetworkInterface(document.RootElement);
 1030                        }
 21031                        return Response.FromValue(value, message.Response);
 1032                    }
 1033                default:
 01034                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1035            }
 21036        }
 1037
 1038        internal HttpMessage CreateListVirtualMachineScaleSetIpConfigurationsRequest(string resourceGroupName, string vi
 1039        {
 01040            var message = _pipeline.CreateMessage();
 01041            var request = message.Request;
 01042            request.Method = RequestMethod.Get;
 01043            var uri = new RawRequestUriBuilder();
 01044            uri.Reset(endpoint);
 01045            uri.AppendPath("/subscriptions/", false);
 01046            uri.AppendPath(subscriptionId, true);
 01047            uri.AppendPath("/resourceGroups/", false);
 01048            uri.AppendPath(resourceGroupName, true);
 01049            uri.AppendPath("/providers/microsoft.Compute/virtualMachineScaleSets/", false);
 01050            uri.AppendPath(virtualMachineScaleSetName, true);
 01051            uri.AppendPath("/virtualMachines/", false);
 01052            uri.AppendPath(virtualmachineIndex, true);
 01053            uri.AppendPath("/networkInterfaces/", false);
 01054            uri.AppendPath(networkInterfaceName, true);
 01055            uri.AppendPath("/ipConfigurations", false);
 01056            uri.AppendQuery("api-version", "2018-10-01", true);
 01057            if (expand != null)
 1058            {
 01059                uri.AppendQuery("$expand", expand, true);
 1060            }
 01061            request.Uri = uri;
 01062            return message;
 1063        }
 1064
 1065        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1066        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1067        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1068        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1069        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1070        /// <param name="expand"> Expands referenced resources. </param>
 1071        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1072        public async Task<Response<NetworkInterfaceIPConfigurationListResult>> ListVirtualMachineScaleSetIpConfiguration
 1073        {
 01074            if (resourceGroupName == null)
 1075            {
 01076                throw new ArgumentNullException(nameof(resourceGroupName));
 1077            }
 01078            if (virtualMachineScaleSetName == null)
 1079            {
 01080                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1081            }
 01082            if (virtualmachineIndex == null)
 1083            {
 01084                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1085            }
 01086            if (networkInterfaceName == null)
 1087            {
 01088                throw new ArgumentNullException(nameof(networkInterfaceName));
 1089            }
 1090
 01091            using var message = CreateListVirtualMachineScaleSetIpConfigurationsRequest(resourceGroupName, virtualMachin
 01092            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01093            switch (message.Response.Status)
 1094            {
 1095                case 200:
 1096                    {
 01097                        NetworkInterfaceIPConfigurationListResult value = default;
 01098                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01099                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1100                        {
 01101                            value = null;
 1102                        }
 1103                        else
 1104                        {
 01105                            value = NetworkInterfaceIPConfigurationListResult.DeserializeNetworkInterfaceIPConfiguration
 1106                        }
 01107                        return Response.FromValue(value, message.Response);
 1108                    }
 1109                default:
 01110                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1111            }
 01112        }
 1113
 1114        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1115        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1116        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1117        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1118        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1119        /// <param name="expand"> Expands referenced resources. </param>
 1120        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1121        public Response<NetworkInterfaceIPConfigurationListResult> ListVirtualMachineScaleSetIpConfigurations(string res
 1122        {
 01123            if (resourceGroupName == null)
 1124            {
 01125                throw new ArgumentNullException(nameof(resourceGroupName));
 1126            }
 01127            if (virtualMachineScaleSetName == null)
 1128            {
 01129                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1130            }
 01131            if (virtualmachineIndex == null)
 1132            {
 01133                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1134            }
 01135            if (networkInterfaceName == null)
 1136            {
 01137                throw new ArgumentNullException(nameof(networkInterfaceName));
 1138            }
 1139
 01140            using var message = CreateListVirtualMachineScaleSetIpConfigurationsRequest(resourceGroupName, virtualMachin
 01141            _pipeline.Send(message, cancellationToken);
 01142            switch (message.Response.Status)
 1143            {
 1144                case 200:
 1145                    {
 01146                        NetworkInterfaceIPConfigurationListResult value = default;
 01147                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01148                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1149                        {
 01150                            value = null;
 1151                        }
 1152                        else
 1153                        {
 01154                            value = NetworkInterfaceIPConfigurationListResult.DeserializeNetworkInterfaceIPConfiguration
 1155                        }
 01156                        return Response.FromValue(value, message.Response);
 1157                    }
 1158                default:
 01159                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1160            }
 01161        }
 1162
 1163        internal HttpMessage CreateGetVirtualMachineScaleSetIpConfigurationRequest(string resourceGroupName, string virt
 1164        {
 01165            var message = _pipeline.CreateMessage();
 01166            var request = message.Request;
 01167            request.Method = RequestMethod.Get;
 01168            var uri = new RawRequestUriBuilder();
 01169            uri.Reset(endpoint);
 01170            uri.AppendPath("/subscriptions/", false);
 01171            uri.AppendPath(subscriptionId, true);
 01172            uri.AppendPath("/resourceGroups/", false);
 01173            uri.AppendPath(resourceGroupName, true);
 01174            uri.AppendPath("/providers/microsoft.Compute/virtualMachineScaleSets/", false);
 01175            uri.AppendPath(virtualMachineScaleSetName, true);
 01176            uri.AppendPath("/virtualMachines/", false);
 01177            uri.AppendPath(virtualmachineIndex, true);
 01178            uri.AppendPath("/networkInterfaces/", false);
 01179            uri.AppendPath(networkInterfaceName, true);
 01180            uri.AppendPath("/ipConfigurations/", false);
 01181            uri.AppendPath(ipConfigurationName, true);
 01182            uri.AppendQuery("api-version", "2018-10-01", true);
 01183            if (expand != null)
 1184            {
 01185                uri.AppendQuery("$expand", expand, true);
 1186            }
 01187            request.Uri = uri;
 01188            return message;
 1189        }
 1190
 1191        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1192        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1193        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1194        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1195        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1196        /// <param name="ipConfigurationName"> The name of the ip configuration. </param>
 1197        /// <param name="expand"> Expands referenced resources. </param>
 1198        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1199        public async Task<Response<NetworkInterfaceIPConfiguration>> GetVirtualMachineScaleSetIpConfigurationAsync(strin
 1200        {
 01201            if (resourceGroupName == null)
 1202            {
 01203                throw new ArgumentNullException(nameof(resourceGroupName));
 1204            }
 01205            if (virtualMachineScaleSetName == null)
 1206            {
 01207                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1208            }
 01209            if (virtualmachineIndex == null)
 1210            {
 01211                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1212            }
 01213            if (networkInterfaceName == null)
 1214            {
 01215                throw new ArgumentNullException(nameof(networkInterfaceName));
 1216            }
 01217            if (ipConfigurationName == null)
 1218            {
 01219                throw new ArgumentNullException(nameof(ipConfigurationName));
 1220            }
 1221
 01222            using var message = CreateGetVirtualMachineScaleSetIpConfigurationRequest(resourceGroupName, virtualMachineS
 01223            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01224            switch (message.Response.Status)
 1225            {
 1226                case 200:
 1227                    {
 01228                        NetworkInterfaceIPConfiguration value = default;
 01229                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01230                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1231                        {
 01232                            value = null;
 1233                        }
 1234                        else
 1235                        {
 01236                            value = NetworkInterfaceIPConfiguration.DeserializeNetworkInterfaceIPConfiguration(document.
 1237                        }
 01238                        return Response.FromValue(value, message.Response);
 1239                    }
 1240                default:
 01241                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1242            }
 01243        }
 1244
 1245        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1246        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1247        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1248        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1249        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1250        /// <param name="ipConfigurationName"> The name of the ip configuration. </param>
 1251        /// <param name="expand"> Expands referenced resources. </param>
 1252        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1253        public Response<NetworkInterfaceIPConfiguration> GetVirtualMachineScaleSetIpConfiguration(string resourceGroupNa
 1254        {
 01255            if (resourceGroupName == null)
 1256            {
 01257                throw new ArgumentNullException(nameof(resourceGroupName));
 1258            }
 01259            if (virtualMachineScaleSetName == null)
 1260            {
 01261                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1262            }
 01263            if (virtualmachineIndex == null)
 1264            {
 01265                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1266            }
 01267            if (networkInterfaceName == null)
 1268            {
 01269                throw new ArgumentNullException(nameof(networkInterfaceName));
 1270            }
 01271            if (ipConfigurationName == null)
 1272            {
 01273                throw new ArgumentNullException(nameof(ipConfigurationName));
 1274            }
 1275
 01276            using var message = CreateGetVirtualMachineScaleSetIpConfigurationRequest(resourceGroupName, virtualMachineS
 01277            _pipeline.Send(message, cancellationToken);
 01278            switch (message.Response.Status)
 1279            {
 1280                case 200:
 1281                    {
 01282                        NetworkInterfaceIPConfiguration value = default;
 01283                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01284                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1285                        {
 01286                            value = null;
 1287                        }
 1288                        else
 1289                        {
 01290                            value = NetworkInterfaceIPConfiguration.DeserializeNetworkInterfaceIPConfiguration(document.
 1291                        }
 01292                        return Response.FromValue(value, message.Response);
 1293                    }
 1294                default:
 01295                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1296            }
 01297        }
 1298
 1299        internal HttpMessage CreateListAllNextPageRequest(string nextLink)
 1300        {
 01301            var message = _pipeline.CreateMessage();
 01302            var request = message.Request;
 01303            request.Method = RequestMethod.Get;
 01304            var uri = new RawRequestUriBuilder();
 01305            uri.Reset(endpoint);
 01306            uri.AppendRawNextLink(nextLink, false);
 01307            request.Uri = uri;
 01308            return message;
 1309        }
 1310
 1311        /// <summary> Gets all network interfaces in a subscription. </summary>
 1312        /// <param name="nextLink"> The URL to the next page of results. </param>
 1313        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1314        public async Task<Response<NetworkInterfaceListResult>> ListAllNextPageAsync(string nextLink, CancellationToken 
 1315        {
 01316            if (nextLink == null)
 1317            {
 01318                throw new ArgumentNullException(nameof(nextLink));
 1319            }
 1320
 01321            using var message = CreateListAllNextPageRequest(nextLink);
 01322            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01323            switch (message.Response.Status)
 1324            {
 1325                case 200:
 1326                    {
 01327                        NetworkInterfaceListResult value = default;
 01328                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01329                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1330                        {
 01331                            value = null;
 1332                        }
 1333                        else
 1334                        {
 01335                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1336                        }
 01337                        return Response.FromValue(value, message.Response);
 1338                    }
 1339                default:
 01340                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1341            }
 01342        }
 1343
 1344        /// <summary> Gets all network interfaces in a subscription. </summary>
 1345        /// <param name="nextLink"> The URL to the next page of results. </param>
 1346        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1347        public Response<NetworkInterfaceListResult> ListAllNextPage(string nextLink, CancellationToken cancellationToken
 1348        {
 01349            if (nextLink == null)
 1350            {
 01351                throw new ArgumentNullException(nameof(nextLink));
 1352            }
 1353
 01354            using var message = CreateListAllNextPageRequest(nextLink);
 01355            _pipeline.Send(message, cancellationToken);
 01356            switch (message.Response.Status)
 1357            {
 1358                case 200:
 1359                    {
 01360                        NetworkInterfaceListResult value = default;
 01361                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01362                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1363                        {
 01364                            value = null;
 1365                        }
 1366                        else
 1367                        {
 01368                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1369                        }
 01370                        return Response.FromValue(value, message.Response);
 1371                    }
 1372                default:
 01373                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1374            }
 01375        }
 1376
 1377        internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName)
 1378        {
 01379            var message = _pipeline.CreateMessage();
 01380            var request = message.Request;
 01381            request.Method = RequestMethod.Get;
 01382            var uri = new RawRequestUriBuilder();
 01383            uri.Reset(endpoint);
 01384            uri.AppendRawNextLink(nextLink, false);
 01385            request.Uri = uri;
 01386            return message;
 1387        }
 1388
 1389        /// <summary> Gets all network interfaces in a resource group. </summary>
 1390        /// <param name="nextLink"> The URL to the next page of results. </param>
 1391        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1392        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1393        public async Task<Response<NetworkInterfaceListResult>> ListNextPageAsync(string nextLink, string resourceGroupN
 1394        {
 01395            if (nextLink == null)
 1396            {
 01397                throw new ArgumentNullException(nameof(nextLink));
 1398            }
 01399            if (resourceGroupName == null)
 1400            {
 01401                throw new ArgumentNullException(nameof(resourceGroupName));
 1402            }
 1403
 01404            using var message = CreateListNextPageRequest(nextLink, resourceGroupName);
 01405            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01406            switch (message.Response.Status)
 1407            {
 1408                case 200:
 1409                    {
 01410                        NetworkInterfaceListResult value = default;
 01411                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01412                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1413                        {
 01414                            value = null;
 1415                        }
 1416                        else
 1417                        {
 01418                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1419                        }
 01420                        return Response.FromValue(value, message.Response);
 1421                    }
 1422                default:
 01423                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1424            }
 01425        }
 1426
 1427        /// <summary> Gets all network interfaces in a resource group. </summary>
 1428        /// <param name="nextLink"> The URL to the next page of results. </param>
 1429        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1430        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1431        public Response<NetworkInterfaceListResult> ListNextPage(string nextLink, string resourceGroupName, Cancellation
 1432        {
 01433            if (nextLink == null)
 1434            {
 01435                throw new ArgumentNullException(nameof(nextLink));
 1436            }
 01437            if (resourceGroupName == null)
 1438            {
 01439                throw new ArgumentNullException(nameof(resourceGroupName));
 1440            }
 1441
 01442            using var message = CreateListNextPageRequest(nextLink, resourceGroupName);
 01443            _pipeline.Send(message, cancellationToken);
 01444            switch (message.Response.Status)
 1445            {
 1446                case 200:
 1447                    {
 01448                        NetworkInterfaceListResult value = default;
 01449                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01450                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1451                        {
 01452                            value = null;
 1453                        }
 1454                        else
 1455                        {
 01456                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1457                        }
 01458                        return Response.FromValue(value, message.Response);
 1459                    }
 1460                default:
 01461                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1462            }
 01463        }
 1464
 1465        internal HttpMessage CreateListVirtualMachineScaleSetVMNetworkInterfacesNextPageRequest(string nextLink, string 
 1466        {
 01467            var message = _pipeline.CreateMessage();
 01468            var request = message.Request;
 01469            request.Method = RequestMethod.Get;
 01470            var uri = new RawRequestUriBuilder();
 01471            uri.Reset(endpoint);
 01472            uri.AppendRawNextLink(nextLink, false);
 01473            request.Uri = uri;
 01474            return message;
 1475        }
 1476
 1477        /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
 1478        /// <param name="nextLink"> The URL to the next page of results. </param>
 1479        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1480        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1481        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1482        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1483        public async Task<Response<NetworkInterfaceListResult>> ListVirtualMachineScaleSetVMNetworkInterfacesNextPageAsy
 1484        {
 01485            if (nextLink == null)
 1486            {
 01487                throw new ArgumentNullException(nameof(nextLink));
 1488            }
 01489            if (resourceGroupName == null)
 1490            {
 01491                throw new ArgumentNullException(nameof(resourceGroupName));
 1492            }
 01493            if (virtualMachineScaleSetName == null)
 1494            {
 01495                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1496            }
 01497            if (virtualmachineIndex == null)
 1498            {
 01499                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1500            }
 1501
 01502            using var message = CreateListVirtualMachineScaleSetVMNetworkInterfacesNextPageRequest(nextLink, resourceGro
 01503            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01504            switch (message.Response.Status)
 1505            {
 1506                case 200:
 1507                    {
 01508                        NetworkInterfaceListResult value = default;
 01509                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01510                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1511                        {
 01512                            value = null;
 1513                        }
 1514                        else
 1515                        {
 01516                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1517                        }
 01518                        return Response.FromValue(value, message.Response);
 1519                    }
 1520                default:
 01521                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1522            }
 01523        }
 1524
 1525        /// <summary> Gets information about all network interfaces in a virtual machine in a virtual machine scale set.
 1526        /// <param name="nextLink"> The URL to the next page of results. </param>
 1527        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1528        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1529        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1530        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1531        public Response<NetworkInterfaceListResult> ListVirtualMachineScaleSetVMNetworkInterfacesNextPage(string nextLin
 1532        {
 01533            if (nextLink == null)
 1534            {
 01535                throw new ArgumentNullException(nameof(nextLink));
 1536            }
 01537            if (resourceGroupName == null)
 1538            {
 01539                throw new ArgumentNullException(nameof(resourceGroupName));
 1540            }
 01541            if (virtualMachineScaleSetName == null)
 1542            {
 01543                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1544            }
 01545            if (virtualmachineIndex == null)
 1546            {
 01547                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1548            }
 1549
 01550            using var message = CreateListVirtualMachineScaleSetVMNetworkInterfacesNextPageRequest(nextLink, resourceGro
 01551            _pipeline.Send(message, cancellationToken);
 01552            switch (message.Response.Status)
 1553            {
 1554                case 200:
 1555                    {
 01556                        NetworkInterfaceListResult value = default;
 01557                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01558                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1559                        {
 01560                            value = null;
 1561                        }
 1562                        else
 1563                        {
 01564                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1565                        }
 01566                        return Response.FromValue(value, message.Response);
 1567                    }
 1568                default:
 01569                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1570            }
 01571        }
 1572
 1573        internal HttpMessage CreateListVirtualMachineScaleSetNetworkInterfacesNextPageRequest(string nextLink, string re
 1574        {
 01575            var message = _pipeline.CreateMessage();
 01576            var request = message.Request;
 01577            request.Method = RequestMethod.Get;
 01578            var uri = new RawRequestUriBuilder();
 01579            uri.Reset(endpoint);
 01580            uri.AppendRawNextLink(nextLink, false);
 01581            request.Uri = uri;
 01582            return message;
 1583        }
 1584
 1585        /// <summary> Gets all network interfaces in a virtual machine scale set. </summary>
 1586        /// <param name="nextLink"> The URL to the next page of results. </param>
 1587        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1588        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1589        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1590        public async Task<Response<NetworkInterfaceListResult>> ListVirtualMachineScaleSetNetworkInterfacesNextPageAsync
 1591        {
 01592            if (nextLink == null)
 1593            {
 01594                throw new ArgumentNullException(nameof(nextLink));
 1595            }
 01596            if (resourceGroupName == null)
 1597            {
 01598                throw new ArgumentNullException(nameof(resourceGroupName));
 1599            }
 01600            if (virtualMachineScaleSetName == null)
 1601            {
 01602                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1603            }
 1604
 01605            using var message = CreateListVirtualMachineScaleSetNetworkInterfacesNextPageRequest(nextLink, resourceGroup
 01606            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01607            switch (message.Response.Status)
 1608            {
 1609                case 200:
 1610                    {
 01611                        NetworkInterfaceListResult value = default;
 01612                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01613                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1614                        {
 01615                            value = null;
 1616                        }
 1617                        else
 1618                        {
 01619                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1620                        }
 01621                        return Response.FromValue(value, message.Response);
 1622                    }
 1623                default:
 01624                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1625            }
 01626        }
 1627
 1628        /// <summary> Gets all network interfaces in a virtual machine scale set. </summary>
 1629        /// <param name="nextLink"> The URL to the next page of results. </param>
 1630        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1631        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1632        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1633        public Response<NetworkInterfaceListResult> ListVirtualMachineScaleSetNetworkInterfacesNextPage(string nextLink,
 1634        {
 01635            if (nextLink == null)
 1636            {
 01637                throw new ArgumentNullException(nameof(nextLink));
 1638            }
 01639            if (resourceGroupName == null)
 1640            {
 01641                throw new ArgumentNullException(nameof(resourceGroupName));
 1642            }
 01643            if (virtualMachineScaleSetName == null)
 1644            {
 01645                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1646            }
 1647
 01648            using var message = CreateListVirtualMachineScaleSetNetworkInterfacesNextPageRequest(nextLink, resourceGroup
 01649            _pipeline.Send(message, cancellationToken);
 01650            switch (message.Response.Status)
 1651            {
 1652                case 200:
 1653                    {
 01654                        NetworkInterfaceListResult value = default;
 01655                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01656                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1657                        {
 01658                            value = null;
 1659                        }
 1660                        else
 1661                        {
 01662                            value = NetworkInterfaceListResult.DeserializeNetworkInterfaceListResult(document.RootElemen
 1663                        }
 01664                        return Response.FromValue(value, message.Response);
 1665                    }
 1666                default:
 01667                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1668            }
 01669        }
 1670
 1671        internal HttpMessage CreateListVirtualMachineScaleSetIpConfigurationsNextPageRequest(string nextLink, string res
 1672        {
 01673            var message = _pipeline.CreateMessage();
 01674            var request = message.Request;
 01675            request.Method = RequestMethod.Get;
 01676            var uri = new RawRequestUriBuilder();
 01677            uri.Reset(endpoint);
 01678            uri.AppendRawNextLink(nextLink, false);
 01679            request.Uri = uri;
 01680            return message;
 1681        }
 1682
 1683        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1684        /// <param name="nextLink"> The URL to the next page of results. </param>
 1685        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1686        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1687        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1688        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1689        /// <param name="expand"> Expands referenced resources. </param>
 1690        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1691        public async Task<Response<NetworkInterfaceIPConfigurationListResult>> ListVirtualMachineScaleSetIpConfiguration
 1692        {
 01693            if (nextLink == null)
 1694            {
 01695                throw new ArgumentNullException(nameof(nextLink));
 1696            }
 01697            if (resourceGroupName == null)
 1698            {
 01699                throw new ArgumentNullException(nameof(resourceGroupName));
 1700            }
 01701            if (virtualMachineScaleSetName == null)
 1702            {
 01703                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1704            }
 01705            if (virtualmachineIndex == null)
 1706            {
 01707                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1708            }
 01709            if (networkInterfaceName == null)
 1710            {
 01711                throw new ArgumentNullException(nameof(networkInterfaceName));
 1712            }
 1713
 01714            using var message = CreateListVirtualMachineScaleSetIpConfigurationsNextPageRequest(nextLink, resourceGroupN
 01715            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01716            switch (message.Response.Status)
 1717            {
 1718                case 200:
 1719                    {
 01720                        NetworkInterfaceIPConfigurationListResult value = default;
 01721                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01722                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1723                        {
 01724                            value = null;
 1725                        }
 1726                        else
 1727                        {
 01728                            value = NetworkInterfaceIPConfigurationListResult.DeserializeNetworkInterfaceIPConfiguration
 1729                        }
 01730                        return Response.FromValue(value, message.Response);
 1731                    }
 1732                default:
 01733                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1734            }
 01735        }
 1736
 1737        /// <summary> Get the specified network interface ip configuration in a virtual machine scale set. </summary>
 1738        /// <param name="nextLink"> The URL to the next page of results. </param>
 1739        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1740        /// <param name="virtualMachineScaleSetName"> The name of the virtual machine scale set. </param>
 1741        /// <param name="virtualmachineIndex"> The virtual machine index. </param>
 1742        /// <param name="networkInterfaceName"> The name of the network interface. </param>
 1743        /// <param name="expand"> Expands referenced resources. </param>
 1744        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1745        public Response<NetworkInterfaceIPConfigurationListResult> ListVirtualMachineScaleSetIpConfigurationsNextPage(st
 1746        {
 01747            if (nextLink == null)
 1748            {
 01749                throw new ArgumentNullException(nameof(nextLink));
 1750            }
 01751            if (resourceGroupName == null)
 1752            {
 01753                throw new ArgumentNullException(nameof(resourceGroupName));
 1754            }
 01755            if (virtualMachineScaleSetName == null)
 1756            {
 01757                throw new ArgumentNullException(nameof(virtualMachineScaleSetName));
 1758            }
 01759            if (virtualmachineIndex == null)
 1760            {
 01761                throw new ArgumentNullException(nameof(virtualmachineIndex));
 1762            }
 01763            if (networkInterfaceName == null)
 1764            {
 01765                throw new ArgumentNullException(nameof(networkInterfaceName));
 1766            }
 1767
 01768            using var message = CreateListVirtualMachineScaleSetIpConfigurationsNextPageRequest(nextLink, resourceGroupN
 01769            _pipeline.Send(message, cancellationToken);
 01770            switch (message.Response.Status)
 1771            {
 1772                case 200:
 1773                    {
 01774                        NetworkInterfaceIPConfigurationListResult value = default;
 01775                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01776                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1777                        {
 01778                            value = null;
 1779                        }
 1780                        else
 1781                        {
 01782                            value = NetworkInterfaceIPConfigurationListResult.DeserializeNetworkInterfaceIPConfiguration
 1783                        }
 01784                        return Response.FromValue(value, message.Response);
 1785                    }
 1786                default:
 01787                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1788            }
 01789        }
 1790    }
 1791}

Methods/Properties

.ctor(...)
CreateDeleteRequest(...)
DeleteAsync()
Delete(...)
CreateGetRequest(...)
GetAsync()
Get(...)
CreateCreateOrUpdateRequest(...)
CreateOrUpdateAsync()
CreateOrUpdate(...)
CreateUpdateTagsRequest(...)
UpdateTagsAsync()
UpdateTags(...)
CreateListAllRequest()
ListAllAsync()
ListAll(...)
CreateListRequest(...)
ListAsync()
List(...)
CreateGetEffectiveRouteTableRequest(...)
GetEffectiveRouteTableAsync()
GetEffectiveRouteTable(...)
CreateListEffectiveNetworkSecurityGroupsRequest(...)
ListEffectiveNetworkSecurityGroupsAsync()
ListEffectiveNetworkSecurityGroups(...)
CreateListVirtualMachineScaleSetVMNetworkInterfacesRequest(...)
ListVirtualMachineScaleSetVMNetworkInterfacesAsync()
ListVirtualMachineScaleSetVMNetworkInterfaces(...)
CreateListVirtualMachineScaleSetNetworkInterfacesRequest(...)
ListVirtualMachineScaleSetNetworkInterfacesAsync()
ListVirtualMachineScaleSetNetworkInterfaces(...)
CreateGetVirtualMachineScaleSetNetworkInterfaceRequest(...)
GetVirtualMachineScaleSetNetworkInterfaceAsync()
GetVirtualMachineScaleSetNetworkInterface(...)
CreateListVirtualMachineScaleSetIpConfigurationsRequest(...)
ListVirtualMachineScaleSetIpConfigurationsAsync()
ListVirtualMachineScaleSetIpConfigurations(...)
CreateGetVirtualMachineScaleSetIpConfigurationRequest(...)
GetVirtualMachineScaleSetIpConfigurationAsync()
GetVirtualMachineScaleSetIpConfiguration(...)
CreateListAllNextPageRequest(...)
ListAllNextPageAsync()
ListAllNextPage(...)
CreateListNextPageRequest(...)
ListNextPageAsync()
ListNextPage(...)
CreateListVirtualMachineScaleSetVMNetworkInterfacesNextPageRequest(...)
ListVirtualMachineScaleSetVMNetworkInterfacesNextPageAsync()
ListVirtualMachineScaleSetVMNetworkInterfacesNextPage(...)
CreateListVirtualMachineScaleSetNetworkInterfacesNextPageRequest(...)
ListVirtualMachineScaleSetNetworkInterfacesNextPageAsync()
ListVirtualMachineScaleSetNetworkInterfacesNextPage(...)
CreateListVirtualMachineScaleSetIpConfigurationsNextPageRequest(...)
ListVirtualMachineScaleSetIpConfigurationsNextPageAsync()
ListVirtualMachineScaleSetIpConfigurationsNextPage(...)