< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
CreateDeleteRequest(...)-0%100%
DeleteAsync()-0%0%
Delete(...)-0%0%
CreateGetRequest(...)-0%100%
GetAsync()-0%0%
Get(...)-0%0%
CreateCreateOrUpdateRequest(...)-0%100%
CreateOrUpdateAsync()-0%0%
CreateOrUpdate(...)-0%0%
CreateUpdateTagsRequest(...)-0%100%
UpdateTagsAsync()-0%0%
UpdateTags(...)-0%0%
CreateListRequest(...)-0%100%
ListAsync()-0%0%
List(...)-0%0%
CreateListAllRequest()-0%100%
ListAllAsync()-0%0%
ListAll(...)-0%0%
CreateStartRequest(...)-0%100%
StartAsync()-0%0%
Start(...)-0%0%
CreateStopRequest(...)-0%100%
StopAsync()-0%0%
Stop(...)-0%0%
CreateBackendHealthRequest(...)-0%0%
BackendHealthAsync()-0%0%
BackendHealth(...)-0%0%
CreateBackendHealthOnDemandRequest(...)-0%0%
BackendHealthOnDemandAsync()-0%0%
BackendHealthOnDemand(...)-0%0%
CreateListAvailableServerVariablesRequest()-0%100%
ListAvailableServerVariablesAsync()-0%0%
ListAvailableServerVariables(...)-0%0%
CreateListAvailableRequestHeadersRequest()-0%100%
ListAvailableRequestHeadersAsync()-0%0%
ListAvailableRequestHeaders(...)-0%0%
CreateListAvailableResponseHeadersRequest()-0%100%
ListAvailableResponseHeadersAsync()-0%0%
ListAvailableResponseHeaders(...)-0%0%
CreateListAvailableWafRuleSetsRequest()-0%100%
ListAvailableWafRuleSetsAsync()-0%0%
ListAvailableWafRuleSets(...)-0%0%
CreateListAvailableSslOptionsRequest()-0%100%
ListAvailableSslOptionsAsync()-0%0%
ListAvailableSslOptions(...)-0%0%
CreateListAvailableSslPredefinedPoliciesRequest()-0%100%
ListAvailableSslPredefinedPoliciesAsync()-0%0%
ListAvailableSslPredefinedPolicies(...)-0%0%
CreateGetSslPredefinedPolicyRequest(...)-0%100%
GetSslPredefinedPolicyAsync()-0%0%
GetSslPredefinedPolicy(...)-0%0%
CreateListNextPageRequest(...)-0%100%
ListNextPageAsync()-0%0%
ListNextPage(...)-0%0%
CreateListAllNextPageRequest(...)-0%100%
ListAllNextPageAsync()-0%0%
ListAllNextPage(...)-0%0%
CreateListAvailableSslPredefinedPoliciesNextPageRequest(...)-0%100%
ListAvailableSslPredefinedPoliciesNextPageAsync()-0%0%
ListAvailableSslPredefinedPoliciesNextPage(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ApplicationGatewaysRestOperations.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.Collections.Generic;
 10using System.Text.Json;
 11using System.Threading;
 12using System.Threading.Tasks;
 13using Azure;
 14using Azure.Core;
 15using Azure.Core.Pipeline;
 16using Azure.ResourceManager.Network.Models;
 17
 18namespace Azure.ResourceManager.Network
 19{
 20    internal partial class ApplicationGatewaysRestOperations
 21    {
 22        private string subscriptionId;
 23        private Uri endpoint;
 24        private ClientDiagnostics _clientDiagnostics;
 25        private HttpPipeline _pipeline;
 26
 27        /// <summary> Initializes a new instance of ApplicationGatewaysRestOperations. </summary>
 28        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 29        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 30        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 31        /// <param name="endpoint"> server parameter. </param>
 32        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception
 033        public ApplicationGatewaysRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subs
 34        {
 035            if (subscriptionId == null)
 36            {
 037                throw new ArgumentNullException(nameof(subscriptionId));
 38            }
 039            endpoint ??= new Uri("https://management.azure.com");
 40
 041            this.subscriptionId = subscriptionId;
 042            this.endpoint = endpoint;
 043            _clientDiagnostics = clientDiagnostics;
 044            _pipeline = pipeline;
 045        }
 46
 47        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string applicationGatewayName)
 48        {
 049            var message = _pipeline.CreateMessage();
 050            var request = message.Request;
 051            request.Method = RequestMethod.Delete;
 052            var uri = new RawRequestUriBuilder();
 053            uri.Reset(endpoint);
 054            uri.AppendPath("/subscriptions/", false);
 055            uri.AppendPath(subscriptionId, true);
 056            uri.AppendPath("/resourceGroups/", false);
 057            uri.AppendPath(resourceGroupName, true);
 058            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 059            uri.AppendPath(applicationGatewayName, true);
 060            uri.AppendQuery("api-version", "2020-04-01", true);
 061            request.Uri = uri;
 062            return message;
 63        }
 64
 65        /// <summary> Deletes the specified application gateway. </summary>
 66        /// <param name="resourceGroupName"> The name of the resource group. </param>
 67        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 68        /// <param name="cancellationToken"> The cancellation token to use. </param>
 69        public async Task<Response> DeleteAsync(string resourceGroupName, string applicationGatewayName, CancellationTok
 70        {
 071            if (resourceGroupName == null)
 72            {
 073                throw new ArgumentNullException(nameof(resourceGroupName));
 74            }
 075            if (applicationGatewayName == null)
 76            {
 077                throw new ArgumentNullException(nameof(applicationGatewayName));
 78            }
 79
 080            using var message = CreateDeleteRequest(resourceGroupName, applicationGatewayName);
 081            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 082            switch (message.Response.Status)
 83            {
 84                case 200:
 85                case 202:
 86                case 204:
 087                    return message.Response;
 88                default:
 089                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 90            }
 091        }
 92
 93        /// <summary> Deletes the specified application gateway. </summary>
 94        /// <param name="resourceGroupName"> The name of the resource group. </param>
 95        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 96        /// <param name="cancellationToken"> The cancellation token to use. </param>
 97        public Response Delete(string resourceGroupName, string applicationGatewayName, CancellationToken cancellationTo
 98        {
 099            if (resourceGroupName == null)
 100            {
 0101                throw new ArgumentNullException(nameof(resourceGroupName));
 102            }
 0103            if (applicationGatewayName == null)
 104            {
 0105                throw new ArgumentNullException(nameof(applicationGatewayName));
 106            }
 107
 0108            using var message = CreateDeleteRequest(resourceGroupName, applicationGatewayName);
 0109            _pipeline.Send(message, cancellationToken);
 0110            switch (message.Response.Status)
 111            {
 112                case 200:
 113                case 202:
 114                case 204:
 0115                    return message.Response;
 116                default:
 0117                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 118            }
 0119        }
 120
 121        internal HttpMessage CreateGetRequest(string resourceGroupName, string applicationGatewayName)
 122        {
 0123            var message = _pipeline.CreateMessage();
 0124            var request = message.Request;
 0125            request.Method = RequestMethod.Get;
 0126            var uri = new RawRequestUriBuilder();
 0127            uri.Reset(endpoint);
 0128            uri.AppendPath("/subscriptions/", false);
 0129            uri.AppendPath(subscriptionId, true);
 0130            uri.AppendPath("/resourceGroups/", false);
 0131            uri.AppendPath(resourceGroupName, true);
 0132            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0133            uri.AppendPath(applicationGatewayName, true);
 0134            uri.AppendQuery("api-version", "2020-04-01", true);
 0135            request.Uri = uri;
 0136            return message;
 137        }
 138
 139        /// <summary> Gets the specified application gateway. </summary>
 140        /// <param name="resourceGroupName"> The name of the resource group. </param>
 141        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 142        /// <param name="cancellationToken"> The cancellation token to use. </param>
 143        public async Task<Response<ApplicationGateway>> GetAsync(string resourceGroupName, string applicationGatewayName
 144        {
 0145            if (resourceGroupName == null)
 146            {
 0147                throw new ArgumentNullException(nameof(resourceGroupName));
 148            }
 0149            if (applicationGatewayName == null)
 150            {
 0151                throw new ArgumentNullException(nameof(applicationGatewayName));
 152            }
 153
 0154            using var message = CreateGetRequest(resourceGroupName, applicationGatewayName);
 0155            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0156            switch (message.Response.Status)
 157            {
 158                case 200:
 159                    {
 0160                        ApplicationGateway value = default;
 0161                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0162                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 163                        {
 0164                            value = null;
 165                        }
 166                        else
 167                        {
 0168                            value = ApplicationGateway.DeserializeApplicationGateway(document.RootElement);
 169                        }
 0170                        return Response.FromValue(value, message.Response);
 171                    }
 172                default:
 0173                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 174            }
 0175        }
 176
 177        /// <summary> Gets the specified application gateway. </summary>
 178        /// <param name="resourceGroupName"> The name of the resource group. </param>
 179        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 180        /// <param name="cancellationToken"> The cancellation token to use. </param>
 181        public Response<ApplicationGateway> Get(string resourceGroupName, string applicationGatewayName, CancellationTok
 182        {
 0183            if (resourceGroupName == null)
 184            {
 0185                throw new ArgumentNullException(nameof(resourceGroupName));
 186            }
 0187            if (applicationGatewayName == null)
 188            {
 0189                throw new ArgumentNullException(nameof(applicationGatewayName));
 190            }
 191
 0192            using var message = CreateGetRequest(resourceGroupName, applicationGatewayName);
 0193            _pipeline.Send(message, cancellationToken);
 0194            switch (message.Response.Status)
 195            {
 196                case 200:
 197                    {
 0198                        ApplicationGateway value = default;
 0199                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0200                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 201                        {
 0202                            value = null;
 203                        }
 204                        else
 205                        {
 0206                            value = ApplicationGateway.DeserializeApplicationGateway(document.RootElement);
 207                        }
 0208                        return Response.FromValue(value, message.Response);
 209                    }
 210                default:
 0211                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 212            }
 0213        }
 214
 215        internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string applicationGatewayName, Applic
 216        {
 0217            var message = _pipeline.CreateMessage();
 0218            var request = message.Request;
 0219            request.Method = RequestMethod.Put;
 0220            var uri = new RawRequestUriBuilder();
 0221            uri.Reset(endpoint);
 0222            uri.AppendPath("/subscriptions/", false);
 0223            uri.AppendPath(subscriptionId, true);
 0224            uri.AppendPath("/resourceGroups/", false);
 0225            uri.AppendPath(resourceGroupName, true);
 0226            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0227            uri.AppendPath(applicationGatewayName, true);
 0228            uri.AppendQuery("api-version", "2020-04-01", true);
 0229            request.Uri = uri;
 0230            request.Headers.Add("Content-Type", "application/json");
 0231            var content = new Utf8JsonRequestContent();
 0232            content.JsonWriter.WriteObjectValue(parameters);
 0233            request.Content = content;
 0234            return message;
 235        }
 236
 237        /// <summary> Creates or updates the specified application gateway. </summary>
 238        /// <param name="resourceGroupName"> The name of the resource group. </param>
 239        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 240        /// <param name="parameters"> Parameters supplied to the create or update application gateway operation. </param
 241        /// <param name="cancellationToken"> The cancellation token to use. </param>
 242        public async Task<Response> CreateOrUpdateAsync(string resourceGroupName, string applicationGatewayName, Applica
 243        {
 0244            if (resourceGroupName == null)
 245            {
 0246                throw new ArgumentNullException(nameof(resourceGroupName));
 247            }
 0248            if (applicationGatewayName == null)
 249            {
 0250                throw new ArgumentNullException(nameof(applicationGatewayName));
 251            }
 0252            if (parameters == null)
 253            {
 0254                throw new ArgumentNullException(nameof(parameters));
 255            }
 256
 0257            using var message = CreateCreateOrUpdateRequest(resourceGroupName, applicationGatewayName, parameters);
 0258            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0259            switch (message.Response.Status)
 260            {
 261                case 200:
 262                case 201:
 0263                    return message.Response;
 264                default:
 0265                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 266            }
 0267        }
 268
 269        /// <summary> Creates or updates the specified application gateway. </summary>
 270        /// <param name="resourceGroupName"> The name of the resource group. </param>
 271        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 272        /// <param name="parameters"> Parameters supplied to the create or update application gateway operation. </param
 273        /// <param name="cancellationToken"> The cancellation token to use. </param>
 274        public Response CreateOrUpdate(string resourceGroupName, string applicationGatewayName, ApplicationGateway param
 275        {
 0276            if (resourceGroupName == null)
 277            {
 0278                throw new ArgumentNullException(nameof(resourceGroupName));
 279            }
 0280            if (applicationGatewayName == null)
 281            {
 0282                throw new ArgumentNullException(nameof(applicationGatewayName));
 283            }
 0284            if (parameters == null)
 285            {
 0286                throw new ArgumentNullException(nameof(parameters));
 287            }
 288
 0289            using var message = CreateCreateOrUpdateRequest(resourceGroupName, applicationGatewayName, parameters);
 0290            _pipeline.Send(message, cancellationToken);
 0291            switch (message.Response.Status)
 292            {
 293                case 200:
 294                case 201:
 0295                    return message.Response;
 296                default:
 0297                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 298            }
 0299        }
 300
 301        internal HttpMessage CreateUpdateTagsRequest(string resourceGroupName, string applicationGatewayName, TagsObject
 302        {
 0303            var message = _pipeline.CreateMessage();
 0304            var request = message.Request;
 0305            request.Method = RequestMethod.Patch;
 0306            var uri = new RawRequestUriBuilder();
 0307            uri.Reset(endpoint);
 0308            uri.AppendPath("/subscriptions/", false);
 0309            uri.AppendPath(subscriptionId, true);
 0310            uri.AppendPath("/resourceGroups/", false);
 0311            uri.AppendPath(resourceGroupName, true);
 0312            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0313            uri.AppendPath(applicationGatewayName, true);
 0314            uri.AppendQuery("api-version", "2020-04-01", true);
 0315            request.Uri = uri;
 0316            request.Headers.Add("Content-Type", "application/json");
 0317            var content = new Utf8JsonRequestContent();
 0318            content.JsonWriter.WriteObjectValue(parameters);
 0319            request.Content = content;
 0320            return message;
 321        }
 322
 323        /// <summary> Updates the specified application gateway tags. </summary>
 324        /// <param name="resourceGroupName"> The name of the resource group. </param>
 325        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 326        /// <param name="parameters"> Parameters supplied to update application gateway tags. </param>
 327        /// <param name="cancellationToken"> The cancellation token to use. </param>
 328        public async Task<Response<ApplicationGateway>> UpdateTagsAsync(string resourceGroupName, string applicationGate
 329        {
 0330            if (resourceGroupName == null)
 331            {
 0332                throw new ArgumentNullException(nameof(resourceGroupName));
 333            }
 0334            if (applicationGatewayName == null)
 335            {
 0336                throw new ArgumentNullException(nameof(applicationGatewayName));
 337            }
 0338            if (parameters == null)
 339            {
 0340                throw new ArgumentNullException(nameof(parameters));
 341            }
 342
 0343            using var message = CreateUpdateTagsRequest(resourceGroupName, applicationGatewayName, parameters);
 0344            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0345            switch (message.Response.Status)
 346            {
 347                case 200:
 348                    {
 0349                        ApplicationGateway value = default;
 0350                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0351                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 352                        {
 0353                            value = null;
 354                        }
 355                        else
 356                        {
 0357                            value = ApplicationGateway.DeserializeApplicationGateway(document.RootElement);
 358                        }
 0359                        return Response.FromValue(value, message.Response);
 360                    }
 361                default:
 0362                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 363            }
 0364        }
 365
 366        /// <summary> Updates the specified application gateway tags. </summary>
 367        /// <param name="resourceGroupName"> The name of the resource group. </param>
 368        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 369        /// <param name="parameters"> Parameters supplied to update application gateway tags. </param>
 370        /// <param name="cancellationToken"> The cancellation token to use. </param>
 371        public Response<ApplicationGateway> UpdateTags(string resourceGroupName, string applicationGatewayName, TagsObje
 372        {
 0373            if (resourceGroupName == null)
 374            {
 0375                throw new ArgumentNullException(nameof(resourceGroupName));
 376            }
 0377            if (applicationGatewayName == null)
 378            {
 0379                throw new ArgumentNullException(nameof(applicationGatewayName));
 380            }
 0381            if (parameters == null)
 382            {
 0383                throw new ArgumentNullException(nameof(parameters));
 384            }
 385
 0386            using var message = CreateUpdateTagsRequest(resourceGroupName, applicationGatewayName, parameters);
 0387            _pipeline.Send(message, cancellationToken);
 0388            switch (message.Response.Status)
 389            {
 390                case 200:
 391                    {
 0392                        ApplicationGateway value = default;
 0393                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0394                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 395                        {
 0396                            value = null;
 397                        }
 398                        else
 399                        {
 0400                            value = ApplicationGateway.DeserializeApplicationGateway(document.RootElement);
 401                        }
 0402                        return Response.FromValue(value, message.Response);
 403                    }
 404                default:
 0405                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 406            }
 0407        }
 408
 409        internal HttpMessage CreateListRequest(string resourceGroupName)
 410        {
 0411            var message = _pipeline.CreateMessage();
 0412            var request = message.Request;
 0413            request.Method = RequestMethod.Get;
 0414            var uri = new RawRequestUriBuilder();
 0415            uri.Reset(endpoint);
 0416            uri.AppendPath("/subscriptions/", false);
 0417            uri.AppendPath(subscriptionId, true);
 0418            uri.AppendPath("/resourceGroups/", false);
 0419            uri.AppendPath(resourceGroupName, true);
 0420            uri.AppendPath("/providers/Microsoft.Network/applicationGateways", false);
 0421            uri.AppendQuery("api-version", "2020-04-01", true);
 0422            request.Uri = uri;
 0423            return message;
 424        }
 425
 426        /// <summary> Lists all application gateways in a resource group. </summary>
 427        /// <param name="resourceGroupName"> The name of the resource group. </param>
 428        /// <param name="cancellationToken"> The cancellation token to use. </param>
 429        public async Task<Response<ApplicationGatewayListResult>> ListAsync(string resourceGroupName, CancellationToken 
 430        {
 0431            if (resourceGroupName == null)
 432            {
 0433                throw new ArgumentNullException(nameof(resourceGroupName));
 434            }
 435
 0436            using var message = CreateListRequest(resourceGroupName);
 0437            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0438            switch (message.Response.Status)
 439            {
 440                case 200:
 441                    {
 0442                        ApplicationGatewayListResult value = default;
 0443                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0444                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 445                        {
 0446                            value = null;
 447                        }
 448                        else
 449                        {
 0450                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 451                        }
 0452                        return Response.FromValue(value, message.Response);
 453                    }
 454                default:
 0455                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 456            }
 0457        }
 458
 459        /// <summary> Lists all application gateways in a resource group. </summary>
 460        /// <param name="resourceGroupName"> The name of the resource group. </param>
 461        /// <param name="cancellationToken"> The cancellation token to use. </param>
 462        public Response<ApplicationGatewayListResult> List(string resourceGroupName, CancellationToken cancellationToken
 463        {
 0464            if (resourceGroupName == null)
 465            {
 0466                throw new ArgumentNullException(nameof(resourceGroupName));
 467            }
 468
 0469            using var message = CreateListRequest(resourceGroupName);
 0470            _pipeline.Send(message, cancellationToken);
 0471            switch (message.Response.Status)
 472            {
 473                case 200:
 474                    {
 0475                        ApplicationGatewayListResult value = default;
 0476                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0477                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 478                        {
 0479                            value = null;
 480                        }
 481                        else
 482                        {
 0483                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 484                        }
 0485                        return Response.FromValue(value, message.Response);
 486                    }
 487                default:
 0488                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 489            }
 0490        }
 491
 492        internal HttpMessage CreateListAllRequest()
 493        {
 0494            var message = _pipeline.CreateMessage();
 0495            var request = message.Request;
 0496            request.Method = RequestMethod.Get;
 0497            var uri = new RawRequestUriBuilder();
 0498            uri.Reset(endpoint);
 0499            uri.AppendPath("/subscriptions/", false);
 0500            uri.AppendPath(subscriptionId, true);
 0501            uri.AppendPath("/providers/Microsoft.Network/applicationGateways", false);
 0502            uri.AppendQuery("api-version", "2020-04-01", true);
 0503            request.Uri = uri;
 0504            return message;
 505        }
 506
 507        /// <summary> Gets all the application gateways in a subscription. </summary>
 508        /// <param name="cancellationToken"> The cancellation token to use. </param>
 509        public async Task<Response<ApplicationGatewayListResult>> ListAllAsync(CancellationToken cancellationToken = def
 510        {
 0511            using var message = CreateListAllRequest();
 0512            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0513            switch (message.Response.Status)
 514            {
 515                case 200:
 516                    {
 0517                        ApplicationGatewayListResult value = default;
 0518                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0519                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 520                        {
 0521                            value = null;
 522                        }
 523                        else
 524                        {
 0525                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 526                        }
 0527                        return Response.FromValue(value, message.Response);
 528                    }
 529                default:
 0530                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 531            }
 0532        }
 533
 534        /// <summary> Gets all the application gateways in a subscription. </summary>
 535        /// <param name="cancellationToken"> The cancellation token to use. </param>
 536        public Response<ApplicationGatewayListResult> ListAll(CancellationToken cancellationToken = default)
 537        {
 0538            using var message = CreateListAllRequest();
 0539            _pipeline.Send(message, cancellationToken);
 0540            switch (message.Response.Status)
 541            {
 542                case 200:
 543                    {
 0544                        ApplicationGatewayListResult value = default;
 0545                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0546                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 547                        {
 0548                            value = null;
 549                        }
 550                        else
 551                        {
 0552                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 553                        }
 0554                        return Response.FromValue(value, message.Response);
 555                    }
 556                default:
 0557                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 558            }
 0559        }
 560
 561        internal HttpMessage CreateStartRequest(string resourceGroupName, string applicationGatewayName)
 562        {
 0563            var message = _pipeline.CreateMessage();
 0564            var request = message.Request;
 0565            request.Method = RequestMethod.Post;
 0566            var uri = new RawRequestUriBuilder();
 0567            uri.Reset(endpoint);
 0568            uri.AppendPath("/subscriptions/", false);
 0569            uri.AppendPath(subscriptionId, true);
 0570            uri.AppendPath("/resourceGroups/", false);
 0571            uri.AppendPath(resourceGroupName, true);
 0572            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0573            uri.AppendPath(applicationGatewayName, true);
 0574            uri.AppendPath("/start", false);
 0575            uri.AppendQuery("api-version", "2020-04-01", true);
 0576            request.Uri = uri;
 0577            return message;
 578        }
 579
 580        /// <summary> Starts the specified application gateway. </summary>
 581        /// <param name="resourceGroupName"> The name of the resource group. </param>
 582        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 583        /// <param name="cancellationToken"> The cancellation token to use. </param>
 584        public async Task<Response> StartAsync(string resourceGroupName, string applicationGatewayName, CancellationToke
 585        {
 0586            if (resourceGroupName == null)
 587            {
 0588                throw new ArgumentNullException(nameof(resourceGroupName));
 589            }
 0590            if (applicationGatewayName == null)
 591            {
 0592                throw new ArgumentNullException(nameof(applicationGatewayName));
 593            }
 594
 0595            using var message = CreateStartRequest(resourceGroupName, applicationGatewayName);
 0596            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0597            switch (message.Response.Status)
 598            {
 599                case 200:
 600                case 202:
 0601                    return message.Response;
 602                default:
 0603                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 604            }
 0605        }
 606
 607        /// <summary> Starts the specified application gateway. </summary>
 608        /// <param name="resourceGroupName"> The name of the resource group. </param>
 609        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 610        /// <param name="cancellationToken"> The cancellation token to use. </param>
 611        public Response Start(string resourceGroupName, string applicationGatewayName, CancellationToken cancellationTok
 612        {
 0613            if (resourceGroupName == null)
 614            {
 0615                throw new ArgumentNullException(nameof(resourceGroupName));
 616            }
 0617            if (applicationGatewayName == null)
 618            {
 0619                throw new ArgumentNullException(nameof(applicationGatewayName));
 620            }
 621
 0622            using var message = CreateStartRequest(resourceGroupName, applicationGatewayName);
 0623            _pipeline.Send(message, cancellationToken);
 0624            switch (message.Response.Status)
 625            {
 626                case 200:
 627                case 202:
 0628                    return message.Response;
 629                default:
 0630                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 631            }
 0632        }
 633
 634        internal HttpMessage CreateStopRequest(string resourceGroupName, string applicationGatewayName)
 635        {
 0636            var message = _pipeline.CreateMessage();
 0637            var request = message.Request;
 0638            request.Method = RequestMethod.Post;
 0639            var uri = new RawRequestUriBuilder();
 0640            uri.Reset(endpoint);
 0641            uri.AppendPath("/subscriptions/", false);
 0642            uri.AppendPath(subscriptionId, true);
 0643            uri.AppendPath("/resourceGroups/", false);
 0644            uri.AppendPath(resourceGroupName, true);
 0645            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0646            uri.AppendPath(applicationGatewayName, true);
 0647            uri.AppendPath("/stop", false);
 0648            uri.AppendQuery("api-version", "2020-04-01", true);
 0649            request.Uri = uri;
 0650            return message;
 651        }
 652
 653        /// <summary> Stops the specified application gateway in a resource group. </summary>
 654        /// <param name="resourceGroupName"> The name of the resource group. </param>
 655        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 656        /// <param name="cancellationToken"> The cancellation token to use. </param>
 657        public async Task<Response> StopAsync(string resourceGroupName, string applicationGatewayName, CancellationToken
 658        {
 0659            if (resourceGroupName == null)
 660            {
 0661                throw new ArgumentNullException(nameof(resourceGroupName));
 662            }
 0663            if (applicationGatewayName == null)
 664            {
 0665                throw new ArgumentNullException(nameof(applicationGatewayName));
 666            }
 667
 0668            using var message = CreateStopRequest(resourceGroupName, applicationGatewayName);
 0669            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0670            switch (message.Response.Status)
 671            {
 672                case 200:
 673                case 202:
 0674                    return message.Response;
 675                default:
 0676                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 677            }
 0678        }
 679
 680        /// <summary> Stops the specified application gateway in a resource group. </summary>
 681        /// <param name="resourceGroupName"> The name of the resource group. </param>
 682        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 683        /// <param name="cancellationToken"> The cancellation token to use. </param>
 684        public Response Stop(string resourceGroupName, string applicationGatewayName, CancellationToken cancellationToke
 685        {
 0686            if (resourceGroupName == null)
 687            {
 0688                throw new ArgumentNullException(nameof(resourceGroupName));
 689            }
 0690            if (applicationGatewayName == null)
 691            {
 0692                throw new ArgumentNullException(nameof(applicationGatewayName));
 693            }
 694
 0695            using var message = CreateStopRequest(resourceGroupName, applicationGatewayName);
 0696            _pipeline.Send(message, cancellationToken);
 0697            switch (message.Response.Status)
 698            {
 699                case 200:
 700                case 202:
 0701                    return message.Response;
 702                default:
 0703                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 704            }
 0705        }
 706
 707        internal HttpMessage CreateBackendHealthRequest(string resourceGroupName, string applicationGatewayName, string 
 708        {
 0709            var message = _pipeline.CreateMessage();
 0710            var request = message.Request;
 0711            request.Method = RequestMethod.Post;
 0712            var uri = new RawRequestUriBuilder();
 0713            uri.Reset(endpoint);
 0714            uri.AppendPath("/subscriptions/", false);
 0715            uri.AppendPath(subscriptionId, true);
 0716            uri.AppendPath("/resourceGroups/", false);
 0717            uri.AppendPath(resourceGroupName, true);
 0718            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0719            uri.AppendPath(applicationGatewayName, true);
 0720            uri.AppendPath("/backendhealth", false);
 0721            uri.AppendQuery("api-version", "2020-04-01", true);
 0722            if (expand != null)
 723            {
 0724                uri.AppendQuery("$expand", expand, true);
 725            }
 0726            request.Uri = uri;
 0727            return message;
 728        }
 729
 730        /// <summary> Gets the backend health of the specified application gateway in a resource group. </summary>
 731        /// <param name="resourceGroupName"> The name of the resource group. </param>
 732        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 733        /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par
 734        /// <param name="cancellationToken"> The cancellation token to use. </param>
 735        public async Task<Response> BackendHealthAsync(string resourceGroupName, string applicationGatewayName, string e
 736        {
 0737            if (resourceGroupName == null)
 738            {
 0739                throw new ArgumentNullException(nameof(resourceGroupName));
 740            }
 0741            if (applicationGatewayName == null)
 742            {
 0743                throw new ArgumentNullException(nameof(applicationGatewayName));
 744            }
 745
 0746            using var message = CreateBackendHealthRequest(resourceGroupName, applicationGatewayName, expand);
 0747            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0748            switch (message.Response.Status)
 749            {
 750                case 200:
 751                case 202:
 0752                    return message.Response;
 753                default:
 0754                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 755            }
 0756        }
 757
 758        /// <summary> Gets the backend health of the specified application gateway in a resource group. </summary>
 759        /// <param name="resourceGroupName"> The name of the resource group. </param>
 760        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 761        /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par
 762        /// <param name="cancellationToken"> The cancellation token to use. </param>
 763        public Response BackendHealth(string resourceGroupName, string applicationGatewayName, string expand = null, Can
 764        {
 0765            if (resourceGroupName == null)
 766            {
 0767                throw new ArgumentNullException(nameof(resourceGroupName));
 768            }
 0769            if (applicationGatewayName == null)
 770            {
 0771                throw new ArgumentNullException(nameof(applicationGatewayName));
 772            }
 773
 0774            using var message = CreateBackendHealthRequest(resourceGroupName, applicationGatewayName, expand);
 0775            _pipeline.Send(message, cancellationToken);
 0776            switch (message.Response.Status)
 777            {
 778                case 200:
 779                case 202:
 0780                    return message.Response;
 781                default:
 0782                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 783            }
 0784        }
 785
 786        internal HttpMessage CreateBackendHealthOnDemandRequest(string resourceGroupName, string applicationGatewayName,
 787        {
 0788            var message = _pipeline.CreateMessage();
 0789            var request = message.Request;
 0790            request.Method = RequestMethod.Post;
 0791            var uri = new RawRequestUriBuilder();
 0792            uri.Reset(endpoint);
 0793            uri.AppendPath("/subscriptions/", false);
 0794            uri.AppendPath(subscriptionId, true);
 0795            uri.AppendPath("/resourceGroups/", false);
 0796            uri.AppendPath(resourceGroupName, true);
 0797            uri.AppendPath("/providers/Microsoft.Network/applicationGateways/", false);
 0798            uri.AppendPath(applicationGatewayName, true);
 0799            uri.AppendPath("/getBackendHealthOnDemand", false);
 0800            uri.AppendQuery("api-version", "2020-04-01", true);
 0801            if (expand != null)
 802            {
 0803                uri.AppendQuery("$expand", expand, true);
 804            }
 0805            request.Uri = uri;
 0806            request.Headers.Add("Content-Type", "application/json");
 0807            var content = new Utf8JsonRequestContent();
 0808            content.JsonWriter.WriteObjectValue(probeRequest);
 0809            request.Content = content;
 0810            return message;
 811        }
 812
 813        /// <summary> Gets the backend health for given combination of backend pool and http setting of the specified ap
 814        /// <param name="resourceGroupName"> The name of the resource group. </param>
 815        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 816        /// <param name="probeRequest"> Request body for on-demand test probe operation. </param>
 817        /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par
 818        /// <param name="cancellationToken"> The cancellation token to use. </param>
 819        public async Task<Response> BackendHealthOnDemandAsync(string resourceGroupName, string applicationGatewayName, 
 820        {
 0821            if (resourceGroupName == null)
 822            {
 0823                throw new ArgumentNullException(nameof(resourceGroupName));
 824            }
 0825            if (applicationGatewayName == null)
 826            {
 0827                throw new ArgumentNullException(nameof(applicationGatewayName));
 828            }
 0829            if (probeRequest == null)
 830            {
 0831                throw new ArgumentNullException(nameof(probeRequest));
 832            }
 833
 0834            using var message = CreateBackendHealthOnDemandRequest(resourceGroupName, applicationGatewayName, probeReque
 0835            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0836            switch (message.Response.Status)
 837            {
 838                case 200:
 839                case 202:
 0840                    return message.Response;
 841                default:
 0842                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 843            }
 0844        }
 845
 846        /// <summary> Gets the backend health for given combination of backend pool and http setting of the specified ap
 847        /// <param name="resourceGroupName"> The name of the resource group. </param>
 848        /// <param name="applicationGatewayName"> The name of the application gateway. </param>
 849        /// <param name="probeRequest"> Request body for on-demand test probe operation. </param>
 850        /// <param name="expand"> Expands BackendAddressPool and BackendHttpSettings referenced in backend health. </par
 851        /// <param name="cancellationToken"> The cancellation token to use. </param>
 852        public Response BackendHealthOnDemand(string resourceGroupName, string applicationGatewayName, ApplicationGatewa
 853        {
 0854            if (resourceGroupName == null)
 855            {
 0856                throw new ArgumentNullException(nameof(resourceGroupName));
 857            }
 0858            if (applicationGatewayName == null)
 859            {
 0860                throw new ArgumentNullException(nameof(applicationGatewayName));
 861            }
 0862            if (probeRequest == null)
 863            {
 0864                throw new ArgumentNullException(nameof(probeRequest));
 865            }
 866
 0867            using var message = CreateBackendHealthOnDemandRequest(resourceGroupName, applicationGatewayName, probeReque
 0868            _pipeline.Send(message, cancellationToken);
 0869            switch (message.Response.Status)
 870            {
 871                case 200:
 872                case 202:
 0873                    return message.Response;
 874                default:
 0875                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 876            }
 0877        }
 878
 879        internal HttpMessage CreateListAvailableServerVariablesRequest()
 880        {
 0881            var message = _pipeline.CreateMessage();
 0882            var request = message.Request;
 0883            request.Method = RequestMethod.Get;
 0884            var uri = new RawRequestUriBuilder();
 0885            uri.Reset(endpoint);
 0886            uri.AppendPath("/subscriptions/", false);
 0887            uri.AppendPath(subscriptionId, true);
 0888            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", false);
 0889            uri.AppendQuery("api-version", "2020-04-01", true);
 0890            request.Uri = uri;
 0891            return message;
 892        }
 893
 894        /// <summary> Lists all available server variables. </summary>
 895        /// <param name="cancellationToken"> The cancellation token to use. </param>
 896        public async Task<Response<IReadOnlyList<string>>> ListAvailableServerVariablesAsync(CancellationToken cancellat
 897        {
 0898            using var message = CreateListAvailableServerVariablesRequest();
 0899            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0900            switch (message.Response.Status)
 901            {
 902                case 200:
 903                    {
 0904                        IReadOnlyList<string> value = default;
 0905                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0906                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 907                        {
 0908                            value = null;
 909                        }
 910                        else
 911                        {
 0912                            List<string> array = new List<string>();
 0913                            foreach (var item in document.RootElement.EnumerateArray())
 914                            {
 0915                                if (item.ValueKind == JsonValueKind.Null)
 916                                {
 0917                                    array.Add(null);
 918                                }
 919                                else
 920                                {
 0921                                    array.Add(item.GetString());
 922                                }
 923                            }
 0924                            value = array;
 925                        }
 0926                        return Response.FromValue(value, message.Response);
 927                    }
 928                default:
 0929                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 930            }
 0931        }
 932
 933        /// <summary> Lists all available server variables. </summary>
 934        /// <param name="cancellationToken"> The cancellation token to use. </param>
 935        public Response<IReadOnlyList<string>> ListAvailableServerVariables(CancellationToken cancellationToken = defaul
 936        {
 0937            using var message = CreateListAvailableServerVariablesRequest();
 0938            _pipeline.Send(message, cancellationToken);
 0939            switch (message.Response.Status)
 940            {
 941                case 200:
 942                    {
 0943                        IReadOnlyList<string> value = default;
 0944                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0945                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 946                        {
 0947                            value = null;
 948                        }
 949                        else
 950                        {
 0951                            List<string> array = new List<string>();
 0952                            foreach (var item in document.RootElement.EnumerateArray())
 953                            {
 0954                                if (item.ValueKind == JsonValueKind.Null)
 955                                {
 0956                                    array.Add(null);
 957                                }
 958                                else
 959                                {
 0960                                    array.Add(item.GetString());
 961                                }
 962                            }
 0963                            value = array;
 964                        }
 0965                        return Response.FromValue(value, message.Response);
 966                    }
 967                default:
 0968                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 969            }
 0970        }
 971
 972        internal HttpMessage CreateListAvailableRequestHeadersRequest()
 973        {
 0974            var message = _pipeline.CreateMessage();
 0975            var request = message.Request;
 0976            request.Method = RequestMethod.Get;
 0977            var uri = new RawRequestUriBuilder();
 0978            uri.Reset(endpoint);
 0979            uri.AppendPath("/subscriptions/", false);
 0980            uri.AppendPath(subscriptionId, true);
 0981            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", false);
 0982            uri.AppendQuery("api-version", "2020-04-01", true);
 0983            request.Uri = uri;
 0984            return message;
 985        }
 986
 987        /// <summary> Lists all available request headers. </summary>
 988        /// <param name="cancellationToken"> The cancellation token to use. </param>
 989        public async Task<Response<IReadOnlyList<string>>> ListAvailableRequestHeadersAsync(CancellationToken cancellati
 990        {
 0991            using var message = CreateListAvailableRequestHeadersRequest();
 0992            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0993            switch (message.Response.Status)
 994            {
 995                case 200:
 996                    {
 0997                        IReadOnlyList<string> value = default;
 0998                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0999                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1000                        {
 01001                            value = null;
 1002                        }
 1003                        else
 1004                        {
 01005                            List<string> array = new List<string>();
 01006                            foreach (var item in document.RootElement.EnumerateArray())
 1007                            {
 01008                                if (item.ValueKind == JsonValueKind.Null)
 1009                                {
 01010                                    array.Add(null);
 1011                                }
 1012                                else
 1013                                {
 01014                                    array.Add(item.GetString());
 1015                                }
 1016                            }
 01017                            value = array;
 1018                        }
 01019                        return Response.FromValue(value, message.Response);
 1020                    }
 1021                default:
 01022                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1023            }
 01024        }
 1025
 1026        /// <summary> Lists all available request headers. </summary>
 1027        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1028        public Response<IReadOnlyList<string>> ListAvailableRequestHeaders(CancellationToken cancellationToken = default
 1029        {
 01030            using var message = CreateListAvailableRequestHeadersRequest();
 01031            _pipeline.Send(message, cancellationToken);
 01032            switch (message.Response.Status)
 1033            {
 1034                case 200:
 1035                    {
 01036                        IReadOnlyList<string> value = default;
 01037                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01038                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1039                        {
 01040                            value = null;
 1041                        }
 1042                        else
 1043                        {
 01044                            List<string> array = new List<string>();
 01045                            foreach (var item in document.RootElement.EnumerateArray())
 1046                            {
 01047                                if (item.ValueKind == JsonValueKind.Null)
 1048                                {
 01049                                    array.Add(null);
 1050                                }
 1051                                else
 1052                                {
 01053                                    array.Add(item.GetString());
 1054                                }
 1055                            }
 01056                            value = array;
 1057                        }
 01058                        return Response.FromValue(value, message.Response);
 1059                    }
 1060                default:
 01061                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1062            }
 01063        }
 1064
 1065        internal HttpMessage CreateListAvailableResponseHeadersRequest()
 1066        {
 01067            var message = _pipeline.CreateMessage();
 01068            var request = message.Request;
 01069            request.Method = RequestMethod.Get;
 01070            var uri = new RawRequestUriBuilder();
 01071            uri.Reset(endpoint);
 01072            uri.AppendPath("/subscriptions/", false);
 01073            uri.AppendPath(subscriptionId, true);
 01074            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", false);
 01075            uri.AppendQuery("api-version", "2020-04-01", true);
 01076            request.Uri = uri;
 01077            return message;
 1078        }
 1079
 1080        /// <summary> Lists all available response headers. </summary>
 1081        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1082        public async Task<Response<IReadOnlyList<string>>> ListAvailableResponseHeadersAsync(CancellationToken cancellat
 1083        {
 01084            using var message = CreateListAvailableResponseHeadersRequest();
 01085            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01086            switch (message.Response.Status)
 1087            {
 1088                case 200:
 1089                    {
 01090                        IReadOnlyList<string> value = default;
 01091                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01092                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1093                        {
 01094                            value = null;
 1095                        }
 1096                        else
 1097                        {
 01098                            List<string> array = new List<string>();
 01099                            foreach (var item in document.RootElement.EnumerateArray())
 1100                            {
 01101                                if (item.ValueKind == JsonValueKind.Null)
 1102                                {
 01103                                    array.Add(null);
 1104                                }
 1105                                else
 1106                                {
 01107                                    array.Add(item.GetString());
 1108                                }
 1109                            }
 01110                            value = array;
 1111                        }
 01112                        return Response.FromValue(value, message.Response);
 1113                    }
 1114                default:
 01115                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1116            }
 01117        }
 1118
 1119        /// <summary> Lists all available response headers. </summary>
 1120        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1121        public Response<IReadOnlyList<string>> ListAvailableResponseHeaders(CancellationToken cancellationToken = defaul
 1122        {
 01123            using var message = CreateListAvailableResponseHeadersRequest();
 01124            _pipeline.Send(message, cancellationToken);
 01125            switch (message.Response.Status)
 1126            {
 1127                case 200:
 1128                    {
 01129                        IReadOnlyList<string> value = default;
 01130                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01131                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1132                        {
 01133                            value = null;
 1134                        }
 1135                        else
 1136                        {
 01137                            List<string> array = new List<string>();
 01138                            foreach (var item in document.RootElement.EnumerateArray())
 1139                            {
 01140                                if (item.ValueKind == JsonValueKind.Null)
 1141                                {
 01142                                    array.Add(null);
 1143                                }
 1144                                else
 1145                                {
 01146                                    array.Add(item.GetString());
 1147                                }
 1148                            }
 01149                            value = array;
 1150                        }
 01151                        return Response.FromValue(value, message.Response);
 1152                    }
 1153                default:
 01154                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1155            }
 01156        }
 1157
 1158        internal HttpMessage CreateListAvailableWafRuleSetsRequest()
 1159        {
 01160            var message = _pipeline.CreateMessage();
 01161            var request = message.Request;
 01162            request.Method = RequestMethod.Get;
 01163            var uri = new RawRequestUriBuilder();
 01164            uri.Reset(endpoint);
 01165            uri.AppendPath("/subscriptions/", false);
 01166            uri.AppendPath(subscriptionId, true);
 01167            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", false);
 01168            uri.AppendQuery("api-version", "2020-04-01", true);
 01169            request.Uri = uri;
 01170            return message;
 1171        }
 1172
 1173        /// <summary> Lists all available web application firewall rule sets. </summary>
 1174        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1175        public async Task<Response<ApplicationGatewayAvailableWafRuleSetsResult>> ListAvailableWafRuleSetsAsync(Cancella
 1176        {
 01177            using var message = CreateListAvailableWafRuleSetsRequest();
 01178            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01179            switch (message.Response.Status)
 1180            {
 1181                case 200:
 1182                    {
 01183                        ApplicationGatewayAvailableWafRuleSetsResult value = default;
 01184                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01185                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1186                        {
 01187                            value = null;
 1188                        }
 1189                        else
 1190                        {
 01191                            value = ApplicationGatewayAvailableWafRuleSetsResult.DeserializeApplicationGatewayAvailableW
 1192                        }
 01193                        return Response.FromValue(value, message.Response);
 1194                    }
 1195                default:
 01196                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1197            }
 01198        }
 1199
 1200        /// <summary> Lists all available web application firewall rule sets. </summary>
 1201        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1202        public Response<ApplicationGatewayAvailableWafRuleSetsResult> ListAvailableWafRuleSets(CancellationToken cancell
 1203        {
 01204            using var message = CreateListAvailableWafRuleSetsRequest();
 01205            _pipeline.Send(message, cancellationToken);
 01206            switch (message.Response.Status)
 1207            {
 1208                case 200:
 1209                    {
 01210                        ApplicationGatewayAvailableWafRuleSetsResult value = default;
 01211                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01212                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1213                        {
 01214                            value = null;
 1215                        }
 1216                        else
 1217                        {
 01218                            value = ApplicationGatewayAvailableWafRuleSetsResult.DeserializeApplicationGatewayAvailableW
 1219                        }
 01220                        return Response.FromValue(value, message.Response);
 1221                    }
 1222                default:
 01223                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1224            }
 01225        }
 1226
 1227        internal HttpMessage CreateListAvailableSslOptionsRequest()
 1228        {
 01229            var message = _pipeline.CreateMessage();
 01230            var request = message.Request;
 01231            request.Method = RequestMethod.Get;
 01232            var uri = new RawRequestUriBuilder();
 01233            uri.Reset(endpoint);
 01234            uri.AppendPath("/subscriptions/", false);
 01235            uri.AppendPath(subscriptionId, true);
 01236            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", false);
 01237            uri.AppendQuery("api-version", "2020-04-01", true);
 01238            request.Uri = uri;
 01239            return message;
 1240        }
 1241
 1242        /// <summary> Lists available Ssl options for configuring Ssl policy. </summary>
 1243        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1244        public async Task<Response<ApplicationGatewayAvailableSslOptions>> ListAvailableSslOptionsAsync(CancellationToke
 1245        {
 01246            using var message = CreateListAvailableSslOptionsRequest();
 01247            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01248            switch (message.Response.Status)
 1249            {
 1250                case 200:
 1251                    {
 01252                        ApplicationGatewayAvailableSslOptions value = default;
 01253                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01254                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1255                        {
 01256                            value = null;
 1257                        }
 1258                        else
 1259                        {
 01260                            value = ApplicationGatewayAvailableSslOptions.DeserializeApplicationGatewayAvailableSslOptio
 1261                        }
 01262                        return Response.FromValue(value, message.Response);
 1263                    }
 1264                default:
 01265                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1266            }
 01267        }
 1268
 1269        /// <summary> Lists available Ssl options for configuring Ssl policy. </summary>
 1270        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1271        public Response<ApplicationGatewayAvailableSslOptions> ListAvailableSslOptions(CancellationToken cancellationTok
 1272        {
 01273            using var message = CreateListAvailableSslOptionsRequest();
 01274            _pipeline.Send(message, cancellationToken);
 01275            switch (message.Response.Status)
 1276            {
 1277                case 200:
 1278                    {
 01279                        ApplicationGatewayAvailableSslOptions value = default;
 01280                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01281                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1282                        {
 01283                            value = null;
 1284                        }
 1285                        else
 1286                        {
 01287                            value = ApplicationGatewayAvailableSslOptions.DeserializeApplicationGatewayAvailableSslOptio
 1288                        }
 01289                        return Response.FromValue(value, message.Response);
 1290                    }
 1291                default:
 01292                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1293            }
 01294        }
 1295
 1296        internal HttpMessage CreateListAvailableSslPredefinedPoliciesRequest()
 1297        {
 01298            var message = _pipeline.CreateMessage();
 01299            var request = message.Request;
 01300            request.Method = RequestMethod.Get;
 01301            var uri = new RawRequestUriBuilder();
 01302            uri.Reset(endpoint);
 01303            uri.AppendPath("/subscriptions/", false);
 01304            uri.AppendPath(subscriptionId, true);
 01305            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicie
 01306            uri.AppendQuery("api-version", "2020-04-01", true);
 01307            request.Uri = uri;
 01308            return message;
 1309        }
 1310
 1311        /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary>
 1312        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1313        public async Task<Response<ApplicationGatewayAvailableSslPredefinedPolicies>> ListAvailableSslPredefinedPolicies
 1314        {
 01315            using var message = CreateListAvailableSslPredefinedPoliciesRequest();
 01316            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01317            switch (message.Response.Status)
 1318            {
 1319                case 200:
 1320                    {
 01321                        ApplicationGatewayAvailableSslPredefinedPolicies value = default;
 01322                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01323                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1324                        {
 01325                            value = null;
 1326                        }
 1327                        else
 1328                        {
 01329                            value = ApplicationGatewayAvailableSslPredefinedPolicies.DeserializeApplicationGatewayAvaila
 1330                        }
 01331                        return Response.FromValue(value, message.Response);
 1332                    }
 1333                default:
 01334                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1335            }
 01336        }
 1337
 1338        /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary>
 1339        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1340        public Response<ApplicationGatewayAvailableSslPredefinedPolicies> ListAvailableSslPredefinedPolicies(Cancellatio
 1341        {
 01342            using var message = CreateListAvailableSslPredefinedPoliciesRequest();
 01343            _pipeline.Send(message, cancellationToken);
 01344            switch (message.Response.Status)
 1345            {
 1346                case 200:
 1347                    {
 01348                        ApplicationGatewayAvailableSslPredefinedPolicies value = default;
 01349                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01350                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1351                        {
 01352                            value = null;
 1353                        }
 1354                        else
 1355                        {
 01356                            value = ApplicationGatewayAvailableSslPredefinedPolicies.DeserializeApplicationGatewayAvaila
 1357                        }
 01358                        return Response.FromValue(value, message.Response);
 1359                    }
 1360                default:
 01361                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1362            }
 01363        }
 1364
 1365        internal HttpMessage CreateGetSslPredefinedPolicyRequest(string predefinedPolicyName)
 1366        {
 01367            var message = _pipeline.CreateMessage();
 01368            var request = message.Request;
 01369            request.Method = RequestMethod.Get;
 01370            var uri = new RawRequestUriBuilder();
 01371            uri.Reset(endpoint);
 01372            uri.AppendPath("/subscriptions/", false);
 01373            uri.AppendPath(subscriptionId, true);
 01374            uri.AppendPath("/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicie
 01375            uri.AppendPath(predefinedPolicyName, true);
 01376            uri.AppendQuery("api-version", "2020-04-01", true);
 01377            request.Uri = uri;
 01378            return message;
 1379        }
 1380
 1381        /// <summary> Gets Ssl predefined policy with the specified policy name. </summary>
 1382        /// <param name="predefinedPolicyName"> Name of Ssl predefined policy. </param>
 1383        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1384        public async Task<Response<ApplicationGatewaySslPredefinedPolicy>> GetSslPredefinedPolicyAsync(string predefined
 1385        {
 01386            if (predefinedPolicyName == null)
 1387            {
 01388                throw new ArgumentNullException(nameof(predefinedPolicyName));
 1389            }
 1390
 01391            using var message = CreateGetSslPredefinedPolicyRequest(predefinedPolicyName);
 01392            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01393            switch (message.Response.Status)
 1394            {
 1395                case 200:
 1396                    {
 01397                        ApplicationGatewaySslPredefinedPolicy value = default;
 01398                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01399                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1400                        {
 01401                            value = null;
 1402                        }
 1403                        else
 1404                        {
 01405                            value = ApplicationGatewaySslPredefinedPolicy.DeserializeApplicationGatewaySslPredefinedPoli
 1406                        }
 01407                        return Response.FromValue(value, message.Response);
 1408                    }
 1409                default:
 01410                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1411            }
 01412        }
 1413
 1414        /// <summary> Gets Ssl predefined policy with the specified policy name. </summary>
 1415        /// <param name="predefinedPolicyName"> Name of Ssl predefined policy. </param>
 1416        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1417        public Response<ApplicationGatewaySslPredefinedPolicy> GetSslPredefinedPolicy(string predefinedPolicyName, Cance
 1418        {
 01419            if (predefinedPolicyName == null)
 1420            {
 01421                throw new ArgumentNullException(nameof(predefinedPolicyName));
 1422            }
 1423
 01424            using var message = CreateGetSslPredefinedPolicyRequest(predefinedPolicyName);
 01425            _pipeline.Send(message, cancellationToken);
 01426            switch (message.Response.Status)
 1427            {
 1428                case 200:
 1429                    {
 01430                        ApplicationGatewaySslPredefinedPolicy value = default;
 01431                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01432                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1433                        {
 01434                            value = null;
 1435                        }
 1436                        else
 1437                        {
 01438                            value = ApplicationGatewaySslPredefinedPolicy.DeserializeApplicationGatewaySslPredefinedPoli
 1439                        }
 01440                        return Response.FromValue(value, message.Response);
 1441                    }
 1442                default:
 01443                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1444            }
 01445        }
 1446
 1447        internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName)
 1448        {
 01449            var message = _pipeline.CreateMessage();
 01450            var request = message.Request;
 01451            request.Method = RequestMethod.Get;
 01452            var uri = new RawRequestUriBuilder();
 01453            uri.Reset(endpoint);
 01454            uri.AppendRawNextLink(nextLink, false);
 01455            request.Uri = uri;
 01456            return message;
 1457        }
 1458
 1459        /// <summary> Lists all application gateways in a resource group. </summary>
 1460        /// <param name="nextLink"> The URL to the next page of results. </param>
 1461        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1462        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1463        public async Task<Response<ApplicationGatewayListResult>> ListNextPageAsync(string nextLink, string resourceGrou
 1464        {
 01465            if (nextLink == null)
 1466            {
 01467                throw new ArgumentNullException(nameof(nextLink));
 1468            }
 01469            if (resourceGroupName == null)
 1470            {
 01471                throw new ArgumentNullException(nameof(resourceGroupName));
 1472            }
 1473
 01474            using var message = CreateListNextPageRequest(nextLink, resourceGroupName);
 01475            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01476            switch (message.Response.Status)
 1477            {
 1478                case 200:
 1479                    {
 01480                        ApplicationGatewayListResult value = default;
 01481                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01482                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1483                        {
 01484                            value = null;
 1485                        }
 1486                        else
 1487                        {
 01488                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 1489                        }
 01490                        return Response.FromValue(value, message.Response);
 1491                    }
 1492                default:
 01493                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1494            }
 01495        }
 1496
 1497        /// <summary> Lists all application gateways in a resource group. </summary>
 1498        /// <param name="nextLink"> The URL to the next page of results. </param>
 1499        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1500        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1501        public Response<ApplicationGatewayListResult> ListNextPage(string nextLink, string resourceGroupName, Cancellati
 1502        {
 01503            if (nextLink == null)
 1504            {
 01505                throw new ArgumentNullException(nameof(nextLink));
 1506            }
 01507            if (resourceGroupName == null)
 1508            {
 01509                throw new ArgumentNullException(nameof(resourceGroupName));
 1510            }
 1511
 01512            using var message = CreateListNextPageRequest(nextLink, resourceGroupName);
 01513            _pipeline.Send(message, cancellationToken);
 01514            switch (message.Response.Status)
 1515            {
 1516                case 200:
 1517                    {
 01518                        ApplicationGatewayListResult value = default;
 01519                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01520                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1521                        {
 01522                            value = null;
 1523                        }
 1524                        else
 1525                        {
 01526                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 1527                        }
 01528                        return Response.FromValue(value, message.Response);
 1529                    }
 1530                default:
 01531                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1532            }
 01533        }
 1534
 1535        internal HttpMessage CreateListAllNextPageRequest(string nextLink)
 1536        {
 01537            var message = _pipeline.CreateMessage();
 01538            var request = message.Request;
 01539            request.Method = RequestMethod.Get;
 01540            var uri = new RawRequestUriBuilder();
 01541            uri.Reset(endpoint);
 01542            uri.AppendRawNextLink(nextLink, false);
 01543            request.Uri = uri;
 01544            return message;
 1545        }
 1546
 1547        /// <summary> Gets all the application gateways in a subscription. </summary>
 1548        /// <param name="nextLink"> The URL to the next page of results. </param>
 1549        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1550        public async Task<Response<ApplicationGatewayListResult>> ListAllNextPageAsync(string nextLink, CancellationToke
 1551        {
 01552            if (nextLink == null)
 1553            {
 01554                throw new ArgumentNullException(nameof(nextLink));
 1555            }
 1556
 01557            using var message = CreateListAllNextPageRequest(nextLink);
 01558            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01559            switch (message.Response.Status)
 1560            {
 1561                case 200:
 1562                    {
 01563                        ApplicationGatewayListResult value = default;
 01564                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01565                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1566                        {
 01567                            value = null;
 1568                        }
 1569                        else
 1570                        {
 01571                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 1572                        }
 01573                        return Response.FromValue(value, message.Response);
 1574                    }
 1575                default:
 01576                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1577            }
 01578        }
 1579
 1580        /// <summary> Gets all the application gateways in a subscription. </summary>
 1581        /// <param name="nextLink"> The URL to the next page of results. </param>
 1582        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1583        public Response<ApplicationGatewayListResult> ListAllNextPage(string nextLink, CancellationToken cancellationTok
 1584        {
 01585            if (nextLink == null)
 1586            {
 01587                throw new ArgumentNullException(nameof(nextLink));
 1588            }
 1589
 01590            using var message = CreateListAllNextPageRequest(nextLink);
 01591            _pipeline.Send(message, cancellationToken);
 01592            switch (message.Response.Status)
 1593            {
 1594                case 200:
 1595                    {
 01596                        ApplicationGatewayListResult value = default;
 01597                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01598                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1599                        {
 01600                            value = null;
 1601                        }
 1602                        else
 1603                        {
 01604                            value = ApplicationGatewayListResult.DeserializeApplicationGatewayListResult(document.RootEl
 1605                        }
 01606                        return Response.FromValue(value, message.Response);
 1607                    }
 1608                default:
 01609                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1610            }
 01611        }
 1612
 1613        internal HttpMessage CreateListAvailableSslPredefinedPoliciesNextPageRequest(string nextLink)
 1614        {
 01615            var message = _pipeline.CreateMessage();
 01616            var request = message.Request;
 01617            request.Method = RequestMethod.Get;
 01618            var uri = new RawRequestUriBuilder();
 01619            uri.Reset(endpoint);
 01620            uri.AppendRawNextLink(nextLink, false);
 01621            request.Uri = uri;
 01622            return message;
 1623        }
 1624
 1625        /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary>
 1626        /// <param name="nextLink"> The URL to the next page of results. </param>
 1627        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1628        public async Task<Response<ApplicationGatewayAvailableSslPredefinedPolicies>> ListAvailableSslPredefinedPolicies
 1629        {
 01630            if (nextLink == null)
 1631            {
 01632                throw new ArgumentNullException(nameof(nextLink));
 1633            }
 1634
 01635            using var message = CreateListAvailableSslPredefinedPoliciesNextPageRequest(nextLink);
 01636            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01637            switch (message.Response.Status)
 1638            {
 1639                case 200:
 1640                    {
 01641                        ApplicationGatewayAvailableSslPredefinedPolicies value = default;
 01642                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01643                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1644                        {
 01645                            value = null;
 1646                        }
 1647                        else
 1648                        {
 01649                            value = ApplicationGatewayAvailableSslPredefinedPolicies.DeserializeApplicationGatewayAvaila
 1650                        }
 01651                        return Response.FromValue(value, message.Response);
 1652                    }
 1653                default:
 01654                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1655            }
 01656        }
 1657
 1658        /// <summary> Lists all SSL predefined policies for configuring Ssl policy. </summary>
 1659        /// <param name="nextLink"> The URL to the next page of results. </param>
 1660        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1661        public Response<ApplicationGatewayAvailableSslPredefinedPolicies> ListAvailableSslPredefinedPoliciesNextPage(str
 1662        {
 01663            if (nextLink == null)
 1664            {
 01665                throw new ArgumentNullException(nameof(nextLink));
 1666            }
 1667
 01668            using var message = CreateListAvailableSslPredefinedPoliciesNextPageRequest(nextLink);
 01669            _pipeline.Send(message, cancellationToken);
 01670            switch (message.Response.Status)
 1671            {
 1672                case 200:
 1673                    {
 01674                        ApplicationGatewayAvailableSslPredefinedPolicies value = default;
 01675                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 01676                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1677                        {
 01678                            value = null;
 1679                        }
 1680                        else
 1681                        {
 01682                            value = ApplicationGatewayAvailableSslPredefinedPolicies.DeserializeApplicationGatewayAvaila
 1683                        }
 01684                        return Response.FromValue(value, message.Response);
 1685                    }
 1686                default:
 01687                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1688            }
 01689        }
 1690    }
 1691}

Methods/Properties

.ctor(...)
CreateDeleteRequest(...)
DeleteAsync()
Delete(...)
CreateGetRequest(...)
GetAsync()
Get(...)
CreateCreateOrUpdateRequest(...)
CreateOrUpdateAsync()
CreateOrUpdate(...)
CreateUpdateTagsRequest(...)
UpdateTagsAsync()
UpdateTags(...)
CreateListRequest(...)
ListAsync()
List(...)
CreateListAllRequest()
ListAllAsync()
ListAll(...)
CreateStartRequest(...)
StartAsync()
Start(...)
CreateStopRequest(...)
StopAsync()
Stop(...)
CreateBackendHealthRequest(...)
BackendHealthAsync()
BackendHealth(...)
CreateBackendHealthOnDemandRequest(...)
BackendHealthOnDemandAsync()
BackendHealthOnDemand(...)
CreateListAvailableServerVariablesRequest()
ListAvailableServerVariablesAsync()
ListAvailableServerVariables(...)
CreateListAvailableRequestHeadersRequest()
ListAvailableRequestHeadersAsync()
ListAvailableRequestHeaders(...)
CreateListAvailableResponseHeadersRequest()
ListAvailableResponseHeadersAsync()
ListAvailableResponseHeaders(...)
CreateListAvailableWafRuleSetsRequest()
ListAvailableWafRuleSetsAsync()
ListAvailableWafRuleSets(...)
CreateListAvailableSslOptionsRequest()
ListAvailableSslOptionsAsync()
ListAvailableSslOptions(...)
CreateListAvailableSslPredefinedPoliciesRequest()
ListAvailableSslPredefinedPoliciesAsync()
ListAvailableSslPredefinedPolicies(...)
CreateGetSslPredefinedPolicyRequest(...)
GetSslPredefinedPolicyAsync()
GetSslPredefinedPolicy(...)
CreateListNextPageRequest(...)
ListNextPageAsync()
ListNextPage(...)
CreateListAllNextPageRequest(...)
ListAllNextPageAsync()
ListAllNextPage(...)
CreateListAvailableSslPredefinedPoliciesNextPageRequest(...)
ListAvailableSslPredefinedPoliciesNextPageAsync()
ListAvailableSslPredefinedPoliciesNextPage(...)