< Summary

Class:Azure.ResourceManager.EventHubs.NamespacesOperations
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\NamespacesOperations.cs
Covered lines:160
Uncovered lines:322
Coverable lines:482
Total lines:1254
Line coverage:33.1% (160 of 482)
Covered branches:16
Total branches:48
Branch coverage:33.3% (16 of 48)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
CreateOrUpdateIpFilterRuleAsync()-0%100%
CreateOrUpdateIpFilterRule(...)-0%100%
DeleteIpFilterRuleAsync()-0%100%
DeleteIpFilterRule(...)-0%100%
GetIpFilterRuleAsync()-0%100%
GetIpFilterRule(...)-0%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
UpdateAsync()-57.14%100%
Update(...)-57.14%100%
CreateOrUpdateVirtualNetworkRuleAsync()-0%100%
CreateOrUpdateVirtualNetworkRule(...)-0%100%
DeleteVirtualNetworkRuleAsync()-0%100%
DeleteVirtualNetworkRule(...)-0%100%
GetVirtualNetworkRuleAsync()-0%100%
GetVirtualNetworkRule(...)-0%100%
CreateOrUpdateNetworkRuleSetAsync()-57.14%100%
CreateOrUpdateNetworkRuleSet(...)-57.14%100%
GetNetworkRuleSetAsync()-57.14%100%
GetNetworkRuleSet(...)-57.14%100%
CreateOrUpdateAuthorizationRuleAsync()-57.14%100%
CreateOrUpdateAuthorizationRule(...)-57.14%100%
DeleteAuthorizationRuleAsync()-57.14%100%
DeleteAuthorizationRule(...)-57.14%100%
GetAuthorizationRuleAsync()-57.14%100%
GetAuthorizationRule(...)-57.14%100%
ListKeysAsync()-57.14%100%
ListKeys(...)-57.14%100%
RegenerateKeysAsync()-57.14%100%
RegenerateKeys(...)-57.14%100%
CheckNameAvailabilityAsync()-57.14%100%
CheckNameAvailability(...)-57.14%100%
ListIPFilterRulesAsync(...)-0%0%
<ListIPFilterRulesAsync()-0%100%
<ListIPFilterRulesAsync()-0%100%
ListIPFilterRules(...)-0%0%
<ListAsync()-62.5%100%
<ListAsync()-0%100%
ListAsync(...)-100%100%
List(...)-100%100%
ListByResourceGroupAsync(...)-36.84%50%
<ListByResourceGroupAsync()-62.5%100%
<ListByResourceGroupAsync()-0%100%
ListByResourceGroup(...)-36.84%50%
ListVirtualNetworkRulesAsync(...)-0%0%
<ListVirtualNetworkRulesAsync()-0%100%
<ListVirtualNetworkRulesAsync()-0%100%
ListVirtualNetworkRules(...)-0%0%
ListAuthorizationRulesAsync(...)-38.1%50%
<ListAuthorizationRulesAsync()-62.5%100%
<ListAuthorizationRulesAsync()-0%100%
ListAuthorizationRules(...)-38.1%50%
StartCreateOrUpdateAsync()-57.14%50%
StartCreateOrUpdate(...)-57.14%50%
StartDeleteAsync()-58.33%50%
StartDelete(...)-58.33%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\NamespacesOperations.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.EventHubs.Models;
 15
 16namespace Azure.ResourceManager.EventHubs
 17{
 18    /// <summary> The Namespaces service client. </summary>
 19    public partial class NamespacesOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 36823        internal NamespacesRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of NamespacesOperations for mocking. </summary>
 4825        protected NamespacesOperations()
 26        {
 4827        }
 28        /// <summary> Initializes a new instance of NamespacesOperations. </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"> Subscription credentials that uniquely identify a Microsoft Azure subscription
 32        /// <param name="endpoint"> server parameter. </param>
 4833        internal NamespacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId,
 34        {
 4835            RestClient = new NamespacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 4836            _clientDiagnostics = clientDiagnostics;
 4837            _pipeline = pipeline;
 4838        }
 39
 40        /// <summary> Creates or updates an IpFilterRule for a Namespace. </summary>
 41        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 42        /// <param name="namespaceName"> The Namespace name. </param>
 43        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 44        /// <param name="parameters"> The Namespace IpFilterRule. </param>
 45        /// <param name="cancellationToken"> The cancellation token to use. </param>
 46        public virtual async Task<Response<IpFilterRule>> CreateOrUpdateIpFilterRuleAsync(string resourceGroupName, stri
 47        {
 048            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateIpFilterRule");
 049            scope.Start();
 50            try
 51            {
 052                return await RestClient.CreateOrUpdateIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleNa
 53            }
 054            catch (Exception e)
 55            {
 056                scope.Failed(e);
 057                throw;
 58            }
 059        }
 60
 61        /// <summary> Creates or updates an IpFilterRule for a Namespace. </summary>
 62        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 63        /// <param name="namespaceName"> The Namespace name. </param>
 64        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 65        /// <param name="parameters"> The Namespace IpFilterRule. </param>
 66        /// <param name="cancellationToken"> The cancellation token to use. </param>
 67        public virtual Response<IpFilterRule> CreateOrUpdateIpFilterRule(string resourceGroupName, string namespaceName,
 68        {
 069            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateIpFilterRule");
 070            scope.Start();
 71            try
 72            {
 073                return RestClient.CreateOrUpdateIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, paramet
 74            }
 075            catch (Exception e)
 76            {
 077                scope.Failed(e);
 078                throw;
 79            }
 080        }
 81
 82        /// <summary> Deletes an IpFilterRule for a Namespace. </summary>
 83        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 84        /// <param name="namespaceName"> The Namespace name. </param>
 85        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 86        /// <param name="cancellationToken"> The cancellation token to use. </param>
 87        public virtual async Task<Response> DeleteIpFilterRuleAsync(string resourceGroupName, string namespaceName, stri
 88        {
 089            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteIpFilterRule");
 090            scope.Start();
 91            try
 92            {
 093                return await RestClient.DeleteIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleName, canc
 94            }
 095            catch (Exception e)
 96            {
 097                scope.Failed(e);
 098                throw;
 99            }
 0100        }
 101
 102        /// <summary> Deletes an IpFilterRule for a Namespace. </summary>
 103        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 104        /// <param name="namespaceName"> The Namespace name. </param>
 105        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 106        /// <param name="cancellationToken"> The cancellation token to use. </param>
 107        public virtual Response DeleteIpFilterRule(string resourceGroupName, string namespaceName, string ipFilterRuleNa
 108        {
 0109            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteIpFilterRule");
 0110            scope.Start();
 111            try
 112            {
 0113                return RestClient.DeleteIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, cancellationTok
 114            }
 0115            catch (Exception e)
 116            {
 0117                scope.Failed(e);
 0118                throw;
 119            }
 0120        }
 121
 122        /// <summary> Gets an IpFilterRule for a Namespace by rule name. </summary>
 123        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 124        /// <param name="namespaceName"> The Namespace name. </param>
 125        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 126        /// <param name="cancellationToken"> The cancellation token to use. </param>
 127        public virtual async Task<Response<IpFilterRule>> GetIpFilterRuleAsync(string resourceGroupName, string namespac
 128        {
 0129            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetIpFilterRule");
 0130            scope.Start();
 131            try
 132            {
 0133                return await RestClient.GetIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleName, cancell
 134            }
 0135            catch (Exception e)
 136            {
 0137                scope.Failed(e);
 0138                throw;
 139            }
 0140        }
 141
 142        /// <summary> Gets an IpFilterRule for a Namespace by rule name. </summary>
 143        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 144        /// <param name="namespaceName"> The Namespace name. </param>
 145        /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param>
 146        /// <param name="cancellationToken"> The cancellation token to use. </param>
 147        public virtual Response<IpFilterRule> GetIpFilterRule(string resourceGroupName, string namespaceName, string ipF
 148        {
 0149            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetIpFilterRule");
 0150            scope.Start();
 151            try
 152            {
 0153                return RestClient.GetIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, cancellationToken)
 154            }
 0155            catch (Exception e)
 156            {
 0157                scope.Failed(e);
 0158                throw;
 159            }
 0160        }
 161
 162        /// <summary> Gets the description of the specified namespace. </summary>
 163        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 164        /// <param name="namespaceName"> The Namespace name. </param>
 165        /// <param name="cancellationToken"> The cancellation token to use. </param>
 166        public virtual async Task<Response<EHNamespace>> GetAsync(string resourceGroupName, string namespaceName, Cancel
 167        {
 28168            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Get");
 28169            scope.Start();
 170            try
 171            {
 28172                return await RestClient.GetAsync(resourceGroupName, namespaceName, cancellationToken).ConfigureAwait(fal
 173            }
 0174            catch (Exception e)
 175            {
 0176                scope.Failed(e);
 0177                throw;
 178            }
 28179        }
 180
 181        /// <summary> Gets the description of the specified namespace. </summary>
 182        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 183        /// <param name="namespaceName"> The Namespace name. </param>
 184        /// <param name="cancellationToken"> The cancellation token to use. </param>
 185        public virtual Response<EHNamespace> Get(string resourceGroupName, string namespaceName, CancellationToken cance
 186        {
 28187            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Get");
 28188            scope.Start();
 189            try
 190            {
 28191                return RestClient.Get(resourceGroupName, namespaceName, cancellationToken);
 192            }
 0193            catch (Exception e)
 194            {
 0195                scope.Failed(e);
 0196                throw;
 197            }
 28198        }
 199
 200        /// <summary> Creates or updates a namespace. Once created, this namespace&apos;s resource manifest is immutable
 201        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 202        /// <param name="namespaceName"> The Namespace name. </param>
 203        /// <param name="parameters"> Parameters for updating a namespace resource. </param>
 204        /// <param name="cancellationToken"> The cancellation token to use. </param>
 205        public virtual async Task<Response<EHNamespace>> UpdateAsync(string resourceGroupName, string namespaceName, EHN
 206        {
 4207            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Update");
 4208            scope.Start();
 209            try
 210            {
 4211                return await RestClient.UpdateAsync(resourceGroupName, namespaceName, parameters, cancellationToken).Con
 212            }
 0213            catch (Exception e)
 214            {
 0215                scope.Failed(e);
 0216                throw;
 217            }
 4218        }
 219
 220        /// <summary> Creates or updates a namespace. Once created, this namespace&apos;s resource manifest is immutable
 221        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 222        /// <param name="namespaceName"> The Namespace name. </param>
 223        /// <param name="parameters"> Parameters for updating a namespace resource. </param>
 224        /// <param name="cancellationToken"> The cancellation token to use. </param>
 225        public virtual Response<EHNamespace> Update(string resourceGroupName, string namespaceName, EHNamespace paramete
 226        {
 4227            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Update");
 4228            scope.Start();
 229            try
 230            {
 4231                return RestClient.Update(resourceGroupName, namespaceName, parameters, cancellationToken);
 232            }
 0233            catch (Exception e)
 234            {
 0235                scope.Failed(e);
 0236                throw;
 237            }
 4238        }
 239
 240        /// <summary> Creates or updates an VirtualNetworkRule for a Namespace. </summary>
 241        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 242        /// <param name="namespaceName"> The Namespace name. </param>
 243        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 244        /// <param name="parameters"> The Namespace VirtualNetworkRule. </param>
 245        /// <param name="cancellationToken"> The cancellation token to use. </param>
 246        public virtual async Task<Response<VirtualNetworkRule>> CreateOrUpdateVirtualNetworkRuleAsync(string resourceGro
 247        {
 0248            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateVirtualNetworkRule");
 0249            scope.Start();
 250            try
 251            {
 0252                return await RestClient.CreateOrUpdateVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualN
 253            }
 0254            catch (Exception e)
 255            {
 0256                scope.Failed(e);
 0257                throw;
 258            }
 0259        }
 260
 261        /// <summary> Creates or updates an VirtualNetworkRule for a Namespace. </summary>
 262        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 263        /// <param name="namespaceName"> The Namespace name. </param>
 264        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 265        /// <param name="parameters"> The Namespace VirtualNetworkRule. </param>
 266        /// <param name="cancellationToken"> The cancellation token to use. </param>
 267        public virtual Response<VirtualNetworkRule> CreateOrUpdateVirtualNetworkRule(string resourceGroupName, string na
 268        {
 0269            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateVirtualNetworkRule");
 0270            scope.Start();
 271            try
 272            {
 0273                return RestClient.CreateOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleN
 274            }
 0275            catch (Exception e)
 276            {
 0277                scope.Failed(e);
 0278                throw;
 279            }
 0280        }
 281
 282        /// <summary> Deletes an VirtualNetworkRule for a Namespace. </summary>
 283        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 284        /// <param name="namespaceName"> The Namespace name. </param>
 285        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 286        /// <param name="cancellationToken"> The cancellation token to use. </param>
 287        public virtual async Task<Response> DeleteVirtualNetworkRuleAsync(string resourceGroupName, string namespaceName
 288        {
 0289            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteVirtualNetworkRule");
 0290            scope.Start();
 291            try
 292            {
 0293                return await RestClient.DeleteVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRu
 294            }
 0295            catch (Exception e)
 296            {
 0297                scope.Failed(e);
 0298                throw;
 299            }
 0300        }
 301
 302        /// <summary> Deletes an VirtualNetworkRule for a Namespace. </summary>
 303        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 304        /// <param name="namespaceName"> The Namespace name. </param>
 305        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 306        /// <param name="cancellationToken"> The cancellation token to use. </param>
 307        public virtual Response DeleteVirtualNetworkRule(string resourceGroupName, string namespaceName, string virtualN
 308        {
 0309            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteVirtualNetworkRule");
 0310            scope.Start();
 311            try
 312            {
 0313                return RestClient.DeleteVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, can
 314            }
 0315            catch (Exception e)
 316            {
 0317                scope.Failed(e);
 0318                throw;
 319            }
 0320        }
 321
 322        /// <summary> Gets an VirtualNetworkRule for a Namespace by rule name. </summary>
 323        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 324        /// <param name="namespaceName"> The Namespace name. </param>
 325        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 326        /// <param name="cancellationToken"> The cancellation token to use. </param>
 327        public virtual async Task<Response<VirtualNetworkRule>> GetVirtualNetworkRuleAsync(string resourceGroupName, str
 328        {
 0329            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetVirtualNetworkRule");
 0330            scope.Start();
 331            try
 332            {
 0333                return await RestClient.GetVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRuleN
 334            }
 0335            catch (Exception e)
 336            {
 0337                scope.Failed(e);
 0338                throw;
 339            }
 0340        }
 341
 342        /// <summary> Gets an VirtualNetworkRule for a Namespace by rule name. </summary>
 343        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 344        /// <param name="namespaceName"> The Namespace name. </param>
 345        /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param>
 346        /// <param name="cancellationToken"> The cancellation token to use. </param>
 347        public virtual Response<VirtualNetworkRule> GetVirtualNetworkRule(string resourceGroupName, string namespaceName
 348        {
 0349            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetVirtualNetworkRule");
 0350            scope.Start();
 351            try
 352            {
 0353                return RestClient.GetVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, cancel
 354            }
 0355            catch (Exception e)
 356            {
 0357                scope.Failed(e);
 0358                throw;
 359            }
 0360        }
 361
 362        /// <summary> Create or update NetworkRuleSet for a Namespace. </summary>
 363        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 364        /// <param name="namespaceName"> The Namespace name. </param>
 365        /// <param name="parameters"> The Namespace IpFilterRule. </param>
 366        /// <param name="cancellationToken"> The cancellation token to use. </param>
 367        public virtual async Task<Response<NetworkRuleSet>> CreateOrUpdateNetworkRuleSetAsync(string resourceGroupName, 
 368        {
 4369            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateNetworkRuleSet");
 4370            scope.Start();
 371            try
 372            {
 4373                return await RestClient.CreateOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters, 
 374            }
 0375            catch (Exception e)
 376            {
 0377                scope.Failed(e);
 0378                throw;
 379            }
 4380        }
 381
 382        /// <summary> Create or update NetworkRuleSet for a Namespace. </summary>
 383        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 384        /// <param name="namespaceName"> The Namespace name. </param>
 385        /// <param name="parameters"> The Namespace IpFilterRule. </param>
 386        /// <param name="cancellationToken"> The cancellation token to use. </param>
 387        public virtual Response<NetworkRuleSet> CreateOrUpdateNetworkRuleSet(string resourceGroupName, string namespaceN
 388        {
 4389            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateNetworkRuleSet");
 4390            scope.Start();
 391            try
 392            {
 4393                return RestClient.CreateOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, parameters, cancellatio
 394            }
 0395            catch (Exception e)
 396            {
 0397                scope.Failed(e);
 0398                throw;
 399            }
 4400        }
 401
 402        /// <summary> Gets NetworkRuleSet for a Namespace. </summary>
 403        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 404        /// <param name="namespaceName"> The Namespace name. </param>
 405        /// <param name="cancellationToken"> The cancellation token to use. </param>
 406        public virtual async Task<Response<NetworkRuleSet>> GetNetworkRuleSetAsync(string resourceGroupName, string name
 407        {
 4408            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetNetworkRuleSet");
 4409            scope.Start();
 410            try
 411            {
 4412                return await RestClient.GetNetworkRuleSetAsync(resourceGroupName, namespaceName, cancellationToken).Conf
 413            }
 0414            catch (Exception e)
 415            {
 0416                scope.Failed(e);
 0417                throw;
 418            }
 4419        }
 420
 421        /// <summary> Gets NetworkRuleSet for a Namespace. </summary>
 422        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 423        /// <param name="namespaceName"> The Namespace name. </param>
 424        /// <param name="cancellationToken"> The cancellation token to use. </param>
 425        public virtual Response<NetworkRuleSet> GetNetworkRuleSet(string resourceGroupName, string namespaceName, Cancel
 426        {
 4427            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetNetworkRuleSet");
 4428            scope.Start();
 429            try
 430            {
 4431                return RestClient.GetNetworkRuleSet(resourceGroupName, namespaceName, cancellationToken);
 432            }
 0433            catch (Exception e)
 434            {
 0435                scope.Failed(e);
 0436                throw;
 437            }
 4438        }
 439
 440        /// <summary> Creates or updates an AuthorizationRule for a Namespace. </summary>
 441        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 442        /// <param name="namespaceName"> The Namespace name. </param>
 443        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 444        /// <param name="parameters"> The shared access AuthorizationRule. </param>
 445        /// <param name="cancellationToken"> The cancellation token to use. </param>
 446        public virtual async Task<Response<AuthorizationRule>> CreateOrUpdateAuthorizationRuleAsync(string resourceGroup
 447        {
 8448            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateAuthorizationRule");
 8449            scope.Start();
 450            try
 451            {
 8452                return await RestClient.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authoriza
 453            }
 0454            catch (Exception e)
 455            {
 0456                scope.Failed(e);
 0457                throw;
 458            }
 8459        }
 460
 461        /// <summary> Creates or updates an AuthorizationRule for a Namespace. </summary>
 462        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 463        /// <param name="namespaceName"> The Namespace name. </param>
 464        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 465        /// <param name="parameters"> The shared access AuthorizationRule. </param>
 466        /// <param name="cancellationToken"> The cancellation token to use. </param>
 467        public virtual Response<AuthorizationRule> CreateOrUpdateAuthorizationRule(string resourceGroupName, string name
 468        {
 8469            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateAuthorizationRule");
 8470            scope.Start();
 471            try
 472            {
 8473                return RestClient.CreateOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleNam
 474            }
 0475            catch (Exception e)
 476            {
 0477                scope.Failed(e);
 0478                throw;
 479            }
 8480        }
 481
 482        /// <summary> Deletes an AuthorizationRule for a Namespace. </summary>
 483        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 484        /// <param name="namespaceName"> The Namespace name. </param>
 485        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 486        /// <param name="cancellationToken"> The cancellation token to use. </param>
 487        public virtual async Task<Response> DeleteAuthorizationRuleAsync(string resourceGroupName, string namespaceName,
 488        {
 2489            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteAuthorizationRule");
 2490            scope.Start();
 491            try
 492            {
 2493                return await RestClient.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRule
 494            }
 0495            catch (Exception e)
 496            {
 0497                scope.Failed(e);
 0498                throw;
 499            }
 2500        }
 501
 502        /// <summary> Deletes an AuthorizationRule for a Namespace. </summary>
 503        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 504        /// <param name="namespaceName"> The Namespace name. </param>
 505        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 506        /// <param name="cancellationToken"> The cancellation token to use. </param>
 507        public virtual Response DeleteAuthorizationRule(string resourceGroupName, string namespaceName, string authoriza
 508        {
 2509            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteAuthorizationRule");
 2510            scope.Start();
 511            try
 512            {
 2513                return RestClient.DeleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, cance
 514            }
 0515            catch (Exception e)
 516            {
 0517                scope.Failed(e);
 0518                throw;
 519            }
 2520        }
 521
 522        /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary>
 523        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 524        /// <param name="namespaceName"> The Namespace name. </param>
 525        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 526        /// <param name="cancellationToken"> The cancellation token to use. </param>
 527        public virtual async Task<Response<AuthorizationRule>> GetAuthorizationRuleAsync(string resourceGroupName, strin
 528        {
 10529            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetAuthorizationRule");
 10530            scope.Start();
 531            try
 532            {
 10533                return await RestClient.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleNam
 534            }
 0535            catch (Exception e)
 536            {
 0537                scope.Failed(e);
 0538                throw;
 539            }
 10540        }
 541
 542        /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary>
 543        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 544        /// <param name="namespaceName"> The Namespace name. </param>
 545        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 546        /// <param name="cancellationToken"> The cancellation token to use. </param>
 547        public virtual Response<AuthorizationRule> GetAuthorizationRule(string resourceGroupName, string namespaceName, 
 548        {
 10549            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetAuthorizationRule");
 10550            scope.Start();
 551            try
 552            {
 10553                return RestClient.GetAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, cancella
 554            }
 0555            catch (Exception e)
 556            {
 0557                scope.Failed(e);
 0558                throw;
 559            }
 10560        }
 561
 562        /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary>
 563        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 564        /// <param name="namespaceName"> The Namespace name. </param>
 565        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 566        /// <param name="cancellationToken"> The cancellation token to use. </param>
 567        public virtual async Task<Response<AccessKeys>> ListKeysAsync(string resourceGroupName, string namespaceName, st
 568        {
 6569            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListKeys");
 6570            scope.Start();
 571            try
 572            {
 6573                return await RestClient.ListKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, cancellat
 574            }
 0575            catch (Exception e)
 576            {
 0577                scope.Failed(e);
 0578                throw;
 579            }
 6580        }
 581
 582        /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary>
 583        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 584        /// <param name="namespaceName"> The Namespace name. </param>
 585        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 586        /// <param name="cancellationToken"> The cancellation token to use. </param>
 587        public virtual Response<AccessKeys> ListKeys(string resourceGroupName, string namespaceName, string authorizatio
 588        {
 6589            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListKeys");
 6590            scope.Start();
 591            try
 592            {
 6593                return RestClient.ListKeys(resourceGroupName, namespaceName, authorizationRuleName, cancellationToken);
 594            }
 0595            catch (Exception e)
 596            {
 0597                scope.Failed(e);
 0598                throw;
 599            }
 6600        }
 601
 602        /// <summary> Regenerates the primary or secondary connection strings for the specified Namespace. </summary>
 603        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 604        /// <param name="namespaceName"> The Namespace name. </param>
 605        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 606        /// <param name="parameters"> Parameters required to regenerate the connection string. </param>
 607        /// <param name="cancellationToken"> The cancellation token to use. </param>
 608        public virtual async Task<Response<AccessKeys>> RegenerateKeysAsync(string resourceGroupName, string namespaceNa
 609        {
 4610            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.RegenerateKeys");
 4611            scope.Start();
 612            try
 613            {
 4614                return await RestClient.RegenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, par
 615            }
 0616            catch (Exception e)
 617            {
 0618                scope.Failed(e);
 0619                throw;
 620            }
 4621        }
 622
 623        /// <summary> Regenerates the primary or secondary connection strings for the specified Namespace. </summary>
 624        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 625        /// <param name="namespaceName"> The Namespace name. </param>
 626        /// <param name="authorizationRuleName"> The authorization rule name. </param>
 627        /// <param name="parameters"> Parameters required to regenerate the connection string. </param>
 628        /// <param name="cancellationToken"> The cancellation token to use. </param>
 629        public virtual Response<AccessKeys> RegenerateKeys(string resourceGroupName, string namespaceName, string author
 630        {
 4631            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.RegenerateKeys");
 4632            scope.Start();
 633            try
 634            {
 4635                return RestClient.RegenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, parameters, ca
 636            }
 0637            catch (Exception e)
 638            {
 0639                scope.Failed(e);
 0640                throw;
 641            }
 4642        }
 643
 644        /// <summary> Check the give Namespace name availability. </summary>
 645        /// <param name="parameters"> Parameters to check availability of the given Namespace name. </param>
 646        /// <param name="cancellationToken"> The cancellation token to use. </param>
 647        public virtual async Task<Response<CheckNameAvailabilityResult>> CheckNameAvailabilityAsync(CheckNameAvailabilit
 648        {
 2649            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CheckNameAvailability");
 2650            scope.Start();
 651            try
 652            {
 2653                return await RestClient.CheckNameAvailabilityAsync(parameters, cancellationToken).ConfigureAwait(false);
 654            }
 0655            catch (Exception e)
 656            {
 0657                scope.Failed(e);
 0658                throw;
 659            }
 2660        }
 661
 662        /// <summary> Check the give Namespace name availability. </summary>
 663        /// <param name="parameters"> Parameters to check availability of the given Namespace name. </param>
 664        /// <param name="cancellationToken"> The cancellation token to use. </param>
 665        public virtual Response<CheckNameAvailabilityResult> CheckNameAvailability(CheckNameAvailabilityParameter parame
 666        {
 2667            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CheckNameAvailability");
 2668            scope.Start();
 669            try
 670            {
 2671                return RestClient.CheckNameAvailability(parameters, cancellationToken);
 672            }
 0673            catch (Exception e)
 674            {
 0675                scope.Failed(e);
 0676                throw;
 677            }
 2678        }
 679
 680        /// <summary> Gets a list of IP Filter rules for a Namespace. </summary>
 681        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 682        /// <param name="namespaceName"> The Namespace name. </param>
 683        /// <param name="cancellationToken"> The cancellation token to use. </param>
 684        public virtual AsyncPageable<IpFilterRule> ListIPFilterRulesAsync(string resourceGroupName, string namespaceName
 685        {
 0686            if (resourceGroupName == null)
 687            {
 0688                throw new ArgumentNullException(nameof(resourceGroupName));
 689            }
 0690            if (namespaceName == null)
 691            {
 0692                throw new ArgumentNullException(nameof(namespaceName));
 693            }
 694
 695            async Task<Page<IpFilterRule>> FirstPageFunc(int? pageSizeHint)
 696            {
 0697                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules");
 0698                scope.Start();
 699                try
 700                {
 0701                    var response = await RestClient.ListIPFilterRulesAsync(resourceGroupName, namespaceName, cancellatio
 0702                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 703                }
 0704                catch (Exception e)
 705                {
 0706                    scope.Failed(e);
 0707                    throw;
 708                }
 0709            }
 710            async Task<Page<IpFilterRule>> NextPageFunc(string nextLink, int? pageSizeHint)
 711            {
 0712                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules");
 0713                scope.Start();
 714                try
 715                {
 0716                    var response = await RestClient.ListIPFilterRulesNextPageAsync(nextLink, resourceGroupName, namespac
 0717                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 718                }
 0719                catch (Exception e)
 720                {
 0721                    scope.Failed(e);
 0722                    throw;
 723                }
 0724            }
 0725            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 726        }
 727
 728        /// <summary> Gets a list of IP Filter rules for a Namespace. </summary>
 729        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 730        /// <param name="namespaceName"> The Namespace name. </param>
 731        /// <param name="cancellationToken"> The cancellation token to use. </param>
 732        public virtual Pageable<IpFilterRule> ListIPFilterRules(string resourceGroupName, string namespaceName, Cancella
 733        {
 0734            if (resourceGroupName == null)
 735            {
 0736                throw new ArgumentNullException(nameof(resourceGroupName));
 737            }
 0738            if (namespaceName == null)
 739            {
 0740                throw new ArgumentNullException(nameof(namespaceName));
 741            }
 742
 743            Page<IpFilterRule> FirstPageFunc(int? pageSizeHint)
 744            {
 0745                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules");
 0746                scope.Start();
 747                try
 748                {
 0749                    var response = RestClient.ListIPFilterRules(resourceGroupName, namespaceName, cancellationToken);
 0750                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 751                }
 0752                catch (Exception e)
 753                {
 0754                    scope.Failed(e);
 0755                    throw;
 756                }
 0757            }
 758            Page<IpFilterRule> NextPageFunc(string nextLink, int? pageSizeHint)
 759            {
 0760                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules");
 0761                scope.Start();
 762                try
 763                {
 0764                    var response = RestClient.ListIPFilterRulesNextPage(nextLink, resourceGroupName, namespaceName, canc
 0765                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 766                }
 0767                catch (Exception e)
 768                {
 0769                    scope.Failed(e);
 0770                    throw;
 771                }
 0772            }
 0773            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 774        }
 775
 776        /// <summary> Lists all the available Namespaces within a subscription, irrespective of the resource groups. </s
 777        /// <param name="cancellationToken"> The cancellation token to use. </param>
 778        public virtual AsyncPageable<EHNamespace> ListAsync(CancellationToken cancellationToken = default)
 779        {
 780            async Task<Page<EHNamespace>> FirstPageFunc(int? pageSizeHint)
 781            {
 2782                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List");
 2783                scope.Start();
 784                try
 785                {
 2786                    var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false);
 2787                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 788                }
 0789                catch (Exception e)
 790                {
 0791                    scope.Failed(e);
 0792                    throw;
 793                }
 2794            }
 795            async Task<Page<EHNamespace>> NextPageFunc(string nextLink, int? pageSizeHint)
 796            {
 0797                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List");
 0798                scope.Start();
 799                try
 800                {
 0801                    var response = await RestClient.ListNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false)
 0802                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 803                }
 0804                catch (Exception e)
 805                {
 0806                    scope.Failed(e);
 0807                    throw;
 808                }
 0809            }
 4810            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 811        }
 812
 813        /// <summary> Lists all the available Namespaces within a subscription, irrespective of the resource groups. </s
 814        /// <param name="cancellationToken"> The cancellation token to use. </param>
 815        public virtual Pageable<EHNamespace> List(CancellationToken cancellationToken = default)
 816        {
 817            Page<EHNamespace> FirstPageFunc(int? pageSizeHint)
 818            {
 2819                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List");
 2820                scope.Start();
 821                try
 822                {
 2823                    var response = RestClient.List(cancellationToken);
 2824                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 825                }
 0826                catch (Exception e)
 827                {
 0828                    scope.Failed(e);
 0829                    throw;
 830                }
 2831            }
 832            Page<EHNamespace> NextPageFunc(string nextLink, int? pageSizeHint)
 833            {
 0834                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List");
 0835                scope.Start();
 836                try
 837                {
 0838                    var response = RestClient.ListNextPage(nextLink, cancellationToken);
 0839                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 840                }
 0841                catch (Exception e)
 842                {
 0843                    scope.Failed(e);
 0844                    throw;
 845                }
 0846            }
 4847            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 848        }
 849
 850        /// <summary> Lists the available Namespaces within a resource group. </summary>
 851        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 852        /// <param name="cancellationToken"> The cancellation token to use. </param>
 853        public virtual AsyncPageable<EHNamespace> ListByResourceGroupAsync(string resourceGroupName, CancellationToken c
 854        {
 4855            if (resourceGroupName == null)
 856            {
 0857                throw new ArgumentNullException(nameof(resourceGroupName));
 858            }
 859
 860            async Task<Page<EHNamespace>> FirstPageFunc(int? pageSizeHint)
 861            {
 4862                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup");
 4863                scope.Start();
 864                try
 865                {
 4866                    var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, cancellationToken).Confi
 4867                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 868                }
 0869                catch (Exception e)
 870                {
 0871                    scope.Failed(e);
 0872                    throw;
 873                }
 4874            }
 875            async Task<Page<EHNamespace>> NextPageFunc(string nextLink, int? pageSizeHint)
 876            {
 0877                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup");
 0878                scope.Start();
 879                try
 880                {
 0881                    var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, cancel
 0882                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 883                }
 0884                catch (Exception e)
 885                {
 0886                    scope.Failed(e);
 0887                    throw;
 888                }
 0889            }
 4890            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 891        }
 892
 893        /// <summary> Lists the available Namespaces within a resource group. </summary>
 894        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 895        /// <param name="cancellationToken"> The cancellation token to use. </param>
 896        public virtual Pageable<EHNamespace> ListByResourceGroup(string resourceGroupName, CancellationToken cancellatio
 897        {
 4898            if (resourceGroupName == null)
 899            {
 0900                throw new ArgumentNullException(nameof(resourceGroupName));
 901            }
 902
 903            Page<EHNamespace> FirstPageFunc(int? pageSizeHint)
 904            {
 4905                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup");
 4906                scope.Start();
 907                try
 908                {
 4909                    var response = RestClient.ListByResourceGroup(resourceGroupName, cancellationToken);
 4910                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 911                }
 0912                catch (Exception e)
 913                {
 0914                    scope.Failed(e);
 0915                    throw;
 916                }
 4917            }
 918            Page<EHNamespace> NextPageFunc(string nextLink, int? pageSizeHint)
 919            {
 0920                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup");
 0921                scope.Start();
 922                try
 923                {
 0924                    var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, cancellationToken
 0925                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 926                }
 0927                catch (Exception e)
 928                {
 0929                    scope.Failed(e);
 0930                    throw;
 931                }
 0932            }
 4933            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 934        }
 935
 936        /// <summary> Gets a list of VirtualNetwork rules for a Namespace. </summary>
 937        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 938        /// <param name="namespaceName"> The Namespace name. </param>
 939        /// <param name="cancellationToken"> The cancellation token to use. </param>
 940        public virtual AsyncPageable<VirtualNetworkRule> ListVirtualNetworkRulesAsync(string resourceGroupName, string n
 941        {
 0942            if (resourceGroupName == null)
 943            {
 0944                throw new ArgumentNullException(nameof(resourceGroupName));
 945            }
 0946            if (namespaceName == null)
 947            {
 0948                throw new ArgumentNullException(nameof(namespaceName));
 949            }
 950
 951            async Task<Page<VirtualNetworkRule>> FirstPageFunc(int? pageSizeHint)
 952            {
 0953                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules");
 0954                scope.Start();
 955                try
 956                {
 0957                    var response = await RestClient.ListVirtualNetworkRulesAsync(resourceGroupName, namespaceName, cance
 0958                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 959                }
 0960                catch (Exception e)
 961                {
 0962                    scope.Failed(e);
 0963                    throw;
 964                }
 0965            }
 966            async Task<Page<VirtualNetworkRule>> NextPageFunc(string nextLink, int? pageSizeHint)
 967            {
 0968                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules");
 0969                scope.Start();
 970                try
 971                {
 0972                    var response = await RestClient.ListVirtualNetworkRulesNextPageAsync(nextLink, resourceGroupName, na
 0973                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 974                }
 0975                catch (Exception e)
 976                {
 0977                    scope.Failed(e);
 0978                    throw;
 979                }
 0980            }
 0981            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 982        }
 983
 984        /// <summary> Gets a list of VirtualNetwork rules for a Namespace. </summary>
 985        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 986        /// <param name="namespaceName"> The Namespace name. </param>
 987        /// <param name="cancellationToken"> The cancellation token to use. </param>
 988        public virtual Pageable<VirtualNetworkRule> ListVirtualNetworkRules(string resourceGroupName, string namespaceNa
 989        {
 0990            if (resourceGroupName == null)
 991            {
 0992                throw new ArgumentNullException(nameof(resourceGroupName));
 993            }
 0994            if (namespaceName == null)
 995            {
 0996                throw new ArgumentNullException(nameof(namespaceName));
 997            }
 998
 999            Page<VirtualNetworkRule> FirstPageFunc(int? pageSizeHint)
 1000            {
 01001                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules");
 01002                scope.Start();
 1003                try
 1004                {
 01005                    var response = RestClient.ListVirtualNetworkRules(resourceGroupName, namespaceName, cancellationToke
 01006                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1007                }
 01008                catch (Exception e)
 1009                {
 01010                    scope.Failed(e);
 01011                    throw;
 1012                }
 01013            }
 1014            Page<VirtualNetworkRule> NextPageFunc(string nextLink, int? pageSizeHint)
 1015            {
 01016                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules");
 01017                scope.Start();
 1018                try
 1019                {
 01020                    var response = RestClient.ListVirtualNetworkRulesNextPage(nextLink, resourceGroupName, namespaceName
 01021                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1022                }
 01023                catch (Exception e)
 1024                {
 01025                    scope.Failed(e);
 01026                    throw;
 1027                }
 01028            }
 01029            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 1030        }
 1031
 1032        /// <summary> Gets a list of authorization rules for a Namespace. </summary>
 1033        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1034        /// <param name="namespaceName"> The Namespace name. </param>
 1035        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1036        public virtual AsyncPageable<AuthorizationRule> ListAuthorizationRulesAsync(string resourceGroupName, string nam
 1037        {
 21038            if (resourceGroupName == null)
 1039            {
 01040                throw new ArgumentNullException(nameof(resourceGroupName));
 1041            }
 21042            if (namespaceName == null)
 1043            {
 01044                throw new ArgumentNullException(nameof(namespaceName));
 1045            }
 1046
 1047            async Task<Page<AuthorizationRule>> FirstPageFunc(int? pageSizeHint)
 1048            {
 21049                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules");
 21050                scope.Start();
 1051                try
 1052                {
 21053                    var response = await RestClient.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, cancel
 21054                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1055                }
 01056                catch (Exception e)
 1057                {
 01058                    scope.Failed(e);
 01059                    throw;
 1060                }
 21061            }
 1062            async Task<Page<AuthorizationRule>> NextPageFunc(string nextLink, int? pageSizeHint)
 1063            {
 01064                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules");
 01065                scope.Start();
 1066                try
 1067                {
 01068                    var response = await RestClient.ListAuthorizationRulesNextPageAsync(nextLink, resourceGroupName, nam
 01069                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1070                }
 01071                catch (Exception e)
 1072                {
 01073                    scope.Failed(e);
 01074                    throw;
 1075                }
 01076            }
 21077            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 1078        }
 1079
 1080        /// <summary> Gets a list of authorization rules for a Namespace. </summary>
 1081        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1082        /// <param name="namespaceName"> The Namespace name. </param>
 1083        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1084        public virtual Pageable<AuthorizationRule> ListAuthorizationRules(string resourceGroupName, string namespaceName
 1085        {
 21086            if (resourceGroupName == null)
 1087            {
 01088                throw new ArgumentNullException(nameof(resourceGroupName));
 1089            }
 21090            if (namespaceName == null)
 1091            {
 01092                throw new ArgumentNullException(nameof(namespaceName));
 1093            }
 1094
 1095            Page<AuthorizationRule> FirstPageFunc(int? pageSizeHint)
 1096            {
 21097                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules");
 21098                scope.Start();
 1099                try
 1100                {
 21101                    var response = RestClient.ListAuthorizationRules(resourceGroupName, namespaceName, cancellationToken
 21102                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1103                }
 01104                catch (Exception e)
 1105                {
 01106                    scope.Failed(e);
 01107                    throw;
 1108                }
 21109            }
 1110            Page<AuthorizationRule> NextPageFunc(string nextLink, int? pageSizeHint)
 1111            {
 01112                using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules");
 01113                scope.Start();
 1114                try
 1115                {
 01116                    var response = RestClient.ListAuthorizationRulesNextPage(nextLink, resourceGroupName, namespaceName,
 01117                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 1118                }
 01119                catch (Exception e)
 1120                {
 01121                    scope.Failed(e);
 01122                    throw;
 1123                }
 01124            }
 21125            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 1126        }
 1127
 1128        /// <summary> Creates or updates a namespace. Once created, this namespace&apos;s resource manifest is immutable
 1129        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1130        /// <param name="namespaceName"> The Namespace name. </param>
 1131        /// <param name="parameters"> Parameters for creating a namespace resource. </param>
 1132        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1133        public virtual async Task<NamespacesCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGroupName, 
 1134        {
 281135            if (resourceGroupName == null)
 1136            {
 01137                throw new ArgumentNullException(nameof(resourceGroupName));
 1138            }
 281139            if (namespaceName == null)
 1140            {
 01141                throw new ArgumentNullException(nameof(namespaceName));
 1142            }
 281143            if (parameters == null)
 1144            {
 01145                throw new ArgumentNullException(nameof(parameters));
 1146            }
 1147
 281148            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartCreateOrUpdate");
 281149            scope.Start();
 1150            try
 1151            {
 281152                var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, namespaceName, parameters
 281153                return new NamespacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpd
 1154            }
 01155            catch (Exception e)
 1156            {
 01157                scope.Failed(e);
 01158                throw;
 1159            }
 281160        }
 1161
 1162        /// <summary> Creates or updates a namespace. Once created, this namespace&apos;s resource manifest is immutable
 1163        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1164        /// <param name="namespaceName"> The Namespace name. </param>
 1165        /// <param name="parameters"> Parameters for creating a namespace resource. </param>
 1166        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1167        public virtual NamespacesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string namespaceN
 1168        {
 281169            if (resourceGroupName == null)
 1170            {
 01171                throw new ArgumentNullException(nameof(resourceGroupName));
 1172            }
 281173            if (namespaceName == null)
 1174            {
 01175                throw new ArgumentNullException(nameof(namespaceName));
 1176            }
 281177            if (parameters == null)
 1178            {
 01179                throw new ArgumentNullException(nameof(parameters));
 1180            }
 1181
 281182            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartCreateOrUpdate");
 281183            scope.Start();
 1184            try
 1185            {
 281186                var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, namespaceName, parameters, cancellat
 281187                return new NamespacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpd
 1188            }
 01189            catch (Exception e)
 1190            {
 01191                scope.Failed(e);
 01192                throw;
 1193            }
 281194        }
 1195
 1196        /// <summary> Deletes an existing namespace. This operation also removes all associated resources under the name
 1197        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1198        /// <param name="namespaceName"> The Namespace name. </param>
 1199        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1200        public virtual async Task<NamespacesDeleteOperation> StartDeleteAsync(string resourceGroupName, string namespace
 1201        {
 241202            if (resourceGroupName == null)
 1203            {
 01204                throw new ArgumentNullException(nameof(resourceGroupName));
 1205            }
 241206            if (namespaceName == null)
 1207            {
 01208                throw new ArgumentNullException(nameof(namespaceName));
 1209            }
 1210
 241211            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartDelete");
 241212            scope.Start();
 1213            try
 1214            {
 241215                var originalResponse = await RestClient.DeleteAsync(resourceGroupName, namespaceName, cancellationToken)
 241216                return new NamespacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resou
 1217            }
 01218            catch (Exception e)
 1219            {
 01220                scope.Failed(e);
 01221                throw;
 1222            }
 241223        }
 1224
 1225        /// <summary> Deletes an existing namespace. This operation also removes all associated resources under the name
 1226        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 1227        /// <param name="namespaceName"> The Namespace name. </param>
 1228        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1229        public virtual NamespacesDeleteOperation StartDelete(string resourceGroupName, string namespaceName, Cancellatio
 1230        {
 241231            if (resourceGroupName == null)
 1232            {
 01233                throw new ArgumentNullException(nameof(resourceGroupName));
 1234            }
 241235            if (namespaceName == null)
 1236            {
 01237                throw new ArgumentNullException(nameof(namespaceName));
 1238            }
 1239
 241240            using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartDelete");
 241241            scope.Start();
 1242            try
 1243            {
 241244                var originalResponse = RestClient.Delete(resourceGroupName, namespaceName, cancellationToken);
 241245                return new NamespacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resou
 1246            }
 01247            catch (Exception e)
 1248            {
 01249                scope.Failed(e);
 01250                throw;
 1251            }
 241252        }
 1253    }
 1254}