< Summary

Class:Azure.ResourceManager.Network.VirtualNetworksOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VirtualNetworksOperations.cs
Covered lines:96
Uncovered lines:120
Coverable lines:216
Total lines:542
Line coverage:44.4% (96 of 216)
Covered branches:16
Total branches:32
Branch coverage:50% (16 of 32)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
UpdateTagsAsync()-0%100%
UpdateTags(...)-0%100%
CheckIPAddressAvailabilityAsync()-57.14%100%
CheckIPAddressAvailability(...)-57.14%100%
<ListAllAsync()-62.5%100%
<ListAllAsync()-0%100%
ListAllAsync(...)-100%100%
ListAll(...)-100%100%
ListAsync(...)-36.84%50%
<ListAsync()-62.5%100%
<ListAsync()-0%100%
List(...)-36.84%50%
ListUsageAsync(...)-38.1%50%
<ListUsageAsync()-62.5%100%
<ListUsageAsync()-0%100%
ListUsage(...)-38.1%50%
StartDeleteAsync()-58.33%50%
StartDelete(...)-58.33%50%
StartCreateOrUpdateAsync()-57.14%50%
StartCreateOrUpdate(...)-57.14%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VirtualNetworksOperations.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 VirtualNetworks service client. </summary>
 19    public partial class VirtualNetworksOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 46423        internal VirtualNetworksRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of VirtualNetworksOperations for mocking. </summary>
 28025        protected VirtualNetworksOperations()
 26        {
 28027        }
 28        /// <summary> Initializes a new instance of VirtualNetworksOperations. </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>
 28033        internal VirtualNetworksOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscripti
 34        {
 28035            RestClient = new VirtualNetworksRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 28036            _clientDiagnostics = clientDiagnostics;
 28037            _pipeline = pipeline;
 28038        }
 39
 40        /// <summary> Gets the specified virtual network by resource group. </summary>
 41        /// <param name="resourceGroupName"> The name of the resource group. </param>
 42        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 43        /// <param name="expand"> Expands referenced resources. </param>
 44        /// <param name="cancellationToken"> The cancellation token to use. </param>
 45        public virtual async Task<Response<VirtualNetwork>> GetAsync(string resourceGroupName, string virtualNetworkName
 46        {
 3047            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.Get");
 3048            scope.Start();
 49            try
 50            {
 3051                return await RestClient.GetAsync(resourceGroupName, virtualNetworkName, expand, cancellationToken).Confi
 52            }
 053            catch (Exception e)
 54            {
 055                scope.Failed(e);
 056                throw;
 57            }
 3058        }
 59
 60        /// <summary> Gets the specified virtual network by resource group. </summary>
 61        /// <param name="resourceGroupName"> The name of the resource group. </param>
 62        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 63        /// <param name="expand"> Expands referenced resources. </param>
 64        /// <param name="cancellationToken"> The cancellation token to use. </param>
 65        public virtual Response<VirtualNetwork> Get(string resourceGroupName, string virtualNetworkName, string expand =
 66        {
 3067            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.Get");
 3068            scope.Start();
 69            try
 70            {
 3071                return RestClient.Get(resourceGroupName, virtualNetworkName, expand, cancellationToken);
 72            }
 073            catch (Exception e)
 74            {
 075                scope.Failed(e);
 076                throw;
 77            }
 3078        }
 79
 80        /// <summary> Updates a virtual network tags. </summary>
 81        /// <param name="resourceGroupName"> The name of the resource group. </param>
 82        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 83        /// <param name="parameters"> Parameters supplied to update virtual network tags. </param>
 84        /// <param name="cancellationToken"> The cancellation token to use. </param>
 85        public virtual async Task<Response<VirtualNetwork>> UpdateTagsAsync(string resourceGroupName, string virtualNetw
 86        {
 087            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.UpdateTags");
 088            scope.Start();
 89            try
 90            {
 091                return await RestClient.UpdateTagsAsync(resourceGroupName, virtualNetworkName, parameters, cancellationT
 92            }
 093            catch (Exception e)
 94            {
 095                scope.Failed(e);
 096                throw;
 97            }
 098        }
 99
 100        /// <summary> Updates a virtual network tags. </summary>
 101        /// <param name="resourceGroupName"> The name of the resource group. </param>
 102        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 103        /// <param name="parameters"> Parameters supplied to update virtual network tags. </param>
 104        /// <param name="cancellationToken"> The cancellation token to use. </param>
 105        public virtual Response<VirtualNetwork> UpdateTags(string resourceGroupName, string virtualNetworkName, TagsObje
 106        {
 0107            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.UpdateTags");
 0108            scope.Start();
 109            try
 110            {
 0111                return RestClient.UpdateTags(resourceGroupName, virtualNetworkName, parameters, cancellationToken);
 112            }
 0113            catch (Exception e)
 114            {
 0115                scope.Failed(e);
 0116                throw;
 117            }
 0118        }
 119
 120        /// <summary> Checks whether a private IP address is available for use. </summary>
 121        /// <param name="resourceGroupName"> The name of the resource group. </param>
 122        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 123        /// <param name="ipAddress"> The private IP address to be verified. </param>
 124        /// <param name="cancellationToken"> The cancellation token to use. </param>
 125        public virtual async Task<Response<IPAddressAvailabilityResult>> CheckIPAddressAvailabilityAsync(string resource
 126        {
 4127            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.CheckIPAddressAvailability");
 4128            scope.Start();
 129            try
 130            {
 4131                return await RestClient.CheckIPAddressAvailabilityAsync(resourceGroupName, virtualNetworkName, ipAddress
 132            }
 0133            catch (Exception e)
 134            {
 0135                scope.Failed(e);
 0136                throw;
 137            }
 4138        }
 139
 140        /// <summary> Checks whether a private IP address is available for use. </summary>
 141        /// <param name="resourceGroupName"> The name of the resource group. </param>
 142        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 143        /// <param name="ipAddress"> The private IP address to be verified. </param>
 144        /// <param name="cancellationToken"> The cancellation token to use. </param>
 145        public virtual Response<IPAddressAvailabilityResult> CheckIPAddressAvailability(string resourceGroupName, string
 146        {
 4147            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.CheckIPAddressAvailability");
 4148            scope.Start();
 149            try
 150            {
 4151                return RestClient.CheckIPAddressAvailability(resourceGroupName, virtualNetworkName, ipAddress, cancellat
 152            }
 0153            catch (Exception e)
 154            {
 0155                scope.Failed(e);
 0156                throw;
 157            }
 4158        }
 159
 160        /// <summary> Gets all virtual networks in a subscription. </summary>
 161        /// <param name="cancellationToken"> The cancellation token to use. </param>
 162        public virtual AsyncPageable<VirtualNetwork> ListAllAsync(CancellationToken cancellationToken = default)
 163        {
 164            async Task<Page<VirtualNetwork>> FirstPageFunc(int? pageSizeHint)
 165            {
 2166                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListAll");
 2167                scope.Start();
 168                try
 169                {
 2170                    var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false);
 2171                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 172                }
 0173                catch (Exception e)
 174                {
 0175                    scope.Failed(e);
 0176                    throw;
 177                }
 2178            }
 179            async Task<Page<VirtualNetwork>> NextPageFunc(string nextLink, int? pageSizeHint)
 180            {
 0181                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListAll");
 0182                scope.Start();
 183                try
 184                {
 0185                    var response = await RestClient.ListAllNextPageAsync(nextLink, cancellationToken).ConfigureAwait(fal
 0186                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 187                }
 0188                catch (Exception e)
 189                {
 0190                    scope.Failed(e);
 0191                    throw;
 192                }
 0193            }
 2194            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 195        }
 196
 197        /// <summary> Gets all virtual networks in a subscription. </summary>
 198        /// <param name="cancellationToken"> The cancellation token to use. </param>
 199        public virtual Pageable<VirtualNetwork> ListAll(CancellationToken cancellationToken = default)
 200        {
 201            Page<VirtualNetwork> FirstPageFunc(int? pageSizeHint)
 202            {
 2203                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListAll");
 2204                scope.Start();
 205                try
 206                {
 2207                    var response = RestClient.ListAll(cancellationToken);
 2208                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 209                }
 0210                catch (Exception e)
 211                {
 0212                    scope.Failed(e);
 0213                    throw;
 214                }
 2215            }
 216            Page<VirtualNetwork> NextPageFunc(string nextLink, int? pageSizeHint)
 217            {
 0218                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListAll");
 0219                scope.Start();
 220                try
 221                {
 0222                    var response = RestClient.ListAllNextPage(nextLink, cancellationToken);
 0223                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 224                }
 0225                catch (Exception e)
 226                {
 0227                    scope.Failed(e);
 0228                    throw;
 229                }
 0230            }
 2231            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 232        }
 233
 234        /// <summary> Gets all virtual networks in a resource group. </summary>
 235        /// <param name="resourceGroupName"> The name of the resource group. </param>
 236        /// <param name="cancellationToken"> The cancellation token to use. </param>
 237        public virtual AsyncPageable<VirtualNetwork> ListAsync(string resourceGroupName, CancellationToken cancellationT
 238        {
 8239            if (resourceGroupName == null)
 240            {
 0241                throw new ArgumentNullException(nameof(resourceGroupName));
 242            }
 243
 244            async Task<Page<VirtualNetwork>> FirstPageFunc(int? pageSizeHint)
 245            {
 8246                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.List");
 8247                scope.Start();
 248                try
 249                {
 8250                    var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false
 8251                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 252                }
 0253                catch (Exception e)
 254                {
 0255                    scope.Failed(e);
 0256                    throw;
 257                }
 8258            }
 259            async Task<Page<VirtualNetwork>> NextPageFunc(string nextLink, int? pageSizeHint)
 260            {
 0261                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.List");
 0262                scope.Start();
 263                try
 264                {
 0265                    var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co
 0266                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 267                }
 0268                catch (Exception e)
 269                {
 0270                    scope.Failed(e);
 0271                    throw;
 272                }
 0273            }
 8274            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 275        }
 276
 277        /// <summary> Gets all virtual networks in a resource group. </summary>
 278        /// <param name="resourceGroupName"> The name of the resource group. </param>
 279        /// <param name="cancellationToken"> The cancellation token to use. </param>
 280        public virtual Pageable<VirtualNetwork> List(string resourceGroupName, CancellationToken cancellationToken = def
 281        {
 8282            if (resourceGroupName == null)
 283            {
 0284                throw new ArgumentNullException(nameof(resourceGroupName));
 285            }
 286
 287            Page<VirtualNetwork> FirstPageFunc(int? pageSizeHint)
 288            {
 8289                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.List");
 8290                scope.Start();
 291                try
 292                {
 8293                    var response = RestClient.List(resourceGroupName, cancellationToken);
 8294                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 295                }
 0296                catch (Exception e)
 297                {
 0298                    scope.Failed(e);
 0299                    throw;
 300                }
 8301            }
 302            Page<VirtualNetwork> NextPageFunc(string nextLink, int? pageSizeHint)
 303            {
 0304                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.List");
 0305                scope.Start();
 306                try
 307                {
 0308                    var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken);
 0309                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 310                }
 0311                catch (Exception e)
 312                {
 0313                    scope.Failed(e);
 0314                    throw;
 315                }
 0316            }
 8317            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 318        }
 319
 320        /// <summary> Lists usage stats. </summary>
 321        /// <param name="resourceGroupName"> The name of the resource group. </param>
 322        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 323        /// <param name="cancellationToken"> The cancellation token to use. </param>
 324        public virtual AsyncPageable<VirtualNetworkUsage> ListUsageAsync(string resourceGroupName, string virtualNetwork
 325        {
 4326            if (resourceGroupName == null)
 327            {
 0328                throw new ArgumentNullException(nameof(resourceGroupName));
 329            }
 4330            if (virtualNetworkName == null)
 331            {
 0332                throw new ArgumentNullException(nameof(virtualNetworkName));
 333            }
 334
 335            async Task<Page<VirtualNetworkUsage>> FirstPageFunc(int? pageSizeHint)
 336            {
 4337                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListUsage");
 4338                scope.Start();
 339                try
 340                {
 4341                    var response = await RestClient.ListUsageAsync(resourceGroupName, virtualNetworkName, cancellationTo
 4342                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 343                }
 0344                catch (Exception e)
 345                {
 0346                    scope.Failed(e);
 0347                    throw;
 348                }
 4349            }
 350            async Task<Page<VirtualNetworkUsage>> NextPageFunc(string nextLink, int? pageSizeHint)
 351            {
 0352                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListUsage");
 0353                scope.Start();
 354                try
 355                {
 0356                    var response = await RestClient.ListUsageNextPageAsync(nextLink, resourceGroupName, virtualNetworkNa
 0357                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 358                }
 0359                catch (Exception e)
 360                {
 0361                    scope.Failed(e);
 0362                    throw;
 363                }
 0364            }
 4365            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 366        }
 367
 368        /// <summary> Lists usage stats. </summary>
 369        /// <param name="resourceGroupName"> The name of the resource group. </param>
 370        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 371        /// <param name="cancellationToken"> The cancellation token to use. </param>
 372        public virtual Pageable<VirtualNetworkUsage> ListUsage(string resourceGroupName, string virtualNetworkName, Canc
 373        {
 4374            if (resourceGroupName == null)
 375            {
 0376                throw new ArgumentNullException(nameof(resourceGroupName));
 377            }
 4378            if (virtualNetworkName == null)
 379            {
 0380                throw new ArgumentNullException(nameof(virtualNetworkName));
 381            }
 382
 383            Page<VirtualNetworkUsage> FirstPageFunc(int? pageSizeHint)
 384            {
 4385                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListUsage");
 4386                scope.Start();
 387                try
 388                {
 4389                    var response = RestClient.ListUsage(resourceGroupName, virtualNetworkName, cancellationToken);
 4390                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 391                }
 0392                catch (Exception e)
 393                {
 0394                    scope.Failed(e);
 0395                    throw;
 396                }
 4397            }
 398            Page<VirtualNetworkUsage> NextPageFunc(string nextLink, int? pageSizeHint)
 399            {
 0400                using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.ListUsage");
 0401                scope.Start();
 402                try
 403                {
 0404                    var response = RestClient.ListUsageNextPage(nextLink, resourceGroupName, virtualNetworkName, cancell
 0405                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 406                }
 0407                catch (Exception e)
 408                {
 0409                    scope.Failed(e);
 0410                    throw;
 411                }
 0412            }
 4413            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 414        }
 415
 416        /// <summary> Deletes the specified virtual network. </summary>
 417        /// <param name="resourceGroupName"> The name of the resource group. </param>
 418        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 419        /// <param name="cancellationToken"> The cancellation token to use. </param>
 420        public virtual async Task<VirtualNetworksDeleteOperation> StartDeleteAsync(string resourceGroupName, string virt
 421        {
 38422            if (resourceGroupName == null)
 423            {
 0424                throw new ArgumentNullException(nameof(resourceGroupName));
 425            }
 38426            if (virtualNetworkName == null)
 427            {
 0428                throw new ArgumentNullException(nameof(virtualNetworkName));
 429            }
 430
 38431            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.StartDelete");
 38432            scope.Start();
 433            try
 434            {
 38435                var originalResponse = await RestClient.DeleteAsync(resourceGroupName, virtualNetworkName, cancellationT
 38436                return new VirtualNetworksDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(
 437            }
 0438            catch (Exception e)
 439            {
 0440                scope.Failed(e);
 0441                throw;
 442            }
 38443        }
 444
 445        /// <summary> Deletes the specified virtual network. </summary>
 446        /// <param name="resourceGroupName"> The name of the resource group. </param>
 447        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 448        /// <param name="cancellationToken"> The cancellation token to use. </param>
 449        public virtual VirtualNetworksDeleteOperation StartDelete(string resourceGroupName, string virtualNetworkName, C
 450        {
 38451            if (resourceGroupName == null)
 452            {
 0453                throw new ArgumentNullException(nameof(resourceGroupName));
 454            }
 38455            if (virtualNetworkName == null)
 456            {
 0457                throw new ArgumentNullException(nameof(virtualNetworkName));
 458            }
 459
 38460            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.StartDelete");
 38461            scope.Start();
 462            try
 463            {
 38464                var originalResponse = RestClient.Delete(resourceGroupName, virtualNetworkName, cancellationToken);
 38465                return new VirtualNetworksDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(
 466            }
 0467            catch (Exception e)
 468            {
 0469                scope.Failed(e);
 0470                throw;
 471            }
 38472        }
 473
 474        /// <summary> Creates or updates a virtual network in the specified resource group. </summary>
 475        /// <param name="resourceGroupName"> The name of the resource group. </param>
 476        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 477        /// <param name="parameters"> Parameters supplied to the create or update virtual network operation. </param>
 478        /// <param name="cancellationToken"> The cancellation token to use. </param>
 479        public virtual async Task<VirtualNetworksCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGroupN
 480        {
 54481            if (resourceGroupName == null)
 482            {
 0483                throw new ArgumentNullException(nameof(resourceGroupName));
 484            }
 54485            if (virtualNetworkName == null)
 486            {
 0487                throw new ArgumentNullException(nameof(virtualNetworkName));
 488            }
 54489            if (parameters == null)
 490            {
 0491                throw new ArgumentNullException(nameof(parameters));
 492            }
 493
 54494            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.StartCreateOrUpdate");
 54495            scope.Start();
 496            try
 497            {
 54498                var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, virtualNetworkName, param
 54499                return new VirtualNetworksCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreate
 500            }
 0501            catch (Exception e)
 502            {
 0503                scope.Failed(e);
 0504                throw;
 505            }
 54506        }
 507
 508        /// <summary> Creates or updates a virtual network in the specified resource group. </summary>
 509        /// <param name="resourceGroupName"> The name of the resource group. </param>
 510        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 511        /// <param name="parameters"> Parameters supplied to the create or update virtual network operation. </param>
 512        /// <param name="cancellationToken"> The cancellation token to use. </param>
 513        public virtual VirtualNetworksCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string virtu
 514        {
 54515            if (resourceGroupName == null)
 516            {
 0517                throw new ArgumentNullException(nameof(resourceGroupName));
 518            }
 54519            if (virtualNetworkName == null)
 520            {
 0521                throw new ArgumentNullException(nameof(virtualNetworkName));
 522            }
 54523            if (parameters == null)
 524            {
 0525                throw new ArgumentNullException(nameof(parameters));
 526            }
 527
 54528            using var scope = _clientDiagnostics.CreateScope("VirtualNetworksOperations.StartCreateOrUpdate");
 54529            scope.Start();
 530            try
 531            {
 54532                var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, virtualNetworkName, parameters, canc
 54533                return new VirtualNetworksCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreate
 534            }
 0535            catch (Exception e)
 536            {
 0537                scope.Failed(e);
 0538                throw;
 539            }
 54540        }
 541    }
 542}