-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathVirtualNetworkGatewayConnectionPropertiesFormat.cs
More file actions
431 lines (349 loc) · 19.8 KB
/
Copy pathVirtualNetworkGatewayConnectionPropertiesFormat.cs
File metadata and controls
431 lines (349 loc) · 19.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.Management.Network.Models
{
using System.Linq;
/// <summary>
/// VirtualNetworkGatewayConnection properties.
/// </summary>
public partial class VirtualNetworkGatewayConnectionPropertiesFormat
{
/// <summary>
/// Initializes a new instance of the VirtualNetworkGatewayConnectionPropertiesFormat class.
/// </summary>
public VirtualNetworkGatewayConnectionPropertiesFormat()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the VirtualNetworkGatewayConnectionPropertiesFormat class.
/// </summary>
/// <param name="authorizationKey">The authorizationKey.
/// </param>
/// <param name="virtualNetworkGateway1">The reference to virtual network gateway resource.
/// </param>
/// <param name="virtualNetworkGateway2">The reference to virtual network gateway resource.
/// </param>
/// <param name="localNetworkGateway2">The reference to local network gateway resource.
/// </param>
/// <param name="ingressNatRules">List of ingress NatRules.
/// </param>
/// <param name="egressNatRules">List of egress NatRules.
/// </param>
/// <param name="connectionType">Gateway connection type.
/// Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'</param>
/// <param name="connectionProtocol">Connection protocol used for this connection.
/// Possible values include: 'IKEv2', 'IKEv1'</param>
/// <param name="routingWeight">The routing weight.
/// </param>
/// <param name="dpdTimeoutSeconds">The dead peer detection timeout of this connection in seconds.
/// </param>
/// <param name="connectionMode">The connection mode for this connection.
/// Possible values include: 'Default', 'ResponderOnly', 'InitiatorOnly'</param>
/// <param name="tunnelProperties">Tunnel properties for virtual network gateway connection
/// </param>
/// <param name="sharedKey">The IPSec shared key.
/// </param>
/// <param name="connectionStatus">Virtual Network Gateway connection status.
/// Possible values include: 'Unknown', 'Connecting', 'Connected',
/// 'NotConnected'</param>
/// <param name="tunnelConnectionStatus">Collection of all tunnels' connection health status.
/// </param>
/// <param name="egressBytesTransferred">The egress bytes transferred in this connection.
/// </param>
/// <param name="ingressBytesTransferred">The ingress bytes transferred in this connection.
/// </param>
/// <param name="peer">The reference to peerings resource.
/// </param>
/// <param name="enableBgp">EnableBgp flag.
/// </param>
/// <param name="gatewayCustomBgpIPAddresses">GatewayCustomBgpIpAddresses to be used for virtual network gateway
/// Connection.
/// </param>
/// <param name="useLocalAzureIPAddress">Use private local Azure IP for the connection.
/// </param>
/// <param name="usePolicyBasedTrafficSelectors">Enable policy-based traffic selectors.
/// </param>
/// <param name="ipsecPolicies">The IPSec Policies to be considered by this connection.
/// </param>
/// <param name="trafficSelectorPolicies">The Traffic Selector Policies to be considered by this connection.
/// </param>
/// <param name="resourceGuid">The resource GUID property of the virtual network gateway connection
/// resource.
/// </param>
/// <param name="provisioningState">The provisioning state of the virtual network gateway connection resource.
/// Possible values include: 'Failed', 'Succeeded', 'Canceled', 'Creating',
/// 'Updating', 'Deleting'</param>
/// <param name="expressRouteGatewayBypass">Bypass ExpressRoute Gateway for data forwarding.
/// </param>
/// <param name="enablePrivateLinkFastPath">Bypass the ExpressRoute gateway when accessing private-links. ExpressRoute
/// FastPath (expressRouteGatewayBypass) must be enabled.
/// </param>
/// <param name="authenticationType">Gateway connection authentication type.
/// Possible values include: 'PSK', 'Certificate'</param>
/// <param name="certificateAuthentication">Certificate Authentication information for a certificate based
/// authentication connection.
/// </param>
public VirtualNetworkGatewayConnectionPropertiesFormat(VirtualNetworkGateway virtualNetworkGateway1, string connectionType, string authorizationKey = default(string), VirtualNetworkGateway virtualNetworkGateway2 = default(VirtualNetworkGateway), LocalNetworkGateway localNetworkGateway2 = default(LocalNetworkGateway), System.Collections.Generic.IList<SubResource> ingressNatRules = default(System.Collections.Generic.IList<SubResource>), System.Collections.Generic.IList<SubResource> egressNatRules = default(System.Collections.Generic.IList<SubResource>), string connectionProtocol = default(string), int? routingWeight = default(int?), int? dpdTimeoutSeconds = default(int?), string connectionMode = default(string), System.Collections.Generic.IList<VirtualNetworkGatewayConnectionTunnelProperties> tunnelProperties = default(System.Collections.Generic.IList<VirtualNetworkGatewayConnectionTunnelProperties>), string sharedKey = default(string), string connectionStatus = default(string), System.Collections.Generic.IList<TunnelConnectionHealth> tunnelConnectionStatus = default(System.Collections.Generic.IList<TunnelConnectionHealth>), long? egressBytesTransferred = default(long?), long? ingressBytesTransferred = default(long?), SubResource peer = default(SubResource), bool? enableBgp = default(bool?), System.Collections.Generic.IList<GatewayCustomBgpIpAddressIpConfiguration> gatewayCustomBgpIPAddresses = default(System.Collections.Generic.IList<GatewayCustomBgpIpAddressIpConfiguration>), bool? useLocalAzureIPAddress = default(bool?), bool? usePolicyBasedTrafficSelectors = default(bool?), System.Collections.Generic.IList<IpsecPolicy> ipsecPolicies = default(System.Collections.Generic.IList<IpsecPolicy>), System.Collections.Generic.IList<TrafficSelectorPolicy> trafficSelectorPolicies = default(System.Collections.Generic.IList<TrafficSelectorPolicy>), string resourceGuid = default(string), string provisioningState = default(string), bool? expressRouteGatewayBypass = default(bool?), bool? enablePrivateLinkFastPath = default(bool?), string authenticationType = default(string), CertificateAuthentication certificateAuthentication = default(CertificateAuthentication))
{
this.AuthorizationKey = authorizationKey;
this.VirtualNetworkGateway1 = virtualNetworkGateway1;
this.VirtualNetworkGateway2 = virtualNetworkGateway2;
this.LocalNetworkGateway2 = localNetworkGateway2;
this.IngressNatRules = ingressNatRules;
this.EgressNatRules = egressNatRules;
this.ConnectionType = connectionType;
this.ConnectionProtocol = connectionProtocol;
this.RoutingWeight = routingWeight;
this.DpdTimeoutSeconds = dpdTimeoutSeconds;
this.ConnectionMode = connectionMode;
this.TunnelProperties = tunnelProperties;
this.SharedKey = sharedKey;
this.ConnectionStatus = connectionStatus;
this.TunnelConnectionStatus = tunnelConnectionStatus;
this.EgressBytesTransferred = egressBytesTransferred;
this.IngressBytesTransferred = ingressBytesTransferred;
this.Peer = peer;
this.EnableBgp = enableBgp;
this.GatewayCustomBgpIPAddresses = gatewayCustomBgpIPAddresses;
this.UseLocalAzureIPAddress = useLocalAzureIPAddress;
this.UsePolicyBasedTrafficSelectors = usePolicyBasedTrafficSelectors;
this.IpsecPolicies = ipsecPolicies;
this.TrafficSelectorPolicies = trafficSelectorPolicies;
this.ResourceGuid = resourceGuid;
this.ProvisioningState = provisioningState;
this.ExpressRouteGatewayBypass = expressRouteGatewayBypass;
this.EnablePrivateLinkFastPath = enablePrivateLinkFastPath;
this.AuthenticationType = authenticationType;
this.CertificateAuthentication = certificateAuthentication;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets the authorizationKey.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "authorizationKey")]
public string AuthorizationKey {get; set; }
/// <summary>
/// Gets or sets the reference to virtual network gateway resource.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "virtualNetworkGateway1")]
public VirtualNetworkGateway VirtualNetworkGateway1 {get; set; }
/// <summary>
/// Gets or sets the reference to virtual network gateway resource.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "virtualNetworkGateway2")]
public VirtualNetworkGateway VirtualNetworkGateway2 {get; set; }
/// <summary>
/// Gets or sets the reference to local network gateway resource.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "localNetworkGateway2")]
public LocalNetworkGateway LocalNetworkGateway2 {get; set; }
/// <summary>
/// Gets or sets list of ingress NatRules.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "ingressNatRules")]
public System.Collections.Generic.IList<SubResource> IngressNatRules {get; set; }
/// <summary>
/// Gets or sets list of egress NatRules.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "egressNatRules")]
public System.Collections.Generic.IList<SubResource> EgressNatRules {get; set; }
/// <summary>
/// Gets or sets gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "connectionType")]
public string ConnectionType {get; set; }
/// <summary>
/// Gets or sets connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "connectionProtocol")]
public string ConnectionProtocol {get; set; }
/// <summary>
/// Gets or sets the routing weight.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "routingWeight")]
public int? RoutingWeight {get; set; }
/// <summary>
/// Gets or sets the dead peer detection timeout of this connection in seconds.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "dpdTimeoutSeconds")]
public int? DpdTimeoutSeconds {get; set; }
/// <summary>
/// Gets or sets the connection mode for this connection. Possible values include: 'Default', 'ResponderOnly', 'InitiatorOnly'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "connectionMode")]
public string ConnectionMode {get; set; }
/// <summary>
/// Gets or sets tunnel properties for virtual network gateway connection
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "tunnelProperties")]
public System.Collections.Generic.IList<VirtualNetworkGatewayConnectionTunnelProperties> TunnelProperties {get; set; }
/// <summary>
/// Gets or sets the IPSec shared key.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "sharedKey")]
public string SharedKey {get; set; }
/// <summary>
/// Gets virtual Network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "connectionStatus")]
public string ConnectionStatus {get; private set; }
/// <summary>
/// Gets collection of all tunnels' connection health status.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "tunnelConnectionStatus")]
public System.Collections.Generic.IList<TunnelConnectionHealth> TunnelConnectionStatus {get; private set; }
/// <summary>
/// Gets the egress bytes transferred in this connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "egressBytesTransferred")]
public long? EgressBytesTransferred {get; private set; }
/// <summary>
/// Gets the ingress bytes transferred in this connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "ingressBytesTransferred")]
public long? IngressBytesTransferred {get; private set; }
/// <summary>
/// Gets or sets the reference to peerings resource.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "peer")]
public SubResource Peer {get; set; }
/// <summary>
/// Gets or sets enableBgp flag.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "enableBgp")]
public bool? EnableBgp {get; set; }
/// <summary>
/// Gets or sets gatewayCustomBgpIpAddresses to be used for virtual network
/// gateway Connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "gatewayCustomBgpIpAddresses")]
public System.Collections.Generic.IList<GatewayCustomBgpIpAddressIpConfiguration> GatewayCustomBgpIPAddresses {get; set; }
/// <summary>
/// Gets or sets use private local Azure IP for the connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "useLocalAzureIpAddress")]
public bool? UseLocalAzureIPAddress {get; set; }
/// <summary>
/// Gets or sets enable policy-based traffic selectors.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "usePolicyBasedTrafficSelectors")]
public bool? UsePolicyBasedTrafficSelectors {get; set; }
/// <summary>
/// Gets or sets the IPSec Policies to be considered by this connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "ipsecPolicies")]
public System.Collections.Generic.IList<IpsecPolicy> IpsecPolicies {get; set; }
/// <summary>
/// Gets or sets the Traffic Selector Policies to be considered by this
/// connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "trafficSelectorPolicies")]
public System.Collections.Generic.IList<TrafficSelectorPolicy> TrafficSelectorPolicies {get; set; }
/// <summary>
/// Gets the resource GUID property of the virtual network gateway connection
/// resource.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "resourceGuid")]
public string ResourceGuid {get; private set; }
/// <summary>
/// Gets the provisioning state of the virtual network gateway connection
/// resource. Possible values include: 'Failed', 'Succeeded', 'Canceled', 'Creating', 'Updating', 'Deleting'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")]
public string ProvisioningState {get; private set; }
/// <summary>
/// Gets or sets bypass ExpressRoute Gateway for data forwarding.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "expressRouteGatewayBypass")]
public bool? ExpressRouteGatewayBypass {get; set; }
/// <summary>
/// Gets or sets bypass the ExpressRoute gateway when accessing private-links.
/// ExpressRoute FastPath (expressRouteGatewayBypass) must be enabled.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "enablePrivateLinkFastPath")]
public bool? EnablePrivateLinkFastPath {get; set; }
/// <summary>
/// Gets or sets gateway connection authentication type. Possible values include: 'PSK', 'Certificate'
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "authenticationType")]
public string AuthenticationType {get; set; }
/// <summary>
/// Gets or sets certificate Authentication information for a certificate based
/// authentication connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "certificateAuthentication")]
public CertificateAuthentication CertificateAuthentication {get; set; }
/// <summary>
/// Gets or sets the routing configuration indicating the associated and
/// propagated route tables for this connection.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "routingConfiguration")]
public RoutingConfiguration RoutingConfiguration {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.VirtualNetworkGateway1 == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "VirtualNetworkGateway1");
}
if (this.ConnectionType == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ConnectionType");
}
if (this.VirtualNetworkGateway1 != null)
{
this.VirtualNetworkGateway1.Validate();
}
if (this.VirtualNetworkGateway2 != null)
{
this.VirtualNetworkGateway2.Validate();
}
if (this.LocalNetworkGateway2 != null)
{
this.LocalNetworkGateway2.Validate();
}
if (this.GatewayCustomBgpIPAddresses != null)
{
foreach (var element in this.GatewayCustomBgpIPAddresses)
{
if (element != null)
{
element.Validate();
}
}
}
if (this.IpsecPolicies != null)
{
foreach (var element in this.IpsecPolicies)
{
if (element != null)
{
element.Validate();
}
}
}
if (this.TrafficSelectorPolicies != null)
{
foreach (var element in this.TrafficSelectorPolicies)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}