| | 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; |
| | 12 | | using Azure.Core.Pipeline; |
| | 13 | | using Azure.ResourceManager.Network.Models; |
| | 14 | |
|
| | 15 | | namespace Azure.ResourceManager.Network |
| | 16 | | { |
| | 17 | | /// <summary> The VpnSiteLinkConnections service client. </summary> |
| | 18 | | public partial class VpnSiteLinkConnectionsOperations |
| | 19 | | { |
| | 20 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 21 | | private readonly HttpPipeline _pipeline; |
| 0 | 22 | | internal VpnSiteLinkConnectionsRestOperations RestClient { get; } |
| | 23 | | /// <summary> Initializes a new instance of VpnSiteLinkConnectionsOperations for mocking. </summary> |
| 0 | 24 | | protected VpnSiteLinkConnectionsOperations() |
| | 25 | | { |
| 0 | 26 | | } |
| | 27 | | /// <summary> Initializes a new instance of VpnSiteLinkConnectionsOperations. </summary> |
| | 28 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 29 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 30 | | /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | 31 | | /// <param name="endpoint"> server parameter. </param> |
| 0 | 32 | | internal VpnSiteLinkConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string sub |
| | 33 | | { |
| 0 | 34 | | RestClient = new VpnSiteLinkConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint) |
| 0 | 35 | | _clientDiagnostics = clientDiagnostics; |
| 0 | 36 | | _pipeline = pipeline; |
| 0 | 37 | | } |
| | 38 | |
|
| | 39 | | /// <summary> Retrieves the details of a vpn site link connection. </summary> |
| | 40 | | /// <param name="resourceGroupName"> The resource group name of the VpnGateway. </param> |
| | 41 | | /// <param name="gatewayName"> The name of the gateway. </param> |
| | 42 | | /// <param name="connectionName"> The name of the vpn connection. </param> |
| | 43 | | /// <param name="linkConnectionName"> The name of the vpn connection. </param> |
| | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 45 | | public virtual async Task<Response<VpnSiteLinkConnection>> GetAsync(string resourceGroupName, string gatewayName |
| | 46 | | { |
| 0 | 47 | | using var scope = _clientDiagnostics.CreateScope("VpnSiteLinkConnectionsOperations.Get"); |
| 0 | 48 | | scope.Start(); |
| | 49 | | try |
| | 50 | | { |
| 0 | 51 | | return await RestClient.GetAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName, can |
| | 52 | | } |
| 0 | 53 | | catch (Exception e) |
| | 54 | | { |
| 0 | 55 | | scope.Failed(e); |
| 0 | 56 | | throw; |
| | 57 | | } |
| 0 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> Retrieves the details of a vpn site link connection. </summary> |
| | 61 | | /// <param name="resourceGroupName"> The resource group name of the VpnGateway. </param> |
| | 62 | | /// <param name="gatewayName"> The name of the gateway. </param> |
| | 63 | | /// <param name="connectionName"> The name of the vpn connection. </param> |
| | 64 | | /// <param name="linkConnectionName"> The name of the vpn connection. </param> |
| | 65 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 66 | | public virtual Response<VpnSiteLinkConnection> Get(string resourceGroupName, string gatewayName, string connecti |
| | 67 | | { |
| 0 | 68 | | using var scope = _clientDiagnostics.CreateScope("VpnSiteLinkConnectionsOperations.Get"); |
| 0 | 69 | | scope.Start(); |
| | 70 | | try |
| | 71 | | { |
| 0 | 72 | | return RestClient.Get(resourceGroupName, gatewayName, connectionName, linkConnectionName, cancellationTo |
| | 73 | | } |
| 0 | 74 | | catch (Exception e) |
| | 75 | | { |
| 0 | 76 | | scope.Failed(e); |
| 0 | 77 | | throw; |
| | 78 | | } |
| 0 | 79 | | } |
| | 80 | | } |
| | 81 | | } |