< Summary

Class:Azure.ResourceManager.Network.NetworkWatchersOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\NetworkWatchersOperations.cs
Covered lines:104
Uncovered lines:332
Coverable lines:436
Total lines:1104
Line coverage:23.8% (104 of 436)
Covered branches:18
Total branches:144
Branch coverage:12.5% (18 of 144)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
CreateOrUpdateAsync()-57.14%100%
CreateOrUpdate(...)-57.14%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
UpdateTagsAsync()-0%100%
UpdateTags(...)-0%100%
GetTopologyAsync()-57.14%100%
GetTopology(...)-57.14%100%
ListAsync(...)-63.64%50%
<ListAsync()-62.5%100%
List(...)-63.64%50%
<ListAllAsync()-62.5%100%
ListAllAsync(...)-100%100%
ListAll(...)-100%100%
StartDeleteAsync()-58.33%50%
StartDelete(...)-58.33%50%
StartVerifyIPFlowAsync()-0%0%
StartVerifyIPFlow(...)-0%0%
StartGetNextHopAsync()-57.14%50%
StartGetNextHop(...)-57.14%50%
StartGetVMSecurityRulesAsync()-0%0%
StartGetVMSecurityRules(...)-0%0%
StartGetTroubleshootingAsync()-0%0%
StartGetTroubleshooting(...)-0%0%
StartGetTroubleshootingResultAsync()-0%0%
StartGetTroubleshootingResult(...)-0%0%
StartSetFlowLogConfigurationAsync()-0%0%
StartSetFlowLogConfiguration(...)-0%0%
StartGetFlowLogStatusAsync()-0%0%
StartGetFlowLogStatus(...)-0%0%
StartCheckConnectivityAsync()-57.14%50%
StartCheckConnectivity(...)-57.14%50%
StartGetAzureReachabilityReportAsync()-0%0%
StartGetAzureReachabilityReport(...)-0%0%
StartListAvailableProvidersAsync()-0%0%
StartListAvailableProviders(...)-0%0%
StartGetNetworkConfigurationDiagnosticAsync()-0%0%
StartGetNetworkConfigurationDiagnostic(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\NetworkWatchersOperations.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.Network.Models;
 15
 16namespace Azure.ResourceManager.Network
 17{
 18    /// <summary> The NetworkWatchers service client. </summary>
 19    public partial class NetworkWatchersOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 5623        internal NetworkWatchersRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of NetworkWatchersOperations for mocking. </summary>
 4025        protected NetworkWatchersOperations()
 26        {
 4027        }
 28        /// <summary> Initializes a new instance of NetworkWatchersOperations. </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 subscription credentials which uniquely identify the Microsoft Azure subsc
 32        /// <param name="endpoint"> server parameter. </param>
 4033        internal NetworkWatchersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscripti
 34        {
 4035            RestClient = new NetworkWatchersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 4036            _clientDiagnostics = clientDiagnostics;
 4037            _pipeline = pipeline;
 4038        }
 39
 40        /// <summary> Creates or updates a network watcher in the specified resource group. </summary>
 41        /// <param name="resourceGroupName"> The name of the resource group. </param>
 42        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 43        /// <param name="parameters"> Parameters that define the network watcher resource. </param>
 44        /// <param name="cancellationToken"> The cancellation token to use. </param>
 45        public virtual async Task<Response<NetworkWatcher>> CreateOrUpdateAsync(string resourceGroupName, string network
 46        {
 247            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.CreateOrUpdate");
 248            scope.Start();
 49            try
 50            {
 251                return await RestClient.CreateOrUpdateAsync(resourceGroupName, networkWatcherName, parameters, cancellat
 52            }
 053            catch (Exception e)
 54            {
 055                scope.Failed(e);
 056                throw;
 57            }
 258        }
 59
 60        /// <summary> Creates or updates a network watcher in the specified resource group. </summary>
 61        /// <param name="resourceGroupName"> The name of the resource group. </param>
 62        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 63        /// <param name="parameters"> Parameters that define the network watcher resource. </param>
 64        /// <param name="cancellationToken"> The cancellation token to use. </param>
 65        public virtual Response<NetworkWatcher> CreateOrUpdate(string resourceGroupName, string networkWatcherName, Netw
 66        {
 267            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.CreateOrUpdate");
 268            scope.Start();
 69            try
 70            {
 271                return RestClient.CreateOrUpdate(resourceGroupName, networkWatcherName, parameters, cancellationToken);
 72            }
 073            catch (Exception e)
 74            {
 075                scope.Failed(e);
 076                throw;
 77            }
 278        }
 79
 80        /// <summary> Gets the specified network watcher by resource group. </summary>
 81        /// <param name="resourceGroupName"> The name of the resource group. </param>
 82        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 83        /// <param name="cancellationToken"> The cancellation token to use. </param>
 84        public virtual async Task<Response<NetworkWatcher>> GetAsync(string resourceGroupName, string networkWatcherName
 85        {
 286            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.Get");
 287            scope.Start();
 88            try
 89            {
 290                return await RestClient.GetAsync(resourceGroupName, networkWatcherName, cancellationToken).ConfigureAwai
 91            }
 092            catch (Exception e)
 93            {
 094                scope.Failed(e);
 095                throw;
 96            }
 297        }
 98
 99        /// <summary> Gets the specified network watcher by resource group. </summary>
 100        /// <param name="resourceGroupName"> The name of the resource group. </param>
 101        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 102        /// <param name="cancellationToken"> The cancellation token to use. </param>
 103        public virtual Response<NetworkWatcher> Get(string resourceGroupName, string networkWatcherName, CancellationTok
 104        {
 2105            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.Get");
 2106            scope.Start();
 107            try
 108            {
 2109                return RestClient.Get(resourceGroupName, networkWatcherName, cancellationToken);
 110            }
 0111            catch (Exception e)
 112            {
 0113                scope.Failed(e);
 0114                throw;
 115            }
 2116        }
 117
 118        /// <summary> Updates a network watcher tags. </summary>
 119        /// <param name="resourceGroupName"> The name of the resource group. </param>
 120        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 121        /// <param name="parameters"> Parameters supplied to update network watcher tags. </param>
 122        /// <param name="cancellationToken"> The cancellation token to use. </param>
 123        public virtual async Task<Response<NetworkWatcher>> UpdateTagsAsync(string resourceGroupName, string networkWatc
 124        {
 0125            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.UpdateTags");
 0126            scope.Start();
 127            try
 128            {
 0129                return await RestClient.UpdateTagsAsync(resourceGroupName, networkWatcherName, parameters, cancellationT
 130            }
 0131            catch (Exception e)
 132            {
 0133                scope.Failed(e);
 0134                throw;
 135            }
 0136        }
 137
 138        /// <summary> Updates a network watcher tags. </summary>
 139        /// <param name="resourceGroupName"> The name of the resource group. </param>
 140        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 141        /// <param name="parameters"> Parameters supplied to update network watcher tags. </param>
 142        /// <param name="cancellationToken"> The cancellation token to use. </param>
 143        public virtual Response<NetworkWatcher> UpdateTags(string resourceGroupName, string networkWatcherName, TagsObje
 144        {
 0145            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.UpdateTags");
 0146            scope.Start();
 147            try
 148            {
 0149                return RestClient.UpdateTags(resourceGroupName, networkWatcherName, parameters, cancellationToken);
 150            }
 0151            catch (Exception e)
 152            {
 0153                scope.Failed(e);
 0154                throw;
 155            }
 0156        }
 157
 158        /// <summary> Gets the current network topology by resource group. </summary>
 159        /// <param name="resourceGroupName"> The name of the resource group. </param>
 160        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 161        /// <param name="parameters"> Parameters that define the representation of topology. </param>
 162        /// <param name="cancellationToken"> The cancellation token to use. </param>
 163        public virtual async Task<Response<Topology>> GetTopologyAsync(string resourceGroupName, string networkWatcherNa
 164        {
 2165            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.GetTopology");
 2166            scope.Start();
 167            try
 168            {
 2169                return await RestClient.GetTopologyAsync(resourceGroupName, networkWatcherName, parameters, cancellation
 170            }
 0171            catch (Exception e)
 172            {
 0173                scope.Failed(e);
 0174                throw;
 175            }
 2176        }
 177
 178        /// <summary> Gets the current network topology by resource group. </summary>
 179        /// <param name="resourceGroupName"> The name of the resource group. </param>
 180        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 181        /// <param name="parameters"> Parameters that define the representation of topology. </param>
 182        /// <param name="cancellationToken"> The cancellation token to use. </param>
 183        public virtual Response<Topology> GetTopology(string resourceGroupName, string networkWatcherName, TopologyParam
 184        {
 2185            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.GetTopology");
 2186            scope.Start();
 187            try
 188            {
 2189                return RestClient.GetTopology(resourceGroupName, networkWatcherName, parameters, cancellationToken);
 190            }
 0191            catch (Exception e)
 192            {
 0193                scope.Failed(e);
 0194                throw;
 195            }
 2196        }
 197
 198        /// <summary> Gets all network watchers by resource group. </summary>
 199        /// <param name="resourceGroupName"> The name of the resource group. </param>
 200        /// <param name="cancellationToken"> The cancellation token to use. </param>
 201        public virtual AsyncPageable<NetworkWatcher> ListAsync(string resourceGroupName, CancellationToken cancellationT
 202        {
 2203            if (resourceGroupName == null)
 204            {
 0205                throw new ArgumentNullException(nameof(resourceGroupName));
 206            }
 207
 208            async Task<Page<NetworkWatcher>> FirstPageFunc(int? pageSizeHint)
 209            {
 2210                using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.List");
 2211                scope.Start();
 212                try
 213                {
 2214                    var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false
 2215                    return Page.FromValues(response.Value.Value, null, response.GetRawResponse());
 216                }
 0217                catch (Exception e)
 218                {
 0219                    scope.Failed(e);
 0220                    throw;
 221                }
 2222            }
 2223            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null);
 224        }
 225
 226        /// <summary> Gets all network watchers by resource group. </summary>
 227        /// <param name="resourceGroupName"> The name of the resource group. </param>
 228        /// <param name="cancellationToken"> The cancellation token to use. </param>
 229        public virtual Pageable<NetworkWatcher> List(string resourceGroupName, CancellationToken cancellationToken = def
 230        {
 2231            if (resourceGroupName == null)
 232            {
 0233                throw new ArgumentNullException(nameof(resourceGroupName));
 234            }
 235
 236            Page<NetworkWatcher> FirstPageFunc(int? pageSizeHint)
 237            {
 2238                using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.List");
 2239                scope.Start();
 240                try
 241                {
 2242                    var response = RestClient.List(resourceGroupName, cancellationToken);
 2243                    return Page.FromValues(response.Value.Value, null, response.GetRawResponse());
 244                }
 0245                catch (Exception e)
 246                {
 0247                    scope.Failed(e);
 0248                    throw;
 249                }
 2250            }
 2251            return PageableHelpers.CreateEnumerable(FirstPageFunc, null);
 252        }
 253
 254        /// <summary> Gets all network watchers by subscription. </summary>
 255        /// <param name="cancellationToken"> The cancellation token to use. </param>
 256        public virtual AsyncPageable<NetworkWatcher> ListAllAsync(CancellationToken cancellationToken = default)
 257        {
 258            async Task<Page<NetworkWatcher>> FirstPageFunc(int? pageSizeHint)
 259            {
 4260                using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.ListAll");
 4261                scope.Start();
 262                try
 263                {
 4264                    var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false);
 4265                    return Page.FromValues(response.Value.Value, null, response.GetRawResponse());
 266                }
 0267                catch (Exception e)
 268                {
 0269                    scope.Failed(e);
 0270                    throw;
 271                }
 4272            }
 4273            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null);
 274        }
 275
 276        /// <summary> Gets all network watchers by subscription. </summary>
 277        /// <param name="cancellationToken"> The cancellation token to use. </param>
 278        public virtual Pageable<NetworkWatcher> ListAll(CancellationToken cancellationToken = default)
 279        {
 280            Page<NetworkWatcher> FirstPageFunc(int? pageSizeHint)
 281            {
 4282                using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.ListAll");
 4283                scope.Start();
 284                try
 285                {
 4286                    var response = RestClient.ListAll(cancellationToken);
 4287                    return Page.FromValues(response.Value.Value, null, response.GetRawResponse());
 288                }
 0289                catch (Exception e)
 290                {
 0291                    scope.Failed(e);
 0292                    throw;
 293                }
 4294            }
 4295            return PageableHelpers.CreateEnumerable(FirstPageFunc, null);
 296        }
 297
 298        /// <summary> Deletes the specified network watcher resource. </summary>
 299        /// <param name="resourceGroupName"> The name of the resource group. </param>
 300        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 301        /// <param name="cancellationToken"> The cancellation token to use. </param>
 302        public virtual async Task<NetworkWatchersDeleteOperation> StartDeleteAsync(string resourceGroupName, string netw
 303        {
 2304            if (resourceGroupName == null)
 305            {
 0306                throw new ArgumentNullException(nameof(resourceGroupName));
 307            }
 2308            if (networkWatcherName == null)
 309            {
 0310                throw new ArgumentNullException(nameof(networkWatcherName));
 311            }
 312
 2313            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartDelete");
 2314            scope.Start();
 315            try
 316            {
 2317                var originalResponse = await RestClient.DeleteAsync(resourceGroupName, networkWatcherName, cancellationT
 2318                return new NetworkWatchersDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(
 319            }
 0320            catch (Exception e)
 321            {
 0322                scope.Failed(e);
 0323                throw;
 324            }
 2325        }
 326
 327        /// <summary> Deletes the specified network watcher resource. </summary>
 328        /// <param name="resourceGroupName"> The name of the resource group. </param>
 329        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 330        /// <param name="cancellationToken"> The cancellation token to use. </param>
 331        public virtual NetworkWatchersDeleteOperation StartDelete(string resourceGroupName, string networkWatcherName, C
 332        {
 2333            if (resourceGroupName == null)
 334            {
 0335                throw new ArgumentNullException(nameof(resourceGroupName));
 336            }
 2337            if (networkWatcherName == null)
 338            {
 0339                throw new ArgumentNullException(nameof(networkWatcherName));
 340            }
 341
 2342            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartDelete");
 2343            scope.Start();
 344            try
 345            {
 2346                var originalResponse = RestClient.Delete(resourceGroupName, networkWatcherName, cancellationToken);
 2347                return new NetworkWatchersDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(
 348            }
 0349            catch (Exception e)
 350            {
 0351                scope.Failed(e);
 0352                throw;
 353            }
 2354        }
 355
 356        /// <summary> Verify IP flow from the specified VM to a location given the currently configured NSG rules. </sum
 357        /// <param name="resourceGroupName"> The name of the resource group. </param>
 358        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 359        /// <param name="parameters"> Parameters that define the IP flow to be verified. </param>
 360        /// <param name="cancellationToken"> The cancellation token to use. </param>
 361        public virtual async Task<NetworkWatchersVerifyIPFlowOperation> StartVerifyIPFlowAsync(string resourceGroupName,
 362        {
 0363            if (resourceGroupName == null)
 364            {
 0365                throw new ArgumentNullException(nameof(resourceGroupName));
 366            }
 0367            if (networkWatcherName == null)
 368            {
 0369                throw new ArgumentNullException(nameof(networkWatcherName));
 370            }
 0371            if (parameters == null)
 372            {
 0373                throw new ArgumentNullException(nameof(parameters));
 374            }
 375
 0376            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartVerifyIPFlow");
 0377            scope.Start();
 378            try
 379            {
 0380                var originalResponse = await RestClient.VerifyIPFlowAsync(resourceGroupName, networkWatcherName, paramet
 0381                return new NetworkWatchersVerifyIPFlowOperation(_clientDiagnostics, _pipeline, RestClient.CreateVerifyIP
 382            }
 0383            catch (Exception e)
 384            {
 0385                scope.Failed(e);
 0386                throw;
 387            }
 0388        }
 389
 390        /// <summary> Verify IP flow from the specified VM to a location given the currently configured NSG rules. </sum
 391        /// <param name="resourceGroupName"> The name of the resource group. </param>
 392        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 393        /// <param name="parameters"> Parameters that define the IP flow to be verified. </param>
 394        /// <param name="cancellationToken"> The cancellation token to use. </param>
 395        public virtual NetworkWatchersVerifyIPFlowOperation StartVerifyIPFlow(string resourceGroupName, string networkWa
 396        {
 0397            if (resourceGroupName == null)
 398            {
 0399                throw new ArgumentNullException(nameof(resourceGroupName));
 400            }
 0401            if (networkWatcherName == null)
 402            {
 0403                throw new ArgumentNullException(nameof(networkWatcherName));
 404            }
 0405            if (parameters == null)
 406            {
 0407                throw new ArgumentNullException(nameof(parameters));
 408            }
 409
 0410            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartVerifyIPFlow");
 0411            scope.Start();
 412            try
 413            {
 0414                var originalResponse = RestClient.VerifyIPFlow(resourceGroupName, networkWatcherName, parameters, cancel
 0415                return new NetworkWatchersVerifyIPFlowOperation(_clientDiagnostics, _pipeline, RestClient.CreateVerifyIP
 416            }
 0417            catch (Exception e)
 418            {
 0419                scope.Failed(e);
 0420                throw;
 421            }
 0422        }
 423
 424        /// <summary> Gets the next hop from the specified VM. </summary>
 425        /// <param name="resourceGroupName"> The name of the resource group. </param>
 426        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 427        /// <param name="parameters"> Parameters that define the source and destination endpoint. </param>
 428        /// <param name="cancellationToken"> The cancellation token to use. </param>
 429        public virtual async Task<NetworkWatchersGetNextHopOperation> StartGetNextHopAsync(string resourceGroupName, str
 430        {
 4431            if (resourceGroupName == null)
 432            {
 0433                throw new ArgumentNullException(nameof(resourceGroupName));
 434            }
 4435            if (networkWatcherName == null)
 436            {
 0437                throw new ArgumentNullException(nameof(networkWatcherName));
 438            }
 4439            if (parameters == null)
 440            {
 0441                throw new ArgumentNullException(nameof(parameters));
 442            }
 443
 4444            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetNextHop");
 4445            scope.Start();
 446            try
 447            {
 4448                var originalResponse = await RestClient.GetNextHopAsync(resourceGroupName, networkWatcherName, parameter
 4449                return new NetworkWatchersGetNextHopOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetNextHop
 450            }
 0451            catch (Exception e)
 452            {
 0453                scope.Failed(e);
 0454                throw;
 455            }
 4456        }
 457
 458        /// <summary> Gets the next hop from the specified VM. </summary>
 459        /// <param name="resourceGroupName"> The name of the resource group. </param>
 460        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 461        /// <param name="parameters"> Parameters that define the source and destination endpoint. </param>
 462        /// <param name="cancellationToken"> The cancellation token to use. </param>
 463        public virtual NetworkWatchersGetNextHopOperation StartGetNextHop(string resourceGroupName, string networkWatche
 464        {
 4465            if (resourceGroupName == null)
 466            {
 0467                throw new ArgumentNullException(nameof(resourceGroupName));
 468            }
 4469            if (networkWatcherName == null)
 470            {
 0471                throw new ArgumentNullException(nameof(networkWatcherName));
 472            }
 4473            if (parameters == null)
 474            {
 0475                throw new ArgumentNullException(nameof(parameters));
 476            }
 477
 4478            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetNextHop");
 4479            scope.Start();
 480            try
 481            {
 4482                var originalResponse = RestClient.GetNextHop(resourceGroupName, networkWatcherName, parameters, cancella
 4483                return new NetworkWatchersGetNextHopOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetNextHop
 484            }
 0485            catch (Exception e)
 486            {
 0487                scope.Failed(e);
 0488                throw;
 489            }
 4490        }
 491
 492        /// <summary> Gets the configured and effective security group rules on the specified VM. </summary>
 493        /// <param name="resourceGroupName"> The name of the resource group. </param>
 494        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 495        /// <param name="parameters"> Parameters that define the VM to check security groups for. </param>
 496        /// <param name="cancellationToken"> The cancellation token to use. </param>
 497        public virtual async Task<NetworkWatchersGetVMSecurityRulesOperation> StartGetVMSecurityRulesAsync(string resour
 498        {
 0499            if (resourceGroupName == null)
 500            {
 0501                throw new ArgumentNullException(nameof(resourceGroupName));
 502            }
 0503            if (networkWatcherName == null)
 504            {
 0505                throw new ArgumentNullException(nameof(networkWatcherName));
 506            }
 0507            if (parameters == null)
 508            {
 0509                throw new ArgumentNullException(nameof(parameters));
 510            }
 511
 0512            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetVMSecurityRules");
 0513            scope.Start();
 514            try
 515            {
 0516                var originalResponse = await RestClient.GetVMSecurityRulesAsync(resourceGroupName, networkWatcherName, p
 0517                return new NetworkWatchersGetVMSecurityRulesOperation(_clientDiagnostics, _pipeline, RestClient.CreateGe
 518            }
 0519            catch (Exception e)
 520            {
 0521                scope.Failed(e);
 0522                throw;
 523            }
 0524        }
 525
 526        /// <summary> Gets the configured and effective security group rules on the specified VM. </summary>
 527        /// <param name="resourceGroupName"> The name of the resource group. </param>
 528        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 529        /// <param name="parameters"> Parameters that define the VM to check security groups for. </param>
 530        /// <param name="cancellationToken"> The cancellation token to use. </param>
 531        public virtual NetworkWatchersGetVMSecurityRulesOperation StartGetVMSecurityRules(string resourceGroupName, stri
 532        {
 0533            if (resourceGroupName == null)
 534            {
 0535                throw new ArgumentNullException(nameof(resourceGroupName));
 536            }
 0537            if (networkWatcherName == null)
 538            {
 0539                throw new ArgumentNullException(nameof(networkWatcherName));
 540            }
 0541            if (parameters == null)
 542            {
 0543                throw new ArgumentNullException(nameof(parameters));
 544            }
 545
 0546            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetVMSecurityRules");
 0547            scope.Start();
 548            try
 549            {
 0550                var originalResponse = RestClient.GetVMSecurityRules(resourceGroupName, networkWatcherName, parameters, 
 0551                return new NetworkWatchersGetVMSecurityRulesOperation(_clientDiagnostics, _pipeline, RestClient.CreateGe
 552            }
 0553            catch (Exception e)
 554            {
 0555                scope.Failed(e);
 0556                throw;
 557            }
 0558        }
 559
 560        /// <summary> Initiate troubleshooting on a specified resource. </summary>
 561        /// <param name="resourceGroupName"> The name of the resource group. </param>
 562        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 563        /// <param name="parameters"> Parameters that define the resource to troubleshoot. </param>
 564        /// <param name="cancellationToken"> The cancellation token to use. </param>
 565        public virtual async Task<NetworkWatchersGetTroubleshootingOperation> StartGetTroubleshootingAsync(string resour
 566        {
 0567            if (resourceGroupName == null)
 568            {
 0569                throw new ArgumentNullException(nameof(resourceGroupName));
 570            }
 0571            if (networkWatcherName == null)
 572            {
 0573                throw new ArgumentNullException(nameof(networkWatcherName));
 574            }
 0575            if (parameters == null)
 576            {
 0577                throw new ArgumentNullException(nameof(parameters));
 578            }
 579
 0580            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetTroubleshooting");
 0581            scope.Start();
 582            try
 583            {
 0584                var originalResponse = await RestClient.GetTroubleshootingAsync(resourceGroupName, networkWatcherName, p
 0585                return new NetworkWatchersGetTroubleshootingOperation(_clientDiagnostics, _pipeline, RestClient.CreateGe
 586            }
 0587            catch (Exception e)
 588            {
 0589                scope.Failed(e);
 0590                throw;
 591            }
 0592        }
 593
 594        /// <summary> Initiate troubleshooting on a specified resource. </summary>
 595        /// <param name="resourceGroupName"> The name of the resource group. </param>
 596        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 597        /// <param name="parameters"> Parameters that define the resource to troubleshoot. </param>
 598        /// <param name="cancellationToken"> The cancellation token to use. </param>
 599        public virtual NetworkWatchersGetTroubleshootingOperation StartGetTroubleshooting(string resourceGroupName, stri
 600        {
 0601            if (resourceGroupName == null)
 602            {
 0603                throw new ArgumentNullException(nameof(resourceGroupName));
 604            }
 0605            if (networkWatcherName == null)
 606            {
 0607                throw new ArgumentNullException(nameof(networkWatcherName));
 608            }
 0609            if (parameters == null)
 610            {
 0611                throw new ArgumentNullException(nameof(parameters));
 612            }
 613
 0614            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetTroubleshooting");
 0615            scope.Start();
 616            try
 617            {
 0618                var originalResponse = RestClient.GetTroubleshooting(resourceGroupName, networkWatcherName, parameters, 
 0619                return new NetworkWatchersGetTroubleshootingOperation(_clientDiagnostics, _pipeline, RestClient.CreateGe
 620            }
 0621            catch (Exception e)
 622            {
 0623                scope.Failed(e);
 0624                throw;
 625            }
 0626        }
 627
 628        /// <summary> Get the last completed troubleshooting result on a specified resource. </summary>
 629        /// <param name="resourceGroupName"> The name of the resource group. </param>
 630        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 631        /// <param name="parameters"> Parameters that define the resource to query the troubleshooting result. </param>
 632        /// <param name="cancellationToken"> The cancellation token to use. </param>
 633        public virtual async Task<NetworkWatchersGetTroubleshootingResultOperation> StartGetTroubleshootingResultAsync(s
 634        {
 0635            if (resourceGroupName == null)
 636            {
 0637                throw new ArgumentNullException(nameof(resourceGroupName));
 638            }
 0639            if (networkWatcherName == null)
 640            {
 0641                throw new ArgumentNullException(nameof(networkWatcherName));
 642            }
 0643            if (parameters == null)
 644            {
 0645                throw new ArgumentNullException(nameof(parameters));
 646            }
 647
 0648            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetTroubleshootingResult");
 0649            scope.Start();
 650            try
 651            {
 0652                var originalResponse = await RestClient.GetTroubleshootingResultAsync(resourceGroupName, networkWatcherN
 0653                return new NetworkWatchersGetTroubleshootingResultOperation(_clientDiagnostics, _pipeline, RestClient.Cr
 654            }
 0655            catch (Exception e)
 656            {
 0657                scope.Failed(e);
 0658                throw;
 659            }
 0660        }
 661
 662        /// <summary> Get the last completed troubleshooting result on a specified resource. </summary>
 663        /// <param name="resourceGroupName"> The name of the resource group. </param>
 664        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 665        /// <param name="parameters"> Parameters that define the resource to query the troubleshooting result. </param>
 666        /// <param name="cancellationToken"> The cancellation token to use. </param>
 667        public virtual NetworkWatchersGetTroubleshootingResultOperation StartGetTroubleshootingResult(string resourceGro
 668        {
 0669            if (resourceGroupName == null)
 670            {
 0671                throw new ArgumentNullException(nameof(resourceGroupName));
 672            }
 0673            if (networkWatcherName == null)
 674            {
 0675                throw new ArgumentNullException(nameof(networkWatcherName));
 676            }
 0677            if (parameters == null)
 678            {
 0679                throw new ArgumentNullException(nameof(parameters));
 680            }
 681
 0682            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetTroubleshootingResult");
 0683            scope.Start();
 684            try
 685            {
 0686                var originalResponse = RestClient.GetTroubleshootingResult(resourceGroupName, networkWatcherName, parame
 0687                return new NetworkWatchersGetTroubleshootingResultOperation(_clientDiagnostics, _pipeline, RestClient.Cr
 688            }
 0689            catch (Exception e)
 690            {
 0691                scope.Failed(e);
 0692                throw;
 693            }
 0694        }
 695
 696        /// <summary> Configures flow log and traffic analytics (optional) on a specified resource. </summary>
 697        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 698        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 699        /// <param name="parameters"> Parameters that define the configuration of flow log. </param>
 700        /// <param name="cancellationToken"> The cancellation token to use. </param>
 701        public virtual async Task<NetworkWatchersSetFlowLogConfigurationOperation> StartSetFlowLogConfigurationAsync(str
 702        {
 0703            if (resourceGroupName == null)
 704            {
 0705                throw new ArgumentNullException(nameof(resourceGroupName));
 706            }
 0707            if (networkWatcherName == null)
 708            {
 0709                throw new ArgumentNullException(nameof(networkWatcherName));
 710            }
 0711            if (parameters == null)
 712            {
 0713                throw new ArgumentNullException(nameof(parameters));
 714            }
 715
 0716            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartSetFlowLogConfiguration");
 0717            scope.Start();
 718            try
 719            {
 0720                var originalResponse = await RestClient.SetFlowLogConfigurationAsync(resourceGroupName, networkWatcherNa
 0721                return new NetworkWatchersSetFlowLogConfigurationOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 722            }
 0723            catch (Exception e)
 724            {
 0725                scope.Failed(e);
 0726                throw;
 727            }
 0728        }
 729
 730        /// <summary> Configures flow log and traffic analytics (optional) on a specified resource. </summary>
 731        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 732        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 733        /// <param name="parameters"> Parameters that define the configuration of flow log. </param>
 734        /// <param name="cancellationToken"> The cancellation token to use. </param>
 735        public virtual NetworkWatchersSetFlowLogConfigurationOperation StartSetFlowLogConfiguration(string resourceGroup
 736        {
 0737            if (resourceGroupName == null)
 738            {
 0739                throw new ArgumentNullException(nameof(resourceGroupName));
 740            }
 0741            if (networkWatcherName == null)
 742            {
 0743                throw new ArgumentNullException(nameof(networkWatcherName));
 744            }
 0745            if (parameters == null)
 746            {
 0747                throw new ArgumentNullException(nameof(parameters));
 748            }
 749
 0750            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartSetFlowLogConfiguration");
 0751            scope.Start();
 752            try
 753            {
 0754                var originalResponse = RestClient.SetFlowLogConfiguration(resourceGroupName, networkWatcherName, paramet
 0755                return new NetworkWatchersSetFlowLogConfigurationOperation(_clientDiagnostics, _pipeline, RestClient.Cre
 756            }
 0757            catch (Exception e)
 758            {
 0759                scope.Failed(e);
 0760                throw;
 761            }
 0762        }
 763
 764        /// <summary> Queries status of flow log and traffic analytics (optional) on a specified resource. </summary>
 765        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 766        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 767        /// <param name="parameters"> Parameters that define a resource to query flow log and traffic analytics (optiona
 768        /// <param name="cancellationToken"> The cancellation token to use. </param>
 769        public virtual async Task<NetworkWatchersGetFlowLogStatusOperation> StartGetFlowLogStatusAsync(string resourceGr
 770        {
 0771            if (resourceGroupName == null)
 772            {
 0773                throw new ArgumentNullException(nameof(resourceGroupName));
 774            }
 0775            if (networkWatcherName == null)
 776            {
 0777                throw new ArgumentNullException(nameof(networkWatcherName));
 778            }
 0779            if (parameters == null)
 780            {
 0781                throw new ArgumentNullException(nameof(parameters));
 782            }
 783
 0784            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetFlowLogStatus");
 0785            scope.Start();
 786            try
 787            {
 0788                var originalResponse = await RestClient.GetFlowLogStatusAsync(resourceGroupName, networkWatcherName, par
 0789                return new NetworkWatchersGetFlowLogStatusOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetF
 790            }
 0791            catch (Exception e)
 792            {
 0793                scope.Failed(e);
 0794                throw;
 795            }
 0796        }
 797
 798        /// <summary> Queries status of flow log and traffic analytics (optional) on a specified resource. </summary>
 799        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 800        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 801        /// <param name="parameters"> Parameters that define a resource to query flow log and traffic analytics (optiona
 802        /// <param name="cancellationToken"> The cancellation token to use. </param>
 803        public virtual NetworkWatchersGetFlowLogStatusOperation StartGetFlowLogStatus(string resourceGroupName, string n
 804        {
 0805            if (resourceGroupName == null)
 806            {
 0807                throw new ArgumentNullException(nameof(resourceGroupName));
 808            }
 0809            if (networkWatcherName == null)
 810            {
 0811                throw new ArgumentNullException(nameof(networkWatcherName));
 812            }
 0813            if (parameters == null)
 814            {
 0815                throw new ArgumentNullException(nameof(parameters));
 816            }
 817
 0818            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetFlowLogStatus");
 0819            scope.Start();
 820            try
 821            {
 0822                var originalResponse = RestClient.GetFlowLogStatus(resourceGroupName, networkWatcherName, parameters, ca
 0823                return new NetworkWatchersGetFlowLogStatusOperation(_clientDiagnostics, _pipeline, RestClient.CreateGetF
 824            }
 0825            catch (Exception e)
 826            {
 0827                scope.Failed(e);
 0828                throw;
 829            }
 0830        }
 831
 832        /// <summary> Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given
 833        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 834        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 835        /// <param name="parameters"> Parameters that determine how the connectivity check will be performed. </param>
 836        /// <param name="cancellationToken"> The cancellation token to use. </param>
 837        public virtual async Task<NetworkWatchersCheckConnectivityOperation> StartCheckConnectivityAsync(string resource
 838        {
 2839            if (resourceGroupName == null)
 840            {
 0841                throw new ArgumentNullException(nameof(resourceGroupName));
 842            }
 2843            if (networkWatcherName == null)
 844            {
 0845                throw new ArgumentNullException(nameof(networkWatcherName));
 846            }
 2847            if (parameters == null)
 848            {
 0849                throw new ArgumentNullException(nameof(parameters));
 850            }
 851
 2852            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartCheckConnectivity");
 2853            scope.Start();
 854            try
 855            {
 2856                var originalResponse = await RestClient.CheckConnectivityAsync(resourceGroupName, networkWatcherName, pa
 2857                return new NetworkWatchersCheckConnectivityOperation(_clientDiagnostics, _pipeline, RestClient.CreateChe
 858            }
 0859            catch (Exception e)
 860            {
 0861                scope.Failed(e);
 0862                throw;
 863            }
 2864        }
 865
 866        /// <summary> Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given
 867        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 868        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 869        /// <param name="parameters"> Parameters that determine how the connectivity check will be performed. </param>
 870        /// <param name="cancellationToken"> The cancellation token to use. </param>
 871        public virtual NetworkWatchersCheckConnectivityOperation StartCheckConnectivity(string resourceGroupName, string
 872        {
 2873            if (resourceGroupName == null)
 874            {
 0875                throw new ArgumentNullException(nameof(resourceGroupName));
 876            }
 2877            if (networkWatcherName == null)
 878            {
 0879                throw new ArgumentNullException(nameof(networkWatcherName));
 880            }
 2881            if (parameters == null)
 882            {
 0883                throw new ArgumentNullException(nameof(parameters));
 884            }
 885
 2886            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartCheckConnectivity");
 2887            scope.Start();
 888            try
 889            {
 2890                var originalResponse = RestClient.CheckConnectivity(resourceGroupName, networkWatcherName, parameters, c
 2891                return new NetworkWatchersCheckConnectivityOperation(_clientDiagnostics, _pipeline, RestClient.CreateChe
 892            }
 0893            catch (Exception e)
 894            {
 0895                scope.Failed(e);
 0896                throw;
 897            }
 2898        }
 899
 900        /// <summary> NOTE: This feature is currently in preview and still being tested for stability. Gets the relative
 901        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 902        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 903        /// <param name="parameters"> Parameters that determine Azure reachability report configuration. </param>
 904        /// <param name="cancellationToken"> The cancellation token to use. </param>
 905        public virtual async Task<NetworkWatchersGetAzureReachabilityReportOperation> StartGetAzureReachabilityReportAsy
 906        {
 0907            if (resourceGroupName == null)
 908            {
 0909                throw new ArgumentNullException(nameof(resourceGroupName));
 910            }
 0911            if (networkWatcherName == null)
 912            {
 0913                throw new ArgumentNullException(nameof(networkWatcherName));
 914            }
 0915            if (parameters == null)
 916            {
 0917                throw new ArgumentNullException(nameof(parameters));
 918            }
 919
 0920            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetAzureReachabilityReport"
 0921            scope.Start();
 922            try
 923            {
 0924                var originalResponse = await RestClient.GetAzureReachabilityReportAsync(resourceGroupName, networkWatche
 0925                return new NetworkWatchersGetAzureReachabilityReportOperation(_clientDiagnostics, _pipeline, RestClient.
 926            }
 0927            catch (Exception e)
 928            {
 0929                scope.Failed(e);
 0930                throw;
 931            }
 0932        }
 933
 934        /// <summary> NOTE: This feature is currently in preview and still being tested for stability. Gets the relative
 935        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 936        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 937        /// <param name="parameters"> Parameters that determine Azure reachability report configuration. </param>
 938        /// <param name="cancellationToken"> The cancellation token to use. </param>
 939        public virtual NetworkWatchersGetAzureReachabilityReportOperation StartGetAzureReachabilityReport(string resourc
 940        {
 0941            if (resourceGroupName == null)
 942            {
 0943                throw new ArgumentNullException(nameof(resourceGroupName));
 944            }
 0945            if (networkWatcherName == null)
 946            {
 0947                throw new ArgumentNullException(nameof(networkWatcherName));
 948            }
 0949            if (parameters == null)
 950            {
 0951                throw new ArgumentNullException(nameof(parameters));
 952            }
 953
 0954            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetAzureReachabilityReport"
 0955            scope.Start();
 956            try
 957            {
 0958                var originalResponse = RestClient.GetAzureReachabilityReport(resourceGroupName, networkWatcherName, para
 0959                return new NetworkWatchersGetAzureReachabilityReportOperation(_clientDiagnostics, _pipeline, RestClient.
 960            }
 0961            catch (Exception e)
 962            {
 0963                scope.Failed(e);
 0964                throw;
 965            }
 0966        }
 967
 968        /// <summary> NOTE: This feature is currently in preview and still being tested for stability. Lists all availab
 969        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 970        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 971        /// <param name="parameters"> Parameters that scope the list of available providers. </param>
 972        /// <param name="cancellationToken"> The cancellation token to use. </param>
 973        public virtual async Task<NetworkWatchersListAvailableProvidersOperation> StartListAvailableProvidersAsync(strin
 974        {
 0975            if (resourceGroupName == null)
 976            {
 0977                throw new ArgumentNullException(nameof(resourceGroupName));
 978            }
 0979            if (networkWatcherName == null)
 980            {
 0981                throw new ArgumentNullException(nameof(networkWatcherName));
 982            }
 0983            if (parameters == null)
 984            {
 0985                throw new ArgumentNullException(nameof(parameters));
 986            }
 987
 0988            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartListAvailableProviders");
 0989            scope.Start();
 990            try
 991            {
 0992                var originalResponse = await RestClient.ListAvailableProvidersAsync(resourceGroupName, networkWatcherNam
 0993                return new NetworkWatchersListAvailableProvidersOperation(_clientDiagnostics, _pipeline, RestClient.Crea
 994            }
 0995            catch (Exception e)
 996            {
 0997                scope.Failed(e);
 0998                throw;
 999            }
 01000        }
 1001
 1002        /// <summary> NOTE: This feature is currently in preview and still being tested for stability. Lists all availab
 1003        /// <param name="resourceGroupName"> The name of the network watcher resource group. </param>
 1004        /// <param name="networkWatcherName"> The name of the network watcher resource. </param>
 1005        /// <param name="parameters"> Parameters that scope the list of available providers. </param>
 1006        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1007        public virtual NetworkWatchersListAvailableProvidersOperation StartListAvailableProviders(string resourceGroupNa
 1008        {
 01009            if (resourceGroupName == null)
 1010            {
 01011                throw new ArgumentNullException(nameof(resourceGroupName));
 1012            }
 01013            if (networkWatcherName == null)
 1014            {
 01015                throw new ArgumentNullException(nameof(networkWatcherName));
 1016            }
 01017            if (parameters == null)
 1018            {
 01019                throw new ArgumentNullException(nameof(parameters));
 1020            }
 1021
 01022            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartListAvailableProviders");
 01023            scope.Start();
 1024            try
 1025            {
 01026                var originalResponse = RestClient.ListAvailableProviders(resourceGroupName, networkWatcherName, paramete
 01027                return new NetworkWatchersListAvailableProvidersOperation(_clientDiagnostics, _pipeline, RestClient.Crea
 1028            }
 01029            catch (Exception e)
 1030            {
 01031                scope.Failed(e);
 01032                throw;
 1033            }
 01034        }
 1035
 1036        /// <summary> Gets Network Configuration Diagnostic data to help customers understand and debug network behavior
 1037        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1038        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 1039        /// <param name="parameters"> Parameters to get network configuration diagnostic. </param>
 1040        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1041        public virtual async Task<NetworkWatchersGetNetworkConfigurationDiagnosticOperation> StartGetNetworkConfiguratio
 1042        {
 01043            if (resourceGroupName == null)
 1044            {
 01045                throw new ArgumentNullException(nameof(resourceGroupName));
 1046            }
 01047            if (networkWatcherName == null)
 1048            {
 01049                throw new ArgumentNullException(nameof(networkWatcherName));
 1050            }
 01051            if (parameters == null)
 1052            {
 01053                throw new ArgumentNullException(nameof(parameters));
 1054            }
 1055
 01056            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetNetworkConfigurationDiag
 01057            scope.Start();
 1058            try
 1059            {
 01060                var originalResponse = await RestClient.GetNetworkConfigurationDiagnosticAsync(resourceGroupName, networ
 01061                return new NetworkWatchersGetNetworkConfigurationDiagnosticOperation(_clientDiagnostics, _pipeline, Rest
 1062            }
 01063            catch (Exception e)
 1064            {
 01065                scope.Failed(e);
 01066                throw;
 1067            }
 01068        }
 1069
 1070        /// <summary> Gets Network Configuration Diagnostic data to help customers understand and debug network behavior
 1071        /// <param name="resourceGroupName"> The name of the resource group. </param>
 1072        /// <param name="networkWatcherName"> The name of the network watcher. </param>
 1073        /// <param name="parameters"> Parameters to get network configuration diagnostic. </param>
 1074        /// <param name="cancellationToken"> The cancellation token to use. </param>
 1075        public virtual NetworkWatchersGetNetworkConfigurationDiagnosticOperation StartGetNetworkConfigurationDiagnostic(
 1076        {
 01077            if (resourceGroupName == null)
 1078            {
 01079                throw new ArgumentNullException(nameof(resourceGroupName));
 1080            }
 01081            if (networkWatcherName == null)
 1082            {
 01083                throw new ArgumentNullException(nameof(networkWatcherName));
 1084            }
 01085            if (parameters == null)
 1086            {
 01087                throw new ArgumentNullException(nameof(parameters));
 1088            }
 1089
 01090            using var scope = _clientDiagnostics.CreateScope("NetworkWatchersOperations.StartGetNetworkConfigurationDiag
 01091            scope.Start();
 1092            try
 1093            {
 01094                var originalResponse = RestClient.GetNetworkConfigurationDiagnostic(resourceGroupName, networkWatcherNam
 01095                return new NetworkWatchersGetNetworkConfigurationDiagnosticOperation(_clientDiagnostics, _pipeline, Rest
 1096            }
 01097            catch (Exception e)
 1098            {
 01099                scope.Failed(e);
 01100                throw;
 1101            }
 01102        }
 1103    }
 1104}