< Summary

Class:Azure.ResourceManager.AppConfiguration.ConfigurationStoresOperations
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\ConfigurationStoresOperations.cs
Covered lines:132
Uncovered lines:112
Coverable lines:244
Total lines:615
Line coverage:54% (132 of 244)
Covered branches:22
Total branches:44
Branch coverage:50% (22 of 44)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
RegenerateKeyAsync()-57.14%100%
RegenerateKey(...)-57.14%100%
ListKeyValueAsync()-0%100%
ListKeyValue(...)-0%100%
<ListAsync()-62.5%100%
<ListAsync()-62.5%100%
ListAsync(...)-100%100%
List(...)-100%100%
ListByResourceGroupAsync(...)-63.16%50%
<ListByResourceGroupAsync()-62.5%100%
<ListByResourceGroupAsync()-62.5%100%
ListByResourceGroup(...)-63.16%50%
ListKeysAsync(...)-38.1%50%
<ListKeysAsync()-62.5%100%
<ListKeysAsync()-0%100%
ListKeys(...)-38.1%50%
StartCreateAsync()-57.14%50%
StartCreate(...)-57.14%50%
StartDeleteAsync()-58.33%50%
StartDelete(...)-58.33%50%
StartUpdateAsync()-57.14%50%
StartUpdate(...)-57.14%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\ConfigurationStoresOperations.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.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Core;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.AppConfiguration.Models;
 15
 16namespace Azure.ResourceManager.AppConfiguration
 17{
 18    /// <summary> The ConfigurationStores service client. </summary>
 19    public partial class ConfigurationStoresOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 6023        internal ConfigurationStoresRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of ConfigurationStoresOperations for mocking. </summary>
 825        protected ConfigurationStoresOperations()
 26        {
 827        }
 28        /// <summary> Initializes a new instance of ConfigurationStoresOperations. </summary>
 29        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 30        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 31        /// <param name="subscriptionId"> The Microsoft Azure subscription ID. </param>
 32        /// <param name="endpoint"> server parameter. </param>
 33        /// <param name="apiVersion"> Api Version. </param>
 834        internal ConfigurationStoresOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscr
 35        {
 836            RestClient = new ConfigurationStoresRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, ap
 837            _clientDiagnostics = clientDiagnostics;
 838            _pipeline = pipeline;
 839        }
 40
 41        /// <summary> Gets the properties of the specified configuration store. </summary>
 42        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 43        /// <param name="configStoreName"> The name of the configuration store. </param>
 44        /// <param name="cancellationToken"> The cancellation token to use. </param>
 45        public virtual async Task<Response<ConfigurationStore>> GetAsync(string resourceGroupName, string configStoreNam
 46        {
 247            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.Get");
 248            scope.Start();
 49            try
 50            {
 251                return await RestClient.GetAsync(resourceGroupName, configStoreName, cancellationToken).ConfigureAwait(f
 52            }
 053            catch (Exception e)
 54            {
 055                scope.Failed(e);
 056                throw;
 57            }
 258        }
 59
 60        /// <summary> Gets the properties of the specified configuration store. </summary>
 61        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 62        /// <param name="configStoreName"> The name of the configuration store. </param>
 63        /// <param name="cancellationToken"> The cancellation token to use. </param>
 64        public virtual Response<ConfigurationStore> Get(string resourceGroupName, string configStoreName, CancellationTo
 65        {
 266            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.Get");
 267            scope.Start();
 68            try
 69            {
 270                return RestClient.Get(resourceGroupName, configStoreName, cancellationToken);
 71            }
 072            catch (Exception e)
 73            {
 074                scope.Failed(e);
 075                throw;
 76            }
 277        }
 78
 79        /// <summary> Regenerates an access key for the specified configuration store. </summary>
 80        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 81        /// <param name="configStoreName"> The name of the configuration store. </param>
 82        /// <param name="regenerateKeyParameters"> The parameters for regenerating an access key. </param>
 83        /// <param name="cancellationToken"> The cancellation token to use. </param>
 84        public virtual async Task<Response<ApiKey>> RegenerateKeyAsync(string resourceGroupName, string configStoreName,
 85        {
 286            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.RegenerateKey");
 287            scope.Start();
 88            try
 89            {
 290                return await RestClient.RegenerateKeyAsync(resourceGroupName, configStoreName, regenerateKeyParameters, 
 91            }
 092            catch (Exception e)
 93            {
 094                scope.Failed(e);
 095                throw;
 96            }
 297        }
 98
 99        /// <summary> Regenerates an access key for the specified configuration store. </summary>
 100        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 101        /// <param name="configStoreName"> The name of the configuration store. </param>
 102        /// <param name="regenerateKeyParameters"> The parameters for regenerating an access key. </param>
 103        /// <param name="cancellationToken"> The cancellation token to use. </param>
 104        public virtual Response<ApiKey> RegenerateKey(string resourceGroupName, string configStoreName, RegenerateKeyPar
 105        {
 2106            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.RegenerateKey");
 2107            scope.Start();
 108            try
 109            {
 2110                return RestClient.RegenerateKey(resourceGroupName, configStoreName, regenerateKeyParameters, cancellatio
 111            }
 0112            catch (Exception e)
 113            {
 0114                scope.Failed(e);
 0115                throw;
 116            }
 2117        }
 118
 119        /// <summary> Lists a configuration store key-value. </summary>
 120        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 121        /// <param name="configStoreName"> The name of the configuration store. </param>
 122        /// <param name="listKeyValueParameters"> The parameters for retrieving a key-value. </param>
 123        /// <param name="cancellationToken"> The cancellation token to use. </param>
 124        public virtual async Task<Response<KeyValue>> ListKeyValueAsync(string resourceGroupName, string configStoreName
 125        {
 0126            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeyValue");
 0127            scope.Start();
 128            try
 129            {
 0130                return await RestClient.ListKeyValueAsync(resourceGroupName, configStoreName, listKeyValueParameters, ca
 131            }
 0132            catch (Exception e)
 133            {
 0134                scope.Failed(e);
 0135                throw;
 136            }
 0137        }
 138
 139        /// <summary> Lists a configuration store key-value. </summary>
 140        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 141        /// <param name="configStoreName"> The name of the configuration store. </param>
 142        /// <param name="listKeyValueParameters"> The parameters for retrieving a key-value. </param>
 143        /// <param name="cancellationToken"> The cancellation token to use. </param>
 144        public virtual Response<KeyValue> ListKeyValue(string resourceGroupName, string configStoreName, ListKeyValuePar
 145        {
 0146            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeyValue");
 0147            scope.Start();
 148            try
 149            {
 0150                return RestClient.ListKeyValue(resourceGroupName, configStoreName, listKeyValueParameters, cancellationT
 151            }
 0152            catch (Exception e)
 153            {
 0154                scope.Failed(e);
 0155                throw;
 156            }
 0157        }
 158
 159        /// <summary> Lists the configuration stores for a given subscription. </summary>
 160        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 161        /// <param name="cancellationToken"> The cancellation token to use. </param>
 162        public virtual AsyncPageable<ConfigurationStore> ListAsync(string skipToken = null, CancellationToken cancellati
 163        {
 164            async Task<Page<ConfigurationStore>> FirstPageFunc(int? pageSizeHint)
 165            {
 2166                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.List");
 2167                scope.Start();
 168                try
 169                {
 2170                    var response = await RestClient.ListAsync(skipToken, cancellationToken).ConfigureAwait(false);
 2171                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 172                }
 0173                catch (Exception e)
 174                {
 0175                    scope.Failed(e);
 0176                    throw;
 177                }
 2178            }
 179            async Task<Page<ConfigurationStore>> NextPageFunc(string nextLink, int? pageSizeHint)
 180            {
 2181                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.List");
 2182                scope.Start();
 183                try
 184                {
 2185                    var response = await RestClient.ListNextPageAsync(nextLink, skipToken, cancellationToken).ConfigureA
 2186                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 187                }
 0188                catch (Exception e)
 189                {
 0190                    scope.Failed(e);
 0191                    throw;
 192                }
 2193            }
 2194            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 195        }
 196
 197        /// <summary> Lists the configuration stores for a given subscription. </summary>
 198        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 199        /// <param name="cancellationToken"> The cancellation token to use. </param>
 200        public virtual Pageable<ConfigurationStore> List(string skipToken = null, CancellationToken cancellationToken = 
 201        {
 202            Page<ConfigurationStore> FirstPageFunc(int? pageSizeHint)
 203            {
 2204                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.List");
 2205                scope.Start();
 206                try
 207                {
 2208                    var response = RestClient.List(skipToken, cancellationToken);
 2209                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 210                }
 0211                catch (Exception e)
 212                {
 0213                    scope.Failed(e);
 0214                    throw;
 215                }
 2216            }
 217            Page<ConfigurationStore> NextPageFunc(string nextLink, int? pageSizeHint)
 218            {
 2219                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.List");
 2220                scope.Start();
 221                try
 222                {
 2223                    var response = RestClient.ListNextPage(nextLink, skipToken, cancellationToken);
 2224                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 225                }
 0226                catch (Exception e)
 227                {
 0228                    scope.Failed(e);
 0229                    throw;
 230                }
 2231            }
 2232            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 233        }
 234
 235        /// <summary> Lists the configuration stores for a given resource group. </summary>
 236        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 237        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 238        /// <param name="cancellationToken"> The cancellation token to use. </param>
 239        public virtual AsyncPageable<ConfigurationStore> ListByResourceGroupAsync(string resourceGroupName, string skipT
 240        {
 2241            if (resourceGroupName == null)
 242            {
 0243                throw new ArgumentNullException(nameof(resourceGroupName));
 244            }
 245
 246            async Task<Page<ConfigurationStore>> FirstPageFunc(int? pageSizeHint)
 247            {
 2248                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListByResourceGroup");
 2249                scope.Start();
 250                try
 251                {
 2252                    var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, skipToken, cancellationT
 2253                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 254                }
 0255                catch (Exception e)
 256                {
 0257                    scope.Failed(e);
 0258                    throw;
 259                }
 2260            }
 261            async Task<Page<ConfigurationStore>> NextPageFunc(string nextLink, int? pageSizeHint)
 262            {
 2263                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListByResourceGroup");
 2264                scope.Start();
 265                try
 266                {
 2267                    var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, skipTo
 2268                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 269                }
 0270                catch (Exception e)
 271                {
 0272                    scope.Failed(e);
 0273                    throw;
 274                }
 2275            }
 2276            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 277        }
 278
 279        /// <summary> Lists the configuration stores for a given resource group. </summary>
 280        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 281        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 282        /// <param name="cancellationToken"> The cancellation token to use. </param>
 283        public virtual Pageable<ConfigurationStore> ListByResourceGroup(string resourceGroupName, string skipToken = nul
 284        {
 2285            if (resourceGroupName == null)
 286            {
 0287                throw new ArgumentNullException(nameof(resourceGroupName));
 288            }
 289
 290            Page<ConfigurationStore> FirstPageFunc(int? pageSizeHint)
 291            {
 2292                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListByResourceGroup");
 2293                scope.Start();
 294                try
 295                {
 2296                    var response = RestClient.ListByResourceGroup(resourceGroupName, skipToken, cancellationToken);
 2297                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 298                }
 0299                catch (Exception e)
 300                {
 0301                    scope.Failed(e);
 0302                    throw;
 303                }
 2304            }
 305            Page<ConfigurationStore> NextPageFunc(string nextLink, int? pageSizeHint)
 306            {
 2307                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListByResourceGroup");
 2308                scope.Start();
 309                try
 310                {
 2311                    var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, skipToken, cancel
 2312                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 313                }
 0314                catch (Exception e)
 315                {
 0316                    scope.Failed(e);
 0317                    throw;
 318                }
 2319            }
 2320            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 321        }
 322
 323        /// <summary> Lists the access key for the specified configuration store. </summary>
 324        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 325        /// <param name="configStoreName"> The name of the configuration store. </param>
 326        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 327        /// <param name="cancellationToken"> The cancellation token to use. </param>
 328        public virtual AsyncPageable<ApiKey> ListKeysAsync(string resourceGroupName, string configStoreName, string skip
 329        {
 2330            if (resourceGroupName == null)
 331            {
 0332                throw new ArgumentNullException(nameof(resourceGroupName));
 333            }
 2334            if (configStoreName == null)
 335            {
 0336                throw new ArgumentNullException(nameof(configStoreName));
 337            }
 338
 339            async Task<Page<ApiKey>> FirstPageFunc(int? pageSizeHint)
 340            {
 2341                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeys");
 2342                scope.Start();
 343                try
 344                {
 2345                    var response = await RestClient.ListKeysAsync(resourceGroupName, configStoreName, skipToken, cancell
 2346                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 347                }
 0348                catch (Exception e)
 349                {
 0350                    scope.Failed(e);
 0351                    throw;
 352                }
 2353            }
 354            async Task<Page<ApiKey>> NextPageFunc(string nextLink, int? pageSizeHint)
 355            {
 0356                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeys");
 0357                scope.Start();
 358                try
 359                {
 0360                    var response = await RestClient.ListKeysNextPageAsync(nextLink, resourceGroupName, configStoreName, 
 0361                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 362                }
 0363                catch (Exception e)
 364                {
 0365                    scope.Failed(e);
 0366                    throw;
 367                }
 0368            }
 2369            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 370        }
 371
 372        /// <summary> Lists the access key for the specified configuration store. </summary>
 373        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 374        /// <param name="configStoreName"> The name of the configuration store. </param>
 375        /// <param name="skipToken"> A skip token is used to continue retrieving items after an operation returns a part
 376        /// <param name="cancellationToken"> The cancellation token to use. </param>
 377        public virtual Pageable<ApiKey> ListKeys(string resourceGroupName, string configStoreName, string skipToken = nu
 378        {
 2379            if (resourceGroupName == null)
 380            {
 0381                throw new ArgumentNullException(nameof(resourceGroupName));
 382            }
 2383            if (configStoreName == null)
 384            {
 0385                throw new ArgumentNullException(nameof(configStoreName));
 386            }
 387
 388            Page<ApiKey> FirstPageFunc(int? pageSizeHint)
 389            {
 2390                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeys");
 2391                scope.Start();
 392                try
 393                {
 2394                    var response = RestClient.ListKeys(resourceGroupName, configStoreName, skipToken, cancellationToken)
 2395                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 396                }
 0397                catch (Exception e)
 398                {
 0399                    scope.Failed(e);
 0400                    throw;
 401                }
 2402            }
 403            Page<ApiKey> NextPageFunc(string nextLink, int? pageSizeHint)
 404            {
 0405                using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeys");
 0406                scope.Start();
 407                try
 408                {
 0409                    var response = RestClient.ListKeysNextPage(nextLink, resourceGroupName, configStoreName, skipToken, 
 0410                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 411                }
 0412                catch (Exception e)
 413                {
 0414                    scope.Failed(e);
 0415                    throw;
 416                }
 0417            }
 2418            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 419        }
 420
 421        /// <summary> Creates a configuration store with the specified parameters. </summary>
 422        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 423        /// <param name="configStoreName"> The name of the configuration store. </param>
 424        /// <param name="configStoreCreationParameters"> The parameters for creating a configuration store. </param>
 425        /// <param name="cancellationToken"> The cancellation token to use. </param>
 426        public virtual async Task<ConfigurationStoresCreateOperation> StartCreateAsync(string resourceGroupName, string 
 427        {
 4428            if (resourceGroupName == null)
 429            {
 0430                throw new ArgumentNullException(nameof(resourceGroupName));
 431            }
 4432            if (configStoreName == null)
 433            {
 0434                throw new ArgumentNullException(nameof(configStoreName));
 435            }
 4436            if (configStoreCreationParameters == null)
 437            {
 0438                throw new ArgumentNullException(nameof(configStoreCreationParameters));
 439            }
 440
 4441            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartCreate");
 4442            scope.Start();
 443            try
 444            {
 4445                var originalResponse = await RestClient.CreateAsync(resourceGroupName, configStoreName, configStoreCreat
 4446                return new ConfigurationStoresCreateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateRequ
 447            }
 0448            catch (Exception e)
 449            {
 0450                scope.Failed(e);
 0451                throw;
 452            }
 4453        }
 454
 455        /// <summary> Creates a configuration store with the specified parameters. </summary>
 456        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 457        /// <param name="configStoreName"> The name of the configuration store. </param>
 458        /// <param name="configStoreCreationParameters"> The parameters for creating a configuration store. </param>
 459        /// <param name="cancellationToken"> The cancellation token to use. </param>
 460        public virtual ConfigurationStoresCreateOperation StartCreate(string resourceGroupName, string configStoreName, 
 461        {
 4462            if (resourceGroupName == null)
 463            {
 0464                throw new ArgumentNullException(nameof(resourceGroupName));
 465            }
 4466            if (configStoreName == null)
 467            {
 0468                throw new ArgumentNullException(nameof(configStoreName));
 469            }
 4470            if (configStoreCreationParameters == null)
 471            {
 0472                throw new ArgumentNullException(nameof(configStoreCreationParameters));
 473            }
 474
 4475            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartCreate");
 4476            scope.Start();
 477            try
 478            {
 4479                var originalResponse = RestClient.Create(resourceGroupName, configStoreName, configStoreCreationParamete
 4480                return new ConfigurationStoresCreateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateRequ
 481            }
 0482            catch (Exception e)
 483            {
 0484                scope.Failed(e);
 0485                throw;
 486            }
 4487        }
 488
 489        /// <summary> Deletes a configuration store. </summary>
 490        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 491        /// <param name="configStoreName"> The name of the configuration store. </param>
 492        /// <param name="cancellationToken"> The cancellation token to use. </param>
 493        public virtual async Task<ConfigurationStoresDeleteOperation> StartDeleteAsync(string resourceGroupName, string 
 494        {
 2495            if (resourceGroupName == null)
 496            {
 0497                throw new ArgumentNullException(nameof(resourceGroupName));
 498            }
 2499            if (configStoreName == null)
 500            {
 0501                throw new ArgumentNullException(nameof(configStoreName));
 502            }
 503
 2504            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartDelete");
 2505            scope.Start();
 506            try
 507            {
 2508                var originalResponse = await RestClient.DeleteAsync(resourceGroupName, configStoreName, cancellationToke
 2509                return new ConfigurationStoresDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ
 510            }
 0511            catch (Exception e)
 512            {
 0513                scope.Failed(e);
 0514                throw;
 515            }
 2516        }
 517
 518        /// <summary> Deletes a configuration store. </summary>
 519        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 520        /// <param name="configStoreName"> The name of the configuration store. </param>
 521        /// <param name="cancellationToken"> The cancellation token to use. </param>
 522        public virtual ConfigurationStoresDeleteOperation StartDelete(string resourceGroupName, string configStoreName, 
 523        {
 2524            if (resourceGroupName == null)
 525            {
 0526                throw new ArgumentNullException(nameof(resourceGroupName));
 527            }
 2528            if (configStoreName == null)
 529            {
 0530                throw new ArgumentNullException(nameof(configStoreName));
 531            }
 532
 2533            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartDelete");
 2534            scope.Start();
 535            try
 536            {
 2537                var originalResponse = RestClient.Delete(resourceGroupName, configStoreName, cancellationToken);
 2538                return new ConfigurationStoresDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ
 539            }
 0540            catch (Exception e)
 541            {
 0542                scope.Failed(e);
 0543                throw;
 544            }
 2545        }
 546
 547        /// <summary> Updates a configuration store with the specified parameters. </summary>
 548        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 549        /// <param name="configStoreName"> The name of the configuration store. </param>
 550        /// <param name="configStoreUpdateParameters"> The parameters for updating a configuration store. </param>
 551        /// <param name="cancellationToken"> The cancellation token to use. </param>
 552        public virtual async Task<ConfigurationStoresUpdateOperation> StartUpdateAsync(string resourceGroupName, string 
 553        {
 2554            if (resourceGroupName == null)
 555            {
 0556                throw new ArgumentNullException(nameof(resourceGroupName));
 557            }
 2558            if (configStoreName == null)
 559            {
 0560                throw new ArgumentNullException(nameof(configStoreName));
 561            }
 2562            if (configStoreUpdateParameters == null)
 563            {
 0564                throw new ArgumentNullException(nameof(configStoreUpdateParameters));
 565            }
 566
 2567            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartUpdate");
 2568            scope.Start();
 569            try
 570            {
 2571                var originalResponse = await RestClient.UpdateAsync(resourceGroupName, configStoreName, configStoreUpdat
 2572                return new ConfigurationStoresUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequ
 573            }
 0574            catch (Exception e)
 575            {
 0576                scope.Failed(e);
 0577                throw;
 578            }
 2579        }
 580
 581        /// <summary> Updates a configuration store with the specified parameters. </summary>
 582        /// <param name="resourceGroupName"> The name of the resource group to which the container registry belongs. </p
 583        /// <param name="configStoreName"> The name of the configuration store. </param>
 584        /// <param name="configStoreUpdateParameters"> The parameters for updating a configuration store. </param>
 585        /// <param name="cancellationToken"> The cancellation token to use. </param>
 586        public virtual ConfigurationStoresUpdateOperation StartUpdate(string resourceGroupName, string configStoreName, 
 587        {
 2588            if (resourceGroupName == null)
 589            {
 0590                throw new ArgumentNullException(nameof(resourceGroupName));
 591            }
 2592            if (configStoreName == null)
 593            {
 0594                throw new ArgumentNullException(nameof(configStoreName));
 595            }
 2596            if (configStoreUpdateParameters == null)
 597            {
 0598                throw new ArgumentNullException(nameof(configStoreUpdateParameters));
 599            }
 600
 2601            using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.StartUpdate");
 2602            scope.Start();
 603            try
 604            {
 2605                var originalResponse = RestClient.Update(resourceGroupName, configStoreName, configStoreUpdateParameters
 2606                return new ConfigurationStoresUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequ
 607            }
 0608            catch (Exception e)
 609            {
 0610                scope.Failed(e);
 0611                throw;
 612            }
 2613        }
 614    }
 615}