< Summary

Class:Azure.ResourceManager.AppConfiguration.ConfigurationStoresRestOperations
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\ConfigurationStoresRestOperations.cs
Covered lines:346
Uncovered lines:171
Coverable lines:517
Total lines:1146
Line coverage:66.9% (346 of 517)
Covered branches:83
Total branches:204
Branch coverage:40.6% (83 of 204)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-83.33%50%
CreateListRequest(...)-100%100%
ListAsync()-81.82%50%
List(...)-81.82%50%
CreateListByResourceGroupRequest(...)-93.33%50%
ListByResourceGroupAsync()-76.92%50%
ListByResourceGroup(...)-76.92%50%
CreateGetRequest(...)-100%100%
GetAsync()-73.33%50%
Get(...)-73.33%50%
CreateCreateRequest(...)-100%100%
CreateAsync()-66.67%50%
Create(...)-66.67%50%
CreateDeleteRequest(...)-100%100%
DeleteAsync()-70%50%
Delete(...)-70%50%
CreateUpdateRequest(...)-100%100%
UpdateAsync()-66.67%50%
Update(...)-66.67%50%
CreateListKeysRequest(...)-94.12%50%
ListKeysAsync()-73.33%50%
ListKeys(...)-73.33%50%
CreateRegenerateKeyRequest(...)-100%100%
RegenerateKeyAsync()-70.59%50%
RegenerateKey(...)-70.59%50%
CreateListKeyValueRequest(...)-0%100%
ListKeyValueAsync()-0%0%
ListKeyValue(...)-0%0%
CreateListNextPageRequest(...)-100%100%
ListNextPageAsync()-76.92%50%
ListNextPage(...)-76.92%50%
CreateListByResourceGroupNextPageRequest(...)-100%100%
ListByResourceGroupNextPageAsync()-73.33%50%
ListByResourceGroupNextPage(...)-73.33%50%
CreateListKeysNextPageRequest(...)-0%100%
ListKeysNextPageAsync()-0%0%
ListKeysNextPage(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\ConfigurationStoresRestOperations.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Text.Json;
 10using System.Threading;
 11using System.Threading.Tasks;
 12using Azure;
 13using Azure.Core;
 14using Azure.Core.Pipeline;
 15using Azure.ResourceManager.AppConfiguration.Models;
 16
 17namespace Azure.ResourceManager.AppConfiguration
 18{
 19    internal partial class ConfigurationStoresRestOperations
 20    {
 21        private string subscriptionId;
 22        private Uri endpoint;
 23        private string apiVersion;
 24        private ClientDiagnostics _clientDiagnostics;
 25        private HttpPipeline _pipeline;
 26
 27        /// <summary> Initializes a new instance of ConfigurationStoresRestOperations. </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 Microsoft Azure subscription ID. </param>
 31        /// <param name="endpoint"> server parameter. </param>
 32        /// <param name="apiVersion"> Api Version. </param>
 33        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception
 834        public ConfigurationStoresRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subs
 35        {
 836            if (subscriptionId == null)
 37            {
 038                throw new ArgumentNullException(nameof(subscriptionId));
 39            }
 840            endpoint ??= new Uri("https://management.azure.com");
 841            if (apiVersion == null)
 42            {
 043                throw new ArgumentNullException(nameof(apiVersion));
 44            }
 45
 846            this.subscriptionId = subscriptionId;
 847            this.endpoint = endpoint;
 848            this.apiVersion = apiVersion;
 849            _clientDiagnostics = clientDiagnostics;
 850            _pipeline = pipeline;
 851        }
 52
 53        internal HttpMessage CreateListRequest(string skipToken)
 54        {
 455            var message = _pipeline.CreateMessage();
 456            var request = message.Request;
 457            request.Method = RequestMethod.Get;
 458            var uri = new RawRequestUriBuilder();
 459            uri.Reset(endpoint);
 460            uri.AppendPath("/subscriptions/", false);
 461            uri.AppendPath(subscriptionId, true);
 462            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores", false);
 463            uri.AppendQuery("api-version", apiVersion, true);
 464            if (skipToken != null)
 65            {
 466                uri.AppendQuery("$skipToken", skipToken, true);
 67            }
 468            request.Uri = uri;
 469            return message;
 70        }
 71
 72        /// <summary> Lists the configuration stores for a given subscription. </summary>
 73        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 74        /// <param name="cancellationToken"> The cancellation token to use. </param>
 75        public async Task<Response<ConfigurationStoreListResult>> ListAsync(string skipToken = null, CancellationToken c
 76        {
 277            using var message = CreateListRequest(skipToken);
 278            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 279            switch (message.Response.Status)
 80            {
 81                case 200:
 82                    {
 283                        ConfigurationStoreListResult value = default;
 284                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 285                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 86                        {
 087                            value = null;
 88                        }
 89                        else
 90                        {
 291                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 92                        }
 293                        return Response.FromValue(value, message.Response);
 94                    }
 95                default:
 096                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 97            }
 298        }
 99
 100        /// <summary> Lists the configuration stores for a given subscription. </summary>
 101        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 102        /// <param name="cancellationToken"> The cancellation token to use. </param>
 103        public Response<ConfigurationStoreListResult> List(string skipToken = null, CancellationToken cancellationToken 
 104        {
 2105            using var message = CreateListRequest(skipToken);
 2106            _pipeline.Send(message, cancellationToken);
 2107            switch (message.Response.Status)
 108            {
 109                case 200:
 110                    {
 2111                        ConfigurationStoreListResult value = default;
 2112                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2113                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 114                        {
 0115                            value = null;
 116                        }
 117                        else
 118                        {
 2119                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 120                        }
 2121                        return Response.FromValue(value, message.Response);
 122                    }
 123                default:
 0124                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 125            }
 2126        }
 127
 128        internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, string skipToken)
 129        {
 4130            var message = _pipeline.CreateMessage();
 4131            var request = message.Request;
 4132            request.Method = RequestMethod.Get;
 4133            var uri = new RawRequestUriBuilder();
 4134            uri.Reset(endpoint);
 4135            uri.AppendPath("/subscriptions/", false);
 4136            uri.AppendPath(subscriptionId, true);
 4137            uri.AppendPath("/resourceGroups/", false);
 4138            uri.AppendPath(resourceGroupName, true);
 4139            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores", false);
 4140            uri.AppendQuery("api-version", apiVersion, true);
 4141            if (skipToken != null)
 142            {
 0143                uri.AppendQuery("$skipToken", skipToken, true);
 144            }
 4145            request.Uri = uri;
 4146            return message;
 147        }
 148
 149        /// <summary> Lists the configuration stores for a given resource group. </summary>
 150        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 151        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 152        /// <param name="cancellationToken"> The cancellation token to use. </param>
 153        public async Task<Response<ConfigurationStoreListResult>> ListByResourceGroupAsync(string resourceGroupName, str
 154        {
 2155            if (resourceGroupName == null)
 156            {
 0157                throw new ArgumentNullException(nameof(resourceGroupName));
 158            }
 159
 2160            using var message = CreateListByResourceGroupRequest(resourceGroupName, skipToken);
 2161            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2162            switch (message.Response.Status)
 163            {
 164                case 200:
 165                    {
 2166                        ConfigurationStoreListResult value = default;
 2167                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2168                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 169                        {
 0170                            value = null;
 171                        }
 172                        else
 173                        {
 2174                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 175                        }
 2176                        return Response.FromValue(value, message.Response);
 177                    }
 178                default:
 0179                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 180            }
 2181        }
 182
 183        /// <summary> Lists the configuration stores for a given resource group. </summary>
 184        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 185        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 186        /// <param name="cancellationToken"> The cancellation token to use. </param>
 187        public Response<ConfigurationStoreListResult> ListByResourceGroup(string resourceGroupName, string skipToken = n
 188        {
 2189            if (resourceGroupName == null)
 190            {
 0191                throw new ArgumentNullException(nameof(resourceGroupName));
 192            }
 193
 2194            using var message = CreateListByResourceGroupRequest(resourceGroupName, skipToken);
 2195            _pipeline.Send(message, cancellationToken);
 2196            switch (message.Response.Status)
 197            {
 198                case 200:
 199                    {
 2200                        ConfigurationStoreListResult value = default;
 2201                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2202                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 203                        {
 0204                            value = null;
 205                        }
 206                        else
 207                        {
 2208                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 209                        }
 2210                        return Response.FromValue(value, message.Response);
 211                    }
 212                default:
 0213                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 214            }
 2215        }
 216
 217        internal HttpMessage CreateGetRequest(string resourceGroupName, string configStoreName)
 218        {
 4219            var message = _pipeline.CreateMessage();
 4220            var request = message.Request;
 4221            request.Method = RequestMethod.Get;
 4222            var uri = new RawRequestUriBuilder();
 4223            uri.Reset(endpoint);
 4224            uri.AppendPath("/subscriptions/", false);
 4225            uri.AppendPath(subscriptionId, true);
 4226            uri.AppendPath("/resourceGroups/", false);
 4227            uri.AppendPath(resourceGroupName, true);
 4228            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 4229            uri.AppendPath(configStoreName, true);
 4230            uri.AppendQuery("api-version", apiVersion, true);
 4231            request.Uri = uri;
 4232            return message;
 233        }
 234
 235        /// <summary> Gets the properties of the specified configuration store. </summary>
 236        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 237        /// <param name="configStoreName"> The name of the configuration store. </param>
 238        /// <param name="cancellationToken"> The cancellation token to use. </param>
 239        public async Task<Response<ConfigurationStore>> GetAsync(string resourceGroupName, string configStoreName, Cance
 240        {
 2241            if (resourceGroupName == null)
 242            {
 0243                throw new ArgumentNullException(nameof(resourceGroupName));
 244            }
 2245            if (configStoreName == null)
 246            {
 0247                throw new ArgumentNullException(nameof(configStoreName));
 248            }
 249
 2250            using var message = CreateGetRequest(resourceGroupName, configStoreName);
 2251            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2252            switch (message.Response.Status)
 253            {
 254                case 200:
 255                    {
 2256                        ConfigurationStore value = default;
 2257                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2258                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 259                        {
 0260                            value = null;
 261                        }
 262                        else
 263                        {
 2264                            value = ConfigurationStore.DeserializeConfigurationStore(document.RootElement);
 265                        }
 2266                        return Response.FromValue(value, message.Response);
 267                    }
 268                default:
 0269                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 270            }
 2271        }
 272
 273        /// <summary> Gets the properties of the specified configuration store. </summary>
 274        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 275        /// <param name="configStoreName"> The name of the configuration store. </param>
 276        /// <param name="cancellationToken"> The cancellation token to use. </param>
 277        public Response<ConfigurationStore> Get(string resourceGroupName, string configStoreName, CancellationToken canc
 278        {
 2279            if (resourceGroupName == null)
 280            {
 0281                throw new ArgumentNullException(nameof(resourceGroupName));
 282            }
 2283            if (configStoreName == null)
 284            {
 0285                throw new ArgumentNullException(nameof(configStoreName));
 286            }
 287
 2288            using var message = CreateGetRequest(resourceGroupName, configStoreName);
 2289            _pipeline.Send(message, cancellationToken);
 2290            switch (message.Response.Status)
 291            {
 292                case 200:
 293                    {
 2294                        ConfigurationStore value = default;
 2295                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2296                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 297                        {
 0298                            value = null;
 299                        }
 300                        else
 301                        {
 2302                            value = ConfigurationStore.DeserializeConfigurationStore(document.RootElement);
 303                        }
 2304                        return Response.FromValue(value, message.Response);
 305                    }
 306                default:
 0307                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 308            }
 2309        }
 310
 311        internal HttpMessage CreateCreateRequest(string resourceGroupName, string configStoreName, ConfigurationStore co
 312        {
 16313            var message = _pipeline.CreateMessage();
 16314            var request = message.Request;
 16315            request.Method = RequestMethod.Put;
 16316            var uri = new RawRequestUriBuilder();
 16317            uri.Reset(endpoint);
 16318            uri.AppendPath("/subscriptions/", false);
 16319            uri.AppendPath(subscriptionId, true);
 16320            uri.AppendPath("/resourceGroups/", false);
 16321            uri.AppendPath(resourceGroupName, true);
 16322            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 16323            uri.AppendPath(configStoreName, true);
 16324            uri.AppendQuery("api-version", apiVersion, true);
 16325            request.Uri = uri;
 16326            request.Headers.Add("Content-Type", "application/json");
 16327            var content = new Utf8JsonRequestContent();
 16328            content.JsonWriter.WriteObjectValue(configStoreCreationParameters);
 16329            request.Content = content;
 16330            return message;
 331        }
 332
 333        /// <summary> Creates a configuration store with the specified parameters. </summary>
 334        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 335        /// <param name="configStoreName"> The name of the configuration store. </param>
 336        /// <param name="configStoreCreationParameters"> The parameters for creating a configuration store. </param>
 337        /// <param name="cancellationToken"> The cancellation token to use. </param>
 338        public async Task<Response> CreateAsync(string resourceGroupName, string configStoreName, ConfigurationStore con
 339        {
 4340            if (resourceGroupName == null)
 341            {
 0342                throw new ArgumentNullException(nameof(resourceGroupName));
 343            }
 4344            if (configStoreName == null)
 345            {
 0346                throw new ArgumentNullException(nameof(configStoreName));
 347            }
 4348            if (configStoreCreationParameters == null)
 349            {
 0350                throw new ArgumentNullException(nameof(configStoreCreationParameters));
 351            }
 352
 4353            using var message = CreateCreateRequest(resourceGroupName, configStoreName, configStoreCreationParameters);
 4354            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 4355            switch (message.Response.Status)
 356            {
 357                case 200:
 358                case 201:
 4359                    return message.Response;
 360                default:
 0361                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 362            }
 4363        }
 364
 365        /// <summary> Creates a configuration store with the specified parameters. </summary>
 366        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 367        /// <param name="configStoreName"> The name of the configuration store. </param>
 368        /// <param name="configStoreCreationParameters"> The parameters for creating a configuration store. </param>
 369        /// <param name="cancellationToken"> The cancellation token to use. </param>
 370        public Response Create(string resourceGroupName, string configStoreName, ConfigurationStore configStoreCreationP
 371        {
 4372            if (resourceGroupName == null)
 373            {
 0374                throw new ArgumentNullException(nameof(resourceGroupName));
 375            }
 4376            if (configStoreName == null)
 377            {
 0378                throw new ArgumentNullException(nameof(configStoreName));
 379            }
 4380            if (configStoreCreationParameters == null)
 381            {
 0382                throw new ArgumentNullException(nameof(configStoreCreationParameters));
 383            }
 384
 4385            using var message = CreateCreateRequest(resourceGroupName, configStoreName, configStoreCreationParameters);
 4386            _pipeline.Send(message, cancellationToken);
 4387            switch (message.Response.Status)
 388            {
 389                case 200:
 390                case 201:
 4391                    return message.Response;
 392                default:
 0393                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 394            }
 4395        }
 396
 397        internal HttpMessage CreateDeleteRequest(string resourceGroupName, string configStoreName)
 398        {
 8399            var message = _pipeline.CreateMessage();
 8400            var request = message.Request;
 8401            request.Method = RequestMethod.Delete;
 8402            var uri = new RawRequestUriBuilder();
 8403            uri.Reset(endpoint);
 8404            uri.AppendPath("/subscriptions/", false);
 8405            uri.AppendPath(subscriptionId, true);
 8406            uri.AppendPath("/resourceGroups/", false);
 8407            uri.AppendPath(resourceGroupName, true);
 8408            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 8409            uri.AppendPath(configStoreName, true);
 8410            uri.AppendQuery("api-version", apiVersion, true);
 8411            request.Uri = uri;
 8412            return message;
 413        }
 414
 415        /// <summary> Deletes a configuration store. </summary>
 416        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 417        /// <param name="configStoreName"> The name of the configuration store. </param>
 418        /// <param name="cancellationToken"> The cancellation token to use. </param>
 419        public async Task<Response> DeleteAsync(string resourceGroupName, string configStoreName, CancellationToken canc
 420        {
 2421            if (resourceGroupName == null)
 422            {
 0423                throw new ArgumentNullException(nameof(resourceGroupName));
 424            }
 2425            if (configStoreName == null)
 426            {
 0427                throw new ArgumentNullException(nameof(configStoreName));
 428            }
 429
 2430            using var message = CreateDeleteRequest(resourceGroupName, configStoreName);
 2431            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2432            switch (message.Response.Status)
 433            {
 434                case 200:
 435                case 202:
 436                case 204:
 2437                    return message.Response;
 438                default:
 0439                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 440            }
 2441        }
 442
 443        /// <summary> Deletes a configuration store. </summary>
 444        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 445        /// <param name="configStoreName"> The name of the configuration store. </param>
 446        /// <param name="cancellationToken"> The cancellation token to use. </param>
 447        public Response Delete(string resourceGroupName, string configStoreName, CancellationToken cancellationToken = d
 448        {
 2449            if (resourceGroupName == null)
 450            {
 0451                throw new ArgumentNullException(nameof(resourceGroupName));
 452            }
 2453            if (configStoreName == null)
 454            {
 0455                throw new ArgumentNullException(nameof(configStoreName));
 456            }
 457
 2458            using var message = CreateDeleteRequest(resourceGroupName, configStoreName);
 2459            _pipeline.Send(message, cancellationToken);
 2460            switch (message.Response.Status)
 461            {
 462                case 200:
 463                case 202:
 464                case 204:
 2465                    return message.Response;
 466                default:
 0467                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 468            }
 2469        }
 470
 471        internal HttpMessage CreateUpdateRequest(string resourceGroupName, string configStoreName, ConfigurationStoreUpd
 472        {
 8473            var message = _pipeline.CreateMessage();
 8474            var request = message.Request;
 8475            request.Method = RequestMethod.Patch;
 8476            var uri = new RawRequestUriBuilder();
 8477            uri.Reset(endpoint);
 8478            uri.AppendPath("/subscriptions/", false);
 8479            uri.AppendPath(subscriptionId, true);
 8480            uri.AppendPath("/resourceGroups/", false);
 8481            uri.AppendPath(resourceGroupName, true);
 8482            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 8483            uri.AppendPath(configStoreName, true);
 8484            uri.AppendQuery("api-version", apiVersion, true);
 8485            request.Uri = uri;
 8486            request.Headers.Add("Content-Type", "application/json");
 8487            var content = new Utf8JsonRequestContent();
 8488            content.JsonWriter.WriteObjectValue(configStoreUpdateParameters);
 8489            request.Content = content;
 8490            return message;
 491        }
 492
 493        /// <summary> Updates a configuration store with the specified parameters. </summary>
 494        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 495        /// <param name="configStoreName"> The name of the configuration store. </param>
 496        /// <param name="configStoreUpdateParameters"> The parameters for updating a configuration store. </param>
 497        /// <param name="cancellationToken"> The cancellation token to use. </param>
 498        public async Task<Response> UpdateAsync(string resourceGroupName, string configStoreName, ConfigurationStoreUpda
 499        {
 2500            if (resourceGroupName == null)
 501            {
 0502                throw new ArgumentNullException(nameof(resourceGroupName));
 503            }
 2504            if (configStoreName == null)
 505            {
 0506                throw new ArgumentNullException(nameof(configStoreName));
 507            }
 2508            if (configStoreUpdateParameters == null)
 509            {
 0510                throw new ArgumentNullException(nameof(configStoreUpdateParameters));
 511            }
 512
 2513            using var message = CreateUpdateRequest(resourceGroupName, configStoreName, configStoreUpdateParameters);
 2514            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2515            switch (message.Response.Status)
 516            {
 517                case 200:
 518                case 201:
 2519                    return message.Response;
 520                default:
 0521                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 522            }
 2523        }
 524
 525        /// <summary> Updates a configuration store with the specified parameters. </summary>
 526        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 527        /// <param name="configStoreName"> The name of the configuration store. </param>
 528        /// <param name="configStoreUpdateParameters"> The parameters for updating a configuration store. </param>
 529        /// <param name="cancellationToken"> The cancellation token to use. </param>
 530        public Response Update(string resourceGroupName, string configStoreName, ConfigurationStoreUpdateParameters conf
 531        {
 2532            if (resourceGroupName == null)
 533            {
 0534                throw new ArgumentNullException(nameof(resourceGroupName));
 535            }
 2536            if (configStoreName == null)
 537            {
 0538                throw new ArgumentNullException(nameof(configStoreName));
 539            }
 2540            if (configStoreUpdateParameters == null)
 541            {
 0542                throw new ArgumentNullException(nameof(configStoreUpdateParameters));
 543            }
 544
 2545            using var message = CreateUpdateRequest(resourceGroupName, configStoreName, configStoreUpdateParameters);
 2546            _pipeline.Send(message, cancellationToken);
 2547            switch (message.Response.Status)
 548            {
 549                case 200:
 550                case 201:
 2551                    return message.Response;
 552                default:
 0553                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 554            }
 2555        }
 556
 557        internal HttpMessage CreateListKeysRequest(string resourceGroupName, string configStoreName, string skipToken)
 558        {
 4559            var message = _pipeline.CreateMessage();
 4560            var request = message.Request;
 4561            request.Method = RequestMethod.Post;
 4562            var uri = new RawRequestUriBuilder();
 4563            uri.Reset(endpoint);
 4564            uri.AppendPath("/subscriptions/", false);
 4565            uri.AppendPath(subscriptionId, true);
 4566            uri.AppendPath("/resourceGroups/", false);
 4567            uri.AppendPath(resourceGroupName, true);
 4568            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 4569            uri.AppendPath(configStoreName, true);
 4570            uri.AppendPath("/ListKeys", false);
 4571            uri.AppendQuery("api-version", apiVersion, true);
 4572            if (skipToken != null)
 573            {
 0574                uri.AppendQuery("$skipToken", skipToken, true);
 575            }
 4576            request.Uri = uri;
 4577            return message;
 578        }
 579
 580        /// <summary> Lists the access key for the specified configuration store. </summary>
 581        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 582        /// <param name="configStoreName"> The name of the configuration store. </param>
 583        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 584        /// <param name="cancellationToken"> The cancellation token to use. </param>
 585        public async Task<Response<ApiKeyListResult>> ListKeysAsync(string resourceGroupName, string configStoreName, st
 586        {
 2587            if (resourceGroupName == null)
 588            {
 0589                throw new ArgumentNullException(nameof(resourceGroupName));
 590            }
 2591            if (configStoreName == null)
 592            {
 0593                throw new ArgumentNullException(nameof(configStoreName));
 594            }
 595
 2596            using var message = CreateListKeysRequest(resourceGroupName, configStoreName, skipToken);
 2597            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2598            switch (message.Response.Status)
 599            {
 600                case 200:
 601                    {
 2602                        ApiKeyListResult value = default;
 2603                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2604                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 605                        {
 0606                            value = null;
 607                        }
 608                        else
 609                        {
 2610                            value = ApiKeyListResult.DeserializeApiKeyListResult(document.RootElement);
 611                        }
 2612                        return Response.FromValue(value, message.Response);
 613                    }
 614                default:
 0615                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 616            }
 2617        }
 618
 619        /// <summary> Lists the access key for the specified configuration store. </summary>
 620        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 621        /// <param name="configStoreName"> The name of the configuration store. </param>
 622        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 623        /// <param name="cancellationToken"> The cancellation token to use. </param>
 624        public Response<ApiKeyListResult> ListKeys(string resourceGroupName, string configStoreName, string skipToken = 
 625        {
 2626            if (resourceGroupName == null)
 627            {
 0628                throw new ArgumentNullException(nameof(resourceGroupName));
 629            }
 2630            if (configStoreName == null)
 631            {
 0632                throw new ArgumentNullException(nameof(configStoreName));
 633            }
 634
 2635            using var message = CreateListKeysRequest(resourceGroupName, configStoreName, skipToken);
 2636            _pipeline.Send(message, cancellationToken);
 2637            switch (message.Response.Status)
 638            {
 639                case 200:
 640                    {
 2641                        ApiKeyListResult value = default;
 2642                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2643                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 644                        {
 0645                            value = null;
 646                        }
 647                        else
 648                        {
 2649                            value = ApiKeyListResult.DeserializeApiKeyListResult(document.RootElement);
 650                        }
 2651                        return Response.FromValue(value, message.Response);
 652                    }
 653                default:
 0654                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 655            }
 2656        }
 657
 658        internal HttpMessage CreateRegenerateKeyRequest(string resourceGroupName, string configStoreName, RegenerateKeyP
 659        {
 4660            var message = _pipeline.CreateMessage();
 4661            var request = message.Request;
 4662            request.Method = RequestMethod.Post;
 4663            var uri = new RawRequestUriBuilder();
 4664            uri.Reset(endpoint);
 4665            uri.AppendPath("/subscriptions/", false);
 4666            uri.AppendPath(subscriptionId, true);
 4667            uri.AppendPath("/resourceGroups/", false);
 4668            uri.AppendPath(resourceGroupName, true);
 4669            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 4670            uri.AppendPath(configStoreName, true);
 4671            uri.AppendPath("/RegenerateKey", false);
 4672            uri.AppendQuery("api-version", apiVersion, true);
 4673            request.Uri = uri;
 4674            request.Headers.Add("Content-Type", "application/json");
 4675            var content = new Utf8JsonRequestContent();
 4676            content.JsonWriter.WriteObjectValue(regenerateKeyParameters);
 4677            request.Content = content;
 4678            return message;
 679        }
 680
 681        /// <summary> Regenerates an access key for the specified configuration store. </summary>
 682        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 683        /// <param name="configStoreName"> The name of the configuration store. </param>
 684        /// <param name="regenerateKeyParameters"> The parameters for regenerating an access key. </param>
 685        /// <param name="cancellationToken"> The cancellation token to use. </param>
 686        public async Task<Response<ApiKey>> RegenerateKeyAsync(string resourceGroupName, string configStoreName, Regener
 687        {
 2688            if (resourceGroupName == null)
 689            {
 0690                throw new ArgumentNullException(nameof(resourceGroupName));
 691            }
 2692            if (configStoreName == null)
 693            {
 0694                throw new ArgumentNullException(nameof(configStoreName));
 695            }
 2696            if (regenerateKeyParameters == null)
 697            {
 0698                throw new ArgumentNullException(nameof(regenerateKeyParameters));
 699            }
 700
 2701            using var message = CreateRegenerateKeyRequest(resourceGroupName, configStoreName, regenerateKeyParameters);
 2702            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2703            switch (message.Response.Status)
 704            {
 705                case 200:
 706                    {
 2707                        ApiKey value = default;
 2708                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2709                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 710                        {
 0711                            value = null;
 712                        }
 713                        else
 714                        {
 2715                            value = ApiKey.DeserializeApiKey(document.RootElement);
 716                        }
 2717                        return Response.FromValue(value, message.Response);
 718                    }
 719                default:
 0720                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 721            }
 2722        }
 723
 724        /// <summary> Regenerates an access key for the specified configuration store. </summary>
 725        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 726        /// <param name="configStoreName"> The name of the configuration store. </param>
 727        /// <param name="regenerateKeyParameters"> The parameters for regenerating an access key. </param>
 728        /// <param name="cancellationToken"> The cancellation token to use. </param>
 729        public Response<ApiKey> RegenerateKey(string resourceGroupName, string configStoreName, RegenerateKeyParameters 
 730        {
 2731            if (resourceGroupName == null)
 732            {
 0733                throw new ArgumentNullException(nameof(resourceGroupName));
 734            }
 2735            if (configStoreName == null)
 736            {
 0737                throw new ArgumentNullException(nameof(configStoreName));
 738            }
 2739            if (regenerateKeyParameters == null)
 740            {
 0741                throw new ArgumentNullException(nameof(regenerateKeyParameters));
 742            }
 743
 2744            using var message = CreateRegenerateKeyRequest(resourceGroupName, configStoreName, regenerateKeyParameters);
 2745            _pipeline.Send(message, cancellationToken);
 2746            switch (message.Response.Status)
 747            {
 748                case 200:
 749                    {
 2750                        ApiKey value = default;
 2751                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2752                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 753                        {
 0754                            value = null;
 755                        }
 756                        else
 757                        {
 2758                            value = ApiKey.DeserializeApiKey(document.RootElement);
 759                        }
 2760                        return Response.FromValue(value, message.Response);
 761                    }
 762                default:
 0763                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 764            }
 2765        }
 766
 767        internal HttpMessage CreateListKeyValueRequest(string resourceGroupName, string configStoreName, ListKeyValuePar
 768        {
 0769            var message = _pipeline.CreateMessage();
 0770            var request = message.Request;
 0771            request.Method = RequestMethod.Post;
 0772            var uri = new RawRequestUriBuilder();
 0773            uri.Reset(endpoint);
 0774            uri.AppendPath("/subscriptions/", false);
 0775            uri.AppendPath(subscriptionId, true);
 0776            uri.AppendPath("/resourceGroups/", false);
 0777            uri.AppendPath(resourceGroupName, true);
 0778            uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
 0779            uri.AppendPath(configStoreName, true);
 0780            uri.AppendPath("/listKeyValue", false);
 0781            uri.AppendQuery("api-version", apiVersion, true);
 0782            request.Uri = uri;
 0783            request.Headers.Add("Content-Type", "application/json");
 0784            var content = new Utf8JsonRequestContent();
 0785            content.JsonWriter.WriteObjectValue(listKeyValueParameters);
 0786            request.Content = content;
 0787            return message;
 788        }
 789
 790        /// <summary> Lists a configuration store key-value. </summary>
 791        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 792        /// <param name="configStoreName"> The name of the configuration store. </param>
 793        /// <param name="listKeyValueParameters"> The parameters for retrieving a key-value. </param>
 794        /// <param name="cancellationToken"> The cancellation token to use. </param>
 795        public async Task<Response<KeyValue>> ListKeyValueAsync(string resourceGroupName, string configStoreName, ListKe
 796        {
 0797            if (resourceGroupName == null)
 798            {
 0799                throw new ArgumentNullException(nameof(resourceGroupName));
 800            }
 0801            if (configStoreName == null)
 802            {
 0803                throw new ArgumentNullException(nameof(configStoreName));
 804            }
 0805            if (listKeyValueParameters == null)
 806            {
 0807                throw new ArgumentNullException(nameof(listKeyValueParameters));
 808            }
 809
 0810            using var message = CreateListKeyValueRequest(resourceGroupName, configStoreName, listKeyValueParameters);
 0811            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 0812            switch (message.Response.Status)
 813            {
 814                case 200:
 815                    {
 0816                        KeyValue value = default;
 0817                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 0818                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 819                        {
 0820                            value = null;
 821                        }
 822                        else
 823                        {
 0824                            value = KeyValue.DeserializeKeyValue(document.RootElement);
 825                        }
 0826                        return Response.FromValue(value, message.Response);
 827                    }
 828                default:
 0829                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 830            }
 0831        }
 832
 833        /// <summary> Lists a configuration store key-value. </summary>
 834        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 835        /// <param name="configStoreName"> The name of the configuration store. </param>
 836        /// <param name="listKeyValueParameters"> The parameters for retrieving a key-value. </param>
 837        /// <param name="cancellationToken"> The cancellation token to use. </param>
 838        public Response<KeyValue> ListKeyValue(string resourceGroupName, string configStoreName, ListKeyValueParameters 
 839        {
 0840            if (resourceGroupName == null)
 841            {
 0842                throw new ArgumentNullException(nameof(resourceGroupName));
 843            }
 0844            if (configStoreName == null)
 845            {
 0846                throw new ArgumentNullException(nameof(configStoreName));
 847            }
 0848            if (listKeyValueParameters == null)
 849            {
 0850                throw new ArgumentNullException(nameof(listKeyValueParameters));
 851            }
 852
 0853            using var message = CreateListKeyValueRequest(resourceGroupName, configStoreName, listKeyValueParameters);
 0854            _pipeline.Send(message, cancellationToken);
 0855            switch (message.Response.Status)
 856            {
 857                case 200:
 858                    {
 0859                        KeyValue value = default;
 0860                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 0861                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 862                        {
 0863                            value = null;
 864                        }
 865                        else
 866                        {
 0867                            value = KeyValue.DeserializeKeyValue(document.RootElement);
 868                        }
 0869                        return Response.FromValue(value, message.Response);
 870                    }
 871                default:
 0872                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 873            }
 0874        }
 875
 876        internal HttpMessage CreateListNextPageRequest(string nextLink, string skipToken)
 877        {
 4878            var message = _pipeline.CreateMessage();
 4879            var request = message.Request;
 4880            request.Method = RequestMethod.Get;
 4881            var uri = new RawRequestUriBuilder();
 4882            uri.Reset(endpoint);
 4883            uri.AppendRawNextLink(nextLink, false);
 4884            request.Uri = uri;
 4885            return message;
 886        }
 887
 888        /// <summary> Lists the configuration stores for a given subscription. </summary>
 889        /// <param name="nextLink"> The URL to the next page of results. </param>
 890        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 891        /// <param name="cancellationToken"> The cancellation token to use. </param>
 892        public async Task<Response<ConfigurationStoreListResult>> ListNextPageAsync(string nextLink, string skipToken = 
 893        {
 2894            if (nextLink == null)
 895            {
 0896                throw new ArgumentNullException(nameof(nextLink));
 897            }
 898
 2899            using var message = CreateListNextPageRequest(nextLink, skipToken);
 2900            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2901            switch (message.Response.Status)
 902            {
 903                case 200:
 904                    {
 2905                        ConfigurationStoreListResult value = default;
 2906                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2907                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 908                        {
 0909                            value = null;
 910                        }
 911                        else
 912                        {
 2913                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 914                        }
 2915                        return Response.FromValue(value, message.Response);
 916                    }
 917                default:
 0918                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 919            }
 2920        }
 921
 922        /// <summary> Lists the configuration stores for a given subscription. </summary>
 923        /// <param name="nextLink"> The URL to the next page of results. </param>
 924        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 925        /// <param name="cancellationToken"> The cancellation token to use. </param>
 926        public Response<ConfigurationStoreListResult> ListNextPage(string nextLink, string skipToken = null, Cancellatio
 927        {
 2928            if (nextLink == null)
 929            {
 0930                throw new ArgumentNullException(nameof(nextLink));
 931            }
 932
 2933            using var message = CreateListNextPageRequest(nextLink, skipToken);
 2934            _pipeline.Send(message, cancellationToken);
 2935            switch (message.Response.Status)
 936            {
 937                case 200:
 938                    {
 2939                        ConfigurationStoreListResult value = default;
 2940                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 2941                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 942                        {
 0943                            value = null;
 944                        }
 945                        else
 946                        {
 2947                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 948                        }
 2949                        return Response.FromValue(value, message.Response);
 950                    }
 951                default:
 0952                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 953            }
 2954        }
 955
 956        internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string resourceGroupName, string 
 957        {
 4958            var message = _pipeline.CreateMessage();
 4959            var request = message.Request;
 4960            request.Method = RequestMethod.Get;
 4961            var uri = new RawRequestUriBuilder();
 4962            uri.Reset(endpoint);
 4963            uri.AppendRawNextLink(nextLink, false);
 4964            request.Uri = uri;
 4965            return message;
 966        }
 967
 968        /// <summary> Lists the configuration stores for a given resource group. </summary>
 969        /// <param name="nextLink"> The URL to the next page of results. </param>
 970        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 971        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 972        /// <param name="cancellationToken"> The cancellation token to use. </param>
 973        public async Task<Response<ConfigurationStoreListResult>> ListByResourceGroupNextPageAsync(string nextLink, stri
 974        {
 2975            if (nextLink == null)
 976            {
 0977                throw new ArgumentNullException(nameof(nextLink));
 978            }
 2979            if (resourceGroupName == null)
 980            {
 0981                throw new ArgumentNullException(nameof(resourceGroupName));
 982            }
 983
 2984            using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skipToken);
 2985            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 2986            switch (message.Response.Status)
 987            {
 988                case 200:
 989                    {
 2990                        ConfigurationStoreListResult value = default;
 2991                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 2992                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 993                        {
 0994                            value = null;
 995                        }
 996                        else
 997                        {
 2998                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 999                        }
 21000                        return Response.FromValue(value, message.Response);
 1001                    }
 1002                default:
 01003                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1004            }
 21005        }
 1006
 1007        /// <summary> Lists the configuration stores for a given resource group. </summary>
 1008        /// <param name="nextLink"> The URL to the next page of results. </param>
 1009        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 1010        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 1011        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1012        public Response<ConfigurationStoreListResult> ListByResourceGroupNextPage(string nextLink, string resourceGroupN
 1013        {
 21014            if (nextLink == null)
 1015            {
 01016                throw new ArgumentNullException(nameof(nextLink));
 1017            }
 21018            if (resourceGroupName == null)
 1019            {
 01020                throw new ArgumentNullException(nameof(resourceGroupName));
 1021            }
 1022
 21023            using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skipToken);
 21024            _pipeline.Send(message, cancellationToken);
 21025            switch (message.Response.Status)
 1026            {
 1027                case 200:
 1028                    {
 21029                        ConfigurationStoreListResult value = default;
 21030                        using var document = JsonDocument.Parse(message.Response.ContentStream);
 21031                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1032                        {
 01033                            value = null;
 1034                        }
 1035                        else
 1036                        {
 21037                            value = ConfigurationStoreListResult.DeserializeConfigurationStoreListResult(document.RootEl
 1038                        }
 21039                        return Response.FromValue(value, message.Response);
 1040                    }
 1041                default:
 01042                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1043            }
 21044        }
 1045
 1046        internal HttpMessage CreateListKeysNextPageRequest(string nextLink, string resourceGroupName, string configStore
 1047        {
 01048            var message = _pipeline.CreateMessage();
 01049            var request = message.Request;
 01050            request.Method = RequestMethod.Get;
 01051            var uri = new RawRequestUriBuilder();
 01052            uri.Reset(endpoint);
 01053            uri.AppendRawNextLink(nextLink, false);
 01054            request.Uri = uri;
 01055            return message;
 1056        }
 1057
 1058        /// <summary> Lists the access key for the specified configuration store. </summary>
 1059        /// <param name="nextLink"> The URL to the next page of results. </param>
 1060        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 1061        /// <param name="configStoreName"> The name of the configuration store. </param>
 1062        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 1063        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1064        public async Task<Response<ApiKeyListResult>> ListKeysNextPageAsync(string nextLink, string resourceGroupName, s
 1065        {
 01066            if (nextLink == null)
 1067            {
 01068                throw new ArgumentNullException(nameof(nextLink));
 1069            }
 01070            if (resourceGroupName == null)
 1071            {
 01072                throw new ArgumentNullException(nameof(resourceGroupName));
 1073            }
 01074            if (configStoreName == null)
 1075            {
 01076                throw new ArgumentNullException(nameof(configStoreName));
 1077            }
 1078
 01079            using var message = CreateListKeysNextPageRequest(nextLink, resourceGroupName, configStoreName, skipToken);
 01080            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
 01081            switch (message.Response.Status)
 1082            {
 1083                case 200:
 1084                    {
 01085                        ApiKeyListResult value = default;
 01086                        using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc
 01087                        if (document.RootElement.ValueKind == JsonValueKind.Null)
 1088                        {
 01089                            value = null;
 1090                        }
 1091                        else
 1092                        {
 01093                            value = ApiKeyListResult.DeserializeApiKeyListResult(document.RootElement);
 1094                        }
 01095                        return Response.FromValue(value, message.Response);
 1096                    }
 1097                default:
 01098                    throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa
 1099            }
 01100        }
 1101
 1102        /// <summary> Lists the access key for the specified configuration store. </summary>
 1103        /// <param name="nextLink"> The URL to the next page of results. </param>
 1104        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 1105        /// <param name="configStoreName"> The name of the configuration store. </param>
 1106        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 1107        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1108        public Response<ApiKeyListResult> ListKeysNextPage(string nextLink, string resourceGroupName, string configStore
 1109        {
 01110            if (nextLink == null)
 1111            {
 01112                throw new ArgumentNullException(nameof(nextLink));
 1113            }
 01114            if (resourceGroupName == null)
 1115            {
 01116                throw new ArgumentNullException(nameof(resourceGroupName));
 1117            }
 01118            if (configStoreName == null)
 1119            {
 01120                throw new ArgumentNullException(nameof(configStoreName));
 1121            }
 1122
 01123            using var message = CreateListKeysNextPageRequest(nextLink, resourceGroupName, configStoreName, skipToken);
 01124            _pipeline.Send(message, cancellationToken);
 01125            switch (message.Response.Status)
 1126            {
 1127                case 200:
 1128                    {
 01129                        ApiKeyListResult 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                            value = ApiKeyListResult.DeserializeApiKeyListResult(document.RootElement);
 1138                        }
 01139                        return Response.FromValue(value, message.Response);
 1140                    }
 1141                default:
 01142                    throw _clientDiagnostics.CreateRequestFailedException(message.Response);
 1143            }
 01144        }
 1145    }
 1146}