| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure.Core.Pipeline; |
| | 12 | |
|
| | 13 | | namespace Azure.ResourceManager.Network |
| | 14 | | { |
| | 15 | | /// <summary> The VpnServerConfigurationsAssociatedWithVirtualWan service client. </summary> |
| | 16 | | public partial class VpnServerConfigurationsAssociatedWithVirtualWanOperations |
| | 17 | | { |
| | 18 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 19 | | private readonly HttpPipeline _pipeline; |
| 0 | 20 | | internal VpnServerConfigurationsAssociatedWithVirtualWanRestOperations RestClient { get; } |
| | 21 | | /// <summary> Initializes a new instance of VpnServerConfigurationsAssociatedWithVirtualWanOperations for mockin |
| 0 | 22 | | protected VpnServerConfigurationsAssociatedWithVirtualWanOperations() |
| | 23 | | { |
| 0 | 24 | | } |
| | 25 | | /// <summary> Initializes a new instance of VpnServerConfigurationsAssociatedWithVirtualWanOperations. </summary |
| | 26 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 27 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 28 | | /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | 29 | | /// <param name="endpoint"> server parameter. </param> |
| 0 | 30 | | internal VpnServerConfigurationsAssociatedWithVirtualWanOperations(ClientDiagnostics clientDiagnostics, HttpPipe |
| | 31 | | { |
| 0 | 32 | | RestClient = new VpnServerConfigurationsAssociatedWithVirtualWanRestOperations(clientDiagnostics, pipeline, |
| 0 | 33 | | _clientDiagnostics = clientDiagnostics; |
| 0 | 34 | | _pipeline = pipeline; |
| 0 | 35 | | } |
| | 36 | |
|
| | 37 | | /// <summary> Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. </summa |
| | 38 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 39 | | /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed. |
| | 40 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 41 | | public virtual async Task<VpnServerConfigurationsAssociatedWithVirtualWanListOperation> StartListAsync(string re |
| | 42 | | { |
| 0 | 43 | | if (resourceGroupName == null) |
| | 44 | | { |
| 0 | 45 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 46 | | } |
| 0 | 47 | | if (virtualWANName == null) |
| | 48 | | { |
| 0 | 49 | | throw new ArgumentNullException(nameof(virtualWANName)); |
| | 50 | | } |
| | 51 | |
|
| 0 | 52 | | using var scope = _clientDiagnostics.CreateScope("VpnServerConfigurationsAssociatedWithVirtualWanOperations. |
| 0 | 53 | | scope.Start(); |
| | 54 | | try |
| | 55 | | { |
| 0 | 56 | | var originalResponse = await RestClient.ListAsync(resourceGroupName, virtualWANName, cancellationToken). |
| 0 | 57 | | return new VpnServerConfigurationsAssociatedWithVirtualWanListOperation(_clientDiagnostics, _pipeline, R |
| | 58 | | } |
| 0 | 59 | | catch (Exception e) |
| | 60 | | { |
| 0 | 61 | | scope.Failed(e); |
| 0 | 62 | | throw; |
| | 63 | | } |
| 0 | 64 | | } |
| | 65 | |
|
| | 66 | | /// <summary> Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. </summa |
| | 67 | | /// <param name="resourceGroupName"> The resource group name. </param> |
| | 68 | | /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed. |
| | 69 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 70 | | public virtual VpnServerConfigurationsAssociatedWithVirtualWanListOperation StartList(string resourceGroupName, |
| | 71 | | { |
| 0 | 72 | | if (resourceGroupName == null) |
| | 73 | | { |
| 0 | 74 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 75 | | } |
| 0 | 76 | | if (virtualWANName == null) |
| | 77 | | { |
| 0 | 78 | | throw new ArgumentNullException(nameof(virtualWANName)); |
| | 79 | | } |
| | 80 | |
|
| 0 | 81 | | using var scope = _clientDiagnostics.CreateScope("VpnServerConfigurationsAssociatedWithVirtualWanOperations. |
| 0 | 82 | | scope.Start(); |
| | 83 | | try |
| | 84 | | { |
| 0 | 85 | | var originalResponse = RestClient.List(resourceGroupName, virtualWANName, cancellationToken); |
| 0 | 86 | | return new VpnServerConfigurationsAssociatedWithVirtualWanListOperation(_clientDiagnostics, _pipeline, R |
| | 87 | | } |
| 0 | 88 | | catch (Exception e) |
| | 89 | | { |
| 0 | 90 | | scope.Failed(e); |
| 0 | 91 | | throw; |
| | 92 | | } |
| 0 | 93 | | } |
| | 94 | | } |
| | 95 | | } |