1package network
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-04-01/network"
33
34// Access enumerates the values for access.
35type Access string
36
37const (
38	// Allow ...
39	Allow Access = "Allow"
40	// Deny ...
41	Deny Access = "Deny"
42)
43
44// PossibleAccessValues returns an array of possible values for the Access const type.
45func PossibleAccessValues() []Access {
46	return []Access{Allow, Deny}
47}
48
49// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health
50// server health.
51type ApplicationGatewayBackendHealthServerHealth string
52
53const (
54	// Down ...
55	Down ApplicationGatewayBackendHealthServerHealth = "Down"
56	// Draining ...
57	Draining ApplicationGatewayBackendHealthServerHealth = "Draining"
58	// Partial ...
59	Partial ApplicationGatewayBackendHealthServerHealth = "Partial"
60	// Unknown ...
61	Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown"
62	// Up ...
63	Up ApplicationGatewayBackendHealthServerHealth = "Up"
64)
65
66// PossibleApplicationGatewayBackendHealthServerHealthValues returns an array of possible values for the ApplicationGatewayBackendHealthServerHealth const type.
67func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGatewayBackendHealthServerHealth {
68	return []ApplicationGatewayBackendHealthServerHealth{Down, Draining, Partial, Unknown, Up}
69}
70
71// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity.
72type ApplicationGatewayCookieBasedAffinity string
73
74const (
75	// Disabled ...
76	Disabled ApplicationGatewayCookieBasedAffinity = "Disabled"
77	// Enabled ...
78	Enabled ApplicationGatewayCookieBasedAffinity = "Enabled"
79)
80
81// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type.
82func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity {
83	return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled}
84}
85
86// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode.
87type ApplicationGatewayFirewallMode string
88
89const (
90	// Detection ...
91	Detection ApplicationGatewayFirewallMode = "Detection"
92	// Prevention ...
93	Prevention ApplicationGatewayFirewallMode = "Prevention"
94)
95
96// PossibleApplicationGatewayFirewallModeValues returns an array of possible values for the ApplicationGatewayFirewallMode const type.
97func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewallMode {
98	return []ApplicationGatewayFirewallMode{Detection, Prevention}
99}
100
101// ApplicationGatewayOperationalState enumerates the values for application gateway operational state.
102type ApplicationGatewayOperationalState string
103
104const (
105	// Running ...
106	Running ApplicationGatewayOperationalState = "Running"
107	// Starting ...
108	Starting ApplicationGatewayOperationalState = "Starting"
109	// Stopped ...
110	Stopped ApplicationGatewayOperationalState = "Stopped"
111	// Stopping ...
112	Stopping ApplicationGatewayOperationalState = "Stopping"
113)
114
115// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type.
116func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState {
117	return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping}
118}
119
120// ApplicationGatewayProtocol enumerates the values for application gateway protocol.
121type ApplicationGatewayProtocol string
122
123const (
124	// HTTP ...
125	HTTP ApplicationGatewayProtocol = "Http"
126	// HTTPS ...
127	HTTPS ApplicationGatewayProtocol = "Https"
128)
129
130// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type.
131func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol {
132	return []ApplicationGatewayProtocol{HTTP, HTTPS}
133}
134
135// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type.
136type ApplicationGatewayRedirectType string
137
138const (
139	// Found ...
140	Found ApplicationGatewayRedirectType = "Found"
141	// Permanent ...
142	Permanent ApplicationGatewayRedirectType = "Permanent"
143	// SeeOther ...
144	SeeOther ApplicationGatewayRedirectType = "SeeOther"
145	// Temporary ...
146	Temporary ApplicationGatewayRedirectType = "Temporary"
147)
148
149// PossibleApplicationGatewayRedirectTypeValues returns an array of possible values for the ApplicationGatewayRedirectType const type.
150func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirectType {
151	return []ApplicationGatewayRedirectType{Found, Permanent, SeeOther, Temporary}
152}
153
154// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule
155// type.
156type ApplicationGatewayRequestRoutingRuleType string
157
158const (
159	// Basic ...
160	Basic ApplicationGatewayRequestRoutingRuleType = "Basic"
161	// PathBasedRouting ...
162	PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting"
163)
164
165// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type.
166func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType {
167	return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting}
168}
169
170// ApplicationGatewaySkuName enumerates the values for application gateway sku name.
171type ApplicationGatewaySkuName string
172
173const (
174	// StandardLarge ...
175	StandardLarge ApplicationGatewaySkuName = "Standard_Large"
176	// StandardMedium ...
177	StandardMedium ApplicationGatewaySkuName = "Standard_Medium"
178	// StandardSmall ...
179	StandardSmall ApplicationGatewaySkuName = "Standard_Small"
180	// StandardV2 ...
181	StandardV2 ApplicationGatewaySkuName = "Standard_v2"
182	// WAFLarge ...
183	WAFLarge ApplicationGatewaySkuName = "WAF_Large"
184	// WAFMedium ...
185	WAFMedium ApplicationGatewaySkuName = "WAF_Medium"
186	// WAFV2 ...
187	WAFV2 ApplicationGatewaySkuName = "WAF_v2"
188)
189
190// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type.
191func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName {
192	return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall, StandardV2, WAFLarge, WAFMedium, WAFV2}
193}
194
195// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite.
196type ApplicationGatewaySslCipherSuite string
197
198const (
199	// TLSDHEDSSWITH3DESEDECBCSHA ...
200	TLSDHEDSSWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
201	// TLSDHEDSSWITHAES128CBCSHA ...
202	TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
203	// TLSDHEDSSWITHAES128CBCSHA256 ...
204	TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
205	// TLSDHEDSSWITHAES256CBCSHA ...
206	TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
207	// TLSDHEDSSWITHAES256CBCSHA256 ...
208	TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
209	// TLSDHERSAWITHAES128CBCSHA ...
210	TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
211	// TLSDHERSAWITHAES128GCMSHA256 ...
212	TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"
213	// TLSDHERSAWITHAES256CBCSHA ...
214	TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
215	// TLSDHERSAWITHAES256GCMSHA384 ...
216	TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
217	// TLSECDHEECDSAWITHAES128CBCSHA ...
218	TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
219	// TLSECDHEECDSAWITHAES128CBCSHA256 ...
220	TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
221	// TLSECDHEECDSAWITHAES128GCMSHA256 ...
222	TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
223	// TLSECDHEECDSAWITHAES256CBCSHA ...
224	TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
225	// TLSECDHEECDSAWITHAES256CBCSHA384 ...
226	TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"
227	// TLSECDHEECDSAWITHAES256GCMSHA384 ...
228	TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
229	// TLSECDHERSAWITHAES128CBCSHA ...
230	TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
231	// TLSECDHERSAWITHAES128CBCSHA256 ...
232	TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
233	// TLSECDHERSAWITHAES128GCMSHA256 ...
234	TLSECDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
235	// TLSECDHERSAWITHAES256CBCSHA ...
236	TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
237	// TLSECDHERSAWITHAES256CBCSHA384 ...
238	TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"
239	// TLSECDHERSAWITHAES256GCMSHA384 ...
240	TLSECDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
241	// TLSRSAWITH3DESEDECBCSHA ...
242	TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
243	// TLSRSAWITHAES128CBCSHA ...
244	TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA"
245	// TLSRSAWITHAES128CBCSHA256 ...
246	TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256"
247	// TLSRSAWITHAES128GCMSHA256 ...
248	TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256"
249	// TLSRSAWITHAES256CBCSHA ...
250	TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA"
251	// TLSRSAWITHAES256CBCSHA256 ...
252	TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256"
253	// TLSRSAWITHAES256GCMSHA384 ...
254	TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384"
255)
256
257// PossibleApplicationGatewaySslCipherSuiteValues returns an array of possible values for the ApplicationGatewaySslCipherSuite const type.
258func PossibleApplicationGatewaySslCipherSuiteValues() []ApplicationGatewaySslCipherSuite {
259	return []ApplicationGatewaySslCipherSuite{TLSDHEDSSWITH3DESEDECBCSHA, TLSDHEDSSWITHAES128CBCSHA, TLSDHEDSSWITHAES128CBCSHA256, TLSDHEDSSWITHAES256CBCSHA, TLSDHEDSSWITHAES256CBCSHA256, TLSDHERSAWITHAES128CBCSHA, TLSDHERSAWITHAES128GCMSHA256, TLSDHERSAWITHAES256CBCSHA, TLSDHERSAWITHAES256GCMSHA384, TLSECDHEECDSAWITHAES128CBCSHA, TLSECDHEECDSAWITHAES128CBCSHA256, TLSECDHEECDSAWITHAES128GCMSHA256, TLSECDHEECDSAWITHAES256CBCSHA, TLSECDHEECDSAWITHAES256CBCSHA384, TLSECDHEECDSAWITHAES256GCMSHA384, TLSECDHERSAWITHAES128CBCSHA, TLSECDHERSAWITHAES128CBCSHA256, TLSECDHERSAWITHAES128GCMSHA256, TLSECDHERSAWITHAES256CBCSHA, TLSECDHERSAWITHAES256CBCSHA384, TLSECDHERSAWITHAES256GCMSHA384, TLSRSAWITH3DESEDECBCSHA, TLSRSAWITHAES128CBCSHA, TLSRSAWITHAES128CBCSHA256, TLSRSAWITHAES128GCMSHA256, TLSRSAWITHAES256CBCSHA, TLSRSAWITHAES256CBCSHA256, TLSRSAWITHAES256GCMSHA384}
260}
261
262// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name.
263type ApplicationGatewaySslPolicyName string
264
265const (
266	// AppGwSslPolicy20150501 ...
267	AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501"
268	// AppGwSslPolicy20170401 ...
269	AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401"
270	// AppGwSslPolicy20170401S ...
271	AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S"
272)
273
274// PossibleApplicationGatewaySslPolicyNameValues returns an array of possible values for the ApplicationGatewaySslPolicyName const type.
275func PossibleApplicationGatewaySslPolicyNameValues() []ApplicationGatewaySslPolicyName {
276	return []ApplicationGatewaySslPolicyName{AppGwSslPolicy20150501, AppGwSslPolicy20170401, AppGwSslPolicy20170401S}
277}
278
279// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type.
280type ApplicationGatewaySslPolicyType string
281
282const (
283	// Custom ...
284	Custom ApplicationGatewaySslPolicyType = "Custom"
285	// Predefined ...
286	Predefined ApplicationGatewaySslPolicyType = "Predefined"
287)
288
289// PossibleApplicationGatewaySslPolicyTypeValues returns an array of possible values for the ApplicationGatewaySslPolicyType const type.
290func PossibleApplicationGatewaySslPolicyTypeValues() []ApplicationGatewaySslPolicyType {
291	return []ApplicationGatewaySslPolicyType{Custom, Predefined}
292}
293
294// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol.
295type ApplicationGatewaySslProtocol string
296
297const (
298	// TLSv10 ...
299	TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0"
300	// TLSv11 ...
301	TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1"
302	// TLSv12 ...
303	TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2"
304)
305
306// PossibleApplicationGatewaySslProtocolValues returns an array of possible values for the ApplicationGatewaySslProtocol const type.
307func PossibleApplicationGatewaySslProtocolValues() []ApplicationGatewaySslProtocol {
308	return []ApplicationGatewaySslProtocol{TLSv10, TLSv11, TLSv12}
309}
310
311// ApplicationGatewayTier enumerates the values for application gateway tier.
312type ApplicationGatewayTier string
313
314const (
315	// ApplicationGatewayTierStandard ...
316	ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard"
317	// ApplicationGatewayTierStandardV2 ...
318	ApplicationGatewayTierStandardV2 ApplicationGatewayTier = "Standard_v2"
319	// ApplicationGatewayTierWAF ...
320	ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF"
321	// ApplicationGatewayTierWAFV2 ...
322	ApplicationGatewayTierWAFV2 ApplicationGatewayTier = "WAF_v2"
323)
324
325// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type.
326func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier {
327	return []ApplicationGatewayTier{ApplicationGatewayTierStandard, ApplicationGatewayTierStandardV2, ApplicationGatewayTierWAF, ApplicationGatewayTierWAFV2}
328}
329
330// AssociationType enumerates the values for association type.
331type AssociationType string
332
333const (
334	// Associated ...
335	Associated AssociationType = "Associated"
336	// Contains ...
337	Contains AssociationType = "Contains"
338)
339
340// PossibleAssociationTypeValues returns an array of possible values for the AssociationType const type.
341func PossibleAssociationTypeValues() []AssociationType {
342	return []AssociationType{Associated, Contains}
343}
344
345// AuthenticationMethod enumerates the values for authentication method.
346type AuthenticationMethod string
347
348const (
349	// EAPMSCHAPv2 ...
350	EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2"
351	// EAPTLS ...
352	EAPTLS AuthenticationMethod = "EAPTLS"
353)
354
355// PossibleAuthenticationMethodValues returns an array of possible values for the AuthenticationMethod const type.
356func PossibleAuthenticationMethodValues() []AuthenticationMethod {
357	return []AuthenticationMethod{EAPMSCHAPv2, EAPTLS}
358}
359
360// AuthorizationUseStatus enumerates the values for authorization use status.
361type AuthorizationUseStatus string
362
363const (
364	// Available ...
365	Available AuthorizationUseStatus = "Available"
366	// InUse ...
367	InUse AuthorizationUseStatus = "InUse"
368)
369
370// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type.
371func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus {
372	return []AuthorizationUseStatus{Available, InUse}
373}
374
375// AzureFirewallApplicationRuleProtocolType enumerates the values for azure firewall application rule protocol
376// type.
377type AzureFirewallApplicationRuleProtocolType string
378
379const (
380	// AzureFirewallApplicationRuleProtocolTypeHTTP ...
381	AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http"
382	// AzureFirewallApplicationRuleProtocolTypeHTTPS ...
383	AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https"
384)
385
386// PossibleAzureFirewallApplicationRuleProtocolTypeValues returns an array of possible values for the AzureFirewallApplicationRuleProtocolType const type.
387func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApplicationRuleProtocolType {
388	return []AzureFirewallApplicationRuleProtocolType{AzureFirewallApplicationRuleProtocolTypeHTTP, AzureFirewallApplicationRuleProtocolTypeHTTPS}
389}
390
391// AzureFirewallNetworkRuleProtocol enumerates the values for azure firewall network rule protocol.
392type AzureFirewallNetworkRuleProtocol string
393
394const (
395	// Any ...
396	Any AzureFirewallNetworkRuleProtocol = "Any"
397	// ICMP ...
398	ICMP AzureFirewallNetworkRuleProtocol = "ICMP"
399	// TCP ...
400	TCP AzureFirewallNetworkRuleProtocol = "TCP"
401	// UDP ...
402	UDP AzureFirewallNetworkRuleProtocol = "UDP"
403)
404
405// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type.
406func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol {
407	return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP}
408}
409
410// AzureFirewallRCActionType enumerates the values for azure firewall rc action type.
411type AzureFirewallRCActionType string
412
413const (
414	// AzureFirewallRCActionTypeAllow ...
415	AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow"
416	// AzureFirewallRCActionTypeDeny ...
417	AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny"
418)
419
420// PossibleAzureFirewallRCActionTypeValues returns an array of possible values for the AzureFirewallRCActionType const type.
421func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType {
422	return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny}
423}
424
425// BgpPeerState enumerates the values for bgp peer state.
426type BgpPeerState string
427
428const (
429	// BgpPeerStateConnected ...
430	BgpPeerStateConnected BgpPeerState = "Connected"
431	// BgpPeerStateConnecting ...
432	BgpPeerStateConnecting BgpPeerState = "Connecting"
433	// BgpPeerStateIdle ...
434	BgpPeerStateIdle BgpPeerState = "Idle"
435	// BgpPeerStateStopped ...
436	BgpPeerStateStopped BgpPeerState = "Stopped"
437	// BgpPeerStateUnknown ...
438	BgpPeerStateUnknown BgpPeerState = "Unknown"
439)
440
441// PossibleBgpPeerStateValues returns an array of possible values for the BgpPeerState const type.
442func PossibleBgpPeerStateValues() []BgpPeerState {
443	return []BgpPeerState{BgpPeerStateConnected, BgpPeerStateConnecting, BgpPeerStateIdle, BgpPeerStateStopped, BgpPeerStateUnknown}
444}
445
446// CircuitConnectionStatus enumerates the values for circuit connection status.
447type CircuitConnectionStatus string
448
449const (
450	// Connected ...
451	Connected CircuitConnectionStatus = "Connected"
452	// Connecting ...
453	Connecting CircuitConnectionStatus = "Connecting"
454	// Disconnected ...
455	Disconnected CircuitConnectionStatus = "Disconnected"
456)
457
458// PossibleCircuitConnectionStatusValues returns an array of possible values for the CircuitConnectionStatus const type.
459func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus {
460	return []CircuitConnectionStatus{Connected, Connecting, Disconnected}
461}
462
463// ConnectionMonitorSourceStatus enumerates the values for connection monitor source status.
464type ConnectionMonitorSourceStatus string
465
466const (
467	// Active ...
468	Active ConnectionMonitorSourceStatus = "Active"
469	// Inactive ...
470	Inactive ConnectionMonitorSourceStatus = "Inactive"
471	// Uknown ...
472	Uknown ConnectionMonitorSourceStatus = "Uknown"
473)
474
475// PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type.
476func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus {
477	return []ConnectionMonitorSourceStatus{Active, Inactive, Uknown}
478}
479
480// ConnectionState enumerates the values for connection state.
481type ConnectionState string
482
483const (
484	// ConnectionStateReachable ...
485	ConnectionStateReachable ConnectionState = "Reachable"
486	// ConnectionStateUnknown ...
487	ConnectionStateUnknown ConnectionState = "Unknown"
488	// ConnectionStateUnreachable ...
489	ConnectionStateUnreachable ConnectionState = "Unreachable"
490)
491
492// PossibleConnectionStateValues returns an array of possible values for the ConnectionState const type.
493func PossibleConnectionStateValues() []ConnectionState {
494	return []ConnectionState{ConnectionStateReachable, ConnectionStateUnknown, ConnectionStateUnreachable}
495}
496
497// ConnectionStatus enumerates the values for connection status.
498type ConnectionStatus string
499
500const (
501	// ConnectionStatusConnected ...
502	ConnectionStatusConnected ConnectionStatus = "Connected"
503	// ConnectionStatusDegraded ...
504	ConnectionStatusDegraded ConnectionStatus = "Degraded"
505	// ConnectionStatusDisconnected ...
506	ConnectionStatusDisconnected ConnectionStatus = "Disconnected"
507	// ConnectionStatusUnknown ...
508	ConnectionStatusUnknown ConnectionStatus = "Unknown"
509)
510
511// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type.
512func PossibleConnectionStatusValues() []ConnectionStatus {
513	return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown}
514}
515
516// DhGroup enumerates the values for dh group.
517type DhGroup string
518
519const (
520	// DHGroup1 ...
521	DHGroup1 DhGroup = "DHGroup1"
522	// DHGroup14 ...
523	DHGroup14 DhGroup = "DHGroup14"
524	// DHGroup2 ...
525	DHGroup2 DhGroup = "DHGroup2"
526	// DHGroup2048 ...
527	DHGroup2048 DhGroup = "DHGroup2048"
528	// DHGroup24 ...
529	DHGroup24 DhGroup = "DHGroup24"
530	// ECP256 ...
531	ECP256 DhGroup = "ECP256"
532	// ECP384 ...
533	ECP384 DhGroup = "ECP384"
534	// None ...
535	None DhGroup = "None"
536)
537
538// PossibleDhGroupValues returns an array of possible values for the DhGroup const type.
539func PossibleDhGroupValues() []DhGroup {
540	return []DhGroup{DHGroup1, DHGroup14, DHGroup2, DHGroup2048, DHGroup24, ECP256, ECP384, None}
541}
542
543// Direction enumerates the values for direction.
544type Direction string
545
546const (
547	// Inbound ...
548	Inbound Direction = "Inbound"
549	// Outbound ...
550	Outbound Direction = "Outbound"
551)
552
553// PossibleDirectionValues returns an array of possible values for the Direction const type.
554func PossibleDirectionValues() []Direction {
555	return []Direction{Inbound, Outbound}
556}
557
558// EffectiveRouteSource enumerates the values for effective route source.
559type EffectiveRouteSource string
560
561const (
562	// EffectiveRouteSourceDefault ...
563	EffectiveRouteSourceDefault EffectiveRouteSource = "Default"
564	// EffectiveRouteSourceUnknown ...
565	EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown"
566	// EffectiveRouteSourceUser ...
567	EffectiveRouteSourceUser EffectiveRouteSource = "User"
568	// EffectiveRouteSourceVirtualNetworkGateway ...
569	EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway"
570)
571
572// PossibleEffectiveRouteSourceValues returns an array of possible values for the EffectiveRouteSource const type.
573func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource {
574	return []EffectiveRouteSource{EffectiveRouteSourceDefault, EffectiveRouteSourceUnknown, EffectiveRouteSourceUser, EffectiveRouteSourceVirtualNetworkGateway}
575}
576
577// EffectiveRouteState enumerates the values for effective route state.
578type EffectiveRouteState string
579
580const (
581	// EffectiveRouteStateActive ...
582	EffectiveRouteStateActive EffectiveRouteState = "Active"
583	// EffectiveRouteStateInvalid ...
584	EffectiveRouteStateInvalid EffectiveRouteState = "Invalid"
585)
586
587// PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type.
588func PossibleEffectiveRouteStateValues() []EffectiveRouteState {
589	return []EffectiveRouteState{EffectiveRouteStateActive, EffectiveRouteStateInvalid}
590}
591
592// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol.
593type EffectiveSecurityRuleProtocol string
594
595const (
596	// EffectiveSecurityRuleProtocolAll ...
597	EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All"
598	// EffectiveSecurityRuleProtocolTCP ...
599	EffectiveSecurityRuleProtocolTCP EffectiveSecurityRuleProtocol = "Tcp"
600	// EffectiveSecurityRuleProtocolUDP ...
601	EffectiveSecurityRuleProtocolUDP EffectiveSecurityRuleProtocol = "Udp"
602)
603
604// PossibleEffectiveSecurityRuleProtocolValues returns an array of possible values for the EffectiveSecurityRuleProtocol const type.
605func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtocol {
606	return []EffectiveSecurityRuleProtocol{EffectiveSecurityRuleProtocolAll, EffectiveSecurityRuleProtocolTCP, EffectiveSecurityRuleProtocolUDP}
607}
608
609// EvaluationState enumerates the values for evaluation state.
610type EvaluationState string
611
612const (
613	// Completed ...
614	Completed EvaluationState = "Completed"
615	// InProgress ...
616	InProgress EvaluationState = "InProgress"
617	// NotStarted ...
618	NotStarted EvaluationState = "NotStarted"
619)
620
621// PossibleEvaluationStateValues returns an array of possible values for the EvaluationState const type.
622func PossibleEvaluationStateValues() []EvaluationState {
623	return []EvaluationState{Completed, InProgress, NotStarted}
624}
625
626// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit
627// peering advertised public prefix state.
628type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string
629
630const (
631	// Configured ...
632	Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured"
633	// Configuring ...
634	Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring"
635	// NotConfigured ...
636	NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured"
637	// ValidationNeeded ...
638	ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded"
639)
640
641// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type.
642func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState {
643	return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded}
644}
645
646// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state.
647type ExpressRouteCircuitPeeringState string
648
649const (
650	// ExpressRouteCircuitPeeringStateDisabled ...
651	ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled"
652	// ExpressRouteCircuitPeeringStateEnabled ...
653	ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled"
654)
655
656// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type.
657func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState {
658	return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled}
659}
660
661// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family.
662type ExpressRouteCircuitSkuFamily string
663
664const (
665	// MeteredData ...
666	MeteredData ExpressRouteCircuitSkuFamily = "MeteredData"
667	// UnlimitedData ...
668	UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData"
669)
670
671// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type.
672func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily {
673	return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData}
674}
675
676// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier.
677type ExpressRouteCircuitSkuTier string
678
679const (
680	// Premium ...
681	Premium ExpressRouteCircuitSkuTier = "Premium"
682	// Standard ...
683	Standard ExpressRouteCircuitSkuTier = "Standard"
684)
685
686// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type.
687func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
688	return []ExpressRouteCircuitSkuTier{Premium, Standard}
689}
690
691// ExpressRoutePeeringState enumerates the values for express route peering state.
692type ExpressRoutePeeringState string
693
694const (
695	// ExpressRoutePeeringStateDisabled ...
696	ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled"
697	// ExpressRoutePeeringStateEnabled ...
698	ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled"
699)
700
701// PossibleExpressRoutePeeringStateValues returns an array of possible values for the ExpressRoutePeeringState const type.
702func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState {
703	return []ExpressRoutePeeringState{ExpressRoutePeeringStateDisabled, ExpressRoutePeeringStateEnabled}
704}
705
706// ExpressRoutePeeringType enumerates the values for express route peering type.
707type ExpressRoutePeeringType string
708
709const (
710	// AzurePrivatePeering ...
711	AzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering"
712	// AzurePublicPeering ...
713	AzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering"
714	// MicrosoftPeering ...
715	MicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering"
716)
717
718// PossibleExpressRoutePeeringTypeValues returns an array of possible values for the ExpressRoutePeeringType const type.
719func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType {
720	return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
721}
722
723// HTTPMethod enumerates the values for http method.
724type HTTPMethod string
725
726const (
727	// Get ...
728	Get HTTPMethod = "Get"
729)
730
731// PossibleHTTPMethodValues returns an array of possible values for the HTTPMethod const type.
732func PossibleHTTPMethodValues() []HTTPMethod {
733	return []HTTPMethod{Get}
734}
735
736// HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status.
737type HubVirtualNetworkConnectionStatus string
738
739const (
740	// HubVirtualNetworkConnectionStatusConnected ...
741	HubVirtualNetworkConnectionStatusConnected HubVirtualNetworkConnectionStatus = "Connected"
742	// HubVirtualNetworkConnectionStatusConnecting ...
743	HubVirtualNetworkConnectionStatusConnecting HubVirtualNetworkConnectionStatus = "Connecting"
744	// HubVirtualNetworkConnectionStatusNotConnected ...
745	HubVirtualNetworkConnectionStatusNotConnected HubVirtualNetworkConnectionStatus = "NotConnected"
746	// HubVirtualNetworkConnectionStatusUnknown ...
747	HubVirtualNetworkConnectionStatusUnknown HubVirtualNetworkConnectionStatus = "Unknown"
748)
749
750// PossibleHubVirtualNetworkConnectionStatusValues returns an array of possible values for the HubVirtualNetworkConnectionStatus const type.
751func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnectionStatus {
752	return []HubVirtualNetworkConnectionStatus{HubVirtualNetworkConnectionStatusConnected, HubVirtualNetworkConnectionStatusConnecting, HubVirtualNetworkConnectionStatusNotConnected, HubVirtualNetworkConnectionStatusUnknown}
753}
754
755// IkeEncryption enumerates the values for ike encryption.
756type IkeEncryption string
757
758const (
759	// AES128 ...
760	AES128 IkeEncryption = "AES128"
761	// AES192 ...
762	AES192 IkeEncryption = "AES192"
763	// AES256 ...
764	AES256 IkeEncryption = "AES256"
765	// DES ...
766	DES IkeEncryption = "DES"
767	// DES3 ...
768	DES3 IkeEncryption = "DES3"
769	// GCMAES128 ...
770	GCMAES128 IkeEncryption = "GCMAES128"
771	// GCMAES256 ...
772	GCMAES256 IkeEncryption = "GCMAES256"
773)
774
775// PossibleIkeEncryptionValues returns an array of possible values for the IkeEncryption const type.
776func PossibleIkeEncryptionValues() []IkeEncryption {
777	return []IkeEncryption{AES128, AES192, AES256, DES, DES3, GCMAES128, GCMAES256}
778}
779
780// IkeIntegrity enumerates the values for ike integrity.
781type IkeIntegrity string
782
783const (
784	// IkeIntegrityGCMAES128 ...
785	IkeIntegrityGCMAES128 IkeIntegrity = "GCMAES128"
786	// IkeIntegrityGCMAES256 ...
787	IkeIntegrityGCMAES256 IkeIntegrity = "GCMAES256"
788	// IkeIntegrityMD5 ...
789	IkeIntegrityMD5 IkeIntegrity = "MD5"
790	// IkeIntegritySHA1 ...
791	IkeIntegritySHA1 IkeIntegrity = "SHA1"
792	// IkeIntegritySHA256 ...
793	IkeIntegritySHA256 IkeIntegrity = "SHA256"
794	// IkeIntegritySHA384 ...
795	IkeIntegritySHA384 IkeIntegrity = "SHA384"
796)
797
798// PossibleIkeIntegrityValues returns an array of possible values for the IkeIntegrity const type.
799func PossibleIkeIntegrityValues() []IkeIntegrity {
800	return []IkeIntegrity{IkeIntegrityGCMAES128, IkeIntegrityGCMAES256, IkeIntegrityMD5, IkeIntegritySHA1, IkeIntegritySHA256, IkeIntegritySHA384}
801}
802
803// IPAllocationMethod enumerates the values for ip allocation method.
804type IPAllocationMethod string
805
806const (
807	// Dynamic ...
808	Dynamic IPAllocationMethod = "Dynamic"
809	// Static ...
810	Static IPAllocationMethod = "Static"
811)
812
813// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type.
814func PossibleIPAllocationMethodValues() []IPAllocationMethod {
815	return []IPAllocationMethod{Dynamic, Static}
816}
817
818// IPFlowProtocol enumerates the values for ip flow protocol.
819type IPFlowProtocol string
820
821const (
822	// IPFlowProtocolTCP ...
823	IPFlowProtocolTCP IPFlowProtocol = "TCP"
824	// IPFlowProtocolUDP ...
825	IPFlowProtocolUDP IPFlowProtocol = "UDP"
826)
827
828// PossibleIPFlowProtocolValues returns an array of possible values for the IPFlowProtocol const type.
829func PossibleIPFlowProtocolValues() []IPFlowProtocol {
830	return []IPFlowProtocol{IPFlowProtocolTCP, IPFlowProtocolUDP}
831}
832
833// IpsecEncryption enumerates the values for ipsec encryption.
834type IpsecEncryption string
835
836const (
837	// IpsecEncryptionAES128 ...
838	IpsecEncryptionAES128 IpsecEncryption = "AES128"
839	// IpsecEncryptionAES192 ...
840	IpsecEncryptionAES192 IpsecEncryption = "AES192"
841	// IpsecEncryptionAES256 ...
842	IpsecEncryptionAES256 IpsecEncryption = "AES256"
843	// IpsecEncryptionDES ...
844	IpsecEncryptionDES IpsecEncryption = "DES"
845	// IpsecEncryptionDES3 ...
846	IpsecEncryptionDES3 IpsecEncryption = "DES3"
847	// IpsecEncryptionGCMAES128 ...
848	IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128"
849	// IpsecEncryptionGCMAES192 ...
850	IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192"
851	// IpsecEncryptionGCMAES256 ...
852	IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256"
853	// IpsecEncryptionNone ...
854	IpsecEncryptionNone IpsecEncryption = "None"
855)
856
857// PossibleIpsecEncryptionValues returns an array of possible values for the IpsecEncryption const type.
858func PossibleIpsecEncryptionValues() []IpsecEncryption {
859	return []IpsecEncryption{IpsecEncryptionAES128, IpsecEncryptionAES192, IpsecEncryptionAES256, IpsecEncryptionDES, IpsecEncryptionDES3, IpsecEncryptionGCMAES128, IpsecEncryptionGCMAES192, IpsecEncryptionGCMAES256, IpsecEncryptionNone}
860}
861
862// IpsecIntegrity enumerates the values for ipsec integrity.
863type IpsecIntegrity string
864
865const (
866	// IpsecIntegrityGCMAES128 ...
867	IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128"
868	// IpsecIntegrityGCMAES192 ...
869	IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192"
870	// IpsecIntegrityGCMAES256 ...
871	IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256"
872	// IpsecIntegrityMD5 ...
873	IpsecIntegrityMD5 IpsecIntegrity = "MD5"
874	// IpsecIntegritySHA1 ...
875	IpsecIntegritySHA1 IpsecIntegrity = "SHA1"
876	// IpsecIntegritySHA256 ...
877	IpsecIntegritySHA256 IpsecIntegrity = "SHA256"
878)
879
880// PossibleIpsecIntegrityValues returns an array of possible values for the IpsecIntegrity const type.
881func PossibleIpsecIntegrityValues() []IpsecIntegrity {
882	return []IpsecIntegrity{IpsecIntegrityGCMAES128, IpsecIntegrityGCMAES192, IpsecIntegrityGCMAES256, IpsecIntegrityMD5, IpsecIntegritySHA1, IpsecIntegritySHA256}
883}
884
885// IPVersion enumerates the values for ip version.
886type IPVersion string
887
888const (
889	// IPv4 ...
890	IPv4 IPVersion = "IPv4"
891	// IPv6 ...
892	IPv6 IPVersion = "IPv6"
893)
894
895// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
896func PossibleIPVersionValues() []IPVersion {
897	return []IPVersion{IPv4, IPv6}
898}
899
900// IssueType enumerates the values for issue type.
901type IssueType string
902
903const (
904	// IssueTypeAgentStopped ...
905	IssueTypeAgentStopped IssueType = "AgentStopped"
906	// IssueTypeDNSResolution ...
907	IssueTypeDNSResolution IssueType = "DnsResolution"
908	// IssueTypeGuestFirewall ...
909	IssueTypeGuestFirewall IssueType = "GuestFirewall"
910	// IssueTypeNetworkSecurityRule ...
911	IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule"
912	// IssueTypePlatform ...
913	IssueTypePlatform IssueType = "Platform"
914	// IssueTypePortThrottled ...
915	IssueTypePortThrottled IssueType = "PortThrottled"
916	// IssueTypeSocketBind ...
917	IssueTypeSocketBind IssueType = "SocketBind"
918	// IssueTypeUnknown ...
919	IssueTypeUnknown IssueType = "Unknown"
920	// IssueTypeUserDefinedRoute ...
921	IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute"
922)
923
924// PossibleIssueTypeValues returns an array of possible values for the IssueType const type.
925func PossibleIssueTypeValues() []IssueType {
926	return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute}
927}
928
929// LoadBalancerSkuName enumerates the values for load balancer sku name.
930type LoadBalancerSkuName string
931
932const (
933	// LoadBalancerSkuNameBasic ...
934	LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic"
935	// LoadBalancerSkuNameStandard ...
936	LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard"
937)
938
939// PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type.
940func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName {
941	return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard}
942}
943
944// LoadDistribution enumerates the values for load distribution.
945type LoadDistribution string
946
947const (
948	// Default ...
949	Default LoadDistribution = "Default"
950	// SourceIP ...
951	SourceIP LoadDistribution = "SourceIP"
952	// SourceIPProtocol ...
953	SourceIPProtocol LoadDistribution = "SourceIPProtocol"
954)
955
956// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type.
957func PossibleLoadDistributionValues() []LoadDistribution {
958	return []LoadDistribution{Default, SourceIP, SourceIPProtocol}
959}
960
961// NextHopType enumerates the values for next hop type.
962type NextHopType string
963
964const (
965	// NextHopTypeHyperNetGateway ...
966	NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway"
967	// NextHopTypeInternet ...
968	NextHopTypeInternet NextHopType = "Internet"
969	// NextHopTypeNone ...
970	NextHopTypeNone NextHopType = "None"
971	// NextHopTypeVirtualAppliance ...
972	NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance"
973	// NextHopTypeVirtualNetworkGateway ...
974	NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway"
975	// NextHopTypeVnetLocal ...
976	NextHopTypeVnetLocal NextHopType = "VnetLocal"
977)
978
979// PossibleNextHopTypeValues returns an array of possible values for the NextHopType const type.
980func PossibleNextHopTypeValues() []NextHopType {
981	return []NextHopType{NextHopTypeHyperNetGateway, NextHopTypeInternet, NextHopTypeNone, NextHopTypeVirtualAppliance, NextHopTypeVirtualNetworkGateway, NextHopTypeVnetLocal}
982}
983
984// OperationStatus enumerates the values for operation status.
985type OperationStatus string
986
987const (
988	// OperationStatusFailed ...
989	OperationStatusFailed OperationStatus = "Failed"
990	// OperationStatusInProgress ...
991	OperationStatusInProgress OperationStatus = "InProgress"
992	// OperationStatusSucceeded ...
993	OperationStatusSucceeded OperationStatus = "Succeeded"
994)
995
996// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type.
997func PossibleOperationStatusValues() []OperationStatus {
998	return []OperationStatus{OperationStatusFailed, OperationStatusInProgress, OperationStatusSucceeded}
999}
1000
1001// Origin enumerates the values for origin.
1002type Origin string
1003
1004const (
1005	// OriginInbound ...
1006	OriginInbound Origin = "Inbound"
1007	// OriginLocal ...
1008	OriginLocal Origin = "Local"
1009	// OriginOutbound ...
1010	OriginOutbound Origin = "Outbound"
1011)
1012
1013// PossibleOriginValues returns an array of possible values for the Origin const type.
1014func PossibleOriginValues() []Origin {
1015	return []Origin{OriginInbound, OriginLocal, OriginOutbound}
1016}
1017
1018// PcError enumerates the values for pc error.
1019type PcError string
1020
1021const (
1022	// AgentStopped ...
1023	AgentStopped PcError = "AgentStopped"
1024	// CaptureFailed ...
1025	CaptureFailed PcError = "CaptureFailed"
1026	// InternalError ...
1027	InternalError PcError = "InternalError"
1028	// LocalFileFailed ...
1029	LocalFileFailed PcError = "LocalFileFailed"
1030	// StorageFailed ...
1031	StorageFailed PcError = "StorageFailed"
1032)
1033
1034// PossiblePcErrorValues returns an array of possible values for the PcError const type.
1035func PossiblePcErrorValues() []PcError {
1036	return []PcError{AgentStopped, CaptureFailed, InternalError, LocalFileFailed, StorageFailed}
1037}
1038
1039// PcProtocol enumerates the values for pc protocol.
1040type PcProtocol string
1041
1042const (
1043	// PcProtocolAny ...
1044	PcProtocolAny PcProtocol = "Any"
1045	// PcProtocolTCP ...
1046	PcProtocolTCP PcProtocol = "TCP"
1047	// PcProtocolUDP ...
1048	PcProtocolUDP PcProtocol = "UDP"
1049)
1050
1051// PossiblePcProtocolValues returns an array of possible values for the PcProtocol const type.
1052func PossiblePcProtocolValues() []PcProtocol {
1053	return []PcProtocol{PcProtocolAny, PcProtocolTCP, PcProtocolUDP}
1054}
1055
1056// PcStatus enumerates the values for pc status.
1057type PcStatus string
1058
1059const (
1060	// PcStatusError ...
1061	PcStatusError PcStatus = "Error"
1062	// PcStatusNotStarted ...
1063	PcStatusNotStarted PcStatus = "NotStarted"
1064	// PcStatusRunning ...
1065	PcStatusRunning PcStatus = "Running"
1066	// PcStatusStopped ...
1067	PcStatusStopped PcStatus = "Stopped"
1068	// PcStatusUnknown ...
1069	PcStatusUnknown PcStatus = "Unknown"
1070)
1071
1072// PossiblePcStatusValues returns an array of possible values for the PcStatus const type.
1073func PossiblePcStatusValues() []PcStatus {
1074	return []PcStatus{PcStatusError, PcStatusNotStarted, PcStatusRunning, PcStatusStopped, PcStatusUnknown}
1075}
1076
1077// PfsGroup enumerates the values for pfs group.
1078type PfsGroup string
1079
1080const (
1081	// PfsGroupECP256 ...
1082	PfsGroupECP256 PfsGroup = "ECP256"
1083	// PfsGroupECP384 ...
1084	PfsGroupECP384 PfsGroup = "ECP384"
1085	// PfsGroupNone ...
1086	PfsGroupNone PfsGroup = "None"
1087	// PfsGroupPFS1 ...
1088	PfsGroupPFS1 PfsGroup = "PFS1"
1089	// PfsGroupPFS14 ...
1090	PfsGroupPFS14 PfsGroup = "PFS14"
1091	// PfsGroupPFS2 ...
1092	PfsGroupPFS2 PfsGroup = "PFS2"
1093	// PfsGroupPFS2048 ...
1094	PfsGroupPFS2048 PfsGroup = "PFS2048"
1095	// PfsGroupPFS24 ...
1096	PfsGroupPFS24 PfsGroup = "PFS24"
1097	// PfsGroupPFSMM ...
1098	PfsGroupPFSMM PfsGroup = "PFSMM"
1099)
1100
1101// PossiblePfsGroupValues returns an array of possible values for the PfsGroup const type.
1102func PossiblePfsGroupValues() []PfsGroup {
1103	return []PfsGroup{PfsGroupECP256, PfsGroupECP384, PfsGroupNone, PfsGroupPFS1, PfsGroupPFS14, PfsGroupPFS2, PfsGroupPFS2048, PfsGroupPFS24, PfsGroupPFSMM}
1104}
1105
1106// ProbeProtocol enumerates the values for probe protocol.
1107type ProbeProtocol string
1108
1109const (
1110	// ProbeProtocolHTTP ...
1111	ProbeProtocolHTTP ProbeProtocol = "Http"
1112	// ProbeProtocolHTTPS ...
1113	ProbeProtocolHTTPS ProbeProtocol = "Https"
1114	// ProbeProtocolTCP ...
1115	ProbeProtocolTCP ProbeProtocol = "Tcp"
1116)
1117
1118// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type.
1119func PossibleProbeProtocolValues() []ProbeProtocol {
1120	return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolHTTPS, ProbeProtocolTCP}
1121}
1122
1123// ProcessorArchitecture enumerates the values for processor architecture.
1124type ProcessorArchitecture string
1125
1126const (
1127	// Amd64 ...
1128	Amd64 ProcessorArchitecture = "Amd64"
1129	// X86 ...
1130	X86 ProcessorArchitecture = "X86"
1131)
1132
1133// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type.
1134func PossibleProcessorArchitectureValues() []ProcessorArchitecture {
1135	return []ProcessorArchitecture{Amd64, X86}
1136}
1137
1138// Protocol enumerates the values for protocol.
1139type Protocol string
1140
1141const (
1142	// ProtocolHTTP ...
1143	ProtocolHTTP Protocol = "Http"
1144	// ProtocolHTTPS ...
1145	ProtocolHTTPS Protocol = "Https"
1146	// ProtocolIcmp ...
1147	ProtocolIcmp Protocol = "Icmp"
1148	// ProtocolTCP ...
1149	ProtocolTCP Protocol = "Tcp"
1150)
1151
1152// PossibleProtocolValues returns an array of possible values for the Protocol const type.
1153func PossibleProtocolValues() []Protocol {
1154	return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP}
1155}
1156
1157// ProvisioningState enumerates the values for provisioning state.
1158type ProvisioningState string
1159
1160const (
1161	// Deleting ...
1162	Deleting ProvisioningState = "Deleting"
1163	// Failed ...
1164	Failed ProvisioningState = "Failed"
1165	// Succeeded ...
1166	Succeeded ProvisioningState = "Succeeded"
1167	// Updating ...
1168	Updating ProvisioningState = "Updating"
1169)
1170
1171// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
1172func PossibleProvisioningStateValues() []ProvisioningState {
1173	return []ProvisioningState{Deleting, Failed, Succeeded, Updating}
1174}
1175
1176// PublicIPAddressSkuName enumerates the values for public ip address sku name.
1177type PublicIPAddressSkuName string
1178
1179const (
1180	// PublicIPAddressSkuNameBasic ...
1181	PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic"
1182	// PublicIPAddressSkuNameStandard ...
1183	PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard"
1184)
1185
1186// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type.
1187func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
1188	return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard}
1189}
1190
1191// RouteNextHopType enumerates the values for route next hop type.
1192type RouteNextHopType string
1193
1194const (
1195	// RouteNextHopTypeInternet ...
1196	RouteNextHopTypeInternet RouteNextHopType = "Internet"
1197	// RouteNextHopTypeNone ...
1198	RouteNextHopTypeNone RouteNextHopType = "None"
1199	// RouteNextHopTypeVirtualAppliance ...
1200	RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance"
1201	// RouteNextHopTypeVirtualNetworkGateway ...
1202	RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway"
1203	// RouteNextHopTypeVnetLocal ...
1204	RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal"
1205)
1206
1207// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type.
1208func PossibleRouteNextHopTypeValues() []RouteNextHopType {
1209	return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal}
1210}
1211
1212// SecurityRuleAccess enumerates the values for security rule access.
1213type SecurityRuleAccess string
1214
1215const (
1216	// SecurityRuleAccessAllow ...
1217	SecurityRuleAccessAllow SecurityRuleAccess = "Allow"
1218	// SecurityRuleAccessDeny ...
1219	SecurityRuleAccessDeny SecurityRuleAccess = "Deny"
1220)
1221
1222// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type.
1223func PossibleSecurityRuleAccessValues() []SecurityRuleAccess {
1224	return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny}
1225}
1226
1227// SecurityRuleDirection enumerates the values for security rule direction.
1228type SecurityRuleDirection string
1229
1230const (
1231	// SecurityRuleDirectionInbound ...
1232	SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound"
1233	// SecurityRuleDirectionOutbound ...
1234	SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound"
1235)
1236
1237// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type.
1238func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection {
1239	return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound}
1240}
1241
1242// SecurityRuleProtocol enumerates the values for security rule protocol.
1243type SecurityRuleProtocol string
1244
1245const (
1246	// SecurityRuleProtocolAsterisk ...
1247	SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*"
1248	// SecurityRuleProtocolTCP ...
1249	SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp"
1250	// SecurityRuleProtocolUDP ...
1251	SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp"
1252)
1253
1254// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type.
1255func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol {
1256	return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP}
1257}
1258
1259// ServiceProviderProvisioningState enumerates the values for service provider provisioning state.
1260type ServiceProviderProvisioningState string
1261
1262const (
1263	// Deprovisioning ...
1264	Deprovisioning ServiceProviderProvisioningState = "Deprovisioning"
1265	// NotProvisioned ...
1266	NotProvisioned ServiceProviderProvisioningState = "NotProvisioned"
1267	// Provisioned ...
1268	Provisioned ServiceProviderProvisioningState = "Provisioned"
1269	// Provisioning ...
1270	Provisioning ServiceProviderProvisioningState = "Provisioning"
1271)
1272
1273// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type.
1274func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState {
1275	return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning}
1276}
1277
1278// Severity enumerates the values for severity.
1279type Severity string
1280
1281const (
1282	// SeverityError ...
1283	SeverityError Severity = "Error"
1284	// SeverityWarning ...
1285	SeverityWarning Severity = "Warning"
1286)
1287
1288// PossibleSeverityValues returns an array of possible values for the Severity const type.
1289func PossibleSeverityValues() []Severity {
1290	return []Severity{SeverityError, SeverityWarning}
1291}
1292
1293// TransportProtocol enumerates the values for transport protocol.
1294type TransportProtocol string
1295
1296const (
1297	// TransportProtocolAll ...
1298	TransportProtocolAll TransportProtocol = "All"
1299	// TransportProtocolTCP ...
1300	TransportProtocolTCP TransportProtocol = "Tcp"
1301	// TransportProtocolUDP ...
1302	TransportProtocolUDP TransportProtocol = "Udp"
1303)
1304
1305// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type.
1306func PossibleTransportProtocolValues() []TransportProtocol {
1307	return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP}
1308}
1309
1310// TunnelConnectionStatus enumerates the values for tunnel connection status.
1311type TunnelConnectionStatus string
1312
1313const (
1314	// TunnelConnectionStatusConnected ...
1315	TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected"
1316	// TunnelConnectionStatusConnecting ...
1317	TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting"
1318	// TunnelConnectionStatusNotConnected ...
1319	TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected"
1320	// TunnelConnectionStatusUnknown ...
1321	TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown"
1322)
1323
1324// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type.
1325func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus {
1326	return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown}
1327}
1328
1329// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status.
1330type VirtualNetworkGatewayConnectionStatus string
1331
1332const (
1333	// VirtualNetworkGatewayConnectionStatusConnected ...
1334	VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected"
1335	// VirtualNetworkGatewayConnectionStatusConnecting ...
1336	VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting"
1337	// VirtualNetworkGatewayConnectionStatusNotConnected ...
1338	VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected"
1339	// VirtualNetworkGatewayConnectionStatusUnknown ...
1340	VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown"
1341)
1342
1343// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type.
1344func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus {
1345	return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown}
1346}
1347
1348// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type.
1349type VirtualNetworkGatewayConnectionType string
1350
1351const (
1352	// ExpressRoute ...
1353	ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute"
1354	// IPsec ...
1355	IPsec VirtualNetworkGatewayConnectionType = "IPsec"
1356	// Vnet2Vnet ...
1357	Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet"
1358	// VPNClient ...
1359	VPNClient VirtualNetworkGatewayConnectionType = "VPNClient"
1360)
1361
1362// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type.
1363func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType {
1364	return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient}
1365}
1366
1367// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name.
1368type VirtualNetworkGatewaySkuName string
1369
1370const (
1371	// VirtualNetworkGatewaySkuNameBasic ...
1372	VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
1373	// VirtualNetworkGatewaySkuNameErGw1AZ ...
1374	VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ"
1375	// VirtualNetworkGatewaySkuNameErGw2AZ ...
1376	VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ"
1377	// VirtualNetworkGatewaySkuNameErGw3AZ ...
1378	VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ"
1379	// VirtualNetworkGatewaySkuNameHighPerformance ...
1380	VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
1381	// VirtualNetworkGatewaySkuNameStandard ...
1382	VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard"
1383	// VirtualNetworkGatewaySkuNameUltraPerformance ...
1384	VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance"
1385	// VirtualNetworkGatewaySkuNameVpnGw1 ...
1386	VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1"
1387	// VirtualNetworkGatewaySkuNameVpnGw1AZ ...
1388	VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ"
1389	// VirtualNetworkGatewaySkuNameVpnGw2 ...
1390	VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2"
1391	// VirtualNetworkGatewaySkuNameVpnGw2AZ ...
1392	VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ"
1393	// VirtualNetworkGatewaySkuNameVpnGw3 ...
1394	VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3"
1395	// VirtualNetworkGatewaySkuNameVpnGw3AZ ...
1396	VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ"
1397)
1398
1399// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
1400func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
1401	return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ}
1402}
1403
1404// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
1405type VirtualNetworkGatewaySkuTier string
1406
1407const (
1408	// VirtualNetworkGatewaySkuTierBasic ...
1409	VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
1410	// VirtualNetworkGatewaySkuTierErGw1AZ ...
1411	VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ"
1412	// VirtualNetworkGatewaySkuTierErGw2AZ ...
1413	VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ"
1414	// VirtualNetworkGatewaySkuTierErGw3AZ ...
1415	VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ"
1416	// VirtualNetworkGatewaySkuTierHighPerformance ...
1417	VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
1418	// VirtualNetworkGatewaySkuTierStandard ...
1419	VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard"
1420	// VirtualNetworkGatewaySkuTierUltraPerformance ...
1421	VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance"
1422	// VirtualNetworkGatewaySkuTierVpnGw1 ...
1423	VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1"
1424	// VirtualNetworkGatewaySkuTierVpnGw1AZ ...
1425	VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ"
1426	// VirtualNetworkGatewaySkuTierVpnGw2 ...
1427	VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2"
1428	// VirtualNetworkGatewaySkuTierVpnGw2AZ ...
1429	VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ"
1430	// VirtualNetworkGatewaySkuTierVpnGw3 ...
1431	VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3"
1432	// VirtualNetworkGatewaySkuTierVpnGw3AZ ...
1433	VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ"
1434)
1435
1436// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
1437func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
1438	return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ}
1439}
1440
1441// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
1442type VirtualNetworkGatewayType string
1443
1444const (
1445	// VirtualNetworkGatewayTypeExpressRoute ...
1446	VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute"
1447	// VirtualNetworkGatewayTypeVpn ...
1448	VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn"
1449)
1450
1451// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type.
1452func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
1453	return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn}
1454}
1455
1456// VirtualNetworkPeeringState enumerates the values for virtual network peering state.
1457type VirtualNetworkPeeringState string
1458
1459const (
1460	// VirtualNetworkPeeringStateConnected ...
1461	VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected"
1462	// VirtualNetworkPeeringStateDisconnected ...
1463	VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected"
1464	// VirtualNetworkPeeringStateInitiated ...
1465	VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated"
1466)
1467
1468// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type.
1469func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState {
1470	return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated}
1471}
1472
1473// VpnClientProtocol enumerates the values for vpn client protocol.
1474type VpnClientProtocol string
1475
1476const (
1477	// IkeV2 ...
1478	IkeV2 VpnClientProtocol = "IkeV2"
1479	// OpenVPN ...
1480	OpenVPN VpnClientProtocol = "OpenVPN"
1481	// SSTP ...
1482	SSTP VpnClientProtocol = "SSTP"
1483)
1484
1485// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type.
1486func PossibleVpnClientProtocolValues() []VpnClientProtocol {
1487	return []VpnClientProtocol{IkeV2, OpenVPN, SSTP}
1488}
1489
1490// VpnConnectionStatus enumerates the values for vpn connection status.
1491type VpnConnectionStatus string
1492
1493const (
1494	// VpnConnectionStatusConnected ...
1495	VpnConnectionStatusConnected VpnConnectionStatus = "Connected"
1496	// VpnConnectionStatusConnecting ...
1497	VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting"
1498	// VpnConnectionStatusNotConnected ...
1499	VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected"
1500	// VpnConnectionStatusUnknown ...
1501	VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown"
1502)
1503
1504// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type.
1505func PossibleVpnConnectionStatusValues() []VpnConnectionStatus {
1506	return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown}
1507}
1508
1509// VpnType enumerates the values for vpn type.
1510type VpnType string
1511
1512const (
1513	// PolicyBased ...
1514	PolicyBased VpnType = "PolicyBased"
1515	// RouteBased ...
1516	RouteBased VpnType = "RouteBased"
1517)
1518
1519// PossibleVpnTypeValues returns an array of possible values for the VpnType const type.
1520func PossibleVpnTypeValues() []VpnType {
1521	return []VpnType{PolicyBased, RouteBased}
1522}
1523
1524// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
1525// virtual network.
1526type AddressSpace struct {
1527	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
1528	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
1529}
1530
1531// ApplicationGateway application gateway resource
1532type ApplicationGateway struct {
1533	autorest.Response                   `json:"-"`
1534	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
1535	// Etag - A unique read-only string that changes whenever the resource is updated.
1536	Etag *string `json:"etag,omitempty"`
1537	// Zones - A list of availability zones denoting where the resource needs to come from.
1538	Zones *[]string `json:"zones,omitempty"`
1539	// ID - Resource ID.
1540	ID *string `json:"id,omitempty"`
1541	// Name - READ-ONLY; Resource name.
1542	Name *string `json:"name,omitempty"`
1543	// Type - READ-ONLY; Resource type.
1544	Type *string `json:"type,omitempty"`
1545	// Location - Resource location.
1546	Location *string `json:"location,omitempty"`
1547	// Tags - Resource tags.
1548	Tags map[string]*string `json:"tags"`
1549}
1550
1551// MarshalJSON is the custom marshaler for ApplicationGateway.
1552func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
1553	objectMap := make(map[string]interface{})
1554	if ag.ApplicationGatewayPropertiesFormat != nil {
1555		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
1556	}
1557	if ag.Etag != nil {
1558		objectMap["etag"] = ag.Etag
1559	}
1560	if ag.Zones != nil {
1561		objectMap["zones"] = ag.Zones
1562	}
1563	if ag.ID != nil {
1564		objectMap["id"] = ag.ID
1565	}
1566	if ag.Location != nil {
1567		objectMap["location"] = ag.Location
1568	}
1569	if ag.Tags != nil {
1570		objectMap["tags"] = ag.Tags
1571	}
1572	return json.Marshal(objectMap)
1573}
1574
1575// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
1576func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
1577	var m map[string]*json.RawMessage
1578	err := json.Unmarshal(body, &m)
1579	if err != nil {
1580		return err
1581	}
1582	for k, v := range m {
1583		switch k {
1584		case "properties":
1585			if v != nil {
1586				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
1587				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
1588				if err != nil {
1589					return err
1590				}
1591				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
1592			}
1593		case "etag":
1594			if v != nil {
1595				var etag string
1596				err = json.Unmarshal(*v, &etag)
1597				if err != nil {
1598					return err
1599				}
1600				ag.Etag = &etag
1601			}
1602		case "zones":
1603			if v != nil {
1604				var zones []string
1605				err = json.Unmarshal(*v, &zones)
1606				if err != nil {
1607					return err
1608				}
1609				ag.Zones = &zones
1610			}
1611		case "id":
1612			if v != nil {
1613				var ID string
1614				err = json.Unmarshal(*v, &ID)
1615				if err != nil {
1616					return err
1617				}
1618				ag.ID = &ID
1619			}
1620		case "name":
1621			if v != nil {
1622				var name string
1623				err = json.Unmarshal(*v, &name)
1624				if err != nil {
1625					return err
1626				}
1627				ag.Name = &name
1628			}
1629		case "type":
1630			if v != nil {
1631				var typeVar string
1632				err = json.Unmarshal(*v, &typeVar)
1633				if err != nil {
1634					return err
1635				}
1636				ag.Type = &typeVar
1637			}
1638		case "location":
1639			if v != nil {
1640				var location string
1641				err = json.Unmarshal(*v, &location)
1642				if err != nil {
1643					return err
1644				}
1645				ag.Location = &location
1646			}
1647		case "tags":
1648			if v != nil {
1649				var tags map[string]*string
1650				err = json.Unmarshal(*v, &tags)
1651				if err != nil {
1652					return err
1653				}
1654				ag.Tags = tags
1655			}
1656		}
1657	}
1658
1659	return nil
1660}
1661
1662// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
1663type ApplicationGatewayAuthenticationCertificate struct {
1664	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
1665	// Name - Name of the authentication certificate that is unique within an Application Gateway.
1666	Name *string `json:"name,omitempty"`
1667	// Etag - A unique read-only string that changes whenever the resource is updated.
1668	Etag *string `json:"etag,omitempty"`
1669	// Type - Type of the resource.
1670	Type *string `json:"type,omitempty"`
1671	// ID - Resource ID.
1672	ID *string `json:"id,omitempty"`
1673}
1674
1675// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
1676func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
1677	objectMap := make(map[string]interface{})
1678	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
1679		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
1680	}
1681	if agac.Name != nil {
1682		objectMap["name"] = agac.Name
1683	}
1684	if agac.Etag != nil {
1685		objectMap["etag"] = agac.Etag
1686	}
1687	if agac.Type != nil {
1688		objectMap["type"] = agac.Type
1689	}
1690	if agac.ID != nil {
1691		objectMap["id"] = agac.ID
1692	}
1693	return json.Marshal(objectMap)
1694}
1695
1696// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
1697func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
1698	var m map[string]*json.RawMessage
1699	err := json.Unmarshal(body, &m)
1700	if err != nil {
1701		return err
1702	}
1703	for k, v := range m {
1704		switch k {
1705		case "properties":
1706			if v != nil {
1707				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
1708				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
1709				if err != nil {
1710					return err
1711				}
1712				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
1713			}
1714		case "name":
1715			if v != nil {
1716				var name string
1717				err = json.Unmarshal(*v, &name)
1718				if err != nil {
1719					return err
1720				}
1721				agac.Name = &name
1722			}
1723		case "etag":
1724			if v != nil {
1725				var etag string
1726				err = json.Unmarshal(*v, &etag)
1727				if err != nil {
1728					return err
1729				}
1730				agac.Etag = &etag
1731			}
1732		case "type":
1733			if v != nil {
1734				var typeVar string
1735				err = json.Unmarshal(*v, &typeVar)
1736				if err != nil {
1737					return err
1738				}
1739				agac.Type = &typeVar
1740			}
1741		case "id":
1742			if v != nil {
1743				var ID string
1744				err = json.Unmarshal(*v, &ID)
1745				if err != nil {
1746					return err
1747				}
1748				agac.ID = &ID
1749			}
1750		}
1751	}
1752
1753	return nil
1754}
1755
1756// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
1757// application gateway.
1758type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
1759	// Data - Certificate public data.
1760	Data *string `json:"data,omitempty"`
1761	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1762	ProvisioningState *string `json:"provisioningState,omitempty"`
1763}
1764
1765// ApplicationGatewayAutoscaleBounds application Gateway autoscale bounds on number of Application Gateway
1766// instance.
1767type ApplicationGatewayAutoscaleBounds struct {
1768	// Min - Lower bound on number of Application Gateway instances.
1769	Min *int32 `json:"min,omitempty"`
1770	// Max - Upper bound on number of Application Gateway instances.
1771	Max *int32 `json:"max,omitempty"`
1772}
1773
1774// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
1775type ApplicationGatewayAutoscaleConfiguration struct {
1776	// Bounds - Autoscale bounds
1777	Bounds *ApplicationGatewayAutoscaleBounds `json:"bounds,omitempty"`
1778}
1779
1780// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
1781// call.
1782type ApplicationGatewayAvailableSslOptions struct {
1783	autorest.Response                                      `json:"-"`
1784	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
1785	// ID - Resource ID.
1786	ID *string `json:"id,omitempty"`
1787	// Name - READ-ONLY; Resource name.
1788	Name *string `json:"name,omitempty"`
1789	// Type - READ-ONLY; Resource type.
1790	Type *string `json:"type,omitempty"`
1791	// Location - Resource location.
1792	Location *string `json:"location,omitempty"`
1793	// Tags - Resource tags.
1794	Tags map[string]*string `json:"tags"`
1795}
1796
1797// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
1798func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
1799	objectMap := make(map[string]interface{})
1800	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
1801		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
1802	}
1803	if agaso.ID != nil {
1804		objectMap["id"] = agaso.ID
1805	}
1806	if agaso.Location != nil {
1807		objectMap["location"] = agaso.Location
1808	}
1809	if agaso.Tags != nil {
1810		objectMap["tags"] = agaso.Tags
1811	}
1812	return json.Marshal(objectMap)
1813}
1814
1815// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
1816func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
1817	var m map[string]*json.RawMessage
1818	err := json.Unmarshal(body, &m)
1819	if err != nil {
1820		return err
1821	}
1822	for k, v := range m {
1823		switch k {
1824		case "properties":
1825			if v != nil {
1826				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
1827				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
1828				if err != nil {
1829					return err
1830				}
1831				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
1832			}
1833		case "id":
1834			if v != nil {
1835				var ID string
1836				err = json.Unmarshal(*v, &ID)
1837				if err != nil {
1838					return err
1839				}
1840				agaso.ID = &ID
1841			}
1842		case "name":
1843			if v != nil {
1844				var name string
1845				err = json.Unmarshal(*v, &name)
1846				if err != nil {
1847					return err
1848				}
1849				agaso.Name = &name
1850			}
1851		case "type":
1852			if v != nil {
1853				var typeVar string
1854				err = json.Unmarshal(*v, &typeVar)
1855				if err != nil {
1856					return err
1857				}
1858				agaso.Type = &typeVar
1859			}
1860		case "location":
1861			if v != nil {
1862				var location string
1863				err = json.Unmarshal(*v, &location)
1864				if err != nil {
1865					return err
1866				}
1867				agaso.Location = &location
1868			}
1869		case "tags":
1870			if v != nil {
1871				var tags map[string]*string
1872				err = json.Unmarshal(*v, &tags)
1873				if err != nil {
1874					return err
1875				}
1876				agaso.Tags = tags
1877			}
1878		}
1879	}
1880
1881	return nil
1882}
1883
1884// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
1885// ApplicationGatewayAvailableSslOptions
1886type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
1887	// PredefinedPolicies - List of available Ssl predefined policy.
1888	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
1889	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
1890	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
1891	// AvailableCipherSuites - List of available Ssl cipher suites.
1892	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
1893	// AvailableProtocols - List of available Ssl protocols.
1894	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
1895}
1896
1897// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
1898// service call.
1899type ApplicationGatewayAvailableSslPredefinedPolicies struct {
1900	autorest.Response `json:"-"`
1901	// Value - List of available Ssl predefined policy.
1902	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
1903	// NextLink - URL to get the next set of results.
1904	NextLink *string `json:"nextLink,omitempty"`
1905}
1906
1907// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
1908// ApplicationGatewaySslPredefinedPolicy values.
1909type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
1910	i    int
1911	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
1912}
1913
1914// NextWithContext advances to the next value.  If there was an error making
1915// the request the iterator does not advance and the error is returned.
1916func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
1917	if tracing.IsEnabled() {
1918		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
1919		defer func() {
1920			sc := -1
1921			if iter.Response().Response.Response != nil {
1922				sc = iter.Response().Response.Response.StatusCode
1923			}
1924			tracing.EndSpan(ctx, sc, err)
1925		}()
1926	}
1927	iter.i++
1928	if iter.i < len(iter.page.Values()) {
1929		return nil
1930	}
1931	err = iter.page.NextWithContext(ctx)
1932	if err != nil {
1933		iter.i--
1934		return err
1935	}
1936	iter.i = 0
1937	return nil
1938}
1939
1940// Next advances to the next value.  If there was an error making
1941// the request the iterator does not advance and the error is returned.
1942// Deprecated: Use NextWithContext() instead.
1943func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
1944	return iter.NextWithContext(context.Background())
1945}
1946
1947// NotDone returns true if the enumeration should be started or is not yet complete.
1948func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
1949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1950}
1951
1952// Response returns the raw server response from the last page request.
1953func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
1954	return iter.page.Response()
1955}
1956
1957// Value returns the current value or a zero-initialized value if the
1958// iterator has advanced beyond the end of the collection.
1959func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
1960	if !iter.page.NotDone() {
1961		return ApplicationGatewaySslPredefinedPolicy{}
1962	}
1963	return iter.page.Values()[iter.i]
1964}
1965
1966// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
1967func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
1968	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
1969}
1970
1971// IsEmpty returns true if the ListResult contains no values.
1972func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
1973	return agaspp.Value == nil || len(*agaspp.Value) == 0
1974}
1975
1976// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
1977// It returns nil if no more results exist.
1978func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
1979	if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 {
1980		return nil, nil
1981	}
1982	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1983		autorest.AsJSON(),
1984		autorest.AsGet(),
1985		autorest.WithBaseURL(to.String(agaspp.NextLink)))
1986}
1987
1988// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
1989// ApplicationGatewaySslPredefinedPolicy values.
1990type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
1991	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
1992	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
1993}
1994
1995// NextWithContext advances to the next page of values.  If there was an error making
1996// the request the page does not advance and the error is returned.
1997func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
1998	if tracing.IsEnabled() {
1999		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
2000		defer func() {
2001			sc := -1
2002			if page.Response().Response.Response != nil {
2003				sc = page.Response().Response.Response.StatusCode
2004			}
2005			tracing.EndSpan(ctx, sc, err)
2006		}()
2007	}
2008	next, err := page.fn(ctx, page.agaspp)
2009	if err != nil {
2010		return err
2011	}
2012	page.agaspp = next
2013	return nil
2014}
2015
2016// Next advances to the next page of values.  If there was an error making
2017// the request the page does not advance and the error is returned.
2018// Deprecated: Use NextWithContext() instead.
2019func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
2020	return page.NextWithContext(context.Background())
2021}
2022
2023// NotDone returns true if the page enumeration should be started or is not yet complete.
2024func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
2025	return !page.agaspp.IsEmpty()
2026}
2027
2028// Response returns the raw server response from the last page request.
2029func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
2030	return page.agaspp
2031}
2032
2033// Values returns the slice of values for the current page or nil if there are no values.
2034func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
2035	if page.agaspp.IsEmpty() {
2036		return nil
2037	}
2038	return *page.agaspp.Value
2039}
2040
2041// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
2042func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
2043	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage}
2044}
2045
2046// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
2047// service call.
2048type ApplicationGatewayAvailableWafRuleSetsResult struct {
2049	autorest.Response `json:"-"`
2050	// Value - The list of application gateway rule sets.
2051	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
2052}
2053
2054// ApplicationGatewayBackendAddress backend address of an application gateway.
2055type ApplicationGatewayBackendAddress struct {
2056	// Fqdn - Fully qualified domain name (FQDN).
2057	Fqdn *string `json:"fqdn,omitempty"`
2058	// IPAddress - IP address
2059	IPAddress *string `json:"ipAddress,omitempty"`
2060}
2061
2062// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
2063type ApplicationGatewayBackendAddressPool struct {
2064	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
2065	// Name - Name of the backend address pool that is unique within an Application Gateway.
2066	Name *string `json:"name,omitempty"`
2067	// Etag - A unique read-only string that changes whenever the resource is updated.
2068	Etag *string `json:"etag,omitempty"`
2069	// Type - Type of the resource.
2070	Type *string `json:"type,omitempty"`
2071	// ID - Resource ID.
2072	ID *string `json:"id,omitempty"`
2073}
2074
2075// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
2076func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
2077	objectMap := make(map[string]interface{})
2078	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
2079		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
2080	}
2081	if agbap.Name != nil {
2082		objectMap["name"] = agbap.Name
2083	}
2084	if agbap.Etag != nil {
2085		objectMap["etag"] = agbap.Etag
2086	}
2087	if agbap.Type != nil {
2088		objectMap["type"] = agbap.Type
2089	}
2090	if agbap.ID != nil {
2091		objectMap["id"] = agbap.ID
2092	}
2093	return json.Marshal(objectMap)
2094}
2095
2096// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
2097func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
2098	var m map[string]*json.RawMessage
2099	err := json.Unmarshal(body, &m)
2100	if err != nil {
2101		return err
2102	}
2103	for k, v := range m {
2104		switch k {
2105		case "properties":
2106			if v != nil {
2107				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
2108				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
2109				if err != nil {
2110					return err
2111				}
2112				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
2113			}
2114		case "name":
2115			if v != nil {
2116				var name string
2117				err = json.Unmarshal(*v, &name)
2118				if err != nil {
2119					return err
2120				}
2121				agbap.Name = &name
2122			}
2123		case "etag":
2124			if v != nil {
2125				var etag string
2126				err = json.Unmarshal(*v, &etag)
2127				if err != nil {
2128					return err
2129				}
2130				agbap.Etag = &etag
2131			}
2132		case "type":
2133			if v != nil {
2134				var typeVar string
2135				err = json.Unmarshal(*v, &typeVar)
2136				if err != nil {
2137					return err
2138				}
2139				agbap.Type = &typeVar
2140			}
2141		case "id":
2142			if v != nil {
2143				var ID string
2144				err = json.Unmarshal(*v, &ID)
2145				if err != nil {
2146					return err
2147				}
2148				agbap.ID = &ID
2149			}
2150		}
2151	}
2152
2153	return nil
2154}
2155
2156// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
2157// application gateway.
2158type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
2159	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
2160	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
2161	// BackendAddresses - Backend addresses
2162	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
2163	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2164	ProvisioningState *string `json:"provisioningState,omitempty"`
2165}
2166
2167// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
2168type ApplicationGatewayBackendHealth struct {
2169	autorest.Response   `json:"-"`
2170	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
2171}
2172
2173// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
2174type ApplicationGatewayBackendHealthHTTPSettings struct {
2175	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
2176	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
2177	// Servers - List of ApplicationGatewayBackendHealthServer resources.
2178	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
2179}
2180
2181// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
2182type ApplicationGatewayBackendHealthPool struct {
2183	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
2184	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
2185	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
2186	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2187}
2188
2189// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
2190type ApplicationGatewayBackendHealthServer struct {
2191	// Address - IP address or FQDN of backend server.
2192	Address *string `json:"address,omitempty"`
2193	// IPConfiguration - Reference of IP configuration of backend server.
2194	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
2195	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
2196	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
2197}
2198
2199// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
2200type ApplicationGatewayBackendHTTPSettings struct {
2201	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
2202	// Name - Name of the backend http settings that is unique within an Application Gateway.
2203	Name *string `json:"name,omitempty"`
2204	// Etag - A unique read-only string that changes whenever the resource is updated.
2205	Etag *string `json:"etag,omitempty"`
2206	// Type - Type of the resource.
2207	Type *string `json:"type,omitempty"`
2208	// ID - Resource ID.
2209	ID *string `json:"id,omitempty"`
2210}
2211
2212// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
2213func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
2214	objectMap := make(map[string]interface{})
2215	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
2216		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
2217	}
2218	if agbhs.Name != nil {
2219		objectMap["name"] = agbhs.Name
2220	}
2221	if agbhs.Etag != nil {
2222		objectMap["etag"] = agbhs.Etag
2223	}
2224	if agbhs.Type != nil {
2225		objectMap["type"] = agbhs.Type
2226	}
2227	if agbhs.ID != nil {
2228		objectMap["id"] = agbhs.ID
2229	}
2230	return json.Marshal(objectMap)
2231}
2232
2233// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
2234func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
2235	var m map[string]*json.RawMessage
2236	err := json.Unmarshal(body, &m)
2237	if err != nil {
2238		return err
2239	}
2240	for k, v := range m {
2241		switch k {
2242		case "properties":
2243			if v != nil {
2244				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
2245				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
2246				if err != nil {
2247					return err
2248				}
2249				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
2250			}
2251		case "name":
2252			if v != nil {
2253				var name string
2254				err = json.Unmarshal(*v, &name)
2255				if err != nil {
2256					return err
2257				}
2258				agbhs.Name = &name
2259			}
2260		case "etag":
2261			if v != nil {
2262				var etag string
2263				err = json.Unmarshal(*v, &etag)
2264				if err != nil {
2265					return err
2266				}
2267				agbhs.Etag = &etag
2268			}
2269		case "type":
2270			if v != nil {
2271				var typeVar string
2272				err = json.Unmarshal(*v, &typeVar)
2273				if err != nil {
2274					return err
2275				}
2276				agbhs.Type = &typeVar
2277			}
2278		case "id":
2279			if v != nil {
2280				var ID string
2281				err = json.Unmarshal(*v, &ID)
2282				if err != nil {
2283					return err
2284				}
2285				agbhs.ID = &ID
2286			}
2287		}
2288	}
2289
2290	return nil
2291}
2292
2293// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
2294// application gateway.
2295type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
2296	// Port - The destination port on the backend.
2297	Port *int32 `json:"port,omitempty"`
2298	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
2299	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2300	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
2301	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
2302	// RequestTimeout - Request timeout in seconds. Application Gateway will fail the request if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 seconds.
2303	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
2304	// Probe - Probe resource of an application gateway.
2305	Probe *SubResource `json:"probe,omitempty"`
2306	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
2307	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
2308	// ConnectionDraining - Connection draining of the backend http settings resource.
2309	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
2310	// HostName - Host header to be sent to the backend servers.
2311	HostName *string `json:"hostName,omitempty"`
2312	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
2313	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
2314	// AffinityCookieName - Cookie name to use for the affinity cookie.
2315	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
2316	// ProbeEnabled - Whether the probe is enabled. Default value is false.
2317	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
2318	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
2319	Path *string `json:"path,omitempty"`
2320	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2321	ProvisioningState *string `json:"provisioningState,omitempty"`
2322}
2323
2324// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
2325// be active for a specified time after the backend server got removed from the configuration.
2326type ApplicationGatewayConnectionDraining struct {
2327	// Enabled - Whether connection draining is enabled or not.
2328	Enabled *bool `json:"enabled,omitempty"`
2329	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
2330	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
2331}
2332
2333// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
2334// rule group.
2335type ApplicationGatewayFirewallDisabledRuleGroup struct {
2336	// RuleGroupName - The name of the rule group that will be disabled.
2337	RuleGroupName *string `json:"ruleGroupName,omitempty"`
2338	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
2339	Rules *[]int32 `json:"rules,omitempty"`
2340}
2341
2342// ApplicationGatewayFirewallRule a web application firewall rule.
2343type ApplicationGatewayFirewallRule struct {
2344	// RuleID - The identifier of the web application firewall rule.
2345	RuleID *int32 `json:"ruleId,omitempty"`
2346	// Description - The description of the web application firewall rule.
2347	Description *string `json:"description,omitempty"`
2348}
2349
2350// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
2351type ApplicationGatewayFirewallRuleGroup struct {
2352	// RuleGroupName - The name of the web application firewall rule group.
2353	RuleGroupName *string `json:"ruleGroupName,omitempty"`
2354	// Description - The description of the web application firewall rule group.
2355	Description *string `json:"description,omitempty"`
2356	// Rules - The rules of the web application firewall rule group.
2357	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
2358}
2359
2360// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
2361type ApplicationGatewayFirewallRuleSet struct {
2362	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
2363	// ID - Resource ID.
2364	ID *string `json:"id,omitempty"`
2365	// Name - READ-ONLY; Resource name.
2366	Name *string `json:"name,omitempty"`
2367	// Type - READ-ONLY; Resource type.
2368	Type *string `json:"type,omitempty"`
2369	// Location - Resource location.
2370	Location *string `json:"location,omitempty"`
2371	// Tags - Resource tags.
2372	Tags map[string]*string `json:"tags"`
2373}
2374
2375// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
2376func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
2377	objectMap := make(map[string]interface{})
2378	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
2379		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
2380	}
2381	if agfrs.ID != nil {
2382		objectMap["id"] = agfrs.ID
2383	}
2384	if agfrs.Location != nil {
2385		objectMap["location"] = agfrs.Location
2386	}
2387	if agfrs.Tags != nil {
2388		objectMap["tags"] = agfrs.Tags
2389	}
2390	return json.Marshal(objectMap)
2391}
2392
2393// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
2394func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
2395	var m map[string]*json.RawMessage
2396	err := json.Unmarshal(body, &m)
2397	if err != nil {
2398		return err
2399	}
2400	for k, v := range m {
2401		switch k {
2402		case "properties":
2403			if v != nil {
2404				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
2405				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
2406				if err != nil {
2407					return err
2408				}
2409				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
2410			}
2411		case "id":
2412			if v != nil {
2413				var ID string
2414				err = json.Unmarshal(*v, &ID)
2415				if err != nil {
2416					return err
2417				}
2418				agfrs.ID = &ID
2419			}
2420		case "name":
2421			if v != nil {
2422				var name string
2423				err = json.Unmarshal(*v, &name)
2424				if err != nil {
2425					return err
2426				}
2427				agfrs.Name = &name
2428			}
2429		case "type":
2430			if v != nil {
2431				var typeVar string
2432				err = json.Unmarshal(*v, &typeVar)
2433				if err != nil {
2434					return err
2435				}
2436				agfrs.Type = &typeVar
2437			}
2438		case "location":
2439			if v != nil {
2440				var location string
2441				err = json.Unmarshal(*v, &location)
2442				if err != nil {
2443					return err
2444				}
2445				agfrs.Location = &location
2446			}
2447		case "tags":
2448			if v != nil {
2449				var tags map[string]*string
2450				err = json.Unmarshal(*v, &tags)
2451				if err != nil {
2452					return err
2453				}
2454				agfrs.Tags = tags
2455			}
2456		}
2457	}
2458
2459	return nil
2460}
2461
2462// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
2463type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
2464	// ProvisioningState - The provisioning state of the web application firewall rule set.
2465	ProvisioningState *string `json:"provisioningState,omitempty"`
2466	// RuleSetType - The type of the web application firewall rule set.
2467	RuleSetType *string `json:"ruleSetType,omitempty"`
2468	// RuleSetVersion - The version of the web application firewall rule set type.
2469	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2470	// RuleGroups - The rule groups of the web application firewall rule set.
2471	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
2472}
2473
2474// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
2475type ApplicationGatewayFrontendIPConfiguration struct {
2476	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
2477	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
2478	Name *string `json:"name,omitempty"`
2479	// Etag - A unique read-only string that changes whenever the resource is updated.
2480	Etag *string `json:"etag,omitempty"`
2481	// Type - Type of the resource.
2482	Type *string `json:"type,omitempty"`
2483	// ID - Resource ID.
2484	ID *string `json:"id,omitempty"`
2485}
2486
2487// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
2488func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
2489	objectMap := make(map[string]interface{})
2490	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
2491		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
2492	}
2493	if agfic.Name != nil {
2494		objectMap["name"] = agfic.Name
2495	}
2496	if agfic.Etag != nil {
2497		objectMap["etag"] = agfic.Etag
2498	}
2499	if agfic.Type != nil {
2500		objectMap["type"] = agfic.Type
2501	}
2502	if agfic.ID != nil {
2503		objectMap["id"] = agfic.ID
2504	}
2505	return json.Marshal(objectMap)
2506}
2507
2508// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
2509func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
2510	var m map[string]*json.RawMessage
2511	err := json.Unmarshal(body, &m)
2512	if err != nil {
2513		return err
2514	}
2515	for k, v := range m {
2516		switch k {
2517		case "properties":
2518			if v != nil {
2519				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
2520				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
2521				if err != nil {
2522					return err
2523				}
2524				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
2525			}
2526		case "name":
2527			if v != nil {
2528				var name string
2529				err = json.Unmarshal(*v, &name)
2530				if err != nil {
2531					return err
2532				}
2533				agfic.Name = &name
2534			}
2535		case "etag":
2536			if v != nil {
2537				var etag string
2538				err = json.Unmarshal(*v, &etag)
2539				if err != nil {
2540					return err
2541				}
2542				agfic.Etag = &etag
2543			}
2544		case "type":
2545			if v != nil {
2546				var typeVar string
2547				err = json.Unmarshal(*v, &typeVar)
2548				if err != nil {
2549					return err
2550				}
2551				agfic.Type = &typeVar
2552			}
2553		case "id":
2554			if v != nil {
2555				var ID string
2556				err = json.Unmarshal(*v, &ID)
2557				if err != nil {
2558					return err
2559				}
2560				agfic.ID = &ID
2561			}
2562		}
2563	}
2564
2565	return nil
2566}
2567
2568// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
2569// application gateway.
2570type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
2571	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
2572	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
2573	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
2574	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
2575	// Subnet - Reference of the subnet resource.
2576	Subnet *SubResource `json:"subnet,omitempty"`
2577	// PublicIPAddress - Reference of the PublicIP resource.
2578	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
2579	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2580	ProvisioningState *string `json:"provisioningState,omitempty"`
2581}
2582
2583// ApplicationGatewayFrontendPort frontend port of an application gateway.
2584type ApplicationGatewayFrontendPort struct {
2585	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
2586	// Name - Name of the frontend port that is unique within an Application Gateway
2587	Name *string `json:"name,omitempty"`
2588	// Etag - A unique read-only string that changes whenever the resource is updated.
2589	Etag *string `json:"etag,omitempty"`
2590	// Type - Type of the resource.
2591	Type *string `json:"type,omitempty"`
2592	// ID - Resource ID.
2593	ID *string `json:"id,omitempty"`
2594}
2595
2596// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
2597func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
2598	objectMap := make(map[string]interface{})
2599	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
2600		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
2601	}
2602	if agfp.Name != nil {
2603		objectMap["name"] = agfp.Name
2604	}
2605	if agfp.Etag != nil {
2606		objectMap["etag"] = agfp.Etag
2607	}
2608	if agfp.Type != nil {
2609		objectMap["type"] = agfp.Type
2610	}
2611	if agfp.ID != nil {
2612		objectMap["id"] = agfp.ID
2613	}
2614	return json.Marshal(objectMap)
2615}
2616
2617// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
2618func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
2619	var m map[string]*json.RawMessage
2620	err := json.Unmarshal(body, &m)
2621	if err != nil {
2622		return err
2623	}
2624	for k, v := range m {
2625		switch k {
2626		case "properties":
2627			if v != nil {
2628				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
2629				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
2630				if err != nil {
2631					return err
2632				}
2633				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
2634			}
2635		case "name":
2636			if v != nil {
2637				var name string
2638				err = json.Unmarshal(*v, &name)
2639				if err != nil {
2640					return err
2641				}
2642				agfp.Name = &name
2643			}
2644		case "etag":
2645			if v != nil {
2646				var etag string
2647				err = json.Unmarshal(*v, &etag)
2648				if err != nil {
2649					return err
2650				}
2651				agfp.Etag = &etag
2652			}
2653		case "type":
2654			if v != nil {
2655				var typeVar string
2656				err = json.Unmarshal(*v, &typeVar)
2657				if err != nil {
2658					return err
2659				}
2660				agfp.Type = &typeVar
2661			}
2662		case "id":
2663			if v != nil {
2664				var ID string
2665				err = json.Unmarshal(*v, &ID)
2666				if err != nil {
2667					return err
2668				}
2669				agfp.ID = &ID
2670			}
2671		}
2672	}
2673
2674	return nil
2675}
2676
2677// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
2678type ApplicationGatewayFrontendPortPropertiesFormat struct {
2679	// Port - Frontend port
2680	Port *int32 `json:"port,omitempty"`
2681	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2682	ProvisioningState *string `json:"provisioningState,omitempty"`
2683}
2684
2685// ApplicationGatewayHTTPListener http listener of an application gateway.
2686type ApplicationGatewayHTTPListener struct {
2687	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
2688	// Name - Name of the HTTP listener that is unique within an Application Gateway.
2689	Name *string `json:"name,omitempty"`
2690	// Etag - A unique read-only string that changes whenever the resource is updated.
2691	Etag *string `json:"etag,omitempty"`
2692	// Type - Type of the resource.
2693	Type *string `json:"type,omitempty"`
2694	// ID - Resource ID.
2695	ID *string `json:"id,omitempty"`
2696}
2697
2698// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
2699func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
2700	objectMap := make(map[string]interface{})
2701	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
2702		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
2703	}
2704	if aghl.Name != nil {
2705		objectMap["name"] = aghl.Name
2706	}
2707	if aghl.Etag != nil {
2708		objectMap["etag"] = aghl.Etag
2709	}
2710	if aghl.Type != nil {
2711		objectMap["type"] = aghl.Type
2712	}
2713	if aghl.ID != nil {
2714		objectMap["id"] = aghl.ID
2715	}
2716	return json.Marshal(objectMap)
2717}
2718
2719// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
2720func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
2721	var m map[string]*json.RawMessage
2722	err := json.Unmarshal(body, &m)
2723	if err != nil {
2724		return err
2725	}
2726	for k, v := range m {
2727		switch k {
2728		case "properties":
2729			if v != nil {
2730				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
2731				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
2732				if err != nil {
2733					return err
2734				}
2735				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
2736			}
2737		case "name":
2738			if v != nil {
2739				var name string
2740				err = json.Unmarshal(*v, &name)
2741				if err != nil {
2742					return err
2743				}
2744				aghl.Name = &name
2745			}
2746		case "etag":
2747			if v != nil {
2748				var etag string
2749				err = json.Unmarshal(*v, &etag)
2750				if err != nil {
2751					return err
2752				}
2753				aghl.Etag = &etag
2754			}
2755		case "type":
2756			if v != nil {
2757				var typeVar string
2758				err = json.Unmarshal(*v, &typeVar)
2759				if err != nil {
2760					return err
2761				}
2762				aghl.Type = &typeVar
2763			}
2764		case "id":
2765			if v != nil {
2766				var ID string
2767				err = json.Unmarshal(*v, &ID)
2768				if err != nil {
2769					return err
2770				}
2771				aghl.ID = &ID
2772			}
2773		}
2774	}
2775
2776	return nil
2777}
2778
2779// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
2780type ApplicationGatewayHTTPListenerPropertiesFormat struct {
2781	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
2782	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
2783	// FrontendPort - Frontend port resource of an application gateway.
2784	FrontendPort *SubResource `json:"frontendPort,omitempty"`
2785	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
2786	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2787	// HostName - Host name of HTTP listener.
2788	HostName *string `json:"hostName,omitempty"`
2789	// SslCertificate - SSL certificate resource of an application gateway.
2790	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
2791	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
2792	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
2793	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2794	ProvisioningState *string `json:"provisioningState,omitempty"`
2795}
2796
2797// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
2798// private IP configuration is allowed.
2799type ApplicationGatewayIPConfiguration struct {
2800	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
2801	// Name - Name of the IP configuration that is unique within an Application Gateway.
2802	Name *string `json:"name,omitempty"`
2803	// Etag - A unique read-only string that changes whenever the resource is updated.
2804	Etag *string `json:"etag,omitempty"`
2805	// Type - Type of the resource.
2806	Type *string `json:"type,omitempty"`
2807	// ID - Resource ID.
2808	ID *string `json:"id,omitempty"`
2809}
2810
2811// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
2812func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
2813	objectMap := make(map[string]interface{})
2814	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
2815		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
2816	}
2817	if agic.Name != nil {
2818		objectMap["name"] = agic.Name
2819	}
2820	if agic.Etag != nil {
2821		objectMap["etag"] = agic.Etag
2822	}
2823	if agic.Type != nil {
2824		objectMap["type"] = agic.Type
2825	}
2826	if agic.ID != nil {
2827		objectMap["id"] = agic.ID
2828	}
2829	return json.Marshal(objectMap)
2830}
2831
2832// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
2833func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
2834	var m map[string]*json.RawMessage
2835	err := json.Unmarshal(body, &m)
2836	if err != nil {
2837		return err
2838	}
2839	for k, v := range m {
2840		switch k {
2841		case "properties":
2842			if v != nil {
2843				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
2844				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
2845				if err != nil {
2846					return err
2847				}
2848				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
2849			}
2850		case "name":
2851			if v != nil {
2852				var name string
2853				err = json.Unmarshal(*v, &name)
2854				if err != nil {
2855					return err
2856				}
2857				agic.Name = &name
2858			}
2859		case "etag":
2860			if v != nil {
2861				var etag string
2862				err = json.Unmarshal(*v, &etag)
2863				if err != nil {
2864					return err
2865				}
2866				agic.Etag = &etag
2867			}
2868		case "type":
2869			if v != nil {
2870				var typeVar string
2871				err = json.Unmarshal(*v, &typeVar)
2872				if err != nil {
2873					return err
2874				}
2875				agic.Type = &typeVar
2876			}
2877		case "id":
2878			if v != nil {
2879				var ID string
2880				err = json.Unmarshal(*v, &ID)
2881				if err != nil {
2882					return err
2883				}
2884				agic.ID = &ID
2885			}
2886		}
2887	}
2888
2889	return nil
2890}
2891
2892// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
2893// gateway.
2894type ApplicationGatewayIPConfigurationPropertiesFormat struct {
2895	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
2896	Subnet *SubResource `json:"subnet,omitempty"`
2897	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2898	ProvisioningState *string `json:"provisioningState,omitempty"`
2899}
2900
2901// ApplicationGatewayListResult response for ListApplicationGateways API service call.
2902type ApplicationGatewayListResult struct {
2903	autorest.Response `json:"-"`
2904	// Value - List of an application gateways in a resource group.
2905	Value *[]ApplicationGateway `json:"value,omitempty"`
2906	// NextLink - URL to get the next set of results.
2907	NextLink *string `json:"nextLink,omitempty"`
2908}
2909
2910// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
2911type ApplicationGatewayListResultIterator struct {
2912	i    int
2913	page ApplicationGatewayListResultPage
2914}
2915
2916// NextWithContext advances to the next value.  If there was an error making
2917// the request the iterator does not advance and the error is returned.
2918func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
2919	if tracing.IsEnabled() {
2920		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
2921		defer func() {
2922			sc := -1
2923			if iter.Response().Response.Response != nil {
2924				sc = iter.Response().Response.Response.StatusCode
2925			}
2926			tracing.EndSpan(ctx, sc, err)
2927		}()
2928	}
2929	iter.i++
2930	if iter.i < len(iter.page.Values()) {
2931		return nil
2932	}
2933	err = iter.page.NextWithContext(ctx)
2934	if err != nil {
2935		iter.i--
2936		return err
2937	}
2938	iter.i = 0
2939	return nil
2940}
2941
2942// Next advances to the next value.  If there was an error making
2943// the request the iterator does not advance and the error is returned.
2944// Deprecated: Use NextWithContext() instead.
2945func (iter *ApplicationGatewayListResultIterator) Next() error {
2946	return iter.NextWithContext(context.Background())
2947}
2948
2949// NotDone returns true if the enumeration should be started or is not yet complete.
2950func (iter ApplicationGatewayListResultIterator) NotDone() bool {
2951	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2952}
2953
2954// Response returns the raw server response from the last page request.
2955func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
2956	return iter.page.Response()
2957}
2958
2959// Value returns the current value or a zero-initialized value if the
2960// iterator has advanced beyond the end of the collection.
2961func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
2962	if !iter.page.NotDone() {
2963		return ApplicationGateway{}
2964	}
2965	return iter.page.Values()[iter.i]
2966}
2967
2968// Creates a new instance of the ApplicationGatewayListResultIterator type.
2969func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
2970	return ApplicationGatewayListResultIterator{page: page}
2971}
2972
2973// IsEmpty returns true if the ListResult contains no values.
2974func (aglr ApplicationGatewayListResult) IsEmpty() bool {
2975	return aglr.Value == nil || len(*aglr.Value) == 0
2976}
2977
2978// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
2979// It returns nil if no more results exist.
2980func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
2981	if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 {
2982		return nil, nil
2983	}
2984	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2985		autorest.AsJSON(),
2986		autorest.AsGet(),
2987		autorest.WithBaseURL(to.String(aglr.NextLink)))
2988}
2989
2990// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
2991type ApplicationGatewayListResultPage struct {
2992	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
2993	aglr ApplicationGatewayListResult
2994}
2995
2996// NextWithContext advances to the next page of values.  If there was an error making
2997// the request the page does not advance and the error is returned.
2998func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
2999	if tracing.IsEnabled() {
3000		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
3001		defer func() {
3002			sc := -1
3003			if page.Response().Response.Response != nil {
3004				sc = page.Response().Response.Response.StatusCode
3005			}
3006			tracing.EndSpan(ctx, sc, err)
3007		}()
3008	}
3009	next, err := page.fn(ctx, page.aglr)
3010	if err != nil {
3011		return err
3012	}
3013	page.aglr = next
3014	return nil
3015}
3016
3017// Next advances to the next page of values.  If there was an error making
3018// the request the page does not advance and the error is returned.
3019// Deprecated: Use NextWithContext() instead.
3020func (page *ApplicationGatewayListResultPage) Next() error {
3021	return page.NextWithContext(context.Background())
3022}
3023
3024// NotDone returns true if the page enumeration should be started or is not yet complete.
3025func (page ApplicationGatewayListResultPage) NotDone() bool {
3026	return !page.aglr.IsEmpty()
3027}
3028
3029// Response returns the raw server response from the last page request.
3030func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
3031	return page.aglr
3032}
3033
3034// Values returns the slice of values for the current page or nil if there are no values.
3035func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
3036	if page.aglr.IsEmpty() {
3037		return nil
3038	}
3039	return *page.aglr.Value
3040}
3041
3042// Creates a new instance of the ApplicationGatewayListResultPage type.
3043func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
3044	return ApplicationGatewayListResultPage{fn: getNextPage}
3045}
3046
3047// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
3048type ApplicationGatewayPathRule struct {
3049	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
3050	// Name - Name of the path rule that is unique within an Application Gateway.
3051	Name *string `json:"name,omitempty"`
3052	// Etag - A unique read-only string that changes whenever the resource is updated.
3053	Etag *string `json:"etag,omitempty"`
3054	// Type - Type of the resource.
3055	Type *string `json:"type,omitempty"`
3056	// ID - Resource ID.
3057	ID *string `json:"id,omitempty"`
3058}
3059
3060// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
3061func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
3062	objectMap := make(map[string]interface{})
3063	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
3064		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
3065	}
3066	if agpr.Name != nil {
3067		objectMap["name"] = agpr.Name
3068	}
3069	if agpr.Etag != nil {
3070		objectMap["etag"] = agpr.Etag
3071	}
3072	if agpr.Type != nil {
3073		objectMap["type"] = agpr.Type
3074	}
3075	if agpr.ID != nil {
3076		objectMap["id"] = agpr.ID
3077	}
3078	return json.Marshal(objectMap)
3079}
3080
3081// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
3082func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
3083	var m map[string]*json.RawMessage
3084	err := json.Unmarshal(body, &m)
3085	if err != nil {
3086		return err
3087	}
3088	for k, v := range m {
3089		switch k {
3090		case "properties":
3091			if v != nil {
3092				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
3093				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
3094				if err != nil {
3095					return err
3096				}
3097				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
3098			}
3099		case "name":
3100			if v != nil {
3101				var name string
3102				err = json.Unmarshal(*v, &name)
3103				if err != nil {
3104					return err
3105				}
3106				agpr.Name = &name
3107			}
3108		case "etag":
3109			if v != nil {
3110				var etag string
3111				err = json.Unmarshal(*v, &etag)
3112				if err != nil {
3113					return err
3114				}
3115				agpr.Etag = &etag
3116			}
3117		case "type":
3118			if v != nil {
3119				var typeVar string
3120				err = json.Unmarshal(*v, &typeVar)
3121				if err != nil {
3122					return err
3123				}
3124				agpr.Type = &typeVar
3125			}
3126		case "id":
3127			if v != nil {
3128				var ID string
3129				err = json.Unmarshal(*v, &ID)
3130				if err != nil {
3131					return err
3132				}
3133				agpr.ID = &ID
3134			}
3135		}
3136	}
3137
3138	return nil
3139}
3140
3141// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
3142type ApplicationGatewayPathRulePropertiesFormat struct {
3143	// Paths - Path rules of URL path map.
3144	Paths *[]string `json:"paths,omitempty"`
3145	// BackendAddressPool - Backend address pool resource of URL path map path rule.
3146	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3147	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
3148	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3149	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
3150	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3151	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3152	ProvisioningState *string `json:"provisioningState,omitempty"`
3153}
3154
3155// ApplicationGatewayProbe probe of the application gateway.
3156type ApplicationGatewayProbe struct {
3157	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
3158	// Name - Name of the probe that is unique within an Application Gateway.
3159	Name *string `json:"name,omitempty"`
3160	// Etag - A unique read-only string that changes whenever the resource is updated.
3161	Etag *string `json:"etag,omitempty"`
3162	// Type - Type of the resource.
3163	Type *string `json:"type,omitempty"`
3164	// ID - Resource ID.
3165	ID *string `json:"id,omitempty"`
3166}
3167
3168// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
3169func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
3170	objectMap := make(map[string]interface{})
3171	if agp.ApplicationGatewayProbePropertiesFormat != nil {
3172		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
3173	}
3174	if agp.Name != nil {
3175		objectMap["name"] = agp.Name
3176	}
3177	if agp.Etag != nil {
3178		objectMap["etag"] = agp.Etag
3179	}
3180	if agp.Type != nil {
3181		objectMap["type"] = agp.Type
3182	}
3183	if agp.ID != nil {
3184		objectMap["id"] = agp.ID
3185	}
3186	return json.Marshal(objectMap)
3187}
3188
3189// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
3190func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
3191	var m map[string]*json.RawMessage
3192	err := json.Unmarshal(body, &m)
3193	if err != nil {
3194		return err
3195	}
3196	for k, v := range m {
3197		switch k {
3198		case "properties":
3199			if v != nil {
3200				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
3201				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
3202				if err != nil {
3203					return err
3204				}
3205				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
3206			}
3207		case "name":
3208			if v != nil {
3209				var name string
3210				err = json.Unmarshal(*v, &name)
3211				if err != nil {
3212					return err
3213				}
3214				agp.Name = &name
3215			}
3216		case "etag":
3217			if v != nil {
3218				var etag string
3219				err = json.Unmarshal(*v, &etag)
3220				if err != nil {
3221					return err
3222				}
3223				agp.Etag = &etag
3224			}
3225		case "type":
3226			if v != nil {
3227				var typeVar string
3228				err = json.Unmarshal(*v, &typeVar)
3229				if err != nil {
3230					return err
3231				}
3232				agp.Type = &typeVar
3233			}
3234		case "id":
3235			if v != nil {
3236				var ID string
3237				err = json.Unmarshal(*v, &ID)
3238				if err != nil {
3239					return err
3240				}
3241				agp.ID = &ID
3242			}
3243		}
3244	}
3245
3246	return nil
3247}
3248
3249// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
3250type ApplicationGatewayProbeHealthResponseMatch struct {
3251	// Body - Body that must be contained in the health response. Default value is empty.
3252	Body *string `json:"body,omitempty"`
3253	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
3254	StatusCodes *[]string `json:"statusCodes,omitempty"`
3255}
3256
3257// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
3258type ApplicationGatewayProbePropertiesFormat struct {
3259	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
3260	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
3261	// Host - Host name to send the probe to.
3262	Host *string `json:"host,omitempty"`
3263	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
3264	Path *string `json:"path,omitempty"`
3265	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
3266	Interval *int32 `json:"interval,omitempty"`
3267	// Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
3268	Timeout *int32 `json:"timeout,omitempty"`
3269	// UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20.
3270	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
3271	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
3272	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
3273	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
3274	MinServers *int32 `json:"minServers,omitempty"`
3275	// Match - Criterion for classifying a healthy probe response.
3276	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
3277	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3278	ProvisioningState *string `json:"provisioningState,omitempty"`
3279}
3280
3281// ApplicationGatewayPropertiesFormat properties of the application gateway.
3282type ApplicationGatewayPropertiesFormat struct {
3283	// Sku - SKU of the application gateway resource.
3284	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
3285	// SslPolicy - SSL policy of the application gateway resource.
3286	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
3287	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
3288	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
3289	// GatewayIPConfigurations - Subnets of application the gateway resource.
3290	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
3291	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
3292	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
3293	// SslCertificates - SSL certificates of the application gateway resource.
3294	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
3295	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
3296	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
3297	// FrontendPorts - Frontend ports of the application gateway resource.
3298	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
3299	// Probes - Probes of the application gateway resource.
3300	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
3301	// BackendAddressPools - Backend address pool of the application gateway resource.
3302	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
3303	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
3304	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
3305	// HTTPListeners - Http listeners of the application gateway resource.
3306	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
3307	// URLPathMaps - URL path map of the application gateway resource.
3308	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
3309	// RequestRoutingRules - Request routing rules of the application gateway resource.
3310	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
3311	// RedirectConfigurations - Redirect configurations of the application gateway resource.
3312	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
3313	// WebApplicationFirewallConfiguration - Web application firewall configuration.
3314	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
3315	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
3316	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
3317	// EnableFips - Whether FIPS is enabled on the application gateway resource.
3318	EnableFips *bool `json:"enableFips,omitempty"`
3319	// AutoscaleConfiguration - Autoscale Configuration.
3320	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
3321	// ResourceGUID - Resource GUID property of the application gateway resource.
3322	ResourceGUID *string `json:"resourceGuid,omitempty"`
3323	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3324	ProvisioningState *string `json:"provisioningState,omitempty"`
3325}
3326
3327// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
3328type ApplicationGatewayRedirectConfiguration struct {
3329	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
3330	// Name - Name of the redirect configuration that is unique within an Application Gateway.
3331	Name *string `json:"name,omitempty"`
3332	// Etag - A unique read-only string that changes whenever the resource is updated.
3333	Etag *string `json:"etag,omitempty"`
3334	// Type - Type of the resource.
3335	Type *string `json:"type,omitempty"`
3336	// ID - Resource ID.
3337	ID *string `json:"id,omitempty"`
3338}
3339
3340// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
3341func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
3342	objectMap := make(map[string]interface{})
3343	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
3344		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
3345	}
3346	if agrc.Name != nil {
3347		objectMap["name"] = agrc.Name
3348	}
3349	if agrc.Etag != nil {
3350		objectMap["etag"] = agrc.Etag
3351	}
3352	if agrc.Type != nil {
3353		objectMap["type"] = agrc.Type
3354	}
3355	if agrc.ID != nil {
3356		objectMap["id"] = agrc.ID
3357	}
3358	return json.Marshal(objectMap)
3359}
3360
3361// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
3362func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
3363	var m map[string]*json.RawMessage
3364	err := json.Unmarshal(body, &m)
3365	if err != nil {
3366		return err
3367	}
3368	for k, v := range m {
3369		switch k {
3370		case "properties":
3371			if v != nil {
3372				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
3373				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
3374				if err != nil {
3375					return err
3376				}
3377				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
3378			}
3379		case "name":
3380			if v != nil {
3381				var name string
3382				err = json.Unmarshal(*v, &name)
3383				if err != nil {
3384					return err
3385				}
3386				agrc.Name = &name
3387			}
3388		case "etag":
3389			if v != nil {
3390				var etag string
3391				err = json.Unmarshal(*v, &etag)
3392				if err != nil {
3393					return err
3394				}
3395				agrc.Etag = &etag
3396			}
3397		case "type":
3398			if v != nil {
3399				var typeVar string
3400				err = json.Unmarshal(*v, &typeVar)
3401				if err != nil {
3402					return err
3403				}
3404				agrc.Type = &typeVar
3405			}
3406		case "id":
3407			if v != nil {
3408				var ID string
3409				err = json.Unmarshal(*v, &ID)
3410				if err != nil {
3411					return err
3412				}
3413				agrc.ID = &ID
3414			}
3415		}
3416	}
3417
3418	return nil
3419}
3420
3421// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
3422// application gateway.
3423type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
3424	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
3425	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
3426	// TargetListener - Reference to a listener to redirect the request to.
3427	TargetListener *SubResource `json:"targetListener,omitempty"`
3428	// TargetURL - Url to redirect the request to.
3429	TargetURL *string `json:"targetUrl,omitempty"`
3430	// IncludePath - Include path in the redirected url.
3431	IncludePath *bool `json:"includePath,omitempty"`
3432	// IncludeQueryString - Include query string in the redirected url.
3433	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
3434	// RequestRoutingRules - Request routing specifying redirect configuration.
3435	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
3436	// URLPathMaps - Url path maps specifying default redirect configuration.
3437	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
3438	// PathRules - Path rules specifying redirect configuration.
3439	PathRules *[]SubResource `json:"pathRules,omitempty"`
3440}
3441
3442// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
3443type ApplicationGatewayRequestRoutingRule struct {
3444	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
3445	// Name - Name of the request routing rule that is unique within an Application Gateway.
3446	Name *string `json:"name,omitempty"`
3447	// Etag - A unique read-only string that changes whenever the resource is updated.
3448	Etag *string `json:"etag,omitempty"`
3449	// Type - Type of the resource.
3450	Type *string `json:"type,omitempty"`
3451	// ID - Resource ID.
3452	ID *string `json:"id,omitempty"`
3453}
3454
3455// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
3456func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
3457	objectMap := make(map[string]interface{})
3458	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
3459		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
3460	}
3461	if agrrr.Name != nil {
3462		objectMap["name"] = agrrr.Name
3463	}
3464	if agrrr.Etag != nil {
3465		objectMap["etag"] = agrrr.Etag
3466	}
3467	if agrrr.Type != nil {
3468		objectMap["type"] = agrrr.Type
3469	}
3470	if agrrr.ID != nil {
3471		objectMap["id"] = agrrr.ID
3472	}
3473	return json.Marshal(objectMap)
3474}
3475
3476// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
3477func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
3478	var m map[string]*json.RawMessage
3479	err := json.Unmarshal(body, &m)
3480	if err != nil {
3481		return err
3482	}
3483	for k, v := range m {
3484		switch k {
3485		case "properties":
3486			if v != nil {
3487				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
3488				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
3489				if err != nil {
3490					return err
3491				}
3492				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
3493			}
3494		case "name":
3495			if v != nil {
3496				var name string
3497				err = json.Unmarshal(*v, &name)
3498				if err != nil {
3499					return err
3500				}
3501				agrrr.Name = &name
3502			}
3503		case "etag":
3504			if v != nil {
3505				var etag string
3506				err = json.Unmarshal(*v, &etag)
3507				if err != nil {
3508					return err
3509				}
3510				agrrr.Etag = &etag
3511			}
3512		case "type":
3513			if v != nil {
3514				var typeVar string
3515				err = json.Unmarshal(*v, &typeVar)
3516				if err != nil {
3517					return err
3518				}
3519				agrrr.Type = &typeVar
3520			}
3521		case "id":
3522			if v != nil {
3523				var ID string
3524				err = json.Unmarshal(*v, &ID)
3525				if err != nil {
3526					return err
3527				}
3528				agrrr.ID = &ID
3529			}
3530		}
3531	}
3532
3533	return nil
3534}
3535
3536// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
3537// application gateway.
3538type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
3539	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
3540	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
3541	// BackendAddressPool - Backend address pool resource of the application gateway.
3542	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3543	// BackendHTTPSettings - Backend http settings resource of the application gateway.
3544	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3545	// HTTPListener - Http listener resource of the application gateway.
3546	HTTPListener *SubResource `json:"httpListener,omitempty"`
3547	// URLPathMap - URL path map resource of the application gateway.
3548	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
3549	// RedirectConfiguration - Redirect configuration resource of the application gateway.
3550	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3551	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3552	ProvisioningState *string `json:"provisioningState,omitempty"`
3553}
3554
3555// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
3556// long-running operation.
3557type ApplicationGatewaysBackendHealthFuture struct {
3558	azure.Future
3559}
3560
3561// Result returns the result of the asynchronous operation.
3562// If the operation has not completed it will return an error.
3563func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
3564	var done bool
3565	done, err = future.DoneWithContext(context.Background(), client)
3566	if err != nil {
3567		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
3568		return
3569	}
3570	if !done {
3571		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
3572		return
3573	}
3574	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3575	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
3576		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
3577		if err != nil {
3578			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
3579		}
3580	}
3581	return
3582}
3583
3584// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3585// long-running operation.
3586type ApplicationGatewaysCreateOrUpdateFuture struct {
3587	azure.Future
3588}
3589
3590// Result returns the result of the asynchronous operation.
3591// If the operation has not completed it will return an error.
3592func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
3593	var done bool
3594	done, err = future.DoneWithContext(context.Background(), client)
3595	if err != nil {
3596		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3597		return
3598	}
3599	if !done {
3600		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
3601		return
3602	}
3603	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3604	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
3605		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
3606		if err != nil {
3607			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
3608		}
3609	}
3610	return
3611}
3612
3613// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
3614// long-running operation.
3615type ApplicationGatewaysDeleteFuture struct {
3616	azure.Future
3617}
3618
3619// Result returns the result of the asynchronous operation.
3620// If the operation has not completed it will return an error.
3621func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3622	var done bool
3623	done, err = future.DoneWithContext(context.Background(), client)
3624	if err != nil {
3625		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
3626		return
3627	}
3628	if !done {
3629		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
3630		return
3631	}
3632	ar.Response = future.Response()
3633	return
3634}
3635
3636// ApplicationGatewaySku SKU of an application gateway
3637type ApplicationGatewaySku struct {
3638	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
3639	Name ApplicationGatewaySkuName `json:"name,omitempty"`
3640	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
3641	Tier ApplicationGatewayTier `json:"tier,omitempty"`
3642	// Capacity - Capacity (instance count) of an application gateway.
3643	Capacity *int32 `json:"capacity,omitempty"`
3644}
3645
3646// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
3647type ApplicationGatewaySslCertificate struct {
3648	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
3649	// Name - Name of the SSL certificate that is unique within an Application Gateway.
3650	Name *string `json:"name,omitempty"`
3651	// Etag - A unique read-only string that changes whenever the resource is updated.
3652	Etag *string `json:"etag,omitempty"`
3653	// Type - Type of the resource.
3654	Type *string `json:"type,omitempty"`
3655	// ID - Resource ID.
3656	ID *string `json:"id,omitempty"`
3657}
3658
3659// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
3660func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
3661	objectMap := make(map[string]interface{})
3662	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
3663		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
3664	}
3665	if agsc.Name != nil {
3666		objectMap["name"] = agsc.Name
3667	}
3668	if agsc.Etag != nil {
3669		objectMap["etag"] = agsc.Etag
3670	}
3671	if agsc.Type != nil {
3672		objectMap["type"] = agsc.Type
3673	}
3674	if agsc.ID != nil {
3675		objectMap["id"] = agsc.ID
3676	}
3677	return json.Marshal(objectMap)
3678}
3679
3680// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
3681func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
3682	var m map[string]*json.RawMessage
3683	err := json.Unmarshal(body, &m)
3684	if err != nil {
3685		return err
3686	}
3687	for k, v := range m {
3688		switch k {
3689		case "properties":
3690			if v != nil {
3691				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
3692				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
3693				if err != nil {
3694					return err
3695				}
3696				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
3697			}
3698		case "name":
3699			if v != nil {
3700				var name string
3701				err = json.Unmarshal(*v, &name)
3702				if err != nil {
3703					return err
3704				}
3705				agsc.Name = &name
3706			}
3707		case "etag":
3708			if v != nil {
3709				var etag string
3710				err = json.Unmarshal(*v, &etag)
3711				if err != nil {
3712					return err
3713				}
3714				agsc.Etag = &etag
3715			}
3716		case "type":
3717			if v != nil {
3718				var typeVar string
3719				err = json.Unmarshal(*v, &typeVar)
3720				if err != nil {
3721					return err
3722				}
3723				agsc.Type = &typeVar
3724			}
3725		case "id":
3726			if v != nil {
3727				var ID string
3728				err = json.Unmarshal(*v, &ID)
3729				if err != nil {
3730					return err
3731				}
3732				agsc.ID = &ID
3733			}
3734		}
3735	}
3736
3737	return nil
3738}
3739
3740// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
3741// gateway.
3742type ApplicationGatewaySslCertificatePropertiesFormat struct {
3743	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
3744	Data *string `json:"data,omitempty"`
3745	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
3746	Password *string `json:"password,omitempty"`
3747	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
3748	PublicCertData *string `json:"publicCertData,omitempty"`
3749	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
3750	ProvisioningState *string `json:"provisioningState,omitempty"`
3751}
3752
3753// ApplicationGatewaySslPolicy application Gateway Ssl policy.
3754type ApplicationGatewaySslPolicy struct {
3755	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
3756	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
3757	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
3758	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
3759	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
3760	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
3761	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
3762	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3763	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3764	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3765}
3766
3767// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
3768type ApplicationGatewaySslPredefinedPolicy struct {
3769	autorest.Response `json:"-"`
3770	// Name - Name of the Ssl predefined policy.
3771	Name                                                   *string `json:"name,omitempty"`
3772	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
3773	// ID - Resource ID.
3774	ID *string `json:"id,omitempty"`
3775}
3776
3777// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
3778func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
3779	objectMap := make(map[string]interface{})
3780	if agspp.Name != nil {
3781		objectMap["name"] = agspp.Name
3782	}
3783	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
3784		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3785	}
3786	if agspp.ID != nil {
3787		objectMap["id"] = agspp.ID
3788	}
3789	return json.Marshal(objectMap)
3790}
3791
3792// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
3793func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
3794	var m map[string]*json.RawMessage
3795	err := json.Unmarshal(body, &m)
3796	if err != nil {
3797		return err
3798	}
3799	for k, v := range m {
3800		switch k {
3801		case "name":
3802			if v != nil {
3803				var name string
3804				err = json.Unmarshal(*v, &name)
3805				if err != nil {
3806					return err
3807				}
3808				agspp.Name = &name
3809			}
3810		case "properties":
3811			if v != nil {
3812				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3813				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
3814				if err != nil {
3815					return err
3816				}
3817				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
3818			}
3819		case "id":
3820			if v != nil {
3821				var ID string
3822				err = json.Unmarshal(*v, &ID)
3823				if err != nil {
3824					return err
3825				}
3826				agspp.ID = &ID
3827			}
3828		}
3829	}
3830
3831	return nil
3832}
3833
3834// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
3835// ApplicationGatewaySslPredefinedPolicy
3836type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
3837	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
3838	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3839	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3840	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3841}
3842
3843// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
3844// long-running operation.
3845type ApplicationGatewaysStartFuture struct {
3846	azure.Future
3847}
3848
3849// Result returns the result of the asynchronous operation.
3850// If the operation has not completed it will return an error.
3851func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3852	var done bool
3853	done, err = future.DoneWithContext(context.Background(), client)
3854	if err != nil {
3855		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
3856		return
3857	}
3858	if !done {
3859		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
3860		return
3861	}
3862	ar.Response = future.Response()
3863	return
3864}
3865
3866// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
3867// operation.
3868type ApplicationGatewaysStopFuture struct {
3869	azure.Future
3870}
3871
3872// Result returns the result of the asynchronous operation.
3873// If the operation has not completed it will return an error.
3874func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3875	var done bool
3876	done, err = future.DoneWithContext(context.Background(), client)
3877	if err != nil {
3878		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
3879		return
3880	}
3881	if !done {
3882		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
3883		return
3884	}
3885	ar.Response = future.Response()
3886	return
3887}
3888
3889// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3890// long-running operation.
3891type ApplicationGatewaysUpdateTagsFuture struct {
3892	azure.Future
3893}
3894
3895// Result returns the result of the asynchronous operation.
3896// If the operation has not completed it will return an error.
3897func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
3898	var done bool
3899	done, err = future.DoneWithContext(context.Background(), client)
3900	if err != nil {
3901		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3902		return
3903	}
3904	if !done {
3905		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
3906		return
3907	}
3908	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3909	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
3910		ag, err = client.UpdateTagsResponder(ag.Response.Response)
3911		if err != nil {
3912			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
3913		}
3914	}
3915	return
3916}
3917
3918// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
3919// PathBasedRouting.
3920type ApplicationGatewayURLPathMap struct {
3921	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
3922	// Name - Name of the URL path map that is unique within an Application Gateway.
3923	Name *string `json:"name,omitempty"`
3924	// Etag - A unique read-only string that changes whenever the resource is updated.
3925	Etag *string `json:"etag,omitempty"`
3926	// Type - Type of the resource.
3927	Type *string `json:"type,omitempty"`
3928	// ID - Resource ID.
3929	ID *string `json:"id,omitempty"`
3930}
3931
3932// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3933func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3934	objectMap := make(map[string]interface{})
3935	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3936		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3937	}
3938	if agupm.Name != nil {
3939		objectMap["name"] = agupm.Name
3940	}
3941	if agupm.Etag != nil {
3942		objectMap["etag"] = agupm.Etag
3943	}
3944	if agupm.Type != nil {
3945		objectMap["type"] = agupm.Type
3946	}
3947	if agupm.ID != nil {
3948		objectMap["id"] = agupm.ID
3949	}
3950	return json.Marshal(objectMap)
3951}
3952
3953// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3954func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3955	var m map[string]*json.RawMessage
3956	err := json.Unmarshal(body, &m)
3957	if err != nil {
3958		return err
3959	}
3960	for k, v := range m {
3961		switch k {
3962		case "properties":
3963			if v != nil {
3964				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3965				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3966				if err != nil {
3967					return err
3968				}
3969				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
3970			}
3971		case "name":
3972			if v != nil {
3973				var name string
3974				err = json.Unmarshal(*v, &name)
3975				if err != nil {
3976					return err
3977				}
3978				agupm.Name = &name
3979			}
3980		case "etag":
3981			if v != nil {
3982				var etag string
3983				err = json.Unmarshal(*v, &etag)
3984				if err != nil {
3985					return err
3986				}
3987				agupm.Etag = &etag
3988			}
3989		case "type":
3990			if v != nil {
3991				var typeVar string
3992				err = json.Unmarshal(*v, &typeVar)
3993				if err != nil {
3994					return err
3995				}
3996				agupm.Type = &typeVar
3997			}
3998		case "id":
3999			if v != nil {
4000				var ID string
4001				err = json.Unmarshal(*v, &ID)
4002				if err != nil {
4003					return err
4004				}
4005				agupm.ID = &ID
4006			}
4007		}
4008	}
4009
4010	return nil
4011}
4012
4013// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
4014type ApplicationGatewayURLPathMapPropertiesFormat struct {
4015	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
4016	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
4017	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
4018	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
4019	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
4020	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
4021	// PathRules - Path rule of URL path map resource.
4022	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
4023	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4024	ProvisioningState *string `json:"provisioningState,omitempty"`
4025}
4026
4027// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
4028// configuration.
4029type ApplicationGatewayWebApplicationFirewallConfiguration struct {
4030	// Enabled - Whether the web application firewall is enabled or not.
4031	Enabled *bool `json:"enabled,omitempty"`
4032	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
4033	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
4034	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
4035	RuleSetType *string `json:"ruleSetType,omitempty"`
4036	// RuleSetVersion - The version of the rule set type.
4037	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4038	// DisabledRuleGroups - The disabled rule groups.
4039	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
4040	// RequestBodyCheck - Whether allow WAF to check request Body.
4041	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
4042	// MaxRequestBodySize - Maximum request body size for WAF.
4043	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
4044}
4045
4046// ApplicationSecurityGroup an application security group in a resource group.
4047type ApplicationSecurityGroup struct {
4048	autorest.Response `json:"-"`
4049	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4050	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4051	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4052	Etag *string `json:"etag,omitempty"`
4053	// ID - Resource ID.
4054	ID *string `json:"id,omitempty"`
4055	// Name - READ-ONLY; Resource name.
4056	Name *string `json:"name,omitempty"`
4057	// Type - READ-ONLY; Resource type.
4058	Type *string `json:"type,omitempty"`
4059	// Location - Resource location.
4060	Location *string `json:"location,omitempty"`
4061	// Tags - Resource tags.
4062	Tags map[string]*string `json:"tags"`
4063}
4064
4065// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4066func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4067	objectMap := make(map[string]interface{})
4068	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4069		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4070	}
4071	if asg.ID != nil {
4072		objectMap["id"] = asg.ID
4073	}
4074	if asg.Location != nil {
4075		objectMap["location"] = asg.Location
4076	}
4077	if asg.Tags != nil {
4078		objectMap["tags"] = asg.Tags
4079	}
4080	return json.Marshal(objectMap)
4081}
4082
4083// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4084func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4085	var m map[string]*json.RawMessage
4086	err := json.Unmarshal(body, &m)
4087	if err != nil {
4088		return err
4089	}
4090	for k, v := range m {
4091		switch k {
4092		case "properties":
4093			if v != nil {
4094				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4095				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4096				if err != nil {
4097					return err
4098				}
4099				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4100			}
4101		case "etag":
4102			if v != nil {
4103				var etag string
4104				err = json.Unmarshal(*v, &etag)
4105				if err != nil {
4106					return err
4107				}
4108				asg.Etag = &etag
4109			}
4110		case "id":
4111			if v != nil {
4112				var ID string
4113				err = json.Unmarshal(*v, &ID)
4114				if err != nil {
4115					return err
4116				}
4117				asg.ID = &ID
4118			}
4119		case "name":
4120			if v != nil {
4121				var name string
4122				err = json.Unmarshal(*v, &name)
4123				if err != nil {
4124					return err
4125				}
4126				asg.Name = &name
4127			}
4128		case "type":
4129			if v != nil {
4130				var typeVar string
4131				err = json.Unmarshal(*v, &typeVar)
4132				if err != nil {
4133					return err
4134				}
4135				asg.Type = &typeVar
4136			}
4137		case "location":
4138			if v != nil {
4139				var location string
4140				err = json.Unmarshal(*v, &location)
4141				if err != nil {
4142					return err
4143				}
4144				asg.Location = &location
4145			}
4146		case "tags":
4147			if v != nil {
4148				var tags map[string]*string
4149				err = json.Unmarshal(*v, &tags)
4150				if err != nil {
4151					return err
4152				}
4153				asg.Tags = tags
4154			}
4155		}
4156	}
4157
4158	return nil
4159}
4160
4161// ApplicationSecurityGroupListResult a list of application security groups.
4162type ApplicationSecurityGroupListResult struct {
4163	autorest.Response `json:"-"`
4164	// Value - A list of application security groups.
4165	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4166	// NextLink - READ-ONLY; The URL to get the next set of results.
4167	NextLink *string `json:"nextLink,omitempty"`
4168}
4169
4170// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4171// ApplicationSecurityGroup values.
4172type ApplicationSecurityGroupListResultIterator struct {
4173	i    int
4174	page ApplicationSecurityGroupListResultPage
4175}
4176
4177// NextWithContext advances to the next value.  If there was an error making
4178// the request the iterator does not advance and the error is returned.
4179func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4180	if tracing.IsEnabled() {
4181		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4182		defer func() {
4183			sc := -1
4184			if iter.Response().Response.Response != nil {
4185				sc = iter.Response().Response.Response.StatusCode
4186			}
4187			tracing.EndSpan(ctx, sc, err)
4188		}()
4189	}
4190	iter.i++
4191	if iter.i < len(iter.page.Values()) {
4192		return nil
4193	}
4194	err = iter.page.NextWithContext(ctx)
4195	if err != nil {
4196		iter.i--
4197		return err
4198	}
4199	iter.i = 0
4200	return nil
4201}
4202
4203// Next advances to the next value.  If there was an error making
4204// the request the iterator does not advance and the error is returned.
4205// Deprecated: Use NextWithContext() instead.
4206func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4207	return iter.NextWithContext(context.Background())
4208}
4209
4210// NotDone returns true if the enumeration should be started or is not yet complete.
4211func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4212	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4213}
4214
4215// Response returns the raw server response from the last page request.
4216func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4217	return iter.page.Response()
4218}
4219
4220// Value returns the current value or a zero-initialized value if the
4221// iterator has advanced beyond the end of the collection.
4222func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4223	if !iter.page.NotDone() {
4224		return ApplicationSecurityGroup{}
4225	}
4226	return iter.page.Values()[iter.i]
4227}
4228
4229// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4230func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4231	return ApplicationSecurityGroupListResultIterator{page: page}
4232}
4233
4234// IsEmpty returns true if the ListResult contains no values.
4235func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4236	return asglr.Value == nil || len(*asglr.Value) == 0
4237}
4238
4239// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4240// It returns nil if no more results exist.
4241func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4242	if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 {
4243		return nil, nil
4244	}
4245	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4246		autorest.AsJSON(),
4247		autorest.AsGet(),
4248		autorest.WithBaseURL(to.String(asglr.NextLink)))
4249}
4250
4251// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4252type ApplicationSecurityGroupListResultPage struct {
4253	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4254	asglr ApplicationSecurityGroupListResult
4255}
4256
4257// NextWithContext advances to the next page of values.  If there was an error making
4258// the request the page does not advance and the error is returned.
4259func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4260	if tracing.IsEnabled() {
4261		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4262		defer func() {
4263			sc := -1
4264			if page.Response().Response.Response != nil {
4265				sc = page.Response().Response.Response.StatusCode
4266			}
4267			tracing.EndSpan(ctx, sc, err)
4268		}()
4269	}
4270	next, err := page.fn(ctx, page.asglr)
4271	if err != nil {
4272		return err
4273	}
4274	page.asglr = next
4275	return nil
4276}
4277
4278// Next advances to the next page of values.  If there was an error making
4279// the request the page does not advance and the error is returned.
4280// Deprecated: Use NextWithContext() instead.
4281func (page *ApplicationSecurityGroupListResultPage) Next() error {
4282	return page.NextWithContext(context.Background())
4283}
4284
4285// NotDone returns true if the page enumeration should be started or is not yet complete.
4286func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4287	return !page.asglr.IsEmpty()
4288}
4289
4290// Response returns the raw server response from the last page request.
4291func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4292	return page.asglr
4293}
4294
4295// Values returns the slice of values for the current page or nil if there are no values.
4296func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4297	if page.asglr.IsEmpty() {
4298		return nil
4299	}
4300	return *page.asglr.Value
4301}
4302
4303// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4304func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4305	return ApplicationSecurityGroupListResultPage{fn: getNextPage}
4306}
4307
4308// ApplicationSecurityGroupPropertiesFormat application security group properties.
4309type ApplicationSecurityGroupPropertiesFormat struct {
4310	// ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
4311	ResourceGUID *string `json:"resourceGuid,omitempty"`
4312	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
4313	ProvisioningState *string `json:"provisioningState,omitempty"`
4314}
4315
4316// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4317// of a long-running operation.
4318type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4319	azure.Future
4320}
4321
4322// Result returns the result of the asynchronous operation.
4323// If the operation has not completed it will return an error.
4324func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
4325	var done bool
4326	done, err = future.DoneWithContext(context.Background(), client)
4327	if err != nil {
4328		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4329		return
4330	}
4331	if !done {
4332		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
4333		return
4334	}
4335	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4336	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
4337		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
4338		if err != nil {
4339			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
4340		}
4341	}
4342	return
4343}
4344
4345// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4346// long-running operation.
4347type ApplicationSecurityGroupsDeleteFuture struct {
4348	azure.Future
4349}
4350
4351// Result returns the result of the asynchronous operation.
4352// If the operation has not completed it will return an error.
4353func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
4354	var done bool
4355	done, err = future.DoneWithContext(context.Background(), client)
4356	if err != nil {
4357		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
4358		return
4359	}
4360	if !done {
4361		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
4362		return
4363	}
4364	ar.Response = future.Response()
4365	return
4366}
4367
4368// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4369// that belongs to an ExpressRouteCircuit.
4370type AuthorizationListResult struct {
4371	autorest.Response `json:"-"`
4372	// Value - The authorizations in an ExpressRoute Circuit.
4373	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4374	// NextLink - The URL to get the next set of results.
4375	NextLink *string `json:"nextLink,omitempty"`
4376}
4377
4378// AuthorizationListResultIterator provides access to a complete listing of
4379// ExpressRouteCircuitAuthorization values.
4380type AuthorizationListResultIterator struct {
4381	i    int
4382	page AuthorizationListResultPage
4383}
4384
4385// NextWithContext advances to the next value.  If there was an error making
4386// the request the iterator does not advance and the error is returned.
4387func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4388	if tracing.IsEnabled() {
4389		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4390		defer func() {
4391			sc := -1
4392			if iter.Response().Response.Response != nil {
4393				sc = iter.Response().Response.Response.StatusCode
4394			}
4395			tracing.EndSpan(ctx, sc, err)
4396		}()
4397	}
4398	iter.i++
4399	if iter.i < len(iter.page.Values()) {
4400		return nil
4401	}
4402	err = iter.page.NextWithContext(ctx)
4403	if err != nil {
4404		iter.i--
4405		return err
4406	}
4407	iter.i = 0
4408	return nil
4409}
4410
4411// Next advances to the next value.  If there was an error making
4412// the request the iterator does not advance and the error is returned.
4413// Deprecated: Use NextWithContext() instead.
4414func (iter *AuthorizationListResultIterator) Next() error {
4415	return iter.NextWithContext(context.Background())
4416}
4417
4418// NotDone returns true if the enumeration should be started or is not yet complete.
4419func (iter AuthorizationListResultIterator) NotDone() bool {
4420	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4421}
4422
4423// Response returns the raw server response from the last page request.
4424func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4425	return iter.page.Response()
4426}
4427
4428// Value returns the current value or a zero-initialized value if the
4429// iterator has advanced beyond the end of the collection.
4430func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4431	if !iter.page.NotDone() {
4432		return ExpressRouteCircuitAuthorization{}
4433	}
4434	return iter.page.Values()[iter.i]
4435}
4436
4437// Creates a new instance of the AuthorizationListResultIterator type.
4438func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4439	return AuthorizationListResultIterator{page: page}
4440}
4441
4442// IsEmpty returns true if the ListResult contains no values.
4443func (alr AuthorizationListResult) IsEmpty() bool {
4444	return alr.Value == nil || len(*alr.Value) == 0
4445}
4446
4447// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4448// It returns nil if no more results exist.
4449func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4450	if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
4451		return nil, nil
4452	}
4453	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4454		autorest.AsJSON(),
4455		autorest.AsGet(),
4456		autorest.WithBaseURL(to.String(alr.NextLink)))
4457}
4458
4459// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4460type AuthorizationListResultPage struct {
4461	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4462	alr AuthorizationListResult
4463}
4464
4465// NextWithContext advances to the next page of values.  If there was an error making
4466// the request the page does not advance and the error is returned.
4467func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4468	if tracing.IsEnabled() {
4469		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
4470		defer func() {
4471			sc := -1
4472			if page.Response().Response.Response != nil {
4473				sc = page.Response().Response.Response.StatusCode
4474			}
4475			tracing.EndSpan(ctx, sc, err)
4476		}()
4477	}
4478	next, err := page.fn(ctx, page.alr)
4479	if err != nil {
4480		return err
4481	}
4482	page.alr = next
4483	return nil
4484}
4485
4486// Next advances to the next page of values.  If there was an error making
4487// the request the page does not advance and the error is returned.
4488// Deprecated: Use NextWithContext() instead.
4489func (page *AuthorizationListResultPage) Next() error {
4490	return page.NextWithContext(context.Background())
4491}
4492
4493// NotDone returns true if the page enumeration should be started or is not yet complete.
4494func (page AuthorizationListResultPage) NotDone() bool {
4495	return !page.alr.IsEmpty()
4496}
4497
4498// Response returns the raw server response from the last page request.
4499func (page AuthorizationListResultPage) Response() AuthorizationListResult {
4500	return page.alr
4501}
4502
4503// Values returns the slice of values for the current page or nil if there are no values.
4504func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
4505	if page.alr.IsEmpty() {
4506		return nil
4507	}
4508	return *page.alr.Value
4509}
4510
4511// Creates a new instance of the AuthorizationListResultPage type.
4512func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
4513	return AuthorizationListResultPage{fn: getNextPage}
4514}
4515
4516// AuthorizationPropertiesFormat ...
4517type AuthorizationPropertiesFormat struct {
4518	// AuthorizationKey - The authorization key.
4519	AuthorizationKey *string `json:"authorizationKey,omitempty"`
4520	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
4521	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
4522	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4523	ProvisioningState *string `json:"provisioningState,omitempty"`
4524}
4525
4526// Availability availability of the metric.
4527type Availability struct {
4528	// TimeGrain - The time grain of the availability.
4529	TimeGrain *string `json:"timeGrain,omitempty"`
4530	// Retention - The retention of the availability.
4531	Retention *string `json:"retention,omitempty"`
4532	// BlobDuration - Duration of the availability blob.
4533	BlobDuration *string `json:"blobDuration,omitempty"`
4534}
4535
4536// AvailableProvidersList list of available countries with details.
4537type AvailableProvidersList struct {
4538	autorest.Response `json:"-"`
4539	// Countries - List of available countries.
4540	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4541}
4542
4543// AvailableProvidersListCity city or town details.
4544type AvailableProvidersListCity struct {
4545	// CityName - The city or town name.
4546	CityName *string `json:"cityName,omitempty"`
4547	// Providers - A list of Internet service providers.
4548	Providers *[]string `json:"providers,omitempty"`
4549}
4550
4551// AvailableProvidersListCountry country details.
4552type AvailableProvidersListCountry struct {
4553	// CountryName - The country name.
4554	CountryName *string `json:"countryName,omitempty"`
4555	// Providers - A list of Internet service providers.
4556	Providers *[]string `json:"providers,omitempty"`
4557	// States - List of available states in the country.
4558	States *[]AvailableProvidersListState `json:"states,omitempty"`
4559}
4560
4561// AvailableProvidersListParameters constraints that determine the list of available Internet service
4562// providers.
4563type AvailableProvidersListParameters struct {
4564	// AzureLocations - A list of Azure regions.
4565	AzureLocations *[]string `json:"azureLocations,omitempty"`
4566	// Country - The country for available providers list.
4567	Country *string `json:"country,omitempty"`
4568	// State - The state for available providers list.
4569	State *string `json:"state,omitempty"`
4570	// City - The city or town for available providers list.
4571	City *string `json:"city,omitempty"`
4572}
4573
4574// AvailableProvidersListState state details.
4575type AvailableProvidersListState struct {
4576	// StateName - The state name.
4577	StateName *string `json:"stateName,omitempty"`
4578	// Providers - A list of Internet service providers.
4579	Providers *[]string `json:"providers,omitempty"`
4580	// Cities - List of available cities or towns in the state.
4581	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4582}
4583
4584// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4585// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4586// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4587// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4588// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4589// and error information regarding the failure.
4590type AzureAsyncOperationResult struct {
4591	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4592	Status OperationStatus `json:"status,omitempty"`
4593	Error  *Error          `json:"error,omitempty"`
4594}
4595
4596// AzureFirewall azure Firewall resource
4597type AzureFirewall struct {
4598	autorest.Response              `json:"-"`
4599	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4600	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4601	Etag *string `json:"etag,omitempty"`
4602	// ID - Resource ID.
4603	ID *string `json:"id,omitempty"`
4604	// Name - READ-ONLY; Resource name.
4605	Name *string `json:"name,omitempty"`
4606	// Type - READ-ONLY; Resource type.
4607	Type *string `json:"type,omitempty"`
4608	// Location - Resource location.
4609	Location *string `json:"location,omitempty"`
4610	// Tags - Resource tags.
4611	Tags map[string]*string `json:"tags"`
4612}
4613
4614// MarshalJSON is the custom marshaler for AzureFirewall.
4615func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4616	objectMap := make(map[string]interface{})
4617	if af.AzureFirewallPropertiesFormat != nil {
4618		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4619	}
4620	if af.ID != nil {
4621		objectMap["id"] = af.ID
4622	}
4623	if af.Location != nil {
4624		objectMap["location"] = af.Location
4625	}
4626	if af.Tags != nil {
4627		objectMap["tags"] = af.Tags
4628	}
4629	return json.Marshal(objectMap)
4630}
4631
4632// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4633func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4634	var m map[string]*json.RawMessage
4635	err := json.Unmarshal(body, &m)
4636	if err != nil {
4637		return err
4638	}
4639	for k, v := range m {
4640		switch k {
4641		case "properties":
4642			if v != nil {
4643				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4644				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4645				if err != nil {
4646					return err
4647				}
4648				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4649			}
4650		case "etag":
4651			if v != nil {
4652				var etag string
4653				err = json.Unmarshal(*v, &etag)
4654				if err != nil {
4655					return err
4656				}
4657				af.Etag = &etag
4658			}
4659		case "id":
4660			if v != nil {
4661				var ID string
4662				err = json.Unmarshal(*v, &ID)
4663				if err != nil {
4664					return err
4665				}
4666				af.ID = &ID
4667			}
4668		case "name":
4669			if v != nil {
4670				var name string
4671				err = json.Unmarshal(*v, &name)
4672				if err != nil {
4673					return err
4674				}
4675				af.Name = &name
4676			}
4677		case "type":
4678			if v != nil {
4679				var typeVar string
4680				err = json.Unmarshal(*v, &typeVar)
4681				if err != nil {
4682					return err
4683				}
4684				af.Type = &typeVar
4685			}
4686		case "location":
4687			if v != nil {
4688				var location string
4689				err = json.Unmarshal(*v, &location)
4690				if err != nil {
4691					return err
4692				}
4693				af.Location = &location
4694			}
4695		case "tags":
4696			if v != nil {
4697				var tags map[string]*string
4698				err = json.Unmarshal(*v, &tags)
4699				if err != nil {
4700					return err
4701				}
4702				af.Tags = tags
4703			}
4704		}
4705	}
4706
4707	return nil
4708}
4709
4710// AzureFirewallApplicationRule properties of an application rule.
4711type AzureFirewallApplicationRule struct {
4712	// Name - Name of the application rule.
4713	Name *string `json:"name,omitempty"`
4714	// Description - Description of the rule.
4715	Description *string `json:"description,omitempty"`
4716	// SourceAddresses - List of source IP addresses for this rule.
4717	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4718	// Protocols - Array of ApplicationRuleProtocols.
4719	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4720	// TargetUrls - List of URLs for this rule.
4721	TargetUrls *[]string `json:"targetUrls,omitempty"`
4722}
4723
4724// AzureFirewallApplicationRuleCollection application rule collection resource
4725type AzureFirewallApplicationRuleCollection struct {
4726	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4727	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4728	Name *string `json:"name,omitempty"`
4729	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4730	Etag *string `json:"etag,omitempty"`
4731	// ID - Resource ID.
4732	ID *string `json:"id,omitempty"`
4733}
4734
4735// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4736func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4737	objectMap := make(map[string]interface{})
4738	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4739		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4740	}
4741	if afarc.Name != nil {
4742		objectMap["name"] = afarc.Name
4743	}
4744	if afarc.ID != nil {
4745		objectMap["id"] = afarc.ID
4746	}
4747	return json.Marshal(objectMap)
4748}
4749
4750// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4751func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4752	var m map[string]*json.RawMessage
4753	err := json.Unmarshal(body, &m)
4754	if err != nil {
4755		return err
4756	}
4757	for k, v := range m {
4758		switch k {
4759		case "properties":
4760			if v != nil {
4761				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4762				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4763				if err != nil {
4764					return err
4765				}
4766				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4767			}
4768		case "name":
4769			if v != nil {
4770				var name string
4771				err = json.Unmarshal(*v, &name)
4772				if err != nil {
4773					return err
4774				}
4775				afarc.Name = &name
4776			}
4777		case "etag":
4778			if v != nil {
4779				var etag string
4780				err = json.Unmarshal(*v, &etag)
4781				if err != nil {
4782					return err
4783				}
4784				afarc.Etag = &etag
4785			}
4786		case "id":
4787			if v != nil {
4788				var ID string
4789				err = json.Unmarshal(*v, &ID)
4790				if err != nil {
4791					return err
4792				}
4793				afarc.ID = &ID
4794			}
4795		}
4796	}
4797
4798	return nil
4799}
4800
4801// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4802type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4803	// Priority - Priority of the application rule collection resource.
4804	Priority *int32 `json:"priority,omitempty"`
4805	// Action - The action type of a rule collection
4806	Action *AzureFirewallRCAction `json:"action,omitempty"`
4807	// Rules - Collection of rules used by a application rule collection.
4808	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4809	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4810	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4811}
4812
4813// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4814type AzureFirewallApplicationRuleProtocol struct {
4815	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4816	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4817	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4818	Port *int32 `json:"port,omitempty"`
4819}
4820
4821// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4822type AzureFirewallIPConfiguration struct {
4823	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4824	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4825	Name *string `json:"name,omitempty"`
4826	// Etag - A unique read-only string that changes whenever the resource is updated.
4827	Etag *string `json:"etag,omitempty"`
4828	// ID - Resource ID.
4829	ID *string `json:"id,omitempty"`
4830}
4831
4832// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4833func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4834	objectMap := make(map[string]interface{})
4835	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4836		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4837	}
4838	if afic.Name != nil {
4839		objectMap["name"] = afic.Name
4840	}
4841	if afic.Etag != nil {
4842		objectMap["etag"] = afic.Etag
4843	}
4844	if afic.ID != nil {
4845		objectMap["id"] = afic.ID
4846	}
4847	return json.Marshal(objectMap)
4848}
4849
4850// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4851func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4852	var m map[string]*json.RawMessage
4853	err := json.Unmarshal(body, &m)
4854	if err != nil {
4855		return err
4856	}
4857	for k, v := range m {
4858		switch k {
4859		case "properties":
4860			if v != nil {
4861				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4862				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4863				if err != nil {
4864					return err
4865				}
4866				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4867			}
4868		case "name":
4869			if v != nil {
4870				var name string
4871				err = json.Unmarshal(*v, &name)
4872				if err != nil {
4873					return err
4874				}
4875				afic.Name = &name
4876			}
4877		case "etag":
4878			if v != nil {
4879				var etag string
4880				err = json.Unmarshal(*v, &etag)
4881				if err != nil {
4882					return err
4883				}
4884				afic.Etag = &etag
4885			}
4886		case "id":
4887			if v != nil {
4888				var ID string
4889				err = json.Unmarshal(*v, &ID)
4890				if err != nil {
4891					return err
4892				}
4893				afic.ID = &ID
4894			}
4895		}
4896	}
4897
4898	return nil
4899}
4900
4901// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4902type AzureFirewallIPConfigurationPropertiesFormat struct {
4903	// PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4904	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4905	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4906	Subnet *SubResource `json:"subnet,omitempty"`
4907	// InternalPublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input.
4908	InternalPublicIPAddress *SubResource `json:"internalPublicIpAddress,omitempty"`
4909	// PublicIPAddress - Reference of the PublicIP resource. This field is populated in the output.
4910	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4911	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4912	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4913}
4914
4915// AzureFirewallListResult response for ListAzureFirewalls API service call.
4916type AzureFirewallListResult struct {
4917	autorest.Response `json:"-"`
4918	// Value - List of a Azure Firewalls in a resource group.
4919	Value *[]AzureFirewall `json:"value,omitempty"`
4920	// NextLink - URL to get the next set of results.
4921	NextLink *string `json:"nextLink,omitempty"`
4922}
4923
4924// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4925type AzureFirewallListResultIterator struct {
4926	i    int
4927	page AzureFirewallListResultPage
4928}
4929
4930// NextWithContext advances to the next value.  If there was an error making
4931// the request the iterator does not advance and the error is returned.
4932func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4933	if tracing.IsEnabled() {
4934		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4935		defer func() {
4936			sc := -1
4937			if iter.Response().Response.Response != nil {
4938				sc = iter.Response().Response.Response.StatusCode
4939			}
4940			tracing.EndSpan(ctx, sc, err)
4941		}()
4942	}
4943	iter.i++
4944	if iter.i < len(iter.page.Values()) {
4945		return nil
4946	}
4947	err = iter.page.NextWithContext(ctx)
4948	if err != nil {
4949		iter.i--
4950		return err
4951	}
4952	iter.i = 0
4953	return nil
4954}
4955
4956// Next advances to the next value.  If there was an error making
4957// the request the iterator does not advance and the error is returned.
4958// Deprecated: Use NextWithContext() instead.
4959func (iter *AzureFirewallListResultIterator) Next() error {
4960	return iter.NextWithContext(context.Background())
4961}
4962
4963// NotDone returns true if the enumeration should be started or is not yet complete.
4964func (iter AzureFirewallListResultIterator) NotDone() bool {
4965	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4966}
4967
4968// Response returns the raw server response from the last page request.
4969func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4970	return iter.page.Response()
4971}
4972
4973// Value returns the current value or a zero-initialized value if the
4974// iterator has advanced beyond the end of the collection.
4975func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4976	if !iter.page.NotDone() {
4977		return AzureFirewall{}
4978	}
4979	return iter.page.Values()[iter.i]
4980}
4981
4982// Creates a new instance of the AzureFirewallListResultIterator type.
4983func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4984	return AzureFirewallListResultIterator{page: page}
4985}
4986
4987// IsEmpty returns true if the ListResult contains no values.
4988func (aflr AzureFirewallListResult) IsEmpty() bool {
4989	return aflr.Value == nil || len(*aflr.Value) == 0
4990}
4991
4992// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4993// It returns nil if no more results exist.
4994func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4995	if aflr.NextLink == nil || len(to.String(aflr.NextLink)) < 1 {
4996		return nil, nil
4997	}
4998	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4999		autorest.AsJSON(),
5000		autorest.AsGet(),
5001		autorest.WithBaseURL(to.String(aflr.NextLink)))
5002}
5003
5004// AzureFirewallListResultPage contains a page of AzureFirewall values.
5005type AzureFirewallListResultPage struct {
5006	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5007	aflr AzureFirewallListResult
5008}
5009
5010// NextWithContext advances to the next page of values.  If there was an error making
5011// the request the page does not advance and the error is returned.
5012func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5013	if tracing.IsEnabled() {
5014		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5015		defer func() {
5016			sc := -1
5017			if page.Response().Response.Response != nil {
5018				sc = page.Response().Response.Response.StatusCode
5019			}
5020			tracing.EndSpan(ctx, sc, err)
5021		}()
5022	}
5023	next, err := page.fn(ctx, page.aflr)
5024	if err != nil {
5025		return err
5026	}
5027	page.aflr = next
5028	return nil
5029}
5030
5031// Next advances to the next page of values.  If there was an error making
5032// the request the page does not advance and the error is returned.
5033// Deprecated: Use NextWithContext() instead.
5034func (page *AzureFirewallListResultPage) Next() error {
5035	return page.NextWithContext(context.Background())
5036}
5037
5038// NotDone returns true if the page enumeration should be started or is not yet complete.
5039func (page AzureFirewallListResultPage) NotDone() bool {
5040	return !page.aflr.IsEmpty()
5041}
5042
5043// Response returns the raw server response from the last page request.
5044func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5045	return page.aflr
5046}
5047
5048// Values returns the slice of values for the current page or nil if there are no values.
5049func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5050	if page.aflr.IsEmpty() {
5051		return nil
5052	}
5053	return *page.aflr.Value
5054}
5055
5056// Creates a new instance of the AzureFirewallListResultPage type.
5057func NewAzureFirewallListResultPage(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5058	return AzureFirewallListResultPage{fn: getNextPage}
5059}
5060
5061// AzureFirewallNetworkRule properties of the network rule.
5062type AzureFirewallNetworkRule struct {
5063	// Name - Name of the network rule.
5064	Name *string `json:"name,omitempty"`
5065	// Description - Description of the rule.
5066	Description *string `json:"description,omitempty"`
5067	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5068	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5069	// SourceAddresses - List of source IP addresses for this rule.
5070	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5071	// DestinationAddresses - List of destination IP addresses.
5072	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5073	// DestinationPorts - List of destination ports.
5074	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5075}
5076
5077// AzureFirewallNetworkRuleCollection network rule collection resource
5078type AzureFirewallNetworkRuleCollection struct {
5079	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5080	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5081	Name *string `json:"name,omitempty"`
5082	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5083	Etag *string `json:"etag,omitempty"`
5084	// ID - Resource ID.
5085	ID *string `json:"id,omitempty"`
5086}
5087
5088// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5089func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5090	objectMap := make(map[string]interface{})
5091	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5092		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5093	}
5094	if afnrc.Name != nil {
5095		objectMap["name"] = afnrc.Name
5096	}
5097	if afnrc.ID != nil {
5098		objectMap["id"] = afnrc.ID
5099	}
5100	return json.Marshal(objectMap)
5101}
5102
5103// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5104func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5105	var m map[string]*json.RawMessage
5106	err := json.Unmarshal(body, &m)
5107	if err != nil {
5108		return err
5109	}
5110	for k, v := range m {
5111		switch k {
5112		case "properties":
5113			if v != nil {
5114				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5115				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5116				if err != nil {
5117					return err
5118				}
5119				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5120			}
5121		case "name":
5122			if v != nil {
5123				var name string
5124				err = json.Unmarshal(*v, &name)
5125				if err != nil {
5126					return err
5127				}
5128				afnrc.Name = &name
5129			}
5130		case "etag":
5131			if v != nil {
5132				var etag string
5133				err = json.Unmarshal(*v, &etag)
5134				if err != nil {
5135					return err
5136				}
5137				afnrc.Etag = &etag
5138			}
5139		case "id":
5140			if v != nil {
5141				var ID string
5142				err = json.Unmarshal(*v, &ID)
5143				if err != nil {
5144					return err
5145				}
5146				afnrc.ID = &ID
5147			}
5148		}
5149	}
5150
5151	return nil
5152}
5153
5154// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5155type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5156	// Priority - Priority of the network rule collection resource.
5157	Priority *int32 `json:"priority,omitempty"`
5158	// Action - The action type of a rule collection
5159	Action *AzureFirewallRCAction `json:"action,omitempty"`
5160	// Rules - Collection of rules used by a network rule collection.
5161	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5162	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5163	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5164}
5165
5166// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5167type AzureFirewallPropertiesFormat struct {
5168	// ApplicationRuleCollections - Collection of application rule collections used by a Azure Firewall.
5169	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5170	// NetworkRuleCollections - Collection of network rule collections used by a Azure Firewall.
5171	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5172	// IPConfigurations - IP configuration of the Azure Firewall resource.
5173	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5174	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5175	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5176}
5177
5178// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5179type AzureFirewallRCAction struct {
5180	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5181	Type AzureFirewallRCActionType `json:"type,omitempty"`
5182}
5183
5184// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5185// long-running operation.
5186type AzureFirewallsCreateOrUpdateFuture struct {
5187	azure.Future
5188}
5189
5190// Result returns the result of the asynchronous operation.
5191// If the operation has not completed it will return an error.
5192func (future *AzureFirewallsCreateOrUpdateFuture) Result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5193	var done bool
5194	done, err = future.DoneWithContext(context.Background(), client)
5195	if err != nil {
5196		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5197		return
5198	}
5199	if !done {
5200		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5201		return
5202	}
5203	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5204	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5205		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5206		if err != nil {
5207			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5208		}
5209	}
5210	return
5211}
5212
5213// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5214// operation.
5215type AzureFirewallsDeleteFuture struct {
5216	azure.Future
5217}
5218
5219// Result returns the result of the asynchronous operation.
5220// If the operation has not completed it will return an error.
5221func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5222	var done bool
5223	done, err = future.DoneWithContext(context.Background(), client)
5224	if err != nil {
5225		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5226		return
5227	}
5228	if !done {
5229		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5230		return
5231	}
5232	ar.Response = future.Response()
5233	return
5234}
5235
5236// AzureReachabilityReport azure reachability report details.
5237type AzureReachabilityReport struct {
5238	autorest.Response `json:"-"`
5239	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5240	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
5241	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5242	// ReachabilityReport - List of Azure reachability report items.
5243	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5244}
5245
5246// AzureReachabilityReportItem azure reachability report details for a given provider location.
5247type AzureReachabilityReportItem struct {
5248	// Provider - The Internet service provider.
5249	Provider *string `json:"provider,omitempty"`
5250	// AzureLocation - The Azure region.
5251	AzureLocation *string `json:"azureLocation,omitempty"`
5252	// Latencies - List of latency details for each of the time series.
5253	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5254}
5255
5256// AzureReachabilityReportLatencyInfo details on latency for a time series.
5257type AzureReachabilityReportLatencyInfo struct {
5258	// TimeStamp - The time stamp.
5259	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5260	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5261	Score *int32 `json:"score,omitempty"`
5262}
5263
5264// AzureReachabilityReportLocation parameters that define a geographic location.
5265type AzureReachabilityReportLocation struct {
5266	// Country - The name of the country.
5267	Country *string `json:"country,omitempty"`
5268	// State - The name of the state.
5269	State *string `json:"state,omitempty"`
5270	// City - The name of the city or town.
5271	City *string `json:"city,omitempty"`
5272}
5273
5274// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5275type AzureReachabilityReportParameters struct {
5276	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5277	// Providers - List of Internet service providers.
5278	Providers *[]string `json:"providers,omitempty"`
5279	// AzureLocations - Optional Azure regions to scope the query to.
5280	AzureLocations *[]string `json:"azureLocations,omitempty"`
5281	// StartTime - The start time for the Azure reachability report.
5282	StartTime *date.Time `json:"startTime,omitempty"`
5283	// EndTime - The end time for the Azure reachability report.
5284	EndTime *date.Time `json:"endTime,omitempty"`
5285}
5286
5287// BackendAddressPool pool of backend IP addresses.
5288type BackendAddressPool struct {
5289	autorest.Response `json:"-"`
5290	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5291	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5292	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5293	Name *string `json:"name,omitempty"`
5294	// Etag - A unique read-only string that changes whenever the resource is updated.
5295	Etag *string `json:"etag,omitempty"`
5296	// ID - Resource ID.
5297	ID *string `json:"id,omitempty"`
5298}
5299
5300// MarshalJSON is the custom marshaler for BackendAddressPool.
5301func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5302	objectMap := make(map[string]interface{})
5303	if bap.BackendAddressPoolPropertiesFormat != nil {
5304		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5305	}
5306	if bap.Name != nil {
5307		objectMap["name"] = bap.Name
5308	}
5309	if bap.Etag != nil {
5310		objectMap["etag"] = bap.Etag
5311	}
5312	if bap.ID != nil {
5313		objectMap["id"] = bap.ID
5314	}
5315	return json.Marshal(objectMap)
5316}
5317
5318// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5319func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5320	var m map[string]*json.RawMessage
5321	err := json.Unmarshal(body, &m)
5322	if err != nil {
5323		return err
5324	}
5325	for k, v := range m {
5326		switch k {
5327		case "properties":
5328			if v != nil {
5329				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5330				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5331				if err != nil {
5332					return err
5333				}
5334				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5335			}
5336		case "name":
5337			if v != nil {
5338				var name string
5339				err = json.Unmarshal(*v, &name)
5340				if err != nil {
5341					return err
5342				}
5343				bap.Name = &name
5344			}
5345		case "etag":
5346			if v != nil {
5347				var etag string
5348				err = json.Unmarshal(*v, &etag)
5349				if err != nil {
5350					return err
5351				}
5352				bap.Etag = &etag
5353			}
5354		case "id":
5355			if v != nil {
5356				var ID string
5357				err = json.Unmarshal(*v, &ID)
5358				if err != nil {
5359					return err
5360				}
5361				bap.ID = &ID
5362			}
5363		}
5364	}
5365
5366	return nil
5367}
5368
5369// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5370type BackendAddressPoolPropertiesFormat struct {
5371	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5372	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5373	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5374	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5375	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5376	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
5377	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5378	ProvisioningState *string `json:"provisioningState,omitempty"`
5379}
5380
5381// BGPCommunity contains bgp community information offered in Service Community resources.
5382type BGPCommunity struct {
5383	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5384	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5385	// CommunityName - The name of the bgp community. e.g. Skype.
5386	CommunityName *string `json:"communityName,omitempty"`
5387	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5388	CommunityValue *string `json:"communityValue,omitempty"`
5389	// CommunityPrefixes - The prefixes that the bgp community contains.
5390	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5391	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5392	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5393	// ServiceGroup - The service group of the bgp community contains.
5394	ServiceGroup *string `json:"serviceGroup,omitempty"`
5395}
5396
5397// BgpPeerStatus BGP peer status details
5398type BgpPeerStatus struct {
5399	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5400	LocalAddress *string `json:"localAddress,omitempty"`
5401	// Neighbor - READ-ONLY; The remote BGP peer
5402	Neighbor *string `json:"neighbor,omitempty"`
5403	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5404	Asn *int32 `json:"asn,omitempty"`
5405	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5406	State BgpPeerState `json:"state,omitempty"`
5407	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5408	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5409	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5410	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5411	// MessagesSent - READ-ONLY; The number of BGP messages sent
5412	MessagesSent *int64 `json:"messagesSent,omitempty"`
5413	// MessagesReceived - READ-ONLY; The number of BGP messages received
5414	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5415}
5416
5417// BgpPeerStatusListResult response for list BGP peer status API service call
5418type BgpPeerStatusListResult struct {
5419	autorest.Response `json:"-"`
5420	// Value - List of BGP peers
5421	Value *[]BgpPeerStatus `json:"value,omitempty"`
5422}
5423
5424// BgpServiceCommunity service Community Properties.
5425type BgpServiceCommunity struct {
5426	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5427	// ID - Resource ID.
5428	ID *string `json:"id,omitempty"`
5429	// Name - READ-ONLY; Resource name.
5430	Name *string `json:"name,omitempty"`
5431	// Type - READ-ONLY; Resource type.
5432	Type *string `json:"type,omitempty"`
5433	// Location - Resource location.
5434	Location *string `json:"location,omitempty"`
5435	// Tags - Resource tags.
5436	Tags map[string]*string `json:"tags"`
5437}
5438
5439// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5440func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5441	objectMap := make(map[string]interface{})
5442	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5443		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5444	}
5445	if bsc.ID != nil {
5446		objectMap["id"] = bsc.ID
5447	}
5448	if bsc.Location != nil {
5449		objectMap["location"] = bsc.Location
5450	}
5451	if bsc.Tags != nil {
5452		objectMap["tags"] = bsc.Tags
5453	}
5454	return json.Marshal(objectMap)
5455}
5456
5457// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5458func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5459	var m map[string]*json.RawMessage
5460	err := json.Unmarshal(body, &m)
5461	if err != nil {
5462		return err
5463	}
5464	for k, v := range m {
5465		switch k {
5466		case "properties":
5467			if v != nil {
5468				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5469				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5470				if err != nil {
5471					return err
5472				}
5473				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5474			}
5475		case "id":
5476			if v != nil {
5477				var ID string
5478				err = json.Unmarshal(*v, &ID)
5479				if err != nil {
5480					return err
5481				}
5482				bsc.ID = &ID
5483			}
5484		case "name":
5485			if v != nil {
5486				var name string
5487				err = json.Unmarshal(*v, &name)
5488				if err != nil {
5489					return err
5490				}
5491				bsc.Name = &name
5492			}
5493		case "type":
5494			if v != nil {
5495				var typeVar string
5496				err = json.Unmarshal(*v, &typeVar)
5497				if err != nil {
5498					return err
5499				}
5500				bsc.Type = &typeVar
5501			}
5502		case "location":
5503			if v != nil {
5504				var location string
5505				err = json.Unmarshal(*v, &location)
5506				if err != nil {
5507					return err
5508				}
5509				bsc.Location = &location
5510			}
5511		case "tags":
5512			if v != nil {
5513				var tags map[string]*string
5514				err = json.Unmarshal(*v, &tags)
5515				if err != nil {
5516					return err
5517				}
5518				bsc.Tags = tags
5519			}
5520		}
5521	}
5522
5523	return nil
5524}
5525
5526// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5527type BgpServiceCommunityListResult struct {
5528	autorest.Response `json:"-"`
5529	// Value - A list of service community resources.
5530	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5531	// NextLink - The URL to get the next set of results.
5532	NextLink *string `json:"nextLink,omitempty"`
5533}
5534
5535// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5536// values.
5537type BgpServiceCommunityListResultIterator struct {
5538	i    int
5539	page BgpServiceCommunityListResultPage
5540}
5541
5542// NextWithContext advances to the next value.  If there was an error making
5543// the request the iterator does not advance and the error is returned.
5544func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5545	if tracing.IsEnabled() {
5546		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5547		defer func() {
5548			sc := -1
5549			if iter.Response().Response.Response != nil {
5550				sc = iter.Response().Response.Response.StatusCode
5551			}
5552			tracing.EndSpan(ctx, sc, err)
5553		}()
5554	}
5555	iter.i++
5556	if iter.i < len(iter.page.Values()) {
5557		return nil
5558	}
5559	err = iter.page.NextWithContext(ctx)
5560	if err != nil {
5561		iter.i--
5562		return err
5563	}
5564	iter.i = 0
5565	return nil
5566}
5567
5568// Next advances to the next value.  If there was an error making
5569// the request the iterator does not advance and the error is returned.
5570// Deprecated: Use NextWithContext() instead.
5571func (iter *BgpServiceCommunityListResultIterator) Next() error {
5572	return iter.NextWithContext(context.Background())
5573}
5574
5575// NotDone returns true if the enumeration should be started or is not yet complete.
5576func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5577	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5578}
5579
5580// Response returns the raw server response from the last page request.
5581func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5582	return iter.page.Response()
5583}
5584
5585// Value returns the current value or a zero-initialized value if the
5586// iterator has advanced beyond the end of the collection.
5587func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5588	if !iter.page.NotDone() {
5589		return BgpServiceCommunity{}
5590	}
5591	return iter.page.Values()[iter.i]
5592}
5593
5594// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5595func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5596	return BgpServiceCommunityListResultIterator{page: page}
5597}
5598
5599// IsEmpty returns true if the ListResult contains no values.
5600func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5601	return bsclr.Value == nil || len(*bsclr.Value) == 0
5602}
5603
5604// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5605// It returns nil if no more results exist.
5606func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5607	if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 {
5608		return nil, nil
5609	}
5610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5611		autorest.AsJSON(),
5612		autorest.AsGet(),
5613		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5614}
5615
5616// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5617type BgpServiceCommunityListResultPage struct {
5618	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5619	bsclr BgpServiceCommunityListResult
5620}
5621
5622// NextWithContext advances to the next page of values.  If there was an error making
5623// the request the page does not advance and the error is returned.
5624func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5625	if tracing.IsEnabled() {
5626		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5627		defer func() {
5628			sc := -1
5629			if page.Response().Response.Response != nil {
5630				sc = page.Response().Response.Response.StatusCode
5631			}
5632			tracing.EndSpan(ctx, sc, err)
5633		}()
5634	}
5635	next, err := page.fn(ctx, page.bsclr)
5636	if err != nil {
5637		return err
5638	}
5639	page.bsclr = next
5640	return nil
5641}
5642
5643// Next advances to the next page of values.  If there was an error making
5644// the request the page does not advance and the error is returned.
5645// Deprecated: Use NextWithContext() instead.
5646func (page *BgpServiceCommunityListResultPage) Next() error {
5647	return page.NextWithContext(context.Background())
5648}
5649
5650// NotDone returns true if the page enumeration should be started or is not yet complete.
5651func (page BgpServiceCommunityListResultPage) NotDone() bool {
5652	return !page.bsclr.IsEmpty()
5653}
5654
5655// Response returns the raw server response from the last page request.
5656func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5657	return page.bsclr
5658}
5659
5660// Values returns the slice of values for the current page or nil if there are no values.
5661func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5662	if page.bsclr.IsEmpty() {
5663		return nil
5664	}
5665	return *page.bsclr.Value
5666}
5667
5668// Creates a new instance of the BgpServiceCommunityListResultPage type.
5669func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5670	return BgpServiceCommunityListResultPage{fn: getNextPage}
5671}
5672
5673// BgpServiceCommunityPropertiesFormat properties of Service Community.
5674type BgpServiceCommunityPropertiesFormat struct {
5675	// ServiceName - The name of the bgp community. e.g. Skype.
5676	ServiceName *string `json:"serviceName,omitempty"`
5677	// BgpCommunities - Get a list of bgp communities.
5678	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5679}
5680
5681// BgpSettings BGP settings details
5682type BgpSettings struct {
5683	// Asn - The BGP speaker's ASN.
5684	Asn *int64 `json:"asn,omitempty"`
5685	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5686	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5687	// PeerWeight - The weight added to routes learned from this BGP speaker.
5688	PeerWeight *int32 `json:"peerWeight,omitempty"`
5689}
5690
5691// ConnectionMonitor parameters that define the operation to create a connection monitor.
5692type ConnectionMonitor struct {
5693	// Location - Connection monitor location.
5694	Location *string `json:"location,omitempty"`
5695	// Tags - Connection monitor tags.
5696	Tags                         map[string]*string `json:"tags"`
5697	*ConnectionMonitorParameters `json:"properties,omitempty"`
5698}
5699
5700// MarshalJSON is the custom marshaler for ConnectionMonitor.
5701func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5702	objectMap := make(map[string]interface{})
5703	if cm.Location != nil {
5704		objectMap["location"] = cm.Location
5705	}
5706	if cm.Tags != nil {
5707		objectMap["tags"] = cm.Tags
5708	}
5709	if cm.ConnectionMonitorParameters != nil {
5710		objectMap["properties"] = cm.ConnectionMonitorParameters
5711	}
5712	return json.Marshal(objectMap)
5713}
5714
5715// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5716func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5717	var m map[string]*json.RawMessage
5718	err := json.Unmarshal(body, &m)
5719	if err != nil {
5720		return err
5721	}
5722	for k, v := range m {
5723		switch k {
5724		case "location":
5725			if v != nil {
5726				var location string
5727				err = json.Unmarshal(*v, &location)
5728				if err != nil {
5729					return err
5730				}
5731				cm.Location = &location
5732			}
5733		case "tags":
5734			if v != nil {
5735				var tags map[string]*string
5736				err = json.Unmarshal(*v, &tags)
5737				if err != nil {
5738					return err
5739				}
5740				cm.Tags = tags
5741			}
5742		case "properties":
5743			if v != nil {
5744				var connectionMonitorParameters ConnectionMonitorParameters
5745				err = json.Unmarshal(*v, &connectionMonitorParameters)
5746				if err != nil {
5747					return err
5748				}
5749				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5750			}
5751		}
5752	}
5753
5754	return nil
5755}
5756
5757// ConnectionMonitorDestination describes the destination of connection monitor.
5758type ConnectionMonitorDestination struct {
5759	// ResourceID - The ID of the resource used as the destination by connection monitor.
5760	ResourceID *string `json:"resourceId,omitempty"`
5761	// Address - Address of the connection monitor destination (IP or domain name).
5762	Address *string `json:"address,omitempty"`
5763	// Port - The destination port used by connection monitor.
5764	Port *int32 `json:"port,omitempty"`
5765}
5766
5767// ConnectionMonitorListResult list of connection monitors.
5768type ConnectionMonitorListResult struct {
5769	autorest.Response `json:"-"`
5770	// Value - Information about connection monitors.
5771	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5772}
5773
5774// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5775type ConnectionMonitorParameters struct {
5776	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5777	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5778	// AutoStart - Determines if the connection monitor will start automatically once created.
5779	AutoStart *bool `json:"autoStart,omitempty"`
5780	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5781	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5782}
5783
5784// ConnectionMonitorQueryResult list of connection states snapshots.
5785type ConnectionMonitorQueryResult struct {
5786	autorest.Response `json:"-"`
5787	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5788	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5789	// States - Information about connection states.
5790	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5791}
5792
5793// ConnectionMonitorResult information about the connection monitor.
5794type ConnectionMonitorResult struct {
5795	autorest.Response `json:"-"`
5796	// Name - READ-ONLY; Name of the connection monitor.
5797	Name *string `json:"name,omitempty"`
5798	// ID - READ-ONLY; ID of the connection monitor.
5799	ID   *string `json:"id,omitempty"`
5800	Etag *string `json:"etag,omitempty"`
5801	// Type - READ-ONLY; Connection monitor type.
5802	Type *string `json:"type,omitempty"`
5803	// Location - Connection monitor location.
5804	Location *string `json:"location,omitempty"`
5805	// Tags - Connection monitor tags.
5806	Tags                               map[string]*string `json:"tags"`
5807	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5808}
5809
5810// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5811func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5812	objectMap := make(map[string]interface{})
5813	if cmr.Etag != nil {
5814		objectMap["etag"] = cmr.Etag
5815	}
5816	if cmr.Location != nil {
5817		objectMap["location"] = cmr.Location
5818	}
5819	if cmr.Tags != nil {
5820		objectMap["tags"] = cmr.Tags
5821	}
5822	if cmr.ConnectionMonitorResultProperties != nil {
5823		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5824	}
5825	return json.Marshal(objectMap)
5826}
5827
5828// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5829func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5830	var m map[string]*json.RawMessage
5831	err := json.Unmarshal(body, &m)
5832	if err != nil {
5833		return err
5834	}
5835	for k, v := range m {
5836		switch k {
5837		case "name":
5838			if v != nil {
5839				var name string
5840				err = json.Unmarshal(*v, &name)
5841				if err != nil {
5842					return err
5843				}
5844				cmr.Name = &name
5845			}
5846		case "id":
5847			if v != nil {
5848				var ID string
5849				err = json.Unmarshal(*v, &ID)
5850				if err != nil {
5851					return err
5852				}
5853				cmr.ID = &ID
5854			}
5855		case "etag":
5856			if v != nil {
5857				var etag string
5858				err = json.Unmarshal(*v, &etag)
5859				if err != nil {
5860					return err
5861				}
5862				cmr.Etag = &etag
5863			}
5864		case "type":
5865			if v != nil {
5866				var typeVar string
5867				err = json.Unmarshal(*v, &typeVar)
5868				if err != nil {
5869					return err
5870				}
5871				cmr.Type = &typeVar
5872			}
5873		case "location":
5874			if v != nil {
5875				var location string
5876				err = json.Unmarshal(*v, &location)
5877				if err != nil {
5878					return err
5879				}
5880				cmr.Location = &location
5881			}
5882		case "tags":
5883			if v != nil {
5884				var tags map[string]*string
5885				err = json.Unmarshal(*v, &tags)
5886				if err != nil {
5887					return err
5888				}
5889				cmr.Tags = tags
5890			}
5891		case "properties":
5892			if v != nil {
5893				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5894				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5895				if err != nil {
5896					return err
5897				}
5898				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5899			}
5900		}
5901	}
5902
5903	return nil
5904}
5905
5906// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5907type ConnectionMonitorResultProperties struct {
5908	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5909	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5910	// StartTime - The date and time when the connection monitor was started.
5911	StartTime *date.Time `json:"startTime,omitempty"`
5912	// MonitoringStatus - The monitoring status of the connection monitor.
5913	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5914	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5915	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5916	// AutoStart - Determines if the connection monitor will start automatically once created.
5917	AutoStart *bool `json:"autoStart,omitempty"`
5918	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5919	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5920}
5921
5922// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5923// long-running operation.
5924type ConnectionMonitorsCreateOrUpdateFuture struct {
5925	azure.Future
5926}
5927
5928// Result returns the result of the asynchronous operation.
5929// If the operation has not completed it will return an error.
5930func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5931	var done bool
5932	done, err = future.DoneWithContext(context.Background(), client)
5933	if err != nil {
5934		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5935		return
5936	}
5937	if !done {
5938		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5939		return
5940	}
5941	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5942	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5943		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5944		if err != nil {
5945			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5946		}
5947	}
5948	return
5949}
5950
5951// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5952// long-running operation.
5953type ConnectionMonitorsDeleteFuture struct {
5954	azure.Future
5955}
5956
5957// Result returns the result of the asynchronous operation.
5958// If the operation has not completed it will return an error.
5959func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5960	var done bool
5961	done, err = future.DoneWithContext(context.Background(), client)
5962	if err != nil {
5963		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5964		return
5965	}
5966	if !done {
5967		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5968		return
5969	}
5970	ar.Response = future.Response()
5971	return
5972}
5973
5974// ConnectionMonitorSource describes the source of connection monitor.
5975type ConnectionMonitorSource struct {
5976	// ResourceID - The ID of the resource used as the source by connection monitor.
5977	ResourceID *string `json:"resourceId,omitempty"`
5978	// Port - The source port used by connection monitor.
5979	Port *int32 `json:"port,omitempty"`
5980}
5981
5982// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5983// operation.
5984type ConnectionMonitorsQueryFuture struct {
5985	azure.Future
5986}
5987
5988// Result returns the result of the asynchronous operation.
5989// If the operation has not completed it will return an error.
5990func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5991	var done bool
5992	done, err = future.DoneWithContext(context.Background(), client)
5993	if err != nil {
5994		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5995		return
5996	}
5997	if !done {
5998		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5999		return
6000	}
6001	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6002	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
6003		cmqr, err = client.QueryResponder(cmqr.Response.Response)
6004		if err != nil {
6005			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
6006		}
6007	}
6008	return
6009}
6010
6011// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
6012// operation.
6013type ConnectionMonitorsStartFuture struct {
6014	azure.Future
6015}
6016
6017// Result returns the result of the asynchronous operation.
6018// If the operation has not completed it will return an error.
6019func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6020	var done bool
6021	done, err = future.DoneWithContext(context.Background(), client)
6022	if err != nil {
6023		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
6024		return
6025	}
6026	if !done {
6027		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
6028		return
6029	}
6030	ar.Response = future.Response()
6031	return
6032}
6033
6034// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
6035// operation.
6036type ConnectionMonitorsStopFuture struct {
6037	azure.Future
6038}
6039
6040// Result returns the result of the asynchronous operation.
6041// If the operation has not completed it will return an error.
6042func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6043	var done bool
6044	done, err = future.DoneWithContext(context.Background(), client)
6045	if err != nil {
6046		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
6047		return
6048	}
6049	if !done {
6050		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
6051		return
6052	}
6053	ar.Response = future.Response()
6054	return
6055}
6056
6057// ConnectionResetSharedKey the virtual network connection reset shared key
6058type ConnectionResetSharedKey struct {
6059	autorest.Response `json:"-"`
6060	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
6061	KeyLength *int32 `json:"keyLength,omitempty"`
6062}
6063
6064// ConnectionSharedKey response for GetConnectionSharedKey API service call
6065type ConnectionSharedKey struct {
6066	autorest.Response `json:"-"`
6067	// Value - The virtual network connection shared key value.
6068	Value *string `json:"value,omitempty"`
6069	// ID - Resource ID.
6070	ID *string `json:"id,omitempty"`
6071}
6072
6073// ConnectionStateSnapshot connection state snapshot.
6074type ConnectionStateSnapshot struct {
6075	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
6076	ConnectionState ConnectionState `json:"connectionState,omitempty"`
6077	// StartTime - The start time of the connection snapshot.
6078	StartTime *date.Time `json:"startTime,omitempty"`
6079	// EndTime - The end time of the connection snapshot.
6080	EndTime *date.Time `json:"endTime,omitempty"`
6081	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
6082	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
6083	// Hops - READ-ONLY; List of hops between the source and the destination.
6084	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6085}
6086
6087// ConnectivityDestination parameters that define destination of connection.
6088type ConnectivityDestination struct {
6089	// ResourceID - The ID of the resource to which a connection attempt will be made.
6090	ResourceID *string `json:"resourceId,omitempty"`
6091	// Address - The IP address or URI the resource to which a connection attempt will be made.
6092	Address *string `json:"address,omitempty"`
6093	// Port - Port on which check connectivity will be performed.
6094	Port *int32 `json:"port,omitempty"`
6095}
6096
6097// ConnectivityHop information about a hop between the source and the destination.
6098type ConnectivityHop struct {
6099	// Type - READ-ONLY; The type of the hop.
6100	Type *string `json:"type,omitempty"`
6101	// ID - READ-ONLY; The ID of the hop.
6102	ID *string `json:"id,omitempty"`
6103	// Address - READ-ONLY; The IP address of the hop.
6104	Address *string `json:"address,omitempty"`
6105	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6106	ResourceID *string `json:"resourceId,omitempty"`
6107	// NextHopIds - READ-ONLY; List of next hop identifiers.
6108	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6109	// Issues - READ-ONLY; List of issues.
6110	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6111}
6112
6113// ConnectivityInformation information on the connectivity status.
6114type ConnectivityInformation struct {
6115	autorest.Response `json:"-"`
6116	// Hops - READ-ONLY; List of hops between the source and the destination.
6117	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6118	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6119	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6120	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6121	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6122	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6123	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6124	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6125	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6126	// ProbesSent - READ-ONLY; Total number of probes sent.
6127	ProbesSent *int32 `json:"probesSent,omitempty"`
6128	// ProbesFailed - READ-ONLY; Number of failed probes.
6129	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6130}
6131
6132// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6133type ConnectivityIssue struct {
6134	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6135	Origin Origin `json:"origin,omitempty"`
6136	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6137	Severity Severity `json:"severity,omitempty"`
6138	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6139	Type IssueType `json:"type,omitempty"`
6140	// Context - READ-ONLY; Provides additional context on the issue.
6141	Context *[]map[string]*string `json:"context,omitempty"`
6142}
6143
6144// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6145type ConnectivityParameters struct {
6146	Source      *ConnectivitySource      `json:"source,omitempty"`
6147	Destination *ConnectivityDestination `json:"destination,omitempty"`
6148	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6149	Protocol              Protocol               `json:"protocol,omitempty"`
6150	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6151}
6152
6153// ConnectivitySource parameters that define the source of the connection.
6154type ConnectivitySource struct {
6155	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6156	ResourceID *string `json:"resourceId,omitempty"`
6157	// Port - The source port from which a connectivity check will be performed.
6158	Port *int32 `json:"port,omitempty"`
6159}
6160
6161// DdosProtectionPlan a DDoS protection plan in a resource group.
6162type DdosProtectionPlan struct {
6163	autorest.Response `json:"-"`
6164	// ID - READ-ONLY; Resource ID.
6165	ID *string `json:"id,omitempty"`
6166	// Name - READ-ONLY; Resource name.
6167	Name *string `json:"name,omitempty"`
6168	// Type - READ-ONLY; Resource type.
6169	Type *string `json:"type,omitempty"`
6170	// Location - Resource location.
6171	Location *string `json:"location,omitempty"`
6172	// Tags - Resource tags.
6173	Tags map[string]*string `json:"tags"`
6174	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6175	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6176	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6177	Etag *string `json:"etag,omitempty"`
6178}
6179
6180// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6181func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6182	objectMap := make(map[string]interface{})
6183	if dpp.Location != nil {
6184		objectMap["location"] = dpp.Location
6185	}
6186	if dpp.Tags != nil {
6187		objectMap["tags"] = dpp.Tags
6188	}
6189	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6190		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6191	}
6192	return json.Marshal(objectMap)
6193}
6194
6195// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6196func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6197	var m map[string]*json.RawMessage
6198	err := json.Unmarshal(body, &m)
6199	if err != nil {
6200		return err
6201	}
6202	for k, v := range m {
6203		switch k {
6204		case "id":
6205			if v != nil {
6206				var ID string
6207				err = json.Unmarshal(*v, &ID)
6208				if err != nil {
6209					return err
6210				}
6211				dpp.ID = &ID
6212			}
6213		case "name":
6214			if v != nil {
6215				var name string
6216				err = json.Unmarshal(*v, &name)
6217				if err != nil {
6218					return err
6219				}
6220				dpp.Name = &name
6221			}
6222		case "type":
6223			if v != nil {
6224				var typeVar string
6225				err = json.Unmarshal(*v, &typeVar)
6226				if err != nil {
6227					return err
6228				}
6229				dpp.Type = &typeVar
6230			}
6231		case "location":
6232			if v != nil {
6233				var location string
6234				err = json.Unmarshal(*v, &location)
6235				if err != nil {
6236					return err
6237				}
6238				dpp.Location = &location
6239			}
6240		case "tags":
6241			if v != nil {
6242				var tags map[string]*string
6243				err = json.Unmarshal(*v, &tags)
6244				if err != nil {
6245					return err
6246				}
6247				dpp.Tags = tags
6248			}
6249		case "properties":
6250			if v != nil {
6251				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6252				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6253				if err != nil {
6254					return err
6255				}
6256				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6257			}
6258		case "etag":
6259			if v != nil {
6260				var etag string
6261				err = json.Unmarshal(*v, &etag)
6262				if err != nil {
6263					return err
6264				}
6265				dpp.Etag = &etag
6266			}
6267		}
6268	}
6269
6270	return nil
6271}
6272
6273// DdosProtectionPlanListResult a list of DDoS protection plans.
6274type DdosProtectionPlanListResult struct {
6275	autorest.Response `json:"-"`
6276	// Value - A list of DDoS protection plans.
6277	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6278	// NextLink - READ-ONLY; The URL to get the next set of results.
6279	NextLink *string `json:"nextLink,omitempty"`
6280}
6281
6282// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6283type DdosProtectionPlanListResultIterator struct {
6284	i    int
6285	page DdosProtectionPlanListResultPage
6286}
6287
6288// NextWithContext advances to the next value.  If there was an error making
6289// the request the iterator does not advance and the error is returned.
6290func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6291	if tracing.IsEnabled() {
6292		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6293		defer func() {
6294			sc := -1
6295			if iter.Response().Response.Response != nil {
6296				sc = iter.Response().Response.Response.StatusCode
6297			}
6298			tracing.EndSpan(ctx, sc, err)
6299		}()
6300	}
6301	iter.i++
6302	if iter.i < len(iter.page.Values()) {
6303		return nil
6304	}
6305	err = iter.page.NextWithContext(ctx)
6306	if err != nil {
6307		iter.i--
6308		return err
6309	}
6310	iter.i = 0
6311	return nil
6312}
6313
6314// Next advances to the next value.  If there was an error making
6315// the request the iterator does not advance and the error is returned.
6316// Deprecated: Use NextWithContext() instead.
6317func (iter *DdosProtectionPlanListResultIterator) Next() error {
6318	return iter.NextWithContext(context.Background())
6319}
6320
6321// NotDone returns true if the enumeration should be started or is not yet complete.
6322func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6323	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6324}
6325
6326// Response returns the raw server response from the last page request.
6327func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6328	return iter.page.Response()
6329}
6330
6331// Value returns the current value or a zero-initialized value if the
6332// iterator has advanced beyond the end of the collection.
6333func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6334	if !iter.page.NotDone() {
6335		return DdosProtectionPlan{}
6336	}
6337	return iter.page.Values()[iter.i]
6338}
6339
6340// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6341func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6342	return DdosProtectionPlanListResultIterator{page: page}
6343}
6344
6345// IsEmpty returns true if the ListResult contains no values.
6346func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6347	return dpplr.Value == nil || len(*dpplr.Value) == 0
6348}
6349
6350// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6351// It returns nil if no more results exist.
6352func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6353	if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 {
6354		return nil, nil
6355	}
6356	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6357		autorest.AsJSON(),
6358		autorest.AsGet(),
6359		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6360}
6361
6362// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6363type DdosProtectionPlanListResultPage struct {
6364	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6365	dpplr DdosProtectionPlanListResult
6366}
6367
6368// NextWithContext advances to the next page of values.  If there was an error making
6369// the request the page does not advance and the error is returned.
6370func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6371	if tracing.IsEnabled() {
6372		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6373		defer func() {
6374			sc := -1
6375			if page.Response().Response.Response != nil {
6376				sc = page.Response().Response.Response.StatusCode
6377			}
6378			tracing.EndSpan(ctx, sc, err)
6379		}()
6380	}
6381	next, err := page.fn(ctx, page.dpplr)
6382	if err != nil {
6383		return err
6384	}
6385	page.dpplr = next
6386	return nil
6387}
6388
6389// Next advances to the next page of values.  If there was an error making
6390// the request the page does not advance and the error is returned.
6391// Deprecated: Use NextWithContext() instead.
6392func (page *DdosProtectionPlanListResultPage) Next() error {
6393	return page.NextWithContext(context.Background())
6394}
6395
6396// NotDone returns true if the page enumeration should be started or is not yet complete.
6397func (page DdosProtectionPlanListResultPage) NotDone() bool {
6398	return !page.dpplr.IsEmpty()
6399}
6400
6401// Response returns the raw server response from the last page request.
6402func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6403	return page.dpplr
6404}
6405
6406// Values returns the slice of values for the current page or nil if there are no values.
6407func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6408	if page.dpplr.IsEmpty() {
6409		return nil
6410	}
6411	return *page.dpplr.Value
6412}
6413
6414// Creates a new instance of the DdosProtectionPlanListResultPage type.
6415func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6416	return DdosProtectionPlanListResultPage{fn: getNextPage}
6417}
6418
6419// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6420type DdosProtectionPlanPropertiesFormat struct {
6421	// ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
6422	ResourceGUID *string `json:"resourceGuid,omitempty"`
6423	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6424	ProvisioningState *string `json:"provisioningState,omitempty"`
6425	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6426	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6427}
6428
6429// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6430// long-running operation.
6431type DdosProtectionPlansCreateOrUpdateFuture struct {
6432	azure.Future
6433}
6434
6435// Result returns the result of the asynchronous operation.
6436// If the operation has not completed it will return an error.
6437func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
6438	var done bool
6439	done, err = future.DoneWithContext(context.Background(), client)
6440	if err != nil {
6441		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6442		return
6443	}
6444	if !done {
6445		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
6446		return
6447	}
6448	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6449	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
6450		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
6451		if err != nil {
6452			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
6453		}
6454	}
6455	return
6456}
6457
6458// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6459// long-running operation.
6460type DdosProtectionPlansDeleteFuture struct {
6461	azure.Future
6462}
6463
6464// Result returns the result of the asynchronous operation.
6465// If the operation has not completed it will return an error.
6466func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
6467	var done bool
6468	done, err = future.DoneWithContext(context.Background(), client)
6469	if err != nil {
6470		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
6471		return
6472	}
6473	if !done {
6474		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
6475		return
6476	}
6477	ar.Response = future.Response()
6478	return
6479}
6480
6481// DeviceProperties list of properties of the device.
6482type DeviceProperties struct {
6483	// DeviceVendor - Name of the device Vendor.
6484	DeviceVendor *string `json:"deviceVendor,omitempty"`
6485	// DeviceModel - Model of the device.
6486	DeviceModel *string `json:"deviceModel,omitempty"`
6487	// LinkSpeedInMbps - Link speed.
6488	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6489}
6490
6491// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6492// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6493type DhcpOptions struct {
6494	// DNSServers - The list of DNS servers IP addresses.
6495	DNSServers *[]string `json:"dnsServers,omitempty"`
6496}
6497
6498// Dimension dimension of the metric.
6499type Dimension struct {
6500	// Name - The name of the dimension.
6501	Name *string `json:"name,omitempty"`
6502	// DisplayName - The display name of the dimension.
6503	DisplayName *string `json:"displayName,omitempty"`
6504	// InternalName - The internal name of the dimension.
6505	InternalName *string `json:"internalName,omitempty"`
6506}
6507
6508// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6509type DNSNameAvailabilityResult struct {
6510	autorest.Response `json:"-"`
6511	// Available - Domain availability (True/False).
6512	Available *bool `json:"available,omitempty"`
6513}
6514
6515// EffectiveNetworkSecurityGroup effective network security group.
6516type EffectiveNetworkSecurityGroup struct {
6517	// NetworkSecurityGroup - The ID of network security group that is applied.
6518	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6519	// Association - Associated resources.
6520	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6521	// EffectiveSecurityRules - A collection of effective security rules.
6522	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6523	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6524	TagMap map[string][]string `json:"tagMap"`
6525}
6526
6527// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6528func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6529	objectMap := make(map[string]interface{})
6530	if ensg.NetworkSecurityGroup != nil {
6531		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6532	}
6533	if ensg.Association != nil {
6534		objectMap["association"] = ensg.Association
6535	}
6536	if ensg.EffectiveSecurityRules != nil {
6537		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6538	}
6539	if ensg.TagMap != nil {
6540		objectMap["tagMap"] = ensg.TagMap
6541	}
6542	return json.Marshal(objectMap)
6543}
6544
6545// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6546type EffectiveNetworkSecurityGroupAssociation struct {
6547	// Subnet - The ID of the subnet if assigned.
6548	Subnet *SubResource `json:"subnet,omitempty"`
6549	// NetworkInterface - The ID of the network interface if assigned.
6550	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6551}
6552
6553// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6554// call.
6555type EffectiveNetworkSecurityGroupListResult struct {
6556	autorest.Response `json:"-"`
6557	// Value - A list of effective network security groups.
6558	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6559	// NextLink - READ-ONLY; The URL to get the next set of results.
6560	NextLink *string `json:"nextLink,omitempty"`
6561}
6562
6563// EffectiveNetworkSecurityRule effective network security rules.
6564type EffectiveNetworkSecurityRule struct {
6565	// Name - The name of the security rule specified by the user (if created by the user).
6566	Name *string `json:"name,omitempty"`
6567	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6568	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6569	// SourcePortRange - The source port or range.
6570	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6571	// DestinationPortRange - The destination port or range.
6572	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6573	// SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
6574	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6575	// DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
6576	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6577	// SourceAddressPrefix - The source address prefix.
6578	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6579	// DestinationAddressPrefix - The destination address prefix.
6580	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6581	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6582	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6583	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6584	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6585	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6586	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6587	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6588	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6589	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6590	Access SecurityRuleAccess `json:"access,omitempty"`
6591	// Priority - The priority of the rule.
6592	Priority *int32 `json:"priority,omitempty"`
6593	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6594	Direction SecurityRuleDirection `json:"direction,omitempty"`
6595}
6596
6597// EffectiveRoute effective Route
6598type EffectiveRoute struct {
6599	// Name - The name of the user defined route. This is optional.
6600	Name *string `json:"name,omitempty"`
6601	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6602	Source EffectiveRouteSource `json:"source,omitempty"`
6603	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
6604	State EffectiveRouteState `json:"state,omitempty"`
6605	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6606	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6607	// NextHopIPAddress - The IP address of the next hop of the effective route.
6608	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6609	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
6610	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6611}
6612
6613// EffectiveRouteListResult response for list effective route API service call.
6614type EffectiveRouteListResult struct {
6615	autorest.Response `json:"-"`
6616	// Value - A list of effective routes.
6617	Value *[]EffectiveRoute `json:"value,omitempty"`
6618	// NextLink - READ-ONLY; The URL to get the next set of results.
6619	NextLink *string `json:"nextLink,omitempty"`
6620}
6621
6622// EndpointServiceResult endpoint service.
6623type EndpointServiceResult struct {
6624	// Name - READ-ONLY; Name of the endpoint service.
6625	Name *string `json:"name,omitempty"`
6626	// Type - READ-ONLY; Type of the endpoint service.
6627	Type *string `json:"type,omitempty"`
6628	// ID - Resource ID.
6629	ID *string `json:"id,omitempty"`
6630}
6631
6632// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
6633type EndpointServicesListResult struct {
6634	autorest.Response `json:"-"`
6635	// Value - List of available endpoint services in a region.
6636	Value *[]EndpointServiceResult `json:"value,omitempty"`
6637	// NextLink - The URL to get the next set of results.
6638	NextLink *string `json:"nextLink,omitempty"`
6639}
6640
6641// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
6642// values.
6643type EndpointServicesListResultIterator struct {
6644	i    int
6645	page EndpointServicesListResultPage
6646}
6647
6648// NextWithContext advances to the next value.  If there was an error making
6649// the request the iterator does not advance and the error is returned.
6650func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
6651	if tracing.IsEnabled() {
6652		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
6653		defer func() {
6654			sc := -1
6655			if iter.Response().Response.Response != nil {
6656				sc = iter.Response().Response.Response.StatusCode
6657			}
6658			tracing.EndSpan(ctx, sc, err)
6659		}()
6660	}
6661	iter.i++
6662	if iter.i < len(iter.page.Values()) {
6663		return nil
6664	}
6665	err = iter.page.NextWithContext(ctx)
6666	if err != nil {
6667		iter.i--
6668		return err
6669	}
6670	iter.i = 0
6671	return nil
6672}
6673
6674// Next advances to the next value.  If there was an error making
6675// the request the iterator does not advance and the error is returned.
6676// Deprecated: Use NextWithContext() instead.
6677func (iter *EndpointServicesListResultIterator) Next() error {
6678	return iter.NextWithContext(context.Background())
6679}
6680
6681// NotDone returns true if the enumeration should be started or is not yet complete.
6682func (iter EndpointServicesListResultIterator) NotDone() bool {
6683	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6684}
6685
6686// Response returns the raw server response from the last page request.
6687func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
6688	return iter.page.Response()
6689}
6690
6691// Value returns the current value or a zero-initialized value if the
6692// iterator has advanced beyond the end of the collection.
6693func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
6694	if !iter.page.NotDone() {
6695		return EndpointServiceResult{}
6696	}
6697	return iter.page.Values()[iter.i]
6698}
6699
6700// Creates a new instance of the EndpointServicesListResultIterator type.
6701func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
6702	return EndpointServicesListResultIterator{page: page}
6703}
6704
6705// IsEmpty returns true if the ListResult contains no values.
6706func (eslr EndpointServicesListResult) IsEmpty() bool {
6707	return eslr.Value == nil || len(*eslr.Value) == 0
6708}
6709
6710// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
6711// It returns nil if no more results exist.
6712func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
6713	if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 {
6714		return nil, nil
6715	}
6716	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6717		autorest.AsJSON(),
6718		autorest.AsGet(),
6719		autorest.WithBaseURL(to.String(eslr.NextLink)))
6720}
6721
6722// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
6723type EndpointServicesListResultPage struct {
6724	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
6725	eslr EndpointServicesListResult
6726}
6727
6728// NextWithContext advances to the next page of values.  If there was an error making
6729// the request the page does not advance and the error is returned.
6730func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
6731	if tracing.IsEnabled() {
6732		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
6733		defer func() {
6734			sc := -1
6735			if page.Response().Response.Response != nil {
6736				sc = page.Response().Response.Response.StatusCode
6737			}
6738			tracing.EndSpan(ctx, sc, err)
6739		}()
6740	}
6741	next, err := page.fn(ctx, page.eslr)
6742	if err != nil {
6743		return err
6744	}
6745	page.eslr = next
6746	return nil
6747}
6748
6749// Next advances to the next page of values.  If there was an error making
6750// the request the page does not advance and the error is returned.
6751// Deprecated: Use NextWithContext() instead.
6752func (page *EndpointServicesListResultPage) Next() error {
6753	return page.NextWithContext(context.Background())
6754}
6755
6756// NotDone returns true if the page enumeration should be started or is not yet complete.
6757func (page EndpointServicesListResultPage) NotDone() bool {
6758	return !page.eslr.IsEmpty()
6759}
6760
6761// Response returns the raw server response from the last page request.
6762func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
6763	return page.eslr
6764}
6765
6766// Values returns the slice of values for the current page or nil if there are no values.
6767func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
6768	if page.eslr.IsEmpty() {
6769		return nil
6770	}
6771	return *page.eslr.Value
6772}
6773
6774// Creates a new instance of the EndpointServicesListResultPage type.
6775func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
6776	return EndpointServicesListResultPage{fn: getNextPage}
6777}
6778
6779// Error ...
6780type Error struct {
6781	Code       *string         `json:"code,omitempty"`
6782	Message    *string         `json:"message,omitempty"`
6783	Target     *string         `json:"target,omitempty"`
6784	Details    *[]ErrorDetails `json:"details,omitempty"`
6785	InnerError *string         `json:"innerError,omitempty"`
6786}
6787
6788// ErrorDetails ...
6789type ErrorDetails struct {
6790	Code    *string `json:"code,omitempty"`
6791	Target  *string `json:"target,omitempty"`
6792	Message *string `json:"message,omitempty"`
6793}
6794
6795// ExpressRouteCircuit expressRouteCircuit resource
6796type ExpressRouteCircuit struct {
6797	autorest.Response `json:"-"`
6798	// Sku - The SKU.
6799	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
6800	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
6801	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6802	Etag *string `json:"etag,omitempty"`
6803	// ID - Resource ID.
6804	ID *string `json:"id,omitempty"`
6805	// Name - READ-ONLY; Resource name.
6806	Name *string `json:"name,omitempty"`
6807	// Type - READ-ONLY; Resource type.
6808	Type *string `json:"type,omitempty"`
6809	// Location - Resource location.
6810	Location *string `json:"location,omitempty"`
6811	// Tags - Resource tags.
6812	Tags map[string]*string `json:"tags"`
6813}
6814
6815// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
6816func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
6817	objectMap := make(map[string]interface{})
6818	if erc.Sku != nil {
6819		objectMap["sku"] = erc.Sku
6820	}
6821	if erc.ExpressRouteCircuitPropertiesFormat != nil {
6822		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
6823	}
6824	if erc.ID != nil {
6825		objectMap["id"] = erc.ID
6826	}
6827	if erc.Location != nil {
6828		objectMap["location"] = erc.Location
6829	}
6830	if erc.Tags != nil {
6831		objectMap["tags"] = erc.Tags
6832	}
6833	return json.Marshal(objectMap)
6834}
6835
6836// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
6837func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
6838	var m map[string]*json.RawMessage
6839	err := json.Unmarshal(body, &m)
6840	if err != nil {
6841		return err
6842	}
6843	for k, v := range m {
6844		switch k {
6845		case "sku":
6846			if v != nil {
6847				var sku ExpressRouteCircuitSku
6848				err = json.Unmarshal(*v, &sku)
6849				if err != nil {
6850					return err
6851				}
6852				erc.Sku = &sku
6853			}
6854		case "properties":
6855			if v != nil {
6856				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
6857				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
6858				if err != nil {
6859					return err
6860				}
6861				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
6862			}
6863		case "etag":
6864			if v != nil {
6865				var etag string
6866				err = json.Unmarshal(*v, &etag)
6867				if err != nil {
6868					return err
6869				}
6870				erc.Etag = &etag
6871			}
6872		case "id":
6873			if v != nil {
6874				var ID string
6875				err = json.Unmarshal(*v, &ID)
6876				if err != nil {
6877					return err
6878				}
6879				erc.ID = &ID
6880			}
6881		case "name":
6882			if v != nil {
6883				var name string
6884				err = json.Unmarshal(*v, &name)
6885				if err != nil {
6886					return err
6887				}
6888				erc.Name = &name
6889			}
6890		case "type":
6891			if v != nil {
6892				var typeVar string
6893				err = json.Unmarshal(*v, &typeVar)
6894				if err != nil {
6895					return err
6896				}
6897				erc.Type = &typeVar
6898			}
6899		case "location":
6900			if v != nil {
6901				var location string
6902				err = json.Unmarshal(*v, &location)
6903				if err != nil {
6904					return err
6905				}
6906				erc.Location = &location
6907			}
6908		case "tags":
6909			if v != nil {
6910				var tags map[string]*string
6911				err = json.Unmarshal(*v, &tags)
6912				if err != nil {
6913					return err
6914				}
6915				erc.Tags = tags
6916			}
6917		}
6918	}
6919
6920	return nil
6921}
6922
6923// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
6924type ExpressRouteCircuitArpTable struct {
6925	// Age - Entry age in minutes
6926	Age *int32 `json:"age,omitempty"`
6927	// Interface - Interface address
6928	Interface *string `json:"interface,omitempty"`
6929	// IPAddress - The IP address.
6930	IPAddress *string `json:"ipAddress,omitempty"`
6931	// MacAddress - The MAC address.
6932	MacAddress *string `json:"macAddress,omitempty"`
6933}
6934
6935// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
6936type ExpressRouteCircuitAuthorization struct {
6937	autorest.Response              `json:"-"`
6938	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
6939	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6940	Name *string `json:"name,omitempty"`
6941	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6942	Etag *string `json:"etag,omitempty"`
6943	// ID - Resource ID.
6944	ID *string `json:"id,omitempty"`
6945}
6946
6947// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
6948func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
6949	objectMap := make(map[string]interface{})
6950	if erca.AuthorizationPropertiesFormat != nil {
6951		objectMap["properties"] = erca.AuthorizationPropertiesFormat
6952	}
6953	if erca.Name != nil {
6954		objectMap["name"] = erca.Name
6955	}
6956	if erca.ID != nil {
6957		objectMap["id"] = erca.ID
6958	}
6959	return json.Marshal(objectMap)
6960}
6961
6962// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
6963func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
6964	var m map[string]*json.RawMessage
6965	err := json.Unmarshal(body, &m)
6966	if err != nil {
6967		return err
6968	}
6969	for k, v := range m {
6970		switch k {
6971		case "properties":
6972			if v != nil {
6973				var authorizationPropertiesFormat AuthorizationPropertiesFormat
6974				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
6975				if err != nil {
6976					return err
6977				}
6978				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
6979			}
6980		case "name":
6981			if v != nil {
6982				var name string
6983				err = json.Unmarshal(*v, &name)
6984				if err != nil {
6985					return err
6986				}
6987				erca.Name = &name
6988			}
6989		case "etag":
6990			if v != nil {
6991				var etag string
6992				err = json.Unmarshal(*v, &etag)
6993				if err != nil {
6994					return err
6995				}
6996				erca.Etag = &etag
6997			}
6998		case "id":
6999			if v != nil {
7000				var ID string
7001				err = json.Unmarshal(*v, &ID)
7002				if err != nil {
7003					return err
7004				}
7005				erca.ID = &ID
7006			}
7007		}
7008	}
7009
7010	return nil
7011}
7012
7013// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7014// results of a long-running operation.
7015type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7016	azure.Future
7017}
7018
7019// Result returns the result of the asynchronous operation.
7020// If the operation has not completed it will return an error.
7021func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7022	var done bool
7023	done, err = future.DoneWithContext(context.Background(), client)
7024	if err != nil {
7025		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7026		return
7027	}
7028	if !done {
7029		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7030		return
7031	}
7032	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7033	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7034		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7035		if err != nil {
7036			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7037		}
7038	}
7039	return
7040}
7041
7042// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7043// of a long-running operation.
7044type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7045	azure.Future
7046}
7047
7048// Result returns the result of the asynchronous operation.
7049// If the operation has not completed it will return an error.
7050func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7051	var done bool
7052	done, err = future.DoneWithContext(context.Background(), client)
7053	if err != nil {
7054		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7055		return
7056	}
7057	if !done {
7058		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7059		return
7060	}
7061	ar.Response = future.Response()
7062	return
7063}
7064
7065// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7066// resource.
7067type ExpressRouteCircuitConnection struct {
7068	autorest.Response                              `json:"-"`
7069	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7070	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7071	Name *string `json:"name,omitempty"`
7072	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7073	Etag *string `json:"etag,omitempty"`
7074	// ID - Resource ID.
7075	ID *string `json:"id,omitempty"`
7076}
7077
7078// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7079func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7080	objectMap := make(map[string]interface{})
7081	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7082		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7083	}
7084	if ercc.Name != nil {
7085		objectMap["name"] = ercc.Name
7086	}
7087	if ercc.ID != nil {
7088		objectMap["id"] = ercc.ID
7089	}
7090	return json.Marshal(objectMap)
7091}
7092
7093// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7094func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7095	var m map[string]*json.RawMessage
7096	err := json.Unmarshal(body, &m)
7097	if err != nil {
7098		return err
7099	}
7100	for k, v := range m {
7101		switch k {
7102		case "properties":
7103			if v != nil {
7104				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7105				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7106				if err != nil {
7107					return err
7108				}
7109				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7110			}
7111		case "name":
7112			if v != nil {
7113				var name string
7114				err = json.Unmarshal(*v, &name)
7115				if err != nil {
7116					return err
7117				}
7118				ercc.Name = &name
7119			}
7120		case "etag":
7121			if v != nil {
7122				var etag string
7123				err = json.Unmarshal(*v, &etag)
7124				if err != nil {
7125					return err
7126				}
7127				ercc.Etag = &etag
7128			}
7129		case "id":
7130			if v != nil {
7131				var ID string
7132				err = json.Unmarshal(*v, &ID)
7133				if err != nil {
7134					return err
7135				}
7136				ercc.ID = &ID
7137			}
7138		}
7139	}
7140
7141	return nil
7142}
7143
7144// ExpressRouteCircuitConnectionPropertiesFormat ...
7145type ExpressRouteCircuitConnectionPropertiesFormat struct {
7146	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7147	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7148	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7149	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7150	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7151	AddressPrefix *string `json:"addressPrefix,omitempty"`
7152	// AuthorizationKey - The authorization key.
7153	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7154	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7155	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7156	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7157	ProvisioningState *string `json:"provisioningState,omitempty"`
7158}
7159
7160// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7161// results of a long-running operation.
7162type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7163	azure.Future
7164}
7165
7166// Result returns the result of the asynchronous operation.
7167// If the operation has not completed it will return an error.
7168func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
7169	var done bool
7170	done, err = future.DoneWithContext(context.Background(), client)
7171	if err != nil {
7172		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7173		return
7174	}
7175	if !done {
7176		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
7177		return
7178	}
7179	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7180	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7181		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
7182		if err != nil {
7183			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
7184		}
7185	}
7186	return
7187}
7188
7189// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7190// long-running operation.
7191type ExpressRouteCircuitConnectionsDeleteFuture struct {
7192	azure.Future
7193}
7194
7195// Result returns the result of the asynchronous operation.
7196// If the operation has not completed it will return an error.
7197func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
7198	var done bool
7199	done, err = future.DoneWithContext(context.Background(), client)
7200	if err != nil {
7201		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
7202		return
7203	}
7204	if !done {
7205		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
7206		return
7207	}
7208	ar.Response = future.Response()
7209	return
7210}
7211
7212// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7213type ExpressRouteCircuitListResult struct {
7214	autorest.Response `json:"-"`
7215	// Value - A list of ExpressRouteCircuits in a resource group.
7216	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7217	// NextLink - The URL to get the next set of results.
7218	NextLink *string `json:"nextLink,omitempty"`
7219}
7220
7221// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7222// values.
7223type ExpressRouteCircuitListResultIterator struct {
7224	i    int
7225	page ExpressRouteCircuitListResultPage
7226}
7227
7228// NextWithContext advances to the next value.  If there was an error making
7229// the request the iterator does not advance and the error is returned.
7230func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7231	if tracing.IsEnabled() {
7232		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7233		defer func() {
7234			sc := -1
7235			if iter.Response().Response.Response != nil {
7236				sc = iter.Response().Response.Response.StatusCode
7237			}
7238			tracing.EndSpan(ctx, sc, err)
7239		}()
7240	}
7241	iter.i++
7242	if iter.i < len(iter.page.Values()) {
7243		return nil
7244	}
7245	err = iter.page.NextWithContext(ctx)
7246	if err != nil {
7247		iter.i--
7248		return err
7249	}
7250	iter.i = 0
7251	return nil
7252}
7253
7254// Next advances to the next value.  If there was an error making
7255// the request the iterator does not advance and the error is returned.
7256// Deprecated: Use NextWithContext() instead.
7257func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7258	return iter.NextWithContext(context.Background())
7259}
7260
7261// NotDone returns true if the enumeration should be started or is not yet complete.
7262func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7263	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7264}
7265
7266// Response returns the raw server response from the last page request.
7267func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7268	return iter.page.Response()
7269}
7270
7271// Value returns the current value or a zero-initialized value if the
7272// iterator has advanced beyond the end of the collection.
7273func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7274	if !iter.page.NotDone() {
7275		return ExpressRouteCircuit{}
7276	}
7277	return iter.page.Values()[iter.i]
7278}
7279
7280// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7281func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7282	return ExpressRouteCircuitListResultIterator{page: page}
7283}
7284
7285// IsEmpty returns true if the ListResult contains no values.
7286func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7287	return erclr.Value == nil || len(*erclr.Value) == 0
7288}
7289
7290// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7291// It returns nil if no more results exist.
7292func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7293	if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 {
7294		return nil, nil
7295	}
7296	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7297		autorest.AsJSON(),
7298		autorest.AsGet(),
7299		autorest.WithBaseURL(to.String(erclr.NextLink)))
7300}
7301
7302// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7303type ExpressRouteCircuitListResultPage struct {
7304	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7305	erclr ExpressRouteCircuitListResult
7306}
7307
7308// NextWithContext advances to the next page of values.  If there was an error making
7309// the request the page does not advance and the error is returned.
7310func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7311	if tracing.IsEnabled() {
7312		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7313		defer func() {
7314			sc := -1
7315			if page.Response().Response.Response != nil {
7316				sc = page.Response().Response.Response.StatusCode
7317			}
7318			tracing.EndSpan(ctx, sc, err)
7319		}()
7320	}
7321	next, err := page.fn(ctx, page.erclr)
7322	if err != nil {
7323		return err
7324	}
7325	page.erclr = next
7326	return nil
7327}
7328
7329// Next advances to the next page of values.  If there was an error making
7330// the request the page does not advance and the error is returned.
7331// Deprecated: Use NextWithContext() instead.
7332func (page *ExpressRouteCircuitListResultPage) Next() error {
7333	return page.NextWithContext(context.Background())
7334}
7335
7336// NotDone returns true if the page enumeration should be started or is not yet complete.
7337func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7338	return !page.erclr.IsEmpty()
7339}
7340
7341// Response returns the raw server response from the last page request.
7342func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
7343	return page.erclr
7344}
7345
7346// Values returns the slice of values for the current page or nil if there are no values.
7347func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
7348	if page.erclr.IsEmpty() {
7349		return nil
7350	}
7351	return *page.erclr.Value
7352}
7353
7354// Creates a new instance of the ExpressRouteCircuitListResultPage type.
7355func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
7356	return ExpressRouteCircuitListResultPage{fn: getNextPage}
7357}
7358
7359// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
7360type ExpressRouteCircuitPeering struct {
7361	autorest.Response                           `json:"-"`
7362	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
7363	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7364	Name *string `json:"name,omitempty"`
7365	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7366	Etag *string `json:"etag,omitempty"`
7367	// ID - Resource ID.
7368	ID *string `json:"id,omitempty"`
7369}
7370
7371// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
7372func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
7373	objectMap := make(map[string]interface{})
7374	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
7375		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
7376	}
7377	if ercp.Name != nil {
7378		objectMap["name"] = ercp.Name
7379	}
7380	if ercp.ID != nil {
7381		objectMap["id"] = ercp.ID
7382	}
7383	return json.Marshal(objectMap)
7384}
7385
7386// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
7387func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
7388	var m map[string]*json.RawMessage
7389	err := json.Unmarshal(body, &m)
7390	if err != nil {
7391		return err
7392	}
7393	for k, v := range m {
7394		switch k {
7395		case "properties":
7396			if v != nil {
7397				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
7398				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
7399				if err != nil {
7400					return err
7401				}
7402				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
7403			}
7404		case "name":
7405			if v != nil {
7406				var name string
7407				err = json.Unmarshal(*v, &name)
7408				if err != nil {
7409					return err
7410				}
7411				ercp.Name = &name
7412			}
7413		case "etag":
7414			if v != nil {
7415				var etag string
7416				err = json.Unmarshal(*v, &etag)
7417				if err != nil {
7418					return err
7419				}
7420				ercp.Etag = &etag
7421			}
7422		case "id":
7423			if v != nil {
7424				var ID string
7425				err = json.Unmarshal(*v, &ID)
7426				if err != nil {
7427					return err
7428				}
7429				ercp.ID = &ID
7430			}
7431		}
7432	}
7433
7434	return nil
7435}
7436
7437// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
7438type ExpressRouteCircuitPeeringConfig struct {
7439	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
7440	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
7441	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
7442	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
7443	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
7444	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
7445	// LegacyMode - The legacy mode of the peering.
7446	LegacyMode *int32 `json:"legacyMode,omitempty"`
7447	// CustomerASN - The CustomerASN of the peering.
7448	CustomerASN *int32 `json:"customerASN,omitempty"`
7449	// RoutingRegistryName - The RoutingRegistryName of the configuration.
7450	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
7451}
7452
7453// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
7454// that belong to an ExpressRouteCircuit.
7455type ExpressRouteCircuitPeeringListResult struct {
7456	autorest.Response `json:"-"`
7457	// Value - The peerings in an express route circuit.
7458	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
7459	// NextLink - The URL to get the next set of results.
7460	NextLink *string `json:"nextLink,omitempty"`
7461}
7462
7463// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
7464// ExpressRouteCircuitPeering values.
7465type ExpressRouteCircuitPeeringListResultIterator struct {
7466	i    int
7467	page ExpressRouteCircuitPeeringListResultPage
7468}
7469
7470// NextWithContext advances to the next value.  If there was an error making
7471// the request the iterator does not advance and the error is returned.
7472func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
7473	if tracing.IsEnabled() {
7474		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
7475		defer func() {
7476			sc := -1
7477			if iter.Response().Response.Response != nil {
7478				sc = iter.Response().Response.Response.StatusCode
7479			}
7480			tracing.EndSpan(ctx, sc, err)
7481		}()
7482	}
7483	iter.i++
7484	if iter.i < len(iter.page.Values()) {
7485		return nil
7486	}
7487	err = iter.page.NextWithContext(ctx)
7488	if err != nil {
7489		iter.i--
7490		return err
7491	}
7492	iter.i = 0
7493	return nil
7494}
7495
7496// Next advances to the next value.  If there was an error making
7497// the request the iterator does not advance and the error is returned.
7498// Deprecated: Use NextWithContext() instead.
7499func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
7500	return iter.NextWithContext(context.Background())
7501}
7502
7503// NotDone returns true if the enumeration should be started or is not yet complete.
7504func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
7505	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7506}
7507
7508// Response returns the raw server response from the last page request.
7509func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
7510	return iter.page.Response()
7511}
7512
7513// Value returns the current value or a zero-initialized value if the
7514// iterator has advanced beyond the end of the collection.
7515func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
7516	if !iter.page.NotDone() {
7517		return ExpressRouteCircuitPeering{}
7518	}
7519	return iter.page.Values()[iter.i]
7520}
7521
7522// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
7523func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
7524	return ExpressRouteCircuitPeeringListResultIterator{page: page}
7525}
7526
7527// IsEmpty returns true if the ListResult contains no values.
7528func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
7529	return ercplr.Value == nil || len(*ercplr.Value) == 0
7530}
7531
7532// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
7533// It returns nil if no more results exist.
7534func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
7535	if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 {
7536		return nil, nil
7537	}
7538	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7539		autorest.AsJSON(),
7540		autorest.AsGet(),
7541		autorest.WithBaseURL(to.String(ercplr.NextLink)))
7542}
7543
7544// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
7545type ExpressRouteCircuitPeeringListResultPage struct {
7546	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
7547	ercplr ExpressRouteCircuitPeeringListResult
7548}
7549
7550// NextWithContext advances to the next page of values.  If there was an error making
7551// the request the page does not advance and the error is returned.
7552func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
7553	if tracing.IsEnabled() {
7554		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
7555		defer func() {
7556			sc := -1
7557			if page.Response().Response.Response != nil {
7558				sc = page.Response().Response.Response.StatusCode
7559			}
7560			tracing.EndSpan(ctx, sc, err)
7561		}()
7562	}
7563	next, err := page.fn(ctx, page.ercplr)
7564	if err != nil {
7565		return err
7566	}
7567	page.ercplr = next
7568	return nil
7569}
7570
7571// Next advances to the next page of values.  If there was an error making
7572// the request the page does not advance and the error is returned.
7573// Deprecated: Use NextWithContext() instead.
7574func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
7575	return page.NextWithContext(context.Background())
7576}
7577
7578// NotDone returns true if the page enumeration should be started or is not yet complete.
7579func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
7580	return !page.ercplr.IsEmpty()
7581}
7582
7583// Response returns the raw server response from the last page request.
7584func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
7585	return page.ercplr
7586}
7587
7588// Values returns the slice of values for the current page or nil if there are no values.
7589func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
7590	if page.ercplr.IsEmpty() {
7591		return nil
7592	}
7593	return *page.ercplr.Value
7594}
7595
7596// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
7597func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
7598	return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage}
7599}
7600
7601// ExpressRouteCircuitPeeringPropertiesFormat ...
7602type ExpressRouteCircuitPeeringPropertiesFormat struct {
7603	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7604	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7605	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7606	State ExpressRoutePeeringState `json:"state,omitempty"`
7607	// AzureASN - The Azure ASN.
7608	AzureASN *int32 `json:"azureASN,omitempty"`
7609	// PeerASN - The peer ASN.
7610	PeerASN *int64 `json:"peerASN,omitempty"`
7611	// PrimaryPeerAddressPrefix - The primary address prefix.
7612	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7613	// SecondaryPeerAddressPrefix - The secondary address prefix.
7614	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7615	// PrimaryAzurePort - The primary port.
7616	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7617	// SecondaryAzurePort - The secondary port.
7618	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7619	// SharedKey - The shared key.
7620	SharedKey *string `json:"sharedKey,omitempty"`
7621	// VlanID - The VLAN ID.
7622	VlanID *int32 `json:"vlanId,omitempty"`
7623	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7624	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7625	// Stats - Gets peering stats.
7626	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
7627	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7628	ProvisioningState *string `json:"provisioningState,omitempty"`
7629	// GatewayManagerEtag - The GatewayManager Etag.
7630	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7631	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7632	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7633	// RouteFilter - The reference of the RouteFilter resource.
7634	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7635	// Ipv6PeeringConfig - The IPv6 peering configuration.
7636	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7637	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
7638	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
7639}
7640
7641// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
7642// of a long-running operation.
7643type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
7644	azure.Future
7645}
7646
7647// Result returns the result of the asynchronous operation.
7648// If the operation has not completed it will return an error.
7649func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
7650	var done bool
7651	done, err = future.DoneWithContext(context.Background(), client)
7652	if err != nil {
7653		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7654		return
7655	}
7656	if !done {
7657		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
7658		return
7659	}
7660	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7661	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
7662		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
7663		if err != nil {
7664			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
7665		}
7666	}
7667	return
7668}
7669
7670// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
7671// long-running operation.
7672type ExpressRouteCircuitPeeringsDeleteFuture struct {
7673	azure.Future
7674}
7675
7676// Result returns the result of the asynchronous operation.
7677// If the operation has not completed it will return an error.
7678func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
7679	var done bool
7680	done, err = future.DoneWithContext(context.Background(), client)
7681	if err != nil {
7682		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
7683		return
7684	}
7685	if !done {
7686		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
7687		return
7688	}
7689	ar.Response = future.Response()
7690	return
7691}
7692
7693// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
7694type ExpressRouteCircuitPropertiesFormat struct {
7695	// AllowClassicOperations - Allow classic operations
7696	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
7697	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
7698	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
7699	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
7700	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
7701	// Authorizations - The list of authorizations.
7702	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
7703	// Peerings - The list of peerings.
7704	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
7705	// ServiceKey - The ServiceKey.
7706	ServiceKey *string `json:"serviceKey,omitempty"`
7707	// ServiceProviderNotes - The ServiceProviderNotes.
7708	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
7709	// ServiceProviderProperties - The ServiceProviderProperties.
7710	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
7711	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7712	ProvisioningState *string `json:"provisioningState,omitempty"`
7713	// GatewayManagerEtag - The GatewayManager Etag.
7714	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7715}
7716
7717// ExpressRouteCircuitReference ...
7718type ExpressRouteCircuitReference struct {
7719	// ID - Corresponding Express Route Circuit Id.
7720	ID *string `json:"id,omitempty"`
7721}
7722
7723// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
7724type ExpressRouteCircuitRoutesTable struct {
7725	// NetworkProperty - IP address of a network entity
7726	NetworkProperty *string `json:"network,omitempty"`
7727	// NextHop - NextHop address
7728	NextHop *string `json:"nextHop,omitempty"`
7729	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
7730	LocPrf *string `json:"locPrf,omitempty"`
7731	// Weight - Route Weight.
7732	Weight *int32 `json:"weight,omitempty"`
7733	// Path - Autonomous system paths to the destination network.
7734	Path *string `json:"path,omitempty"`
7735}
7736
7737// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
7738type ExpressRouteCircuitRoutesTableSummary struct {
7739	// Neighbor - IP address of the neighbor.
7740	Neighbor *string `json:"neighbor,omitempty"`
7741	// V - BGP version number spoken to the neighbor.
7742	V *int32 `json:"v,omitempty"`
7743	// As - Autonomous system number.
7744	As *int32 `json:"as,omitempty"`
7745	// UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
7746	UpDown *string `json:"upDown,omitempty"`
7747	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
7748	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
7749}
7750
7751// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
7752// Circuits API.
7753type ExpressRouteCircuitsArpTableListResult struct {
7754	autorest.Response `json:"-"`
7755	// Value - Gets list of the ARP table.
7756	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
7757	// NextLink - The URL to get the next set of results.
7758	NextLink *string `json:"nextLink,omitempty"`
7759}
7760
7761// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7762// long-running operation.
7763type ExpressRouteCircuitsCreateOrUpdateFuture struct {
7764	azure.Future
7765}
7766
7767// Result returns the result of the asynchronous operation.
7768// If the operation has not completed it will return an error.
7769func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
7770	var done bool
7771	done, err = future.DoneWithContext(context.Background(), client)
7772	if err != nil {
7773		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7774		return
7775	}
7776	if !done {
7777		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
7778		return
7779	}
7780	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7781	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
7782		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
7783		if err != nil {
7784			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
7785		}
7786	}
7787	return
7788}
7789
7790// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
7791// long-running operation.
7792type ExpressRouteCircuitsDeleteFuture struct {
7793	azure.Future
7794}
7795
7796// Result returns the result of the asynchronous operation.
7797// If the operation has not completed it will return an error.
7798func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
7799	var done bool
7800	done, err = future.DoneWithContext(context.Background(), client)
7801	if err != nil {
7802		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
7803		return
7804	}
7805	if !done {
7806		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
7807		return
7808	}
7809	ar.Response = future.Response()
7810	return
7811}
7812
7813// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
7814// ExpressRouteCircuit.
7815type ExpressRouteCircuitServiceProviderProperties struct {
7816	// ServiceProviderName - The serviceProviderName.
7817	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
7818	// PeeringLocation - The peering location.
7819	PeeringLocation *string `json:"peeringLocation,omitempty"`
7820	// BandwidthInMbps - The BandwidthInMbps.
7821	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
7822}
7823
7824// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
7825type ExpressRouteCircuitSku struct {
7826	// Name - The name of the SKU.
7827	Name *string `json:"name,omitempty"`
7828	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'
7829	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
7830	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
7831	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
7832}
7833
7834// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
7835// long-running operation.
7836type ExpressRouteCircuitsListArpTableFuture struct {
7837	azure.Future
7838}
7839
7840// Result returns the result of the asynchronous operation.
7841// If the operation has not completed it will return an error.
7842func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
7843	var done bool
7844	done, err = future.DoneWithContext(context.Background(), client)
7845	if err != nil {
7846		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
7847		return
7848	}
7849	if !done {
7850		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
7851		return
7852	}
7853	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7854	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
7855		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
7856		if err != nil {
7857			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
7858		}
7859	}
7860	return
7861}
7862
7863// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
7864// long-running operation.
7865type ExpressRouteCircuitsListRoutesTableFuture struct {
7866	azure.Future
7867}
7868
7869// Result returns the result of the asynchronous operation.
7870// If the operation has not completed it will return an error.
7871func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
7872	var done bool
7873	done, err = future.DoneWithContext(context.Background(), client)
7874	if err != nil {
7875		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
7876		return
7877	}
7878	if !done {
7879		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
7880		return
7881	}
7882	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7883	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
7884		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
7885		if err != nil {
7886			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
7887		}
7888	}
7889	return
7890}
7891
7892// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
7893// results of a long-running operation.
7894type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
7895	azure.Future
7896}
7897
7898// Result returns the result of the asynchronous operation.
7899// If the operation has not completed it will return an error.
7900func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
7901	var done bool
7902	done, err = future.DoneWithContext(context.Background(), client)
7903	if err != nil {
7904		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
7905		return
7906	}
7907	if !done {
7908		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
7909		return
7910	}
7911	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7912	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
7913		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
7914		if err != nil {
7915			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
7916		}
7917	}
7918	return
7919}
7920
7921// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
7922// Circuits API.
7923type ExpressRouteCircuitsRoutesTableListResult struct {
7924	autorest.Response `json:"-"`
7925	// Value - The list of routes table.
7926	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
7927	// NextLink - The URL to get the next set of results.
7928	NextLink *string `json:"nextLink,omitempty"`
7929}
7930
7931// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
7932// Express Route Circuits API.
7933type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
7934	autorest.Response `json:"-"`
7935	// Value - A list of the routes table.
7936	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
7937	// NextLink - The URL to get the next set of results.
7938	NextLink *string `json:"nextLink,omitempty"`
7939}
7940
7941// ExpressRouteCircuitStats contains stats associated with the peering.
7942type ExpressRouteCircuitStats struct {
7943	autorest.Response `json:"-"`
7944	// PrimarybytesIn - Gets BytesIn of the peering.
7945	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
7946	// PrimarybytesOut - Gets BytesOut of the peering.
7947	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
7948	// SecondarybytesIn - Gets BytesIn of the peering.
7949	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
7950	// SecondarybytesOut - Gets BytesOut of the peering.
7951	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
7952}
7953
7954// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7955// long-running operation.
7956type ExpressRouteCircuitsUpdateTagsFuture struct {
7957	azure.Future
7958}
7959
7960// Result returns the result of the asynchronous operation.
7961// If the operation has not completed it will return an error.
7962func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
7963	var done bool
7964	done, err = future.DoneWithContext(context.Background(), client)
7965	if err != nil {
7966		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7967		return
7968	}
7969	if !done {
7970		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
7971		return
7972	}
7973	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7974	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
7975		erc, err = client.UpdateTagsResponder(erc.Response.Response)
7976		if err != nil {
7977			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
7978		}
7979	}
7980	return
7981}
7982
7983// ExpressRouteCrossConnection expressRouteCrossConnection resource
7984type ExpressRouteCrossConnection struct {
7985	autorest.Response                      `json:"-"`
7986	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
7987	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7988	Etag *string `json:"etag,omitempty"`
7989	// ID - Resource ID.
7990	ID *string `json:"id,omitempty"`
7991	// Name - READ-ONLY; Resource name.
7992	Name *string `json:"name,omitempty"`
7993	// Type - READ-ONLY; Resource type.
7994	Type *string `json:"type,omitempty"`
7995	// Location - Resource location.
7996	Location *string `json:"location,omitempty"`
7997	// Tags - Resource tags.
7998	Tags map[string]*string `json:"tags"`
7999}
8000
8001// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
8002func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
8003	objectMap := make(map[string]interface{})
8004	if ercc.ExpressRouteCrossConnectionProperties != nil {
8005		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
8006	}
8007	if ercc.ID != nil {
8008		objectMap["id"] = ercc.ID
8009	}
8010	if ercc.Location != nil {
8011		objectMap["location"] = ercc.Location
8012	}
8013	if ercc.Tags != nil {
8014		objectMap["tags"] = ercc.Tags
8015	}
8016	return json.Marshal(objectMap)
8017}
8018
8019// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
8020func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
8021	var m map[string]*json.RawMessage
8022	err := json.Unmarshal(body, &m)
8023	if err != nil {
8024		return err
8025	}
8026	for k, v := range m {
8027		switch k {
8028		case "properties":
8029			if v != nil {
8030				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
8031				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
8032				if err != nil {
8033					return err
8034				}
8035				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
8036			}
8037		case "etag":
8038			if v != nil {
8039				var etag string
8040				err = json.Unmarshal(*v, &etag)
8041				if err != nil {
8042					return err
8043				}
8044				ercc.Etag = &etag
8045			}
8046		case "id":
8047			if v != nil {
8048				var ID string
8049				err = json.Unmarshal(*v, &ID)
8050				if err != nil {
8051					return err
8052				}
8053				ercc.ID = &ID
8054			}
8055		case "name":
8056			if v != nil {
8057				var name string
8058				err = json.Unmarshal(*v, &name)
8059				if err != nil {
8060					return err
8061				}
8062				ercc.Name = &name
8063			}
8064		case "type":
8065			if v != nil {
8066				var typeVar string
8067				err = json.Unmarshal(*v, &typeVar)
8068				if err != nil {
8069					return err
8070				}
8071				ercc.Type = &typeVar
8072			}
8073		case "location":
8074			if v != nil {
8075				var location string
8076				err = json.Unmarshal(*v, &location)
8077				if err != nil {
8078					return err
8079				}
8080				ercc.Location = &location
8081			}
8082		case "tags":
8083			if v != nil {
8084				var tags map[string]*string
8085				err = json.Unmarshal(*v, &tags)
8086				if err != nil {
8087					return err
8088				}
8089				ercc.Tags = tags
8090			}
8091		}
8092	}
8093
8094	return nil
8095}
8096
8097// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
8098type ExpressRouteCrossConnectionListResult struct {
8099	autorest.Response `json:"-"`
8100	// Value - A list of ExpressRouteCrossConnection resources.
8101	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
8102	// NextLink - READ-ONLY; The URL to get the next set of results.
8103	NextLink *string `json:"nextLink,omitempty"`
8104}
8105
8106// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
8107// ExpressRouteCrossConnection values.
8108type ExpressRouteCrossConnectionListResultIterator struct {
8109	i    int
8110	page ExpressRouteCrossConnectionListResultPage
8111}
8112
8113// NextWithContext advances to the next value.  If there was an error making
8114// the request the iterator does not advance and the error is returned.
8115func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8116	if tracing.IsEnabled() {
8117		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
8118		defer func() {
8119			sc := -1
8120			if iter.Response().Response.Response != nil {
8121				sc = iter.Response().Response.Response.StatusCode
8122			}
8123			tracing.EndSpan(ctx, sc, err)
8124		}()
8125	}
8126	iter.i++
8127	if iter.i < len(iter.page.Values()) {
8128		return nil
8129	}
8130	err = iter.page.NextWithContext(ctx)
8131	if err != nil {
8132		iter.i--
8133		return err
8134	}
8135	iter.i = 0
8136	return nil
8137}
8138
8139// Next advances to the next value.  If there was an error making
8140// the request the iterator does not advance and the error is returned.
8141// Deprecated: Use NextWithContext() instead.
8142func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
8143	return iter.NextWithContext(context.Background())
8144}
8145
8146// NotDone returns true if the enumeration should be started or is not yet complete.
8147func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
8148	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8149}
8150
8151// Response returns the raw server response from the last page request.
8152func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
8153	return iter.page.Response()
8154}
8155
8156// Value returns the current value or a zero-initialized value if the
8157// iterator has advanced beyond the end of the collection.
8158func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
8159	if !iter.page.NotDone() {
8160		return ExpressRouteCrossConnection{}
8161	}
8162	return iter.page.Values()[iter.i]
8163}
8164
8165// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
8166func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
8167	return ExpressRouteCrossConnectionListResultIterator{page: page}
8168}
8169
8170// IsEmpty returns true if the ListResult contains no values.
8171func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
8172	return ercclr.Value == nil || len(*ercclr.Value) == 0
8173}
8174
8175// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
8176// It returns nil if no more results exist.
8177func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8178	if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 {
8179		return nil, nil
8180	}
8181	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8182		autorest.AsJSON(),
8183		autorest.AsGet(),
8184		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8185}
8186
8187// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
8188type ExpressRouteCrossConnectionListResultPage struct {
8189	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
8190	ercclr ExpressRouteCrossConnectionListResult
8191}
8192
8193// NextWithContext advances to the next page of values.  If there was an error making
8194// the request the page does not advance and the error is returned.
8195func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8196	if tracing.IsEnabled() {
8197		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
8198		defer func() {
8199			sc := -1
8200			if page.Response().Response.Response != nil {
8201				sc = page.Response().Response.Response.StatusCode
8202			}
8203			tracing.EndSpan(ctx, sc, err)
8204		}()
8205	}
8206	next, err := page.fn(ctx, page.ercclr)
8207	if err != nil {
8208		return err
8209	}
8210	page.ercclr = next
8211	return nil
8212}
8213
8214// Next advances to the next page of values.  If there was an error making
8215// the request the page does not advance and the error is returned.
8216// Deprecated: Use NextWithContext() instead.
8217func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
8218	return page.NextWithContext(context.Background())
8219}
8220
8221// NotDone returns true if the page enumeration should be started or is not yet complete.
8222func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
8223	return !page.ercclr.IsEmpty()
8224}
8225
8226// Response returns the raw server response from the last page request.
8227func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
8228	return page.ercclr
8229}
8230
8231// Values returns the slice of values for the current page or nil if there are no values.
8232func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
8233	if page.ercclr.IsEmpty() {
8234		return nil
8235	}
8236	return *page.ercclr.Value
8237}
8238
8239// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
8240func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
8241	return ExpressRouteCrossConnectionListResultPage{fn: getNextPage}
8242}
8243
8244// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
8245type ExpressRouteCrossConnectionPeering struct {
8246	autorest.Response                             `json:"-"`
8247	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
8248	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8249	Name *string `json:"name,omitempty"`
8250	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8251	Etag *string `json:"etag,omitempty"`
8252	// ID - Resource ID.
8253	ID *string `json:"id,omitempty"`
8254}
8255
8256// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
8257func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
8258	objectMap := make(map[string]interface{})
8259	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
8260		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
8261	}
8262	if erccp.Name != nil {
8263		objectMap["name"] = erccp.Name
8264	}
8265	if erccp.ID != nil {
8266		objectMap["id"] = erccp.ID
8267	}
8268	return json.Marshal(objectMap)
8269}
8270
8271// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
8272func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
8273	var m map[string]*json.RawMessage
8274	err := json.Unmarshal(body, &m)
8275	if err != nil {
8276		return err
8277	}
8278	for k, v := range m {
8279		switch k {
8280		case "properties":
8281			if v != nil {
8282				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
8283				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
8284				if err != nil {
8285					return err
8286				}
8287				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
8288			}
8289		case "name":
8290			if v != nil {
8291				var name string
8292				err = json.Unmarshal(*v, &name)
8293				if err != nil {
8294					return err
8295				}
8296				erccp.Name = &name
8297			}
8298		case "etag":
8299			if v != nil {
8300				var etag string
8301				err = json.Unmarshal(*v, &etag)
8302				if err != nil {
8303					return err
8304				}
8305				erccp.Etag = &etag
8306			}
8307		case "id":
8308			if v != nil {
8309				var ID string
8310				err = json.Unmarshal(*v, &ID)
8311				if err != nil {
8312					return err
8313				}
8314				erccp.ID = &ID
8315			}
8316		}
8317	}
8318
8319	return nil
8320}
8321
8322// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
8323// that belong to an ExpressRouteCrossConnection.
8324type ExpressRouteCrossConnectionPeeringList struct {
8325	autorest.Response `json:"-"`
8326	// Value - The peerings in an express route cross connection.
8327	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
8328	// NextLink - READ-ONLY; The URL to get the next set of results.
8329	NextLink *string `json:"nextLink,omitempty"`
8330}
8331
8332// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
8333// ExpressRouteCrossConnectionPeering values.
8334type ExpressRouteCrossConnectionPeeringListIterator struct {
8335	i    int
8336	page ExpressRouteCrossConnectionPeeringListPage
8337}
8338
8339// NextWithContext advances to the next value.  If there was an error making
8340// the request the iterator does not advance and the error is returned.
8341func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
8342	if tracing.IsEnabled() {
8343		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
8344		defer func() {
8345			sc := -1
8346			if iter.Response().Response.Response != nil {
8347				sc = iter.Response().Response.Response.StatusCode
8348			}
8349			tracing.EndSpan(ctx, sc, err)
8350		}()
8351	}
8352	iter.i++
8353	if iter.i < len(iter.page.Values()) {
8354		return nil
8355	}
8356	err = iter.page.NextWithContext(ctx)
8357	if err != nil {
8358		iter.i--
8359		return err
8360	}
8361	iter.i = 0
8362	return nil
8363}
8364
8365// Next advances to the next value.  If there was an error making
8366// the request the iterator does not advance and the error is returned.
8367// Deprecated: Use NextWithContext() instead.
8368func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
8369	return iter.NextWithContext(context.Background())
8370}
8371
8372// NotDone returns true if the enumeration should be started or is not yet complete.
8373func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
8374	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8375}
8376
8377// Response returns the raw server response from the last page request.
8378func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
8379	return iter.page.Response()
8380}
8381
8382// Value returns the current value or a zero-initialized value if the
8383// iterator has advanced beyond the end of the collection.
8384func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
8385	if !iter.page.NotDone() {
8386		return ExpressRouteCrossConnectionPeering{}
8387	}
8388	return iter.page.Values()[iter.i]
8389}
8390
8391// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
8392func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
8393	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
8394}
8395
8396// IsEmpty returns true if the ListResult contains no values.
8397func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
8398	return erccpl.Value == nil || len(*erccpl.Value) == 0
8399}
8400
8401// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
8402// It returns nil if no more results exist.
8403func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
8404	if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 {
8405		return nil, nil
8406	}
8407	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8408		autorest.AsJSON(),
8409		autorest.AsGet(),
8410		autorest.WithBaseURL(to.String(erccpl.NextLink)))
8411}
8412
8413// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
8414type ExpressRouteCrossConnectionPeeringListPage struct {
8415	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
8416	erccpl ExpressRouteCrossConnectionPeeringList
8417}
8418
8419// NextWithContext advances to the next page of values.  If there was an error making
8420// the request the page does not advance and the error is returned.
8421func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
8422	if tracing.IsEnabled() {
8423		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
8424		defer func() {
8425			sc := -1
8426			if page.Response().Response.Response != nil {
8427				sc = page.Response().Response.Response.StatusCode
8428			}
8429			tracing.EndSpan(ctx, sc, err)
8430		}()
8431	}
8432	next, err := page.fn(ctx, page.erccpl)
8433	if err != nil {
8434		return err
8435	}
8436	page.erccpl = next
8437	return nil
8438}
8439
8440// Next advances to the next page of values.  If there was an error making
8441// the request the page does not advance and the error is returned.
8442// Deprecated: Use NextWithContext() instead.
8443func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
8444	return page.NextWithContext(context.Background())
8445}
8446
8447// NotDone returns true if the page enumeration should be started or is not yet complete.
8448func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
8449	return !page.erccpl.IsEmpty()
8450}
8451
8452// Response returns the raw server response from the last page request.
8453func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
8454	return page.erccpl
8455}
8456
8457// Values returns the slice of values for the current page or nil if there are no values.
8458func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
8459	if page.erccpl.IsEmpty() {
8460		return nil
8461	}
8462	return *page.erccpl.Value
8463}
8464
8465// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
8466func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
8467	return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage}
8468}
8469
8470// ExpressRouteCrossConnectionPeeringProperties ...
8471type ExpressRouteCrossConnectionPeeringProperties struct {
8472	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8473	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8474	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8475	State ExpressRoutePeeringState `json:"state,omitempty"`
8476	// AzureASN - READ-ONLY; The Azure ASN.
8477	AzureASN *int32 `json:"azureASN,omitempty"`
8478	// PeerASN - The peer ASN.
8479	PeerASN *int64 `json:"peerASN,omitempty"`
8480	// PrimaryPeerAddressPrefix - The primary address prefix.
8481	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8482	// SecondaryPeerAddressPrefix - The secondary address prefix.
8483	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8484	// PrimaryAzurePort - READ-ONLY; The primary port.
8485	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8486	// SecondaryAzurePort - READ-ONLY; The secondary port.
8487	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8488	// SharedKey - The shared key.
8489	SharedKey *string `json:"sharedKey,omitempty"`
8490	// VlanID - The VLAN ID.
8491	VlanID *int32 `json:"vlanId,omitempty"`
8492	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8493	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8494	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8495	ProvisioningState *string `json:"provisioningState,omitempty"`
8496	// GatewayManagerEtag - The GatewayManager Etag.
8497	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8498	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8499	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8500	// Ipv6PeeringConfig - The IPv6 peering configuration.
8501	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8502}
8503
8504// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8505// results of a long-running operation.
8506type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
8507	azure.Future
8508}
8509
8510// Result returns the result of the asynchronous operation.
8511// If the operation has not completed it will return an error.
8512func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
8513	var done bool
8514	done, err = future.DoneWithContext(context.Background(), client)
8515	if err != nil {
8516		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8517		return
8518	}
8519	if !done {
8520		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
8521		return
8522	}
8523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8524	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
8525		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
8526		if err != nil {
8527			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
8528		}
8529	}
8530	return
8531}
8532
8533// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
8534// of a long-running operation.
8535type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
8536	azure.Future
8537}
8538
8539// Result returns the result of the asynchronous operation.
8540// If the operation has not completed it will return an error.
8541func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
8542	var done bool
8543	done, err = future.DoneWithContext(context.Background(), client)
8544	if err != nil {
8545		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8546		return
8547	}
8548	if !done {
8549		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
8550		return
8551	}
8552	ar.Response = future.Response()
8553	return
8554}
8555
8556// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
8557type ExpressRouteCrossConnectionProperties struct {
8558	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
8559	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8560	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
8561	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8562	// STag - READ-ONLY; The identifier of the circuit traffic.
8563	STag *int32 `json:"sTag,omitempty"`
8564	// PeeringLocation - The peering location of the ExpressRoute circuit.
8565	PeeringLocation *string `json:"peeringLocation,omitempty"`
8566	// BandwidthInMbps - The circuit bandwidth In Mbps.
8567	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8568	// ExpressRouteCircuit - The ExpressRouteCircuit
8569	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
8570	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8571	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8572	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
8573	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8574	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8575	ProvisioningState *string `json:"provisioningState,omitempty"`
8576	// Peerings - The list of peerings.
8577	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
8578}
8579
8580// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8581type ExpressRouteCrossConnectionRoutesTableSummary struct {
8582	// Neighbor - IP address of Neighbor router
8583	Neighbor *string `json:"neighbor,omitempty"`
8584	// Asn - Autonomous system number.
8585	Asn *int32 `json:"asn,omitempty"`
8586	// UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
8587	UpDown *string `json:"upDown,omitempty"`
8588	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8589	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
8590}
8591
8592// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8593// results of a long-running operation.
8594type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
8595	azure.Future
8596}
8597
8598// Result returns the result of the asynchronous operation.
8599// If the operation has not completed it will return an error.
8600func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8601	var done bool
8602	done, err = future.DoneWithContext(context.Background(), client)
8603	if err != nil {
8604		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8605		return
8606	}
8607	if !done {
8608		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
8609		return
8610	}
8611	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8612	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8613		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8614		if err != nil {
8615			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8616		}
8617	}
8618	return
8619}
8620
8621// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
8622// of a long-running operation.
8623type ExpressRouteCrossConnectionsListArpTableFuture struct {
8624	azure.Future
8625}
8626
8627// Result returns the result of the asynchronous operation.
8628// If the operation has not completed it will return an error.
8629func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
8630	var done bool
8631	done, err = future.DoneWithContext(context.Background(), client)
8632	if err != nil {
8633		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
8634		return
8635	}
8636	if !done {
8637		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
8638		return
8639	}
8640	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8641	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
8642		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
8643		if err != nil {
8644			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
8645		}
8646	}
8647	return
8648}
8649
8650// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
8651// results of a long-running operation.
8652type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
8653	azure.Future
8654}
8655
8656// Result returns the result of the asynchronous operation.
8657// If the operation has not completed it will return an error.
8658func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
8659	var done bool
8660	done, err = future.DoneWithContext(context.Background(), client)
8661	if err != nil {
8662		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
8663		return
8664	}
8665	if !done {
8666		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
8667		return
8668	}
8669	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8670	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
8671		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
8672		if err != nil {
8673			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
8674		}
8675	}
8676	return
8677}
8678
8679// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
8680// the results of a long-running operation.
8681type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
8682	azure.Future
8683}
8684
8685// Result returns the result of the asynchronous operation.
8686// If the operation has not completed it will return an error.
8687func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
8688	var done bool
8689	done, err = future.DoneWithContext(context.Background(), client)
8690	if err != nil {
8691		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
8692		return
8693	}
8694	if !done {
8695		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
8696		return
8697	}
8698	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8699	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
8700		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
8701		if err != nil {
8702			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
8703		}
8704	}
8705	return
8706}
8707
8708// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
8709// the Express Route Cross Connections.
8710type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
8711	autorest.Response `json:"-"`
8712	// Value - A list of the routes table.
8713	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
8714	// NextLink - READ-ONLY; The URL to get the next set of results.
8715	NextLink *string `json:"nextLink,omitempty"`
8716}
8717
8718// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
8719// a long-running operation.
8720type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
8721	azure.Future
8722}
8723
8724// Result returns the result of the asynchronous operation.
8725// If the operation has not completed it will return an error.
8726func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8727	var done bool
8728	done, err = future.DoneWithContext(context.Background(), client)
8729	if err != nil {
8730		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8731		return
8732	}
8733	if !done {
8734		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
8735		return
8736	}
8737	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8738	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8739		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
8740		if err != nil {
8741			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
8742		}
8743	}
8744	return
8745}
8746
8747// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
8748type ExpressRouteServiceProvider struct {
8749	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
8750	// ID - Resource ID.
8751	ID *string `json:"id,omitempty"`
8752	// Name - READ-ONLY; Resource name.
8753	Name *string `json:"name,omitempty"`
8754	// Type - READ-ONLY; Resource type.
8755	Type *string `json:"type,omitempty"`
8756	// Location - Resource location.
8757	Location *string `json:"location,omitempty"`
8758	// Tags - Resource tags.
8759	Tags map[string]*string `json:"tags"`
8760}
8761
8762// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
8763func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
8764	objectMap := make(map[string]interface{})
8765	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
8766		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
8767	}
8768	if ersp.ID != nil {
8769		objectMap["id"] = ersp.ID
8770	}
8771	if ersp.Location != nil {
8772		objectMap["location"] = ersp.Location
8773	}
8774	if ersp.Tags != nil {
8775		objectMap["tags"] = ersp.Tags
8776	}
8777	return json.Marshal(objectMap)
8778}
8779
8780// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
8781func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
8782	var m map[string]*json.RawMessage
8783	err := json.Unmarshal(body, &m)
8784	if err != nil {
8785		return err
8786	}
8787	for k, v := range m {
8788		switch k {
8789		case "properties":
8790			if v != nil {
8791				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
8792				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
8793				if err != nil {
8794					return err
8795				}
8796				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
8797			}
8798		case "id":
8799			if v != nil {
8800				var ID string
8801				err = json.Unmarshal(*v, &ID)
8802				if err != nil {
8803					return err
8804				}
8805				ersp.ID = &ID
8806			}
8807		case "name":
8808			if v != nil {
8809				var name string
8810				err = json.Unmarshal(*v, &name)
8811				if err != nil {
8812					return err
8813				}
8814				ersp.Name = &name
8815			}
8816		case "type":
8817			if v != nil {
8818				var typeVar string
8819				err = json.Unmarshal(*v, &typeVar)
8820				if err != nil {
8821					return err
8822				}
8823				ersp.Type = &typeVar
8824			}
8825		case "location":
8826			if v != nil {
8827				var location string
8828				err = json.Unmarshal(*v, &location)
8829				if err != nil {
8830					return err
8831				}
8832				ersp.Location = &location
8833			}
8834		case "tags":
8835			if v != nil {
8836				var tags map[string]*string
8837				err = json.Unmarshal(*v, &tags)
8838				if err != nil {
8839					return err
8840				}
8841				ersp.Tags = tags
8842			}
8843		}
8844	}
8845
8846	return nil
8847}
8848
8849// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
8850// resources.
8851type ExpressRouteServiceProviderBandwidthsOffered struct {
8852	// OfferName - The OfferName.
8853	OfferName *string `json:"offerName,omitempty"`
8854	// ValueInMbps - The ValueInMbps.
8855	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
8856}
8857
8858// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
8859type ExpressRouteServiceProviderListResult struct {
8860	autorest.Response `json:"-"`
8861	// Value - A list of ExpressRouteResourceProvider resources.
8862	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
8863	// NextLink - The URL to get the next set of results.
8864	NextLink *string `json:"nextLink,omitempty"`
8865}
8866
8867// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
8868// ExpressRouteServiceProvider values.
8869type ExpressRouteServiceProviderListResultIterator struct {
8870	i    int
8871	page ExpressRouteServiceProviderListResultPage
8872}
8873
8874// NextWithContext advances to the next value.  If there was an error making
8875// the request the iterator does not advance and the error is returned.
8876func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
8877	if tracing.IsEnabled() {
8878		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
8879		defer func() {
8880			sc := -1
8881			if iter.Response().Response.Response != nil {
8882				sc = iter.Response().Response.Response.StatusCode
8883			}
8884			tracing.EndSpan(ctx, sc, err)
8885		}()
8886	}
8887	iter.i++
8888	if iter.i < len(iter.page.Values()) {
8889		return nil
8890	}
8891	err = iter.page.NextWithContext(ctx)
8892	if err != nil {
8893		iter.i--
8894		return err
8895	}
8896	iter.i = 0
8897	return nil
8898}
8899
8900// Next advances to the next value.  If there was an error making
8901// the request the iterator does not advance and the error is returned.
8902// Deprecated: Use NextWithContext() instead.
8903func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
8904	return iter.NextWithContext(context.Background())
8905}
8906
8907// NotDone returns true if the enumeration should be started or is not yet complete.
8908func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
8909	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8910}
8911
8912// Response returns the raw server response from the last page request.
8913func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
8914	return iter.page.Response()
8915}
8916
8917// Value returns the current value or a zero-initialized value if the
8918// iterator has advanced beyond the end of the collection.
8919func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
8920	if !iter.page.NotDone() {
8921		return ExpressRouteServiceProvider{}
8922	}
8923	return iter.page.Values()[iter.i]
8924}
8925
8926// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
8927func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
8928	return ExpressRouteServiceProviderListResultIterator{page: page}
8929}
8930
8931// IsEmpty returns true if the ListResult contains no values.
8932func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
8933	return ersplr.Value == nil || len(*ersplr.Value) == 0
8934}
8935
8936// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
8937// It returns nil if no more results exist.
8938func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
8939	if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 {
8940		return nil, nil
8941	}
8942	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8943		autorest.AsJSON(),
8944		autorest.AsGet(),
8945		autorest.WithBaseURL(to.String(ersplr.NextLink)))
8946}
8947
8948// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
8949type ExpressRouteServiceProviderListResultPage struct {
8950	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
8951	ersplr ExpressRouteServiceProviderListResult
8952}
8953
8954// NextWithContext advances to the next page of values.  If there was an error making
8955// the request the page does not advance and the error is returned.
8956func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
8957	if tracing.IsEnabled() {
8958		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
8959		defer func() {
8960			sc := -1
8961			if page.Response().Response.Response != nil {
8962				sc = page.Response().Response.Response.StatusCode
8963			}
8964			tracing.EndSpan(ctx, sc, err)
8965		}()
8966	}
8967	next, err := page.fn(ctx, page.ersplr)
8968	if err != nil {
8969		return err
8970	}
8971	page.ersplr = next
8972	return nil
8973}
8974
8975// Next advances to the next page of values.  If there was an error making
8976// the request the page does not advance and the error is returned.
8977// Deprecated: Use NextWithContext() instead.
8978func (page *ExpressRouteServiceProviderListResultPage) Next() error {
8979	return page.NextWithContext(context.Background())
8980}
8981
8982// NotDone returns true if the page enumeration should be started or is not yet complete.
8983func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
8984	return !page.ersplr.IsEmpty()
8985}
8986
8987// Response returns the raw server response from the last page request.
8988func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
8989	return page.ersplr
8990}
8991
8992// Values returns the slice of values for the current page or nil if there are no values.
8993func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
8994	if page.ersplr.IsEmpty() {
8995		return nil
8996	}
8997	return *page.ersplr.Value
8998}
8999
9000// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
9001func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
9002	return ExpressRouteServiceProviderListResultPage{fn: getNextPage}
9003}
9004
9005// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
9006type ExpressRouteServiceProviderPropertiesFormat struct {
9007	// PeeringLocations - Get a list of peering locations.
9008	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
9009	// BandwidthsOffered - Gets bandwidths offered.
9010	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
9011	// ProvisioningState - Gets the provisioning state of the resource.
9012	ProvisioningState *string `json:"provisioningState,omitempty"`
9013}
9014
9015// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
9016type FlowLogInformation struct {
9017	autorest.Response `json:"-"`
9018	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
9019	TargetResourceID           *string `json:"targetResourceId,omitempty"`
9020	*FlowLogProperties         `json:"properties,omitempty"`
9021	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
9022}
9023
9024// MarshalJSON is the custom marshaler for FlowLogInformation.
9025func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
9026	objectMap := make(map[string]interface{})
9027	if fli.TargetResourceID != nil {
9028		objectMap["targetResourceId"] = fli.TargetResourceID
9029	}
9030	if fli.FlowLogProperties != nil {
9031		objectMap["properties"] = fli.FlowLogProperties
9032	}
9033	if fli.FlowAnalyticsConfiguration != nil {
9034		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
9035	}
9036	return json.Marshal(objectMap)
9037}
9038
9039// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
9040func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
9041	var m map[string]*json.RawMessage
9042	err := json.Unmarshal(body, &m)
9043	if err != nil {
9044		return err
9045	}
9046	for k, v := range m {
9047		switch k {
9048		case "targetResourceId":
9049			if v != nil {
9050				var targetResourceID string
9051				err = json.Unmarshal(*v, &targetResourceID)
9052				if err != nil {
9053					return err
9054				}
9055				fli.TargetResourceID = &targetResourceID
9056			}
9057		case "properties":
9058			if v != nil {
9059				var flowLogProperties FlowLogProperties
9060				err = json.Unmarshal(*v, &flowLogProperties)
9061				if err != nil {
9062					return err
9063				}
9064				fli.FlowLogProperties = &flowLogProperties
9065			}
9066		case "flowAnalyticsConfiguration":
9067			if v != nil {
9068				var flowAnalyticsConfiguration TrafficAnalyticsProperties
9069				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
9070				if err != nil {
9071					return err
9072				}
9073				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
9074			}
9075		}
9076	}
9077
9078	return nil
9079}
9080
9081// FlowLogProperties parameters that define the configuration of flow log.
9082type FlowLogProperties struct {
9083	// StorageID - ID of the storage account which is used to store the flow log.
9084	StorageID *string `json:"storageId,omitempty"`
9085	// Enabled - Flag to enable/disable flow logging.
9086	Enabled         *bool                      `json:"enabled,omitempty"`
9087	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
9088}
9089
9090// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
9091// (optional) status.
9092type FlowLogStatusParameters struct {
9093	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
9094	TargetResourceID *string `json:"targetResourceId,omitempty"`
9095}
9096
9097// FrontendIPConfiguration frontend IP address of the load balancer.
9098type FrontendIPConfiguration struct {
9099	autorest.Response `json:"-"`
9100	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
9101	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
9102	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9103	Name *string `json:"name,omitempty"`
9104	// Etag - A unique read-only string that changes whenever the resource is updated.
9105	Etag *string `json:"etag,omitempty"`
9106	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
9107	Zones *[]string `json:"zones,omitempty"`
9108	// ID - Resource ID.
9109	ID *string `json:"id,omitempty"`
9110}
9111
9112// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
9113func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
9114	objectMap := make(map[string]interface{})
9115	if fic.FrontendIPConfigurationPropertiesFormat != nil {
9116		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
9117	}
9118	if fic.Name != nil {
9119		objectMap["name"] = fic.Name
9120	}
9121	if fic.Etag != nil {
9122		objectMap["etag"] = fic.Etag
9123	}
9124	if fic.Zones != nil {
9125		objectMap["zones"] = fic.Zones
9126	}
9127	if fic.ID != nil {
9128		objectMap["id"] = fic.ID
9129	}
9130	return json.Marshal(objectMap)
9131}
9132
9133// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
9134func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
9135	var m map[string]*json.RawMessage
9136	err := json.Unmarshal(body, &m)
9137	if err != nil {
9138		return err
9139	}
9140	for k, v := range m {
9141		switch k {
9142		case "properties":
9143			if v != nil {
9144				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
9145				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
9146				if err != nil {
9147					return err
9148				}
9149				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
9150			}
9151		case "name":
9152			if v != nil {
9153				var name string
9154				err = json.Unmarshal(*v, &name)
9155				if err != nil {
9156					return err
9157				}
9158				fic.Name = &name
9159			}
9160		case "etag":
9161			if v != nil {
9162				var etag string
9163				err = json.Unmarshal(*v, &etag)
9164				if err != nil {
9165					return err
9166				}
9167				fic.Etag = &etag
9168			}
9169		case "zones":
9170			if v != nil {
9171				var zones []string
9172				err = json.Unmarshal(*v, &zones)
9173				if err != nil {
9174					return err
9175				}
9176				fic.Zones = &zones
9177			}
9178		case "id":
9179			if v != nil {
9180				var ID string
9181				err = json.Unmarshal(*v, &ID)
9182				if err != nil {
9183					return err
9184				}
9185				fic.ID = &ID
9186			}
9187		}
9188	}
9189
9190	return nil
9191}
9192
9193// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
9194type FrontendIPConfigurationPropertiesFormat struct {
9195	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
9196	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
9197	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
9198	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
9199	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
9200	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
9201	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
9202	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
9203	// PrivateIPAddress - The private IP address of the IP configuration.
9204	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9205	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9206	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
9207	// Subnet - The reference of the subnet resource.
9208	Subnet *Subnet `json:"subnet,omitempty"`
9209	// PublicIPAddress - The reference of the Public IP resource.
9210	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
9211	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9212	ProvisioningState *string `json:"provisioningState,omitempty"`
9213}
9214
9215// GatewayRoute gateway routing details
9216type GatewayRoute struct {
9217	// LocalAddress - READ-ONLY; The gateway's local address
9218	LocalAddress *string `json:"localAddress,omitempty"`
9219	// NetworkProperty - READ-ONLY; The route's network prefix
9220	NetworkProperty *string `json:"network,omitempty"`
9221	// NextHop - READ-ONLY; The route's next hop
9222	NextHop *string `json:"nextHop,omitempty"`
9223	// SourcePeer - READ-ONLY; The peer this route was learned from
9224	SourcePeer *string `json:"sourcePeer,omitempty"`
9225	// Origin - READ-ONLY; The source this route was learned from
9226	Origin *string `json:"origin,omitempty"`
9227	// AsPath - READ-ONLY; The route's AS path sequence
9228	AsPath *string `json:"asPath,omitempty"`
9229	// Weight - READ-ONLY; The route's weight
9230	Weight *int32 `json:"weight,omitempty"`
9231}
9232
9233// GatewayRouteListResult list of virtual network gateway routes
9234type GatewayRouteListResult struct {
9235	autorest.Response `json:"-"`
9236	// Value - List of gateway routes
9237	Value *[]GatewayRoute `json:"value,omitempty"`
9238}
9239
9240// GetVpnSitesConfigurationRequest list of Vpn-Sites
9241type GetVpnSitesConfigurationRequest struct {
9242	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
9243	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
9244	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
9245	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
9246}
9247
9248// HTTPConfiguration HTTP configuration of the connectivity check.
9249type HTTPConfiguration struct {
9250	// Method - HTTP method. Possible values include: 'Get'
9251	Method HTTPMethod `json:"method,omitempty"`
9252	// Headers - List of HTTP headers.
9253	Headers *[]HTTPHeader `json:"headers,omitempty"`
9254	// ValidStatusCodes - Valid status codes.
9255	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
9256}
9257
9258// HTTPHeader describes the HTTP header.
9259type HTTPHeader struct {
9260	// Name - The name in HTTP header.
9261	Name *string `json:"name,omitempty"`
9262	// Value - The value in HTTP header.
9263	Value *string `json:"value,omitempty"`
9264}
9265
9266// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
9267type HubVirtualNetworkConnection struct {
9268	autorest.Response                      `json:"-"`
9269	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
9270	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9271	Etag *string `json:"etag,omitempty"`
9272	// ID - Resource ID.
9273	ID *string `json:"id,omitempty"`
9274	// Name - READ-ONLY; Resource name.
9275	Name *string `json:"name,omitempty"`
9276	// Type - READ-ONLY; Resource type.
9277	Type *string `json:"type,omitempty"`
9278	// Location - Resource location.
9279	Location *string `json:"location,omitempty"`
9280	// Tags - Resource tags.
9281	Tags map[string]*string `json:"tags"`
9282}
9283
9284// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
9285func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
9286	objectMap := make(map[string]interface{})
9287	if hvnc.HubVirtualNetworkConnectionProperties != nil {
9288		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
9289	}
9290	if hvnc.ID != nil {
9291		objectMap["id"] = hvnc.ID
9292	}
9293	if hvnc.Location != nil {
9294		objectMap["location"] = hvnc.Location
9295	}
9296	if hvnc.Tags != nil {
9297		objectMap["tags"] = hvnc.Tags
9298	}
9299	return json.Marshal(objectMap)
9300}
9301
9302// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
9303func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
9304	var m map[string]*json.RawMessage
9305	err := json.Unmarshal(body, &m)
9306	if err != nil {
9307		return err
9308	}
9309	for k, v := range m {
9310		switch k {
9311		case "properties":
9312			if v != nil {
9313				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
9314				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
9315				if err != nil {
9316					return err
9317				}
9318				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
9319			}
9320		case "etag":
9321			if v != nil {
9322				var etag string
9323				err = json.Unmarshal(*v, &etag)
9324				if err != nil {
9325					return err
9326				}
9327				hvnc.Etag = &etag
9328			}
9329		case "id":
9330			if v != nil {
9331				var ID string
9332				err = json.Unmarshal(*v, &ID)
9333				if err != nil {
9334					return err
9335				}
9336				hvnc.ID = &ID
9337			}
9338		case "name":
9339			if v != nil {
9340				var name string
9341				err = json.Unmarshal(*v, &name)
9342				if err != nil {
9343					return err
9344				}
9345				hvnc.Name = &name
9346			}
9347		case "type":
9348			if v != nil {
9349				var typeVar string
9350				err = json.Unmarshal(*v, &typeVar)
9351				if err != nil {
9352					return err
9353				}
9354				hvnc.Type = &typeVar
9355			}
9356		case "location":
9357			if v != nil {
9358				var location string
9359				err = json.Unmarshal(*v, &location)
9360				if err != nil {
9361					return err
9362				}
9363				hvnc.Location = &location
9364			}
9365		case "tags":
9366			if v != nil {
9367				var tags map[string]*string
9368				err = json.Unmarshal(*v, &tags)
9369				if err != nil {
9370					return err
9371				}
9372				hvnc.Tags = tags
9373			}
9374		}
9375	}
9376
9377	return nil
9378}
9379
9380// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
9381type HubVirtualNetworkConnectionProperties struct {
9382	// RemoteVirtualNetwork - Reference to the remote virtual network.
9383	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
9384	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
9385	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
9386	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
9387	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
9388	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9389	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9390}
9391
9392// InboundNatPool inbound NAT pool of the load balancer.
9393type InboundNatPool struct {
9394	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
9395	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
9396	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9397	Name *string `json:"name,omitempty"`
9398	// Etag - A unique read-only string that changes whenever the resource is updated.
9399	Etag *string `json:"etag,omitempty"`
9400	// ID - Resource ID.
9401	ID *string `json:"id,omitempty"`
9402}
9403
9404// MarshalJSON is the custom marshaler for InboundNatPool.
9405func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
9406	objectMap := make(map[string]interface{})
9407	if inp.InboundNatPoolPropertiesFormat != nil {
9408		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
9409	}
9410	if inp.Name != nil {
9411		objectMap["name"] = inp.Name
9412	}
9413	if inp.Etag != nil {
9414		objectMap["etag"] = inp.Etag
9415	}
9416	if inp.ID != nil {
9417		objectMap["id"] = inp.ID
9418	}
9419	return json.Marshal(objectMap)
9420}
9421
9422// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
9423func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
9424	var m map[string]*json.RawMessage
9425	err := json.Unmarshal(body, &m)
9426	if err != nil {
9427		return err
9428	}
9429	for k, v := range m {
9430		switch k {
9431		case "properties":
9432			if v != nil {
9433				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
9434				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
9435				if err != nil {
9436					return err
9437				}
9438				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
9439			}
9440		case "name":
9441			if v != nil {
9442				var name string
9443				err = json.Unmarshal(*v, &name)
9444				if err != nil {
9445					return err
9446				}
9447				inp.Name = &name
9448			}
9449		case "etag":
9450			if v != nil {
9451				var etag string
9452				err = json.Unmarshal(*v, &etag)
9453				if err != nil {
9454					return err
9455				}
9456				inp.Etag = &etag
9457			}
9458		case "id":
9459			if v != nil {
9460				var ID string
9461				err = json.Unmarshal(*v, &ID)
9462				if err != nil {
9463					return err
9464				}
9465				inp.ID = &ID
9466			}
9467		}
9468	}
9469
9470	return nil
9471}
9472
9473// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
9474type InboundNatPoolPropertiesFormat struct {
9475	// FrontendIPConfiguration - A reference to frontend IP addresses.
9476	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9477	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9478	Protocol TransportProtocol `json:"protocol,omitempty"`
9479	// FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
9480	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
9481	// FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
9482	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
9483	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
9484	BackendPort *int32 `json:"backendPort,omitempty"`
9485	// IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
9486	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9487	// EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
9488	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9489	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9490	ProvisioningState *string `json:"provisioningState,omitempty"`
9491}
9492
9493// InboundNatRule inbound NAT rule of the load balancer.
9494type InboundNatRule struct {
9495	autorest.Response `json:"-"`
9496	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
9497	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
9498	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9499	Name *string `json:"name,omitempty"`
9500	// Etag - A unique read-only string that changes whenever the resource is updated.
9501	Etag *string `json:"etag,omitempty"`
9502	// ID - Resource ID.
9503	ID *string `json:"id,omitempty"`
9504}
9505
9506// MarshalJSON is the custom marshaler for InboundNatRule.
9507func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
9508	objectMap := make(map[string]interface{})
9509	if inr.InboundNatRulePropertiesFormat != nil {
9510		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
9511	}
9512	if inr.Name != nil {
9513		objectMap["name"] = inr.Name
9514	}
9515	if inr.Etag != nil {
9516		objectMap["etag"] = inr.Etag
9517	}
9518	if inr.ID != nil {
9519		objectMap["id"] = inr.ID
9520	}
9521	return json.Marshal(objectMap)
9522}
9523
9524// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
9525func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
9526	var m map[string]*json.RawMessage
9527	err := json.Unmarshal(body, &m)
9528	if err != nil {
9529		return err
9530	}
9531	for k, v := range m {
9532		switch k {
9533		case "properties":
9534			if v != nil {
9535				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
9536				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
9537				if err != nil {
9538					return err
9539				}
9540				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
9541			}
9542		case "name":
9543			if v != nil {
9544				var name string
9545				err = json.Unmarshal(*v, &name)
9546				if err != nil {
9547					return err
9548				}
9549				inr.Name = &name
9550			}
9551		case "etag":
9552			if v != nil {
9553				var etag string
9554				err = json.Unmarshal(*v, &etag)
9555				if err != nil {
9556					return err
9557				}
9558				inr.Etag = &etag
9559			}
9560		case "id":
9561			if v != nil {
9562				var ID string
9563				err = json.Unmarshal(*v, &ID)
9564				if err != nil {
9565					return err
9566				}
9567				inr.ID = &ID
9568			}
9569		}
9570	}
9571
9572	return nil
9573}
9574
9575// InboundNatRuleListResult response for ListInboundNatRule API service call.
9576type InboundNatRuleListResult struct {
9577	autorest.Response `json:"-"`
9578	// Value - A list of inbound nat rules in a load balancer.
9579	Value *[]InboundNatRule `json:"value,omitempty"`
9580	// NextLink - READ-ONLY; The URL to get the next set of results.
9581	NextLink *string `json:"nextLink,omitempty"`
9582}
9583
9584// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
9585type InboundNatRuleListResultIterator struct {
9586	i    int
9587	page InboundNatRuleListResultPage
9588}
9589
9590// NextWithContext advances to the next value.  If there was an error making
9591// the request the iterator does not advance and the error is returned.
9592func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
9593	if tracing.IsEnabled() {
9594		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
9595		defer func() {
9596			sc := -1
9597			if iter.Response().Response.Response != nil {
9598				sc = iter.Response().Response.Response.StatusCode
9599			}
9600			tracing.EndSpan(ctx, sc, err)
9601		}()
9602	}
9603	iter.i++
9604	if iter.i < len(iter.page.Values()) {
9605		return nil
9606	}
9607	err = iter.page.NextWithContext(ctx)
9608	if err != nil {
9609		iter.i--
9610		return err
9611	}
9612	iter.i = 0
9613	return nil
9614}
9615
9616// Next advances to the next value.  If there was an error making
9617// the request the iterator does not advance and the error is returned.
9618// Deprecated: Use NextWithContext() instead.
9619func (iter *InboundNatRuleListResultIterator) Next() error {
9620	return iter.NextWithContext(context.Background())
9621}
9622
9623// NotDone returns true if the enumeration should be started or is not yet complete.
9624func (iter InboundNatRuleListResultIterator) NotDone() bool {
9625	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9626}
9627
9628// Response returns the raw server response from the last page request.
9629func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
9630	return iter.page.Response()
9631}
9632
9633// Value returns the current value or a zero-initialized value if the
9634// iterator has advanced beyond the end of the collection.
9635func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
9636	if !iter.page.NotDone() {
9637		return InboundNatRule{}
9638	}
9639	return iter.page.Values()[iter.i]
9640}
9641
9642// Creates a new instance of the InboundNatRuleListResultIterator type.
9643func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
9644	return InboundNatRuleListResultIterator{page: page}
9645}
9646
9647// IsEmpty returns true if the ListResult contains no values.
9648func (inrlr InboundNatRuleListResult) IsEmpty() bool {
9649	return inrlr.Value == nil || len(*inrlr.Value) == 0
9650}
9651
9652// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
9653// It returns nil if no more results exist.
9654func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
9655	if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 {
9656		return nil, nil
9657	}
9658	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9659		autorest.AsJSON(),
9660		autorest.AsGet(),
9661		autorest.WithBaseURL(to.String(inrlr.NextLink)))
9662}
9663
9664// InboundNatRuleListResultPage contains a page of InboundNatRule values.
9665type InboundNatRuleListResultPage struct {
9666	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
9667	inrlr InboundNatRuleListResult
9668}
9669
9670// NextWithContext advances to the next page of values.  If there was an error making
9671// the request the page does not advance and the error is returned.
9672func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
9673	if tracing.IsEnabled() {
9674		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
9675		defer func() {
9676			sc := -1
9677			if page.Response().Response.Response != nil {
9678				sc = page.Response().Response.Response.StatusCode
9679			}
9680			tracing.EndSpan(ctx, sc, err)
9681		}()
9682	}
9683	next, err := page.fn(ctx, page.inrlr)
9684	if err != nil {
9685		return err
9686	}
9687	page.inrlr = next
9688	return nil
9689}
9690
9691// Next advances to the next page of values.  If there was an error making
9692// the request the page does not advance and the error is returned.
9693// Deprecated: Use NextWithContext() instead.
9694func (page *InboundNatRuleListResultPage) Next() error {
9695	return page.NextWithContext(context.Background())
9696}
9697
9698// NotDone returns true if the page enumeration should be started or is not yet complete.
9699func (page InboundNatRuleListResultPage) NotDone() bool {
9700	return !page.inrlr.IsEmpty()
9701}
9702
9703// Response returns the raw server response from the last page request.
9704func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
9705	return page.inrlr
9706}
9707
9708// Values returns the slice of values for the current page or nil if there are no values.
9709func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
9710	if page.inrlr.IsEmpty() {
9711		return nil
9712	}
9713	return *page.inrlr.Value
9714}
9715
9716// Creates a new instance of the InboundNatRuleListResultPage type.
9717func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
9718	return InboundNatRuleListResultPage{fn: getNextPage}
9719}
9720
9721// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
9722type InboundNatRulePropertiesFormat struct {
9723	// FrontendIPConfiguration - A reference to frontend IP addresses.
9724	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9725	// BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.
9726	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
9727	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9728	Protocol TransportProtocol `json:"protocol,omitempty"`
9729	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
9730	FrontendPort *int32 `json:"frontendPort,omitempty"`
9731	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
9732	BackendPort *int32 `json:"backendPort,omitempty"`
9733	// IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
9734	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9735	// EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
9736	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9737	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9738	ProvisioningState *string `json:"provisioningState,omitempty"`
9739}
9740
9741// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9742// long-running operation.
9743type InboundNatRulesCreateOrUpdateFuture struct {
9744	azure.Future
9745}
9746
9747// Result returns the result of the asynchronous operation.
9748// If the operation has not completed it will return an error.
9749func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
9750	var done bool
9751	done, err = future.DoneWithContext(context.Background(), client)
9752	if err != nil {
9753		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9754		return
9755	}
9756	if !done {
9757		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
9758		return
9759	}
9760	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9761	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
9762		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
9763		if err != nil {
9764			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
9765		}
9766	}
9767	return
9768}
9769
9770// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9771// operation.
9772type InboundNatRulesDeleteFuture struct {
9773	azure.Future
9774}
9775
9776// Result returns the result of the asynchronous operation.
9777// If the operation has not completed it will return an error.
9778func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
9779	var done bool
9780	done, err = future.DoneWithContext(context.Background(), client)
9781	if err != nil {
9782		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
9783		return
9784	}
9785	if !done {
9786		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
9787		return
9788	}
9789	ar.Response = future.Response()
9790	return
9791}
9792
9793// Interface a network interface in a resource group.
9794type Interface struct {
9795	autorest.Response `json:"-"`
9796	// InterfacePropertiesFormat - Properties of the network interface.
9797	*InterfacePropertiesFormat `json:"properties,omitempty"`
9798	// Etag - A unique read-only string that changes whenever the resource is updated.
9799	Etag *string `json:"etag,omitempty"`
9800	// ID - Resource ID.
9801	ID *string `json:"id,omitempty"`
9802	// Name - READ-ONLY; Resource name.
9803	Name *string `json:"name,omitempty"`
9804	// Type - READ-ONLY; Resource type.
9805	Type *string `json:"type,omitempty"`
9806	// Location - Resource location.
9807	Location *string `json:"location,omitempty"`
9808	// Tags - Resource tags.
9809	Tags map[string]*string `json:"tags"`
9810}
9811
9812// MarshalJSON is the custom marshaler for Interface.
9813func (i Interface) MarshalJSON() ([]byte, error) {
9814	objectMap := make(map[string]interface{})
9815	if i.InterfacePropertiesFormat != nil {
9816		objectMap["properties"] = i.InterfacePropertiesFormat
9817	}
9818	if i.Etag != nil {
9819		objectMap["etag"] = i.Etag
9820	}
9821	if i.ID != nil {
9822		objectMap["id"] = i.ID
9823	}
9824	if i.Location != nil {
9825		objectMap["location"] = i.Location
9826	}
9827	if i.Tags != nil {
9828		objectMap["tags"] = i.Tags
9829	}
9830	return json.Marshal(objectMap)
9831}
9832
9833// UnmarshalJSON is the custom unmarshaler for Interface struct.
9834func (i *Interface) UnmarshalJSON(body []byte) error {
9835	var m map[string]*json.RawMessage
9836	err := json.Unmarshal(body, &m)
9837	if err != nil {
9838		return err
9839	}
9840	for k, v := range m {
9841		switch k {
9842		case "properties":
9843			if v != nil {
9844				var interfacePropertiesFormat InterfacePropertiesFormat
9845				err = json.Unmarshal(*v, &interfacePropertiesFormat)
9846				if err != nil {
9847					return err
9848				}
9849				i.InterfacePropertiesFormat = &interfacePropertiesFormat
9850			}
9851		case "etag":
9852			if v != nil {
9853				var etag string
9854				err = json.Unmarshal(*v, &etag)
9855				if err != nil {
9856					return err
9857				}
9858				i.Etag = &etag
9859			}
9860		case "id":
9861			if v != nil {
9862				var ID string
9863				err = json.Unmarshal(*v, &ID)
9864				if err != nil {
9865					return err
9866				}
9867				i.ID = &ID
9868			}
9869		case "name":
9870			if v != nil {
9871				var name string
9872				err = json.Unmarshal(*v, &name)
9873				if err != nil {
9874					return err
9875				}
9876				i.Name = &name
9877			}
9878		case "type":
9879			if v != nil {
9880				var typeVar string
9881				err = json.Unmarshal(*v, &typeVar)
9882				if err != nil {
9883					return err
9884				}
9885				i.Type = &typeVar
9886			}
9887		case "location":
9888			if v != nil {
9889				var location string
9890				err = json.Unmarshal(*v, &location)
9891				if err != nil {
9892					return err
9893				}
9894				i.Location = &location
9895			}
9896		case "tags":
9897			if v != nil {
9898				var tags map[string]*string
9899				err = json.Unmarshal(*v, &tags)
9900				if err != nil {
9901					return err
9902				}
9903				i.Tags = tags
9904			}
9905		}
9906	}
9907
9908	return nil
9909}
9910
9911// InterfaceAssociation network interface and its custom security rules.
9912type InterfaceAssociation struct {
9913	// ID - READ-ONLY; Network interface ID.
9914	ID *string `json:"id,omitempty"`
9915	// SecurityRules - Collection of custom security rules.
9916	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
9917}
9918
9919// InterfaceDNSSettings DNS settings of a network interface.
9920type InterfaceDNSSettings struct {
9921	// DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection.
9922	DNSServers *[]string `json:"dnsServers,omitempty"`
9923	// AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs.
9924	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
9925	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
9926	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
9927	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
9928	InternalFqdn *string `json:"internalFqdn,omitempty"`
9929	// InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
9930	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
9931}
9932
9933// InterfaceIPConfiguration iPConfiguration in a network interface.
9934type InterfaceIPConfiguration struct {
9935	autorest.Response `json:"-"`
9936	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
9937	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
9938	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9939	Name *string `json:"name,omitempty"`
9940	// Etag - A unique read-only string that changes whenever the resource is updated.
9941	Etag *string `json:"etag,omitempty"`
9942	// ID - Resource ID.
9943	ID *string `json:"id,omitempty"`
9944}
9945
9946// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
9947func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
9948	objectMap := make(map[string]interface{})
9949	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
9950		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
9951	}
9952	if iic.Name != nil {
9953		objectMap["name"] = iic.Name
9954	}
9955	if iic.Etag != nil {
9956		objectMap["etag"] = iic.Etag
9957	}
9958	if iic.ID != nil {
9959		objectMap["id"] = iic.ID
9960	}
9961	return json.Marshal(objectMap)
9962}
9963
9964// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
9965func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
9966	var m map[string]*json.RawMessage
9967	err := json.Unmarshal(body, &m)
9968	if err != nil {
9969		return err
9970	}
9971	for k, v := range m {
9972		switch k {
9973		case "properties":
9974			if v != nil {
9975				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
9976				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
9977				if err != nil {
9978					return err
9979				}
9980				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
9981			}
9982		case "name":
9983			if v != nil {
9984				var name string
9985				err = json.Unmarshal(*v, &name)
9986				if err != nil {
9987					return err
9988				}
9989				iic.Name = &name
9990			}
9991		case "etag":
9992			if v != nil {
9993				var etag string
9994				err = json.Unmarshal(*v, &etag)
9995				if err != nil {
9996					return err
9997				}
9998				iic.Etag = &etag
9999			}
10000		case "id":
10001			if v != nil {
10002				var ID string
10003				err = json.Unmarshal(*v, &ID)
10004				if err != nil {
10005					return err
10006				}
10007				iic.ID = &ID
10008			}
10009		}
10010	}
10011
10012	return nil
10013}
10014
10015// InterfaceIPConfigurationListResult response for list ip configurations API service call.
10016type InterfaceIPConfigurationListResult struct {
10017	autorest.Response `json:"-"`
10018	// Value - A list of ip configurations.
10019	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
10020	// NextLink - READ-ONLY; The URL to get the next set of results.
10021	NextLink *string `json:"nextLink,omitempty"`
10022}
10023
10024// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
10025// InterfaceIPConfiguration values.
10026type InterfaceIPConfigurationListResultIterator struct {
10027	i    int
10028	page InterfaceIPConfigurationListResultPage
10029}
10030
10031// NextWithContext advances to the next value.  If there was an error making
10032// the request the iterator does not advance and the error is returned.
10033func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10034	if tracing.IsEnabled() {
10035		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
10036		defer func() {
10037			sc := -1
10038			if iter.Response().Response.Response != nil {
10039				sc = iter.Response().Response.Response.StatusCode
10040			}
10041			tracing.EndSpan(ctx, sc, err)
10042		}()
10043	}
10044	iter.i++
10045	if iter.i < len(iter.page.Values()) {
10046		return nil
10047	}
10048	err = iter.page.NextWithContext(ctx)
10049	if err != nil {
10050		iter.i--
10051		return err
10052	}
10053	iter.i = 0
10054	return nil
10055}
10056
10057// Next advances to the next value.  If there was an error making
10058// the request the iterator does not advance and the error is returned.
10059// Deprecated: Use NextWithContext() instead.
10060func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
10061	return iter.NextWithContext(context.Background())
10062}
10063
10064// NotDone returns true if the enumeration should be started or is not yet complete.
10065func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
10066	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10067}
10068
10069// Response returns the raw server response from the last page request.
10070func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
10071	return iter.page.Response()
10072}
10073
10074// Value returns the current value or a zero-initialized value if the
10075// iterator has advanced beyond the end of the collection.
10076func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
10077	if !iter.page.NotDone() {
10078		return InterfaceIPConfiguration{}
10079	}
10080	return iter.page.Values()[iter.i]
10081}
10082
10083// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
10084func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
10085	return InterfaceIPConfigurationListResultIterator{page: page}
10086}
10087
10088// IsEmpty returns true if the ListResult contains no values.
10089func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
10090	return iiclr.Value == nil || len(*iiclr.Value) == 0
10091}
10092
10093// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
10094// It returns nil if no more results exist.
10095func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
10096	if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 {
10097		return nil, nil
10098	}
10099	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10100		autorest.AsJSON(),
10101		autorest.AsGet(),
10102		autorest.WithBaseURL(to.String(iiclr.NextLink)))
10103}
10104
10105// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
10106type InterfaceIPConfigurationListResultPage struct {
10107	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
10108	iiclr InterfaceIPConfigurationListResult
10109}
10110
10111// NextWithContext advances to the next page of values.  If there was an error making
10112// the request the page does not advance and the error is returned.
10113func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
10114	if tracing.IsEnabled() {
10115		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
10116		defer func() {
10117			sc := -1
10118			if page.Response().Response.Response != nil {
10119				sc = page.Response().Response.Response.StatusCode
10120			}
10121			tracing.EndSpan(ctx, sc, err)
10122		}()
10123	}
10124	next, err := page.fn(ctx, page.iiclr)
10125	if err != nil {
10126		return err
10127	}
10128	page.iiclr = next
10129	return nil
10130}
10131
10132// Next advances to the next page of values.  If there was an error making
10133// the request the page does not advance and the error is returned.
10134// Deprecated: Use NextWithContext() instead.
10135func (page *InterfaceIPConfigurationListResultPage) Next() error {
10136	return page.NextWithContext(context.Background())
10137}
10138
10139// NotDone returns true if the page enumeration should be started or is not yet complete.
10140func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
10141	return !page.iiclr.IsEmpty()
10142}
10143
10144// Response returns the raw server response from the last page request.
10145func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
10146	return page.iiclr
10147}
10148
10149// Values returns the slice of values for the current page or nil if there are no values.
10150func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
10151	if page.iiclr.IsEmpty() {
10152		return nil
10153	}
10154	return *page.iiclr.Value
10155}
10156
10157// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
10158func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
10159	return InterfaceIPConfigurationListResultPage{fn: getNextPage}
10160}
10161
10162// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
10163type InterfaceIPConfigurationPropertiesFormat struct {
10164	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
10165	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
10166	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
10167	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
10168	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
10169	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
10170	// PrivateIPAddress - Private IP address of the IP configuration.
10171	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10172	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10173	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10174	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
10175	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
10176	// Subnet - Subnet bound to the IP configuration.
10177	Subnet *Subnet `json:"subnet,omitempty"`
10178	// Primary - Gets whether this is a primary customer address on the network interface.
10179	Primary *bool `json:"primary,omitempty"`
10180	// PublicIPAddress - Public IP address bound to the IP configuration.
10181	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10182	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
10183	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
10184	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10185	ProvisioningState *string `json:"provisioningState,omitempty"`
10186}
10187
10188// InterfaceListResult response for the ListNetworkInterface API service call.
10189type InterfaceListResult struct {
10190	autorest.Response `json:"-"`
10191	// Value - A list of network interfaces in a resource group.
10192	Value *[]Interface `json:"value,omitempty"`
10193	// NextLink - READ-ONLY; The URL to get the next set of results.
10194	NextLink *string `json:"nextLink,omitempty"`
10195}
10196
10197// InterfaceListResultIterator provides access to a complete listing of Interface values.
10198type InterfaceListResultIterator struct {
10199	i    int
10200	page InterfaceListResultPage
10201}
10202
10203// NextWithContext advances to the next value.  If there was an error making
10204// the request the iterator does not advance and the error is returned.
10205func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
10206	if tracing.IsEnabled() {
10207		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
10208		defer func() {
10209			sc := -1
10210			if iter.Response().Response.Response != nil {
10211				sc = iter.Response().Response.Response.StatusCode
10212			}
10213			tracing.EndSpan(ctx, sc, err)
10214		}()
10215	}
10216	iter.i++
10217	if iter.i < len(iter.page.Values()) {
10218		return nil
10219	}
10220	err = iter.page.NextWithContext(ctx)
10221	if err != nil {
10222		iter.i--
10223		return err
10224	}
10225	iter.i = 0
10226	return nil
10227}
10228
10229// Next advances to the next value.  If there was an error making
10230// the request the iterator does not advance and the error is returned.
10231// Deprecated: Use NextWithContext() instead.
10232func (iter *InterfaceListResultIterator) Next() error {
10233	return iter.NextWithContext(context.Background())
10234}
10235
10236// NotDone returns true if the enumeration should be started or is not yet complete.
10237func (iter InterfaceListResultIterator) NotDone() bool {
10238	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10239}
10240
10241// Response returns the raw server response from the last page request.
10242func (iter InterfaceListResultIterator) Response() InterfaceListResult {
10243	return iter.page.Response()
10244}
10245
10246// Value returns the current value or a zero-initialized value if the
10247// iterator has advanced beyond the end of the collection.
10248func (iter InterfaceListResultIterator) Value() Interface {
10249	if !iter.page.NotDone() {
10250		return Interface{}
10251	}
10252	return iter.page.Values()[iter.i]
10253}
10254
10255// Creates a new instance of the InterfaceListResultIterator type.
10256func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
10257	return InterfaceListResultIterator{page: page}
10258}
10259
10260// IsEmpty returns true if the ListResult contains no values.
10261func (ilr InterfaceListResult) IsEmpty() bool {
10262	return ilr.Value == nil || len(*ilr.Value) == 0
10263}
10264
10265// interfaceListResultPreparer prepares a request to retrieve the next set of results.
10266// It returns nil if no more results exist.
10267func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
10268	if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
10269		return nil, nil
10270	}
10271	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10272		autorest.AsJSON(),
10273		autorest.AsGet(),
10274		autorest.WithBaseURL(to.String(ilr.NextLink)))
10275}
10276
10277// InterfaceListResultPage contains a page of Interface values.
10278type InterfaceListResultPage struct {
10279	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
10280	ilr InterfaceListResult
10281}
10282
10283// NextWithContext advances to the next page of values.  If there was an error making
10284// the request the page does not advance and the error is returned.
10285func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
10286	if tracing.IsEnabled() {
10287		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
10288		defer func() {
10289			sc := -1
10290			if page.Response().Response.Response != nil {
10291				sc = page.Response().Response.Response.StatusCode
10292			}
10293			tracing.EndSpan(ctx, sc, err)
10294		}()
10295	}
10296	next, err := page.fn(ctx, page.ilr)
10297	if err != nil {
10298		return err
10299	}
10300	page.ilr = next
10301	return nil
10302}
10303
10304// Next advances to the next page of values.  If there was an error making
10305// the request the page does not advance and the error is returned.
10306// Deprecated: Use NextWithContext() instead.
10307func (page *InterfaceListResultPage) Next() error {
10308	return page.NextWithContext(context.Background())
10309}
10310
10311// NotDone returns true if the page enumeration should be started or is not yet complete.
10312func (page InterfaceListResultPage) NotDone() bool {
10313	return !page.ilr.IsEmpty()
10314}
10315
10316// Response returns the raw server response from the last page request.
10317func (page InterfaceListResultPage) Response() InterfaceListResult {
10318	return page.ilr
10319}
10320
10321// Values returns the slice of values for the current page or nil if there are no values.
10322func (page InterfaceListResultPage) Values() []Interface {
10323	if page.ilr.IsEmpty() {
10324		return nil
10325	}
10326	return *page.ilr.Value
10327}
10328
10329// Creates a new instance of the InterfaceListResultPage type.
10330func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
10331	return InterfaceListResultPage{fn: getNextPage}
10332}
10333
10334// InterfaceLoadBalancerListResult response for list ip configurations API service call.
10335type InterfaceLoadBalancerListResult struct {
10336	autorest.Response `json:"-"`
10337	// Value - A list of load balancers.
10338	Value *[]LoadBalancer `json:"value,omitempty"`
10339	// NextLink - READ-ONLY; The URL to get the next set of results.
10340	NextLink *string `json:"nextLink,omitempty"`
10341}
10342
10343// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
10344type InterfaceLoadBalancerListResultIterator struct {
10345	i    int
10346	page InterfaceLoadBalancerListResultPage
10347}
10348
10349// NextWithContext advances to the next value.  If there was an error making
10350// the request the iterator does not advance and the error is returned.
10351func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
10352	if tracing.IsEnabled() {
10353		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
10354		defer func() {
10355			sc := -1
10356			if iter.Response().Response.Response != nil {
10357				sc = iter.Response().Response.Response.StatusCode
10358			}
10359			tracing.EndSpan(ctx, sc, err)
10360		}()
10361	}
10362	iter.i++
10363	if iter.i < len(iter.page.Values()) {
10364		return nil
10365	}
10366	err = iter.page.NextWithContext(ctx)
10367	if err != nil {
10368		iter.i--
10369		return err
10370	}
10371	iter.i = 0
10372	return nil
10373}
10374
10375// Next advances to the next value.  If there was an error making
10376// the request the iterator does not advance and the error is returned.
10377// Deprecated: Use NextWithContext() instead.
10378func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
10379	return iter.NextWithContext(context.Background())
10380}
10381
10382// NotDone returns true if the enumeration should be started or is not yet complete.
10383func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
10384	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10385}
10386
10387// Response returns the raw server response from the last page request.
10388func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
10389	return iter.page.Response()
10390}
10391
10392// Value returns the current value or a zero-initialized value if the
10393// iterator has advanced beyond the end of the collection.
10394func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
10395	if !iter.page.NotDone() {
10396		return LoadBalancer{}
10397	}
10398	return iter.page.Values()[iter.i]
10399}
10400
10401// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
10402func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
10403	return InterfaceLoadBalancerListResultIterator{page: page}
10404}
10405
10406// IsEmpty returns true if the ListResult contains no values.
10407func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
10408	return ilblr.Value == nil || len(*ilblr.Value) == 0
10409}
10410
10411// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
10412// It returns nil if no more results exist.
10413func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
10414	if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 {
10415		return nil, nil
10416	}
10417	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10418		autorest.AsJSON(),
10419		autorest.AsGet(),
10420		autorest.WithBaseURL(to.String(ilblr.NextLink)))
10421}
10422
10423// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
10424type InterfaceLoadBalancerListResultPage struct {
10425	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
10426	ilblr InterfaceLoadBalancerListResult
10427}
10428
10429// NextWithContext advances to the next page of values.  If there was an error making
10430// the request the page does not advance and the error is returned.
10431func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
10432	if tracing.IsEnabled() {
10433		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
10434		defer func() {
10435			sc := -1
10436			if page.Response().Response.Response != nil {
10437				sc = page.Response().Response.Response.StatusCode
10438			}
10439			tracing.EndSpan(ctx, sc, err)
10440		}()
10441	}
10442	next, err := page.fn(ctx, page.ilblr)
10443	if err != nil {
10444		return err
10445	}
10446	page.ilblr = next
10447	return nil
10448}
10449
10450// Next advances to the next page of values.  If there was an error making
10451// the request the page does not advance and the error is returned.
10452// Deprecated: Use NextWithContext() instead.
10453func (page *InterfaceLoadBalancerListResultPage) Next() error {
10454	return page.NextWithContext(context.Background())
10455}
10456
10457// NotDone returns true if the page enumeration should be started or is not yet complete.
10458func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
10459	return !page.ilblr.IsEmpty()
10460}
10461
10462// Response returns the raw server response from the last page request.
10463func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
10464	return page.ilblr
10465}
10466
10467// Values returns the slice of values for the current page or nil if there are no values.
10468func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
10469	if page.ilblr.IsEmpty() {
10470		return nil
10471	}
10472	return *page.ilblr.Value
10473}
10474
10475// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
10476func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
10477	return InterfaceLoadBalancerListResultPage{fn: getNextPage}
10478}
10479
10480// InterfacePropertiesFormat networkInterface properties.
10481type InterfacePropertiesFormat struct {
10482	// VirtualMachine - The reference of a virtual machine.
10483	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
10484	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
10485	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
10486	// IPConfigurations - A list of IPConfigurations of the network interface.
10487	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
10488	// DNSSettings - The DNS settings in network interface.
10489	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
10490	// MacAddress - The MAC address of the network interface.
10491	MacAddress *string `json:"macAddress,omitempty"`
10492	// Primary - Gets whether this is a primary network interface on a virtual machine.
10493	Primary *bool `json:"primary,omitempty"`
10494	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
10495	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
10496	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
10497	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
10498	// ResourceGUID - The resource GUID property of the network interface resource.
10499	ResourceGUID *string `json:"resourceGuid,omitempty"`
10500	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10501	ProvisioningState *string `json:"provisioningState,omitempty"`
10502}
10503
10504// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10505// long-running operation.
10506type InterfacesCreateOrUpdateFuture struct {
10507	azure.Future
10508}
10509
10510// Result returns the result of the asynchronous operation.
10511// If the operation has not completed it will return an error.
10512func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
10513	var done bool
10514	done, err = future.DoneWithContext(context.Background(), client)
10515	if err != nil {
10516		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10517		return
10518	}
10519	if !done {
10520		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
10521		return
10522	}
10523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10524	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10525		i, err = client.CreateOrUpdateResponder(i.Response.Response)
10526		if err != nil {
10527			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
10528		}
10529	}
10530	return
10531}
10532
10533// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10534// operation.
10535type InterfacesDeleteFuture struct {
10536	azure.Future
10537}
10538
10539// Result returns the result of the asynchronous operation.
10540// If the operation has not completed it will return an error.
10541func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
10542	var done bool
10543	done, err = future.DoneWithContext(context.Background(), client)
10544	if err != nil {
10545		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
10546		return
10547	}
10548	if !done {
10549		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
10550		return
10551	}
10552	ar.Response = future.Response()
10553	return
10554}
10555
10556// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
10557// long-running operation.
10558type InterfacesGetEffectiveRouteTableFuture struct {
10559	azure.Future
10560}
10561
10562// Result returns the result of the asynchronous operation.
10563// If the operation has not completed it will return an error.
10564func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
10565	var done bool
10566	done, err = future.DoneWithContext(context.Background(), client)
10567	if err != nil {
10568		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
10569		return
10570	}
10571	if !done {
10572		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
10573		return
10574	}
10575	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10576	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
10577		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
10578		if err != nil {
10579			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
10580		}
10581	}
10582	return
10583}
10584
10585// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
10586// results of a long-running operation.
10587type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
10588	azure.Future
10589}
10590
10591// Result returns the result of the asynchronous operation.
10592// If the operation has not completed it will return an error.
10593func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
10594	var done bool
10595	done, err = future.DoneWithContext(context.Background(), client)
10596	if err != nil {
10597		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
10598		return
10599	}
10600	if !done {
10601		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
10602		return
10603	}
10604	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10605	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
10606		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
10607		if err != nil {
10608			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
10609		}
10610	}
10611	return
10612}
10613
10614// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
10615// operation.
10616type InterfacesUpdateTagsFuture struct {
10617	azure.Future
10618}
10619
10620// Result returns the result of the asynchronous operation.
10621// If the operation has not completed it will return an error.
10622func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
10623	var done bool
10624	done, err = future.DoneWithContext(context.Background(), client)
10625	if err != nil {
10626		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10627		return
10628	}
10629	if !done {
10630		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
10631		return
10632	}
10633	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10634	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10635		i, err = client.UpdateTagsResponder(i.Response.Response)
10636		if err != nil {
10637			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
10638		}
10639	}
10640	return
10641}
10642
10643// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
10644type IPAddressAvailabilityResult struct {
10645	autorest.Response `json:"-"`
10646	// Available - Private IP address availability.
10647	Available *bool `json:"available,omitempty"`
10648	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
10649	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
10650}
10651
10652// IPConfiguration IP configuration
10653type IPConfiguration struct {
10654	// IPConfigurationPropertiesFormat - Properties of the IP configuration
10655	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
10656	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10657	Name *string `json:"name,omitempty"`
10658	// Etag - A unique read-only string that changes whenever the resource is updated.
10659	Etag *string `json:"etag,omitempty"`
10660	// ID - Resource ID.
10661	ID *string `json:"id,omitempty"`
10662}
10663
10664// MarshalJSON is the custom marshaler for IPConfiguration.
10665func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
10666	objectMap := make(map[string]interface{})
10667	if ic.IPConfigurationPropertiesFormat != nil {
10668		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
10669	}
10670	if ic.Name != nil {
10671		objectMap["name"] = ic.Name
10672	}
10673	if ic.Etag != nil {
10674		objectMap["etag"] = ic.Etag
10675	}
10676	if ic.ID != nil {
10677		objectMap["id"] = ic.ID
10678	}
10679	return json.Marshal(objectMap)
10680}
10681
10682// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
10683func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
10684	var m map[string]*json.RawMessage
10685	err := json.Unmarshal(body, &m)
10686	if err != nil {
10687		return err
10688	}
10689	for k, v := range m {
10690		switch k {
10691		case "properties":
10692			if v != nil {
10693				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
10694				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
10695				if err != nil {
10696					return err
10697				}
10698				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
10699			}
10700		case "name":
10701			if v != nil {
10702				var name string
10703				err = json.Unmarshal(*v, &name)
10704				if err != nil {
10705					return err
10706				}
10707				ic.Name = &name
10708			}
10709		case "etag":
10710			if v != nil {
10711				var etag string
10712				err = json.Unmarshal(*v, &etag)
10713				if err != nil {
10714					return err
10715				}
10716				ic.Etag = &etag
10717			}
10718		case "id":
10719			if v != nil {
10720				var ID string
10721				err = json.Unmarshal(*v, &ID)
10722				if err != nil {
10723					return err
10724				}
10725				ic.ID = &ID
10726			}
10727		}
10728	}
10729
10730	return nil
10731}
10732
10733// IPConfigurationPropertiesFormat properties of IP configuration.
10734type IPConfigurationPropertiesFormat struct {
10735	// PrivateIPAddress - The private IP address of the IP configuration.
10736	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10737	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10738	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10739	// Subnet - The reference of the subnet resource.
10740	Subnet *Subnet `json:"subnet,omitempty"`
10741	// PublicIPAddress - The reference of the public IP resource.
10742	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10743	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10744	ProvisioningState *string `json:"provisioningState,omitempty"`
10745}
10746
10747// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
10748type IpsecPolicy struct {
10749	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
10750	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
10751	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
10752	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
10753	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
10754	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
10755	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
10756	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
10757	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
10758	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
10759	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
10760	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
10761	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
10762	DhGroup DhGroup `json:"dhGroup,omitempty"`
10763	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
10764	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
10765}
10766
10767// IPTag contains the IpTag associated with the public IP address
10768type IPTag struct {
10769	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
10770	IPTagType *string `json:"ipTagType,omitempty"`
10771	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
10772	Tag *string `json:"tag,omitempty"`
10773}
10774
10775// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
10776type Ipv6ExpressRouteCircuitPeeringConfig struct {
10777	// PrimaryPeerAddressPrefix - The primary address prefix.
10778	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10779	// SecondaryPeerAddressPrefix - The secondary address prefix.
10780	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10781	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10782	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10783	// RouteFilter - The reference of the RouteFilter resource.
10784	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
10785	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
10786	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
10787}
10788
10789// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
10790// the next set of results.
10791type ListHubVirtualNetworkConnectionsResult struct {
10792	autorest.Response `json:"-"`
10793	// Value - List of HubVirtualNetworkConnections.
10794	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
10795	// NextLink - URL to get the next set of operation list results if there are any.
10796	NextLink *string `json:"nextLink,omitempty"`
10797}
10798
10799// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
10800// HubVirtualNetworkConnection values.
10801type ListHubVirtualNetworkConnectionsResultIterator struct {
10802	i    int
10803	page ListHubVirtualNetworkConnectionsResultPage
10804}
10805
10806// NextWithContext advances to the next value.  If there was an error making
10807// the request the iterator does not advance and the error is returned.
10808func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
10809	if tracing.IsEnabled() {
10810		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
10811		defer func() {
10812			sc := -1
10813			if iter.Response().Response.Response != nil {
10814				sc = iter.Response().Response.Response.StatusCode
10815			}
10816			tracing.EndSpan(ctx, sc, err)
10817		}()
10818	}
10819	iter.i++
10820	if iter.i < len(iter.page.Values()) {
10821		return nil
10822	}
10823	err = iter.page.NextWithContext(ctx)
10824	if err != nil {
10825		iter.i--
10826		return err
10827	}
10828	iter.i = 0
10829	return nil
10830}
10831
10832// Next advances to the next value.  If there was an error making
10833// the request the iterator does not advance and the error is returned.
10834// Deprecated: Use NextWithContext() instead.
10835func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
10836	return iter.NextWithContext(context.Background())
10837}
10838
10839// NotDone returns true if the enumeration should be started or is not yet complete.
10840func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
10841	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10842}
10843
10844// Response returns the raw server response from the last page request.
10845func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
10846	return iter.page.Response()
10847}
10848
10849// Value returns the current value or a zero-initialized value if the
10850// iterator has advanced beyond the end of the collection.
10851func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
10852	if !iter.page.NotDone() {
10853		return HubVirtualNetworkConnection{}
10854	}
10855	return iter.page.Values()[iter.i]
10856}
10857
10858// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
10859func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
10860	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
10861}
10862
10863// IsEmpty returns true if the ListResult contains no values.
10864func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
10865	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
10866}
10867
10868// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
10869// It returns nil if no more results exist.
10870func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
10871	if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 {
10872		return nil, nil
10873	}
10874	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10875		autorest.AsJSON(),
10876		autorest.AsGet(),
10877		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
10878}
10879
10880// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
10881type ListHubVirtualNetworkConnectionsResultPage struct {
10882	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
10883	lhvncr ListHubVirtualNetworkConnectionsResult
10884}
10885
10886// NextWithContext advances to the next page of values.  If there was an error making
10887// the request the page does not advance and the error is returned.
10888func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
10889	if tracing.IsEnabled() {
10890		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
10891		defer func() {
10892			sc := -1
10893			if page.Response().Response.Response != nil {
10894				sc = page.Response().Response.Response.StatusCode
10895			}
10896			tracing.EndSpan(ctx, sc, err)
10897		}()
10898	}
10899	next, err := page.fn(ctx, page.lhvncr)
10900	if err != nil {
10901		return err
10902	}
10903	page.lhvncr = next
10904	return nil
10905}
10906
10907// Next advances to the next page of values.  If there was an error making
10908// the request the page does not advance and the error is returned.
10909// Deprecated: Use NextWithContext() instead.
10910func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
10911	return page.NextWithContext(context.Background())
10912}
10913
10914// NotDone returns true if the page enumeration should be started or is not yet complete.
10915func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
10916	return !page.lhvncr.IsEmpty()
10917}
10918
10919// Response returns the raw server response from the last page request.
10920func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
10921	return page.lhvncr
10922}
10923
10924// Values returns the slice of values for the current page or nil if there are no values.
10925func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
10926	if page.lhvncr.IsEmpty() {
10927		return nil
10928	}
10929	return *page.lhvncr.Value
10930}
10931
10932// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
10933func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
10934	return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage}
10935}
10936
10937// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
10938// URL nextLink to get the next set of results.
10939type ListVirtualHubsResult struct {
10940	autorest.Response `json:"-"`
10941	// Value - List of VirtualHubs.
10942	Value *[]VirtualHub `json:"value,omitempty"`
10943	// NextLink - URL to get the next set of operation list results if there are any.
10944	NextLink *string `json:"nextLink,omitempty"`
10945}
10946
10947// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
10948type ListVirtualHubsResultIterator struct {
10949	i    int
10950	page ListVirtualHubsResultPage
10951}
10952
10953// NextWithContext advances to the next value.  If there was an error making
10954// the request the iterator does not advance and the error is returned.
10955func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
10956	if tracing.IsEnabled() {
10957		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
10958		defer func() {
10959			sc := -1
10960			if iter.Response().Response.Response != nil {
10961				sc = iter.Response().Response.Response.StatusCode
10962			}
10963			tracing.EndSpan(ctx, sc, err)
10964		}()
10965	}
10966	iter.i++
10967	if iter.i < len(iter.page.Values()) {
10968		return nil
10969	}
10970	err = iter.page.NextWithContext(ctx)
10971	if err != nil {
10972		iter.i--
10973		return err
10974	}
10975	iter.i = 0
10976	return nil
10977}
10978
10979// Next advances to the next value.  If there was an error making
10980// the request the iterator does not advance and the error is returned.
10981// Deprecated: Use NextWithContext() instead.
10982func (iter *ListVirtualHubsResultIterator) Next() error {
10983	return iter.NextWithContext(context.Background())
10984}
10985
10986// NotDone returns true if the enumeration should be started or is not yet complete.
10987func (iter ListVirtualHubsResultIterator) NotDone() bool {
10988	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10989}
10990
10991// Response returns the raw server response from the last page request.
10992func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
10993	return iter.page.Response()
10994}
10995
10996// Value returns the current value or a zero-initialized value if the
10997// iterator has advanced beyond the end of the collection.
10998func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
10999	if !iter.page.NotDone() {
11000		return VirtualHub{}
11001	}
11002	return iter.page.Values()[iter.i]
11003}
11004
11005// Creates a new instance of the ListVirtualHubsResultIterator type.
11006func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
11007	return ListVirtualHubsResultIterator{page: page}
11008}
11009
11010// IsEmpty returns true if the ListResult contains no values.
11011func (lvhr ListVirtualHubsResult) IsEmpty() bool {
11012	return lvhr.Value == nil || len(*lvhr.Value) == 0
11013}
11014
11015// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
11016// It returns nil if no more results exist.
11017func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
11018	if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 {
11019		return nil, nil
11020	}
11021	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11022		autorest.AsJSON(),
11023		autorest.AsGet(),
11024		autorest.WithBaseURL(to.String(lvhr.NextLink)))
11025}
11026
11027// ListVirtualHubsResultPage contains a page of VirtualHub values.
11028type ListVirtualHubsResultPage struct {
11029	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
11030	lvhr ListVirtualHubsResult
11031}
11032
11033// NextWithContext advances to the next page of values.  If there was an error making
11034// the request the page does not advance and the error is returned.
11035func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
11036	if tracing.IsEnabled() {
11037		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
11038		defer func() {
11039			sc := -1
11040			if page.Response().Response.Response != nil {
11041				sc = page.Response().Response.Response.StatusCode
11042			}
11043			tracing.EndSpan(ctx, sc, err)
11044		}()
11045	}
11046	next, err := page.fn(ctx, page.lvhr)
11047	if err != nil {
11048		return err
11049	}
11050	page.lvhr = next
11051	return nil
11052}
11053
11054// Next advances to the next page of values.  If there was an error making
11055// the request the page does not advance and the error is returned.
11056// Deprecated: Use NextWithContext() instead.
11057func (page *ListVirtualHubsResultPage) Next() error {
11058	return page.NextWithContext(context.Background())
11059}
11060
11061// NotDone returns true if the page enumeration should be started or is not yet complete.
11062func (page ListVirtualHubsResultPage) NotDone() bool {
11063	return !page.lvhr.IsEmpty()
11064}
11065
11066// Response returns the raw server response from the last page request.
11067func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
11068	return page.lvhr
11069}
11070
11071// Values returns the slice of values for the current page or nil if there are no values.
11072func (page ListVirtualHubsResultPage) Values() []VirtualHub {
11073	if page.lvhr.IsEmpty() {
11074		return nil
11075	}
11076	return *page.lvhr.Value
11077}
11078
11079// Creates a new instance of the ListVirtualHubsResultPage type.
11080func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
11081	return ListVirtualHubsResultPage{fn: getNextPage}
11082}
11083
11084// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
11085// URL nextLink to get the next set of results.
11086type ListVirtualWANsResult struct {
11087	autorest.Response `json:"-"`
11088	// Value - List of VirtualWANs.
11089	Value *[]VirtualWAN `json:"value,omitempty"`
11090	// NextLink - URL to get the next set of operation list results if there are any.
11091	NextLink *string `json:"nextLink,omitempty"`
11092}
11093
11094// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
11095type ListVirtualWANsResultIterator struct {
11096	i    int
11097	page ListVirtualWANsResultPage
11098}
11099
11100// NextWithContext advances to the next value.  If there was an error making
11101// the request the iterator does not advance and the error is returned.
11102func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
11103	if tracing.IsEnabled() {
11104		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
11105		defer func() {
11106			sc := -1
11107			if iter.Response().Response.Response != nil {
11108				sc = iter.Response().Response.Response.StatusCode
11109			}
11110			tracing.EndSpan(ctx, sc, err)
11111		}()
11112	}
11113	iter.i++
11114	if iter.i < len(iter.page.Values()) {
11115		return nil
11116	}
11117	err = iter.page.NextWithContext(ctx)
11118	if err != nil {
11119		iter.i--
11120		return err
11121	}
11122	iter.i = 0
11123	return nil
11124}
11125
11126// Next advances to the next value.  If there was an error making
11127// the request the iterator does not advance and the error is returned.
11128// Deprecated: Use NextWithContext() instead.
11129func (iter *ListVirtualWANsResultIterator) Next() error {
11130	return iter.NextWithContext(context.Background())
11131}
11132
11133// NotDone returns true if the enumeration should be started or is not yet complete.
11134func (iter ListVirtualWANsResultIterator) NotDone() bool {
11135	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11136}
11137
11138// Response returns the raw server response from the last page request.
11139func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
11140	return iter.page.Response()
11141}
11142
11143// Value returns the current value or a zero-initialized value if the
11144// iterator has advanced beyond the end of the collection.
11145func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
11146	if !iter.page.NotDone() {
11147		return VirtualWAN{}
11148	}
11149	return iter.page.Values()[iter.i]
11150}
11151
11152// Creates a new instance of the ListVirtualWANsResultIterator type.
11153func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
11154	return ListVirtualWANsResultIterator{page: page}
11155}
11156
11157// IsEmpty returns true if the ListResult contains no values.
11158func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
11159	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
11160}
11161
11162// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
11163// It returns nil if no more results exist.
11164func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
11165	if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 {
11166		return nil, nil
11167	}
11168	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11169		autorest.AsJSON(),
11170		autorest.AsGet(),
11171		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
11172}
11173
11174// ListVirtualWANsResultPage contains a page of VirtualWAN values.
11175type ListVirtualWANsResultPage struct {
11176	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
11177	lvwnr ListVirtualWANsResult
11178}
11179
11180// NextWithContext advances to the next page of values.  If there was an error making
11181// the request the page does not advance and the error is returned.
11182func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
11183	if tracing.IsEnabled() {
11184		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
11185		defer func() {
11186			sc := -1
11187			if page.Response().Response.Response != nil {
11188				sc = page.Response().Response.Response.StatusCode
11189			}
11190			tracing.EndSpan(ctx, sc, err)
11191		}()
11192	}
11193	next, err := page.fn(ctx, page.lvwnr)
11194	if err != nil {
11195		return err
11196	}
11197	page.lvwnr = next
11198	return nil
11199}
11200
11201// Next advances to the next page of values.  If there was an error making
11202// the request the page does not advance and the error is returned.
11203// Deprecated: Use NextWithContext() instead.
11204func (page *ListVirtualWANsResultPage) Next() error {
11205	return page.NextWithContext(context.Background())
11206}
11207
11208// NotDone returns true if the page enumeration should be started or is not yet complete.
11209func (page ListVirtualWANsResultPage) NotDone() bool {
11210	return !page.lvwnr.IsEmpty()
11211}
11212
11213// Response returns the raw server response from the last page request.
11214func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
11215	return page.lvwnr
11216}
11217
11218// Values returns the slice of values for the current page or nil if there are no values.
11219func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
11220	if page.lvwnr.IsEmpty() {
11221		return nil
11222	}
11223	return *page.lvwnr.Value
11224}
11225
11226// Creates a new instance of the ListVirtualWANsResultPage type.
11227func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
11228	return ListVirtualWANsResultPage{fn: getNextPage}
11229}
11230
11231// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
11232// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
11233type ListVpnConnectionsResult struct {
11234	autorest.Response `json:"-"`
11235	// Value - List of Vpn Connections.
11236	Value *[]VpnConnection `json:"value,omitempty"`
11237	// NextLink - URL to get the next set of operation list results if there are any.
11238	NextLink *string `json:"nextLink,omitempty"`
11239}
11240
11241// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
11242type ListVpnConnectionsResultIterator struct {
11243	i    int
11244	page ListVpnConnectionsResultPage
11245}
11246
11247// NextWithContext advances to the next value.  If there was an error making
11248// the request the iterator does not advance and the error is returned.
11249func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
11250	if tracing.IsEnabled() {
11251		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
11252		defer func() {
11253			sc := -1
11254			if iter.Response().Response.Response != nil {
11255				sc = iter.Response().Response.Response.StatusCode
11256			}
11257			tracing.EndSpan(ctx, sc, err)
11258		}()
11259	}
11260	iter.i++
11261	if iter.i < len(iter.page.Values()) {
11262		return nil
11263	}
11264	err = iter.page.NextWithContext(ctx)
11265	if err != nil {
11266		iter.i--
11267		return err
11268	}
11269	iter.i = 0
11270	return nil
11271}
11272
11273// Next advances to the next value.  If there was an error making
11274// the request the iterator does not advance and the error is returned.
11275// Deprecated: Use NextWithContext() instead.
11276func (iter *ListVpnConnectionsResultIterator) Next() error {
11277	return iter.NextWithContext(context.Background())
11278}
11279
11280// NotDone returns true if the enumeration should be started or is not yet complete.
11281func (iter ListVpnConnectionsResultIterator) NotDone() bool {
11282	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11283}
11284
11285// Response returns the raw server response from the last page request.
11286func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
11287	return iter.page.Response()
11288}
11289
11290// Value returns the current value or a zero-initialized value if the
11291// iterator has advanced beyond the end of the collection.
11292func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
11293	if !iter.page.NotDone() {
11294		return VpnConnection{}
11295	}
11296	return iter.page.Values()[iter.i]
11297}
11298
11299// Creates a new instance of the ListVpnConnectionsResultIterator type.
11300func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
11301	return ListVpnConnectionsResultIterator{page: page}
11302}
11303
11304// IsEmpty returns true if the ListResult contains no values.
11305func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
11306	return lvcr.Value == nil || len(*lvcr.Value) == 0
11307}
11308
11309// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
11310// It returns nil if no more results exist.
11311func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
11312	if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 {
11313		return nil, nil
11314	}
11315	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11316		autorest.AsJSON(),
11317		autorest.AsGet(),
11318		autorest.WithBaseURL(to.String(lvcr.NextLink)))
11319}
11320
11321// ListVpnConnectionsResultPage contains a page of VpnConnection values.
11322type ListVpnConnectionsResultPage struct {
11323	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
11324	lvcr ListVpnConnectionsResult
11325}
11326
11327// NextWithContext advances to the next page of values.  If there was an error making
11328// the request the page does not advance and the error is returned.
11329func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
11330	if tracing.IsEnabled() {
11331		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
11332		defer func() {
11333			sc := -1
11334			if page.Response().Response.Response != nil {
11335				sc = page.Response().Response.Response.StatusCode
11336			}
11337			tracing.EndSpan(ctx, sc, err)
11338		}()
11339	}
11340	next, err := page.fn(ctx, page.lvcr)
11341	if err != nil {
11342		return err
11343	}
11344	page.lvcr = next
11345	return nil
11346}
11347
11348// Next advances to the next page of values.  If there was an error making
11349// the request the page does not advance and the error is returned.
11350// Deprecated: Use NextWithContext() instead.
11351func (page *ListVpnConnectionsResultPage) Next() error {
11352	return page.NextWithContext(context.Background())
11353}
11354
11355// NotDone returns true if the page enumeration should be started or is not yet complete.
11356func (page ListVpnConnectionsResultPage) NotDone() bool {
11357	return !page.lvcr.IsEmpty()
11358}
11359
11360// Response returns the raw server response from the last page request.
11361func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
11362	return page.lvcr
11363}
11364
11365// Values returns the slice of values for the current page or nil if there are no values.
11366func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
11367	if page.lvcr.IsEmpty() {
11368		return nil
11369	}
11370	return *page.lvcr.Value
11371}
11372
11373// Creates a new instance of the ListVpnConnectionsResultPage type.
11374func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
11375	return ListVpnConnectionsResultPage{fn: getNextPage}
11376}
11377
11378// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
11379// URL nextLink to get the next set of results.
11380type ListVpnGatewaysResult struct {
11381	autorest.Response `json:"-"`
11382	// Value - List of VpnGateways.
11383	Value *[]VpnGateway `json:"value,omitempty"`
11384	// NextLink - URL to get the next set of operation list results if there are any.
11385	NextLink *string `json:"nextLink,omitempty"`
11386}
11387
11388// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
11389type ListVpnGatewaysResultIterator struct {
11390	i    int
11391	page ListVpnGatewaysResultPage
11392}
11393
11394// NextWithContext advances to the next value.  If there was an error making
11395// the request the iterator does not advance and the error is returned.
11396func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
11397	if tracing.IsEnabled() {
11398		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
11399		defer func() {
11400			sc := -1
11401			if iter.Response().Response.Response != nil {
11402				sc = iter.Response().Response.Response.StatusCode
11403			}
11404			tracing.EndSpan(ctx, sc, err)
11405		}()
11406	}
11407	iter.i++
11408	if iter.i < len(iter.page.Values()) {
11409		return nil
11410	}
11411	err = iter.page.NextWithContext(ctx)
11412	if err != nil {
11413		iter.i--
11414		return err
11415	}
11416	iter.i = 0
11417	return nil
11418}
11419
11420// Next advances to the next value.  If there was an error making
11421// the request the iterator does not advance and the error is returned.
11422// Deprecated: Use NextWithContext() instead.
11423func (iter *ListVpnGatewaysResultIterator) Next() error {
11424	return iter.NextWithContext(context.Background())
11425}
11426
11427// NotDone returns true if the enumeration should be started or is not yet complete.
11428func (iter ListVpnGatewaysResultIterator) NotDone() bool {
11429	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11430}
11431
11432// Response returns the raw server response from the last page request.
11433func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
11434	return iter.page.Response()
11435}
11436
11437// Value returns the current value or a zero-initialized value if the
11438// iterator has advanced beyond the end of the collection.
11439func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
11440	if !iter.page.NotDone() {
11441		return VpnGateway{}
11442	}
11443	return iter.page.Values()[iter.i]
11444}
11445
11446// Creates a new instance of the ListVpnGatewaysResultIterator type.
11447func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
11448	return ListVpnGatewaysResultIterator{page: page}
11449}
11450
11451// IsEmpty returns true if the ListResult contains no values.
11452func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
11453	return lvgr.Value == nil || len(*lvgr.Value) == 0
11454}
11455
11456// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
11457// It returns nil if no more results exist.
11458func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
11459	if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 {
11460		return nil, nil
11461	}
11462	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11463		autorest.AsJSON(),
11464		autorest.AsGet(),
11465		autorest.WithBaseURL(to.String(lvgr.NextLink)))
11466}
11467
11468// ListVpnGatewaysResultPage contains a page of VpnGateway values.
11469type ListVpnGatewaysResultPage struct {
11470	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
11471	lvgr ListVpnGatewaysResult
11472}
11473
11474// NextWithContext advances to the next page of values.  If there was an error making
11475// the request the page does not advance and the error is returned.
11476func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
11477	if tracing.IsEnabled() {
11478		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
11479		defer func() {
11480			sc := -1
11481			if page.Response().Response.Response != nil {
11482				sc = page.Response().Response.Response.StatusCode
11483			}
11484			tracing.EndSpan(ctx, sc, err)
11485		}()
11486	}
11487	next, err := page.fn(ctx, page.lvgr)
11488	if err != nil {
11489		return err
11490	}
11491	page.lvgr = next
11492	return nil
11493}
11494
11495// Next advances to the next page of values.  If there was an error making
11496// the request the page does not advance and the error is returned.
11497// Deprecated: Use NextWithContext() instead.
11498func (page *ListVpnGatewaysResultPage) Next() error {
11499	return page.NextWithContext(context.Background())
11500}
11501
11502// NotDone returns true if the page enumeration should be started or is not yet complete.
11503func (page ListVpnGatewaysResultPage) NotDone() bool {
11504	return !page.lvgr.IsEmpty()
11505}
11506
11507// Response returns the raw server response from the last page request.
11508func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
11509	return page.lvgr
11510}
11511
11512// Values returns the slice of values for the current page or nil if there are no values.
11513func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
11514	if page.lvgr.IsEmpty() {
11515		return nil
11516	}
11517	return *page.lvgr.Value
11518}
11519
11520// Creates a new instance of the ListVpnGatewaysResultPage type.
11521func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
11522	return ListVpnGatewaysResultPage{fn: getNextPage}
11523}
11524
11525// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
11526// nextLink to get the next set of results.
11527type ListVpnSitesResult struct {
11528	autorest.Response `json:"-"`
11529	// Value - List of VpnSites.
11530	Value *[]VpnSite `json:"value,omitempty"`
11531	// NextLink - URL to get the next set of operation list results if there are any.
11532	NextLink *string `json:"nextLink,omitempty"`
11533}
11534
11535// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
11536type ListVpnSitesResultIterator struct {
11537	i    int
11538	page ListVpnSitesResultPage
11539}
11540
11541// NextWithContext advances to the next value.  If there was an error making
11542// the request the iterator does not advance and the error is returned.
11543func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
11544	if tracing.IsEnabled() {
11545		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
11546		defer func() {
11547			sc := -1
11548			if iter.Response().Response.Response != nil {
11549				sc = iter.Response().Response.Response.StatusCode
11550			}
11551			tracing.EndSpan(ctx, sc, err)
11552		}()
11553	}
11554	iter.i++
11555	if iter.i < len(iter.page.Values()) {
11556		return nil
11557	}
11558	err = iter.page.NextWithContext(ctx)
11559	if err != nil {
11560		iter.i--
11561		return err
11562	}
11563	iter.i = 0
11564	return nil
11565}
11566
11567// Next advances to the next value.  If there was an error making
11568// the request the iterator does not advance and the error is returned.
11569// Deprecated: Use NextWithContext() instead.
11570func (iter *ListVpnSitesResultIterator) Next() error {
11571	return iter.NextWithContext(context.Background())
11572}
11573
11574// NotDone returns true if the enumeration should be started or is not yet complete.
11575func (iter ListVpnSitesResultIterator) NotDone() bool {
11576	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11577}
11578
11579// Response returns the raw server response from the last page request.
11580func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
11581	return iter.page.Response()
11582}
11583
11584// Value returns the current value or a zero-initialized value if the
11585// iterator has advanced beyond the end of the collection.
11586func (iter ListVpnSitesResultIterator) Value() VpnSite {
11587	if !iter.page.NotDone() {
11588		return VpnSite{}
11589	}
11590	return iter.page.Values()[iter.i]
11591}
11592
11593// Creates a new instance of the ListVpnSitesResultIterator type.
11594func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
11595	return ListVpnSitesResultIterator{page: page}
11596}
11597
11598// IsEmpty returns true if the ListResult contains no values.
11599func (lvsr ListVpnSitesResult) IsEmpty() bool {
11600	return lvsr.Value == nil || len(*lvsr.Value) == 0
11601}
11602
11603// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
11604// It returns nil if no more results exist.
11605func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
11606	if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 {
11607		return nil, nil
11608	}
11609	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11610		autorest.AsJSON(),
11611		autorest.AsGet(),
11612		autorest.WithBaseURL(to.String(lvsr.NextLink)))
11613}
11614
11615// ListVpnSitesResultPage contains a page of VpnSite values.
11616type ListVpnSitesResultPage struct {
11617	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
11618	lvsr ListVpnSitesResult
11619}
11620
11621// NextWithContext advances to the next page of values.  If there was an error making
11622// the request the page does not advance and the error is returned.
11623func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
11624	if tracing.IsEnabled() {
11625		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
11626		defer func() {
11627			sc := -1
11628			if page.Response().Response.Response != nil {
11629				sc = page.Response().Response.Response.StatusCode
11630			}
11631			tracing.EndSpan(ctx, sc, err)
11632		}()
11633	}
11634	next, err := page.fn(ctx, page.lvsr)
11635	if err != nil {
11636		return err
11637	}
11638	page.lvsr = next
11639	return nil
11640}
11641
11642// Next advances to the next page of values.  If there was an error making
11643// the request the page does not advance and the error is returned.
11644// Deprecated: Use NextWithContext() instead.
11645func (page *ListVpnSitesResultPage) Next() error {
11646	return page.NextWithContext(context.Background())
11647}
11648
11649// NotDone returns true if the page enumeration should be started or is not yet complete.
11650func (page ListVpnSitesResultPage) NotDone() bool {
11651	return !page.lvsr.IsEmpty()
11652}
11653
11654// Response returns the raw server response from the last page request.
11655func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
11656	return page.lvsr
11657}
11658
11659// Values returns the slice of values for the current page or nil if there are no values.
11660func (page ListVpnSitesResultPage) Values() []VpnSite {
11661	if page.lvsr.IsEmpty() {
11662		return nil
11663	}
11664	return *page.lvsr.Value
11665}
11666
11667// Creates a new instance of the ListVpnSitesResultPage type.
11668func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
11669	return ListVpnSitesResultPage{fn: getNextPage}
11670}
11671
11672// LoadBalancer loadBalancer resource
11673type LoadBalancer struct {
11674	autorest.Response `json:"-"`
11675	// Sku - The load balancer SKU.
11676	Sku *LoadBalancerSku `json:"sku,omitempty"`
11677	// LoadBalancerPropertiesFormat - Properties of load balancer.
11678	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
11679	// Etag - A unique read-only string that changes whenever the resource is updated.
11680	Etag *string `json:"etag,omitempty"`
11681	// ID - Resource ID.
11682	ID *string `json:"id,omitempty"`
11683	// Name - READ-ONLY; Resource name.
11684	Name *string `json:"name,omitempty"`
11685	// Type - READ-ONLY; Resource type.
11686	Type *string `json:"type,omitempty"`
11687	// Location - Resource location.
11688	Location *string `json:"location,omitempty"`
11689	// Tags - Resource tags.
11690	Tags map[string]*string `json:"tags"`
11691}
11692
11693// MarshalJSON is the custom marshaler for LoadBalancer.
11694func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
11695	objectMap := make(map[string]interface{})
11696	if lb.Sku != nil {
11697		objectMap["sku"] = lb.Sku
11698	}
11699	if lb.LoadBalancerPropertiesFormat != nil {
11700		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
11701	}
11702	if lb.Etag != nil {
11703		objectMap["etag"] = lb.Etag
11704	}
11705	if lb.ID != nil {
11706		objectMap["id"] = lb.ID
11707	}
11708	if lb.Location != nil {
11709		objectMap["location"] = lb.Location
11710	}
11711	if lb.Tags != nil {
11712		objectMap["tags"] = lb.Tags
11713	}
11714	return json.Marshal(objectMap)
11715}
11716
11717// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
11718func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
11719	var m map[string]*json.RawMessage
11720	err := json.Unmarshal(body, &m)
11721	if err != nil {
11722		return err
11723	}
11724	for k, v := range m {
11725		switch k {
11726		case "sku":
11727			if v != nil {
11728				var sku LoadBalancerSku
11729				err = json.Unmarshal(*v, &sku)
11730				if err != nil {
11731					return err
11732				}
11733				lb.Sku = &sku
11734			}
11735		case "properties":
11736			if v != nil {
11737				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
11738				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
11739				if err != nil {
11740					return err
11741				}
11742				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
11743			}
11744		case "etag":
11745			if v != nil {
11746				var etag string
11747				err = json.Unmarshal(*v, &etag)
11748				if err != nil {
11749					return err
11750				}
11751				lb.Etag = &etag
11752			}
11753		case "id":
11754			if v != nil {
11755				var ID string
11756				err = json.Unmarshal(*v, &ID)
11757				if err != nil {
11758					return err
11759				}
11760				lb.ID = &ID
11761			}
11762		case "name":
11763			if v != nil {
11764				var name string
11765				err = json.Unmarshal(*v, &name)
11766				if err != nil {
11767					return err
11768				}
11769				lb.Name = &name
11770			}
11771		case "type":
11772			if v != nil {
11773				var typeVar string
11774				err = json.Unmarshal(*v, &typeVar)
11775				if err != nil {
11776					return err
11777				}
11778				lb.Type = &typeVar
11779			}
11780		case "location":
11781			if v != nil {
11782				var location string
11783				err = json.Unmarshal(*v, &location)
11784				if err != nil {
11785					return err
11786				}
11787				lb.Location = &location
11788			}
11789		case "tags":
11790			if v != nil {
11791				var tags map[string]*string
11792				err = json.Unmarshal(*v, &tags)
11793				if err != nil {
11794					return err
11795				}
11796				lb.Tags = tags
11797			}
11798		}
11799	}
11800
11801	return nil
11802}
11803
11804// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
11805type LoadBalancerBackendAddressPoolListResult struct {
11806	autorest.Response `json:"-"`
11807	// Value - A list of backend address pools in a load balancer.
11808	Value *[]BackendAddressPool `json:"value,omitempty"`
11809	// NextLink - READ-ONLY; The URL to get the next set of results.
11810	NextLink *string `json:"nextLink,omitempty"`
11811}
11812
11813// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
11814// BackendAddressPool values.
11815type LoadBalancerBackendAddressPoolListResultIterator struct {
11816	i    int
11817	page LoadBalancerBackendAddressPoolListResultPage
11818}
11819
11820// NextWithContext advances to the next value.  If there was an error making
11821// the request the iterator does not advance and the error is returned.
11822func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
11823	if tracing.IsEnabled() {
11824		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
11825		defer func() {
11826			sc := -1
11827			if iter.Response().Response.Response != nil {
11828				sc = iter.Response().Response.Response.StatusCode
11829			}
11830			tracing.EndSpan(ctx, sc, err)
11831		}()
11832	}
11833	iter.i++
11834	if iter.i < len(iter.page.Values()) {
11835		return nil
11836	}
11837	err = iter.page.NextWithContext(ctx)
11838	if err != nil {
11839		iter.i--
11840		return err
11841	}
11842	iter.i = 0
11843	return nil
11844}
11845
11846// Next advances to the next value.  If there was an error making
11847// the request the iterator does not advance and the error is returned.
11848// Deprecated: Use NextWithContext() instead.
11849func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
11850	return iter.NextWithContext(context.Background())
11851}
11852
11853// NotDone returns true if the enumeration should be started or is not yet complete.
11854func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
11855	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11856}
11857
11858// Response returns the raw server response from the last page request.
11859func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
11860	return iter.page.Response()
11861}
11862
11863// Value returns the current value or a zero-initialized value if the
11864// iterator has advanced beyond the end of the collection.
11865func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
11866	if !iter.page.NotDone() {
11867		return BackendAddressPool{}
11868	}
11869	return iter.page.Values()[iter.i]
11870}
11871
11872// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
11873func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
11874	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
11875}
11876
11877// IsEmpty returns true if the ListResult contains no values.
11878func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
11879	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
11880}
11881
11882// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
11883// It returns nil if no more results exist.
11884func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
11885	if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 {
11886		return nil, nil
11887	}
11888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11889		autorest.AsJSON(),
11890		autorest.AsGet(),
11891		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
11892}
11893
11894// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
11895type LoadBalancerBackendAddressPoolListResultPage struct {
11896	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
11897	lbbaplr LoadBalancerBackendAddressPoolListResult
11898}
11899
11900// NextWithContext advances to the next page of values.  If there was an error making
11901// the request the page does not advance and the error is returned.
11902func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
11903	if tracing.IsEnabled() {
11904		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
11905		defer func() {
11906			sc := -1
11907			if page.Response().Response.Response != nil {
11908				sc = page.Response().Response.Response.StatusCode
11909			}
11910			tracing.EndSpan(ctx, sc, err)
11911		}()
11912	}
11913	next, err := page.fn(ctx, page.lbbaplr)
11914	if err != nil {
11915		return err
11916	}
11917	page.lbbaplr = next
11918	return nil
11919}
11920
11921// Next advances to the next page of values.  If there was an error making
11922// the request the page does not advance and the error is returned.
11923// Deprecated: Use NextWithContext() instead.
11924func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
11925	return page.NextWithContext(context.Background())
11926}
11927
11928// NotDone returns true if the page enumeration should be started or is not yet complete.
11929func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
11930	return !page.lbbaplr.IsEmpty()
11931}
11932
11933// Response returns the raw server response from the last page request.
11934func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
11935	return page.lbbaplr
11936}
11937
11938// Values returns the slice of values for the current page or nil if there are no values.
11939func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
11940	if page.lbbaplr.IsEmpty() {
11941		return nil
11942	}
11943	return *page.lbbaplr.Value
11944}
11945
11946// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
11947func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
11948	return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage}
11949}
11950
11951// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
11952type LoadBalancerFrontendIPConfigurationListResult struct {
11953	autorest.Response `json:"-"`
11954	// Value - A list of frontend IP configurations in a load balancer.
11955	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
11956	// NextLink - READ-ONLY; The URL to get the next set of results.
11957	NextLink *string `json:"nextLink,omitempty"`
11958}
11959
11960// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
11961// FrontendIPConfiguration values.
11962type LoadBalancerFrontendIPConfigurationListResultIterator struct {
11963	i    int
11964	page LoadBalancerFrontendIPConfigurationListResultPage
11965}
11966
11967// NextWithContext advances to the next value.  If there was an error making
11968// the request the iterator does not advance and the error is returned.
11969func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11970	if tracing.IsEnabled() {
11971		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
11972		defer func() {
11973			sc := -1
11974			if iter.Response().Response.Response != nil {
11975				sc = iter.Response().Response.Response.StatusCode
11976			}
11977			tracing.EndSpan(ctx, sc, err)
11978		}()
11979	}
11980	iter.i++
11981	if iter.i < len(iter.page.Values()) {
11982		return nil
11983	}
11984	err = iter.page.NextWithContext(ctx)
11985	if err != nil {
11986		iter.i--
11987		return err
11988	}
11989	iter.i = 0
11990	return nil
11991}
11992
11993// Next advances to the next value.  If there was an error making
11994// the request the iterator does not advance and the error is returned.
11995// Deprecated: Use NextWithContext() instead.
11996func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
11997	return iter.NextWithContext(context.Background())
11998}
11999
12000// NotDone returns true if the enumeration should be started or is not yet complete.
12001func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
12002	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12003}
12004
12005// Response returns the raw server response from the last page request.
12006func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
12007	return iter.page.Response()
12008}
12009
12010// Value returns the current value or a zero-initialized value if the
12011// iterator has advanced beyond the end of the collection.
12012func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
12013	if !iter.page.NotDone() {
12014		return FrontendIPConfiguration{}
12015	}
12016	return iter.page.Values()[iter.i]
12017}
12018
12019// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
12020func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
12021	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
12022}
12023
12024// IsEmpty returns true if the ListResult contains no values.
12025func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
12026	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
12027}
12028
12029// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12030// It returns nil if no more results exist.
12031func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12032	if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 {
12033		return nil, nil
12034	}
12035	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12036		autorest.AsJSON(),
12037		autorest.AsGet(),
12038		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
12039}
12040
12041// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
12042type LoadBalancerFrontendIPConfigurationListResultPage struct {
12043	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
12044	lbficlr LoadBalancerFrontendIPConfigurationListResult
12045}
12046
12047// NextWithContext advances to the next page of values.  If there was an error making
12048// the request the page does not advance and the error is returned.
12049func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12050	if tracing.IsEnabled() {
12051		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
12052		defer func() {
12053			sc := -1
12054			if page.Response().Response.Response != nil {
12055				sc = page.Response().Response.Response.StatusCode
12056			}
12057			tracing.EndSpan(ctx, sc, err)
12058		}()
12059	}
12060	next, err := page.fn(ctx, page.lbficlr)
12061	if err != nil {
12062		return err
12063	}
12064	page.lbficlr = next
12065	return nil
12066}
12067
12068// Next advances to the next page of values.  If there was an error making
12069// the request the page does not advance and the error is returned.
12070// Deprecated: Use NextWithContext() instead.
12071func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
12072	return page.NextWithContext(context.Background())
12073}
12074
12075// NotDone returns true if the page enumeration should be started or is not yet complete.
12076func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
12077	return !page.lbficlr.IsEmpty()
12078}
12079
12080// Response returns the raw server response from the last page request.
12081func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
12082	return page.lbficlr
12083}
12084
12085// Values returns the slice of values for the current page or nil if there are no values.
12086func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
12087	if page.lbficlr.IsEmpty() {
12088		return nil
12089	}
12090	return *page.lbficlr.Value
12091}
12092
12093// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
12094func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
12095	return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage}
12096}
12097
12098// LoadBalancerListResult response for ListLoadBalancers API service call.
12099type LoadBalancerListResult struct {
12100	autorest.Response `json:"-"`
12101	// Value - A list of load balancers in a resource group.
12102	Value *[]LoadBalancer `json:"value,omitempty"`
12103	// NextLink - READ-ONLY; The URL to get the next set of results.
12104	NextLink *string `json:"nextLink,omitempty"`
12105}
12106
12107// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
12108type LoadBalancerListResultIterator struct {
12109	i    int
12110	page LoadBalancerListResultPage
12111}
12112
12113// NextWithContext advances to the next value.  If there was an error making
12114// the request the iterator does not advance and the error is returned.
12115func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
12116	if tracing.IsEnabled() {
12117		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
12118		defer func() {
12119			sc := -1
12120			if iter.Response().Response.Response != nil {
12121				sc = iter.Response().Response.Response.StatusCode
12122			}
12123			tracing.EndSpan(ctx, sc, err)
12124		}()
12125	}
12126	iter.i++
12127	if iter.i < len(iter.page.Values()) {
12128		return nil
12129	}
12130	err = iter.page.NextWithContext(ctx)
12131	if err != nil {
12132		iter.i--
12133		return err
12134	}
12135	iter.i = 0
12136	return nil
12137}
12138
12139// Next advances to the next value.  If there was an error making
12140// the request the iterator does not advance and the error is returned.
12141// Deprecated: Use NextWithContext() instead.
12142func (iter *LoadBalancerListResultIterator) Next() error {
12143	return iter.NextWithContext(context.Background())
12144}
12145
12146// NotDone returns true if the enumeration should be started or is not yet complete.
12147func (iter LoadBalancerListResultIterator) NotDone() bool {
12148	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12149}
12150
12151// Response returns the raw server response from the last page request.
12152func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
12153	return iter.page.Response()
12154}
12155
12156// Value returns the current value or a zero-initialized value if the
12157// iterator has advanced beyond the end of the collection.
12158func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
12159	if !iter.page.NotDone() {
12160		return LoadBalancer{}
12161	}
12162	return iter.page.Values()[iter.i]
12163}
12164
12165// Creates a new instance of the LoadBalancerListResultIterator type.
12166func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
12167	return LoadBalancerListResultIterator{page: page}
12168}
12169
12170// IsEmpty returns true if the ListResult contains no values.
12171func (lblr LoadBalancerListResult) IsEmpty() bool {
12172	return lblr.Value == nil || len(*lblr.Value) == 0
12173}
12174
12175// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
12176// It returns nil if no more results exist.
12177func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
12178	if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
12179		return nil, nil
12180	}
12181	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12182		autorest.AsJSON(),
12183		autorest.AsGet(),
12184		autorest.WithBaseURL(to.String(lblr.NextLink)))
12185}
12186
12187// LoadBalancerListResultPage contains a page of LoadBalancer values.
12188type LoadBalancerListResultPage struct {
12189	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
12190	lblr LoadBalancerListResult
12191}
12192
12193// NextWithContext advances to the next page of values.  If there was an error making
12194// the request the page does not advance and the error is returned.
12195func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
12196	if tracing.IsEnabled() {
12197		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
12198		defer func() {
12199			sc := -1
12200			if page.Response().Response.Response != nil {
12201				sc = page.Response().Response.Response.StatusCode
12202			}
12203			tracing.EndSpan(ctx, sc, err)
12204		}()
12205	}
12206	next, err := page.fn(ctx, page.lblr)
12207	if err != nil {
12208		return err
12209	}
12210	page.lblr = next
12211	return nil
12212}
12213
12214// Next advances to the next page of values.  If there was an error making
12215// the request the page does not advance and the error is returned.
12216// Deprecated: Use NextWithContext() instead.
12217func (page *LoadBalancerListResultPage) Next() error {
12218	return page.NextWithContext(context.Background())
12219}
12220
12221// NotDone returns true if the page enumeration should be started or is not yet complete.
12222func (page LoadBalancerListResultPage) NotDone() bool {
12223	return !page.lblr.IsEmpty()
12224}
12225
12226// Response returns the raw server response from the last page request.
12227func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
12228	return page.lblr
12229}
12230
12231// Values returns the slice of values for the current page or nil if there are no values.
12232func (page LoadBalancerListResultPage) Values() []LoadBalancer {
12233	if page.lblr.IsEmpty() {
12234		return nil
12235	}
12236	return *page.lblr.Value
12237}
12238
12239// Creates a new instance of the LoadBalancerListResultPage type.
12240func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
12241	return LoadBalancerListResultPage{fn: getNextPage}
12242}
12243
12244// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
12245type LoadBalancerLoadBalancingRuleListResult struct {
12246	autorest.Response `json:"-"`
12247	// Value - A list of load balancing rules in a load balancer.
12248	Value *[]LoadBalancingRule `json:"value,omitempty"`
12249	// NextLink - READ-ONLY; The URL to get the next set of results.
12250	NextLink *string `json:"nextLink,omitempty"`
12251}
12252
12253// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
12254// LoadBalancingRule values.
12255type LoadBalancerLoadBalancingRuleListResultIterator struct {
12256	i    int
12257	page LoadBalancerLoadBalancingRuleListResultPage
12258}
12259
12260// NextWithContext advances to the next value.  If there was an error making
12261// the request the iterator does not advance and the error is returned.
12262func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12263	if tracing.IsEnabled() {
12264		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
12265		defer func() {
12266			sc := -1
12267			if iter.Response().Response.Response != nil {
12268				sc = iter.Response().Response.Response.StatusCode
12269			}
12270			tracing.EndSpan(ctx, sc, err)
12271		}()
12272	}
12273	iter.i++
12274	if iter.i < len(iter.page.Values()) {
12275		return nil
12276	}
12277	err = iter.page.NextWithContext(ctx)
12278	if err != nil {
12279		iter.i--
12280		return err
12281	}
12282	iter.i = 0
12283	return nil
12284}
12285
12286// Next advances to the next value.  If there was an error making
12287// the request the iterator does not advance and the error is returned.
12288// Deprecated: Use NextWithContext() instead.
12289func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
12290	return iter.NextWithContext(context.Background())
12291}
12292
12293// NotDone returns true if the enumeration should be started or is not yet complete.
12294func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
12295	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12296}
12297
12298// Response returns the raw server response from the last page request.
12299func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
12300	return iter.page.Response()
12301}
12302
12303// Value returns the current value or a zero-initialized value if the
12304// iterator has advanced beyond the end of the collection.
12305func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
12306	if !iter.page.NotDone() {
12307		return LoadBalancingRule{}
12308	}
12309	return iter.page.Values()[iter.i]
12310}
12311
12312// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
12313func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
12314	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
12315}
12316
12317// IsEmpty returns true if the ListResult contains no values.
12318func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
12319	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
12320}
12321
12322// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
12323// It returns nil if no more results exist.
12324func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12325	if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 {
12326		return nil, nil
12327	}
12328	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12329		autorest.AsJSON(),
12330		autorest.AsGet(),
12331		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
12332}
12333
12334// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
12335type LoadBalancerLoadBalancingRuleListResultPage struct {
12336	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
12337	lblbrlr LoadBalancerLoadBalancingRuleListResult
12338}
12339
12340// NextWithContext advances to the next page of values.  If there was an error making
12341// the request the page does not advance and the error is returned.
12342func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12343	if tracing.IsEnabled() {
12344		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
12345		defer func() {
12346			sc := -1
12347			if page.Response().Response.Response != nil {
12348				sc = page.Response().Response.Response.StatusCode
12349			}
12350			tracing.EndSpan(ctx, sc, err)
12351		}()
12352	}
12353	next, err := page.fn(ctx, page.lblbrlr)
12354	if err != nil {
12355		return err
12356	}
12357	page.lblbrlr = next
12358	return nil
12359}
12360
12361// Next advances to the next page of values.  If there was an error making
12362// the request the page does not advance and the error is returned.
12363// Deprecated: Use NextWithContext() instead.
12364func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
12365	return page.NextWithContext(context.Background())
12366}
12367
12368// NotDone returns true if the page enumeration should be started or is not yet complete.
12369func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
12370	return !page.lblbrlr.IsEmpty()
12371}
12372
12373// Response returns the raw server response from the last page request.
12374func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
12375	return page.lblbrlr
12376}
12377
12378// Values returns the slice of values for the current page or nil if there are no values.
12379func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
12380	if page.lblbrlr.IsEmpty() {
12381		return nil
12382	}
12383	return *page.lblbrlr.Value
12384}
12385
12386// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
12387func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
12388	return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage}
12389}
12390
12391// LoadBalancerProbeListResult response for ListProbe API service call.
12392type LoadBalancerProbeListResult struct {
12393	autorest.Response `json:"-"`
12394	// Value - A list of probes in a load balancer.
12395	Value *[]Probe `json:"value,omitempty"`
12396	// NextLink - READ-ONLY; The URL to get the next set of results.
12397	NextLink *string `json:"nextLink,omitempty"`
12398}
12399
12400// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
12401type LoadBalancerProbeListResultIterator struct {
12402	i    int
12403	page LoadBalancerProbeListResultPage
12404}
12405
12406// NextWithContext advances to the next value.  If there was an error making
12407// the request the iterator does not advance and the error is returned.
12408func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
12409	if tracing.IsEnabled() {
12410		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
12411		defer func() {
12412			sc := -1
12413			if iter.Response().Response.Response != nil {
12414				sc = iter.Response().Response.Response.StatusCode
12415			}
12416			tracing.EndSpan(ctx, sc, err)
12417		}()
12418	}
12419	iter.i++
12420	if iter.i < len(iter.page.Values()) {
12421		return nil
12422	}
12423	err = iter.page.NextWithContext(ctx)
12424	if err != nil {
12425		iter.i--
12426		return err
12427	}
12428	iter.i = 0
12429	return nil
12430}
12431
12432// Next advances to the next value.  If there was an error making
12433// the request the iterator does not advance and the error is returned.
12434// Deprecated: Use NextWithContext() instead.
12435func (iter *LoadBalancerProbeListResultIterator) Next() error {
12436	return iter.NextWithContext(context.Background())
12437}
12438
12439// NotDone returns true if the enumeration should be started or is not yet complete.
12440func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
12441	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12442}
12443
12444// Response returns the raw server response from the last page request.
12445func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
12446	return iter.page.Response()
12447}
12448
12449// Value returns the current value or a zero-initialized value if the
12450// iterator has advanced beyond the end of the collection.
12451func (iter LoadBalancerProbeListResultIterator) Value() Probe {
12452	if !iter.page.NotDone() {
12453		return Probe{}
12454	}
12455	return iter.page.Values()[iter.i]
12456}
12457
12458// Creates a new instance of the LoadBalancerProbeListResultIterator type.
12459func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
12460	return LoadBalancerProbeListResultIterator{page: page}
12461}
12462
12463// IsEmpty returns true if the ListResult contains no values.
12464func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
12465	return lbplr.Value == nil || len(*lbplr.Value) == 0
12466}
12467
12468// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
12469// It returns nil if no more results exist.
12470func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
12471	if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 {
12472		return nil, nil
12473	}
12474	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12475		autorest.AsJSON(),
12476		autorest.AsGet(),
12477		autorest.WithBaseURL(to.String(lbplr.NextLink)))
12478}
12479
12480// LoadBalancerProbeListResultPage contains a page of Probe values.
12481type LoadBalancerProbeListResultPage struct {
12482	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
12483	lbplr LoadBalancerProbeListResult
12484}
12485
12486// NextWithContext advances to the next page of values.  If there was an error making
12487// the request the page does not advance and the error is returned.
12488func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
12489	if tracing.IsEnabled() {
12490		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
12491		defer func() {
12492			sc := -1
12493			if page.Response().Response.Response != nil {
12494				sc = page.Response().Response.Response.StatusCode
12495			}
12496			tracing.EndSpan(ctx, sc, err)
12497		}()
12498	}
12499	next, err := page.fn(ctx, page.lbplr)
12500	if err != nil {
12501		return err
12502	}
12503	page.lbplr = next
12504	return nil
12505}
12506
12507// Next advances to the next page of values.  If there was an error making
12508// the request the page does not advance and the error is returned.
12509// Deprecated: Use NextWithContext() instead.
12510func (page *LoadBalancerProbeListResultPage) Next() error {
12511	return page.NextWithContext(context.Background())
12512}
12513
12514// NotDone returns true if the page enumeration should be started or is not yet complete.
12515func (page LoadBalancerProbeListResultPage) NotDone() bool {
12516	return !page.lbplr.IsEmpty()
12517}
12518
12519// Response returns the raw server response from the last page request.
12520func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
12521	return page.lbplr
12522}
12523
12524// Values returns the slice of values for the current page or nil if there are no values.
12525func (page LoadBalancerProbeListResultPage) Values() []Probe {
12526	if page.lbplr.IsEmpty() {
12527		return nil
12528	}
12529	return *page.lbplr.Value
12530}
12531
12532// Creates a new instance of the LoadBalancerProbeListResultPage type.
12533func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
12534	return LoadBalancerProbeListResultPage{fn: getNextPage}
12535}
12536
12537// LoadBalancerPropertiesFormat properties of the load balancer.
12538type LoadBalancerPropertiesFormat struct {
12539	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
12540	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
12541	// BackendAddressPools - Collection of backend address pools used by a load balancer
12542	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
12543	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
12544	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
12545	// Probes - Collection of probe objects used in the load balancer
12546	Probes *[]Probe `json:"probes,omitempty"`
12547	// InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules.
12548	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
12549	// InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules.
12550	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
12551	// OutboundNatRules - The outbound NAT rules.
12552	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
12553	// ResourceGUID - The resource GUID property of the load balancer resource.
12554	ResourceGUID *string `json:"resourceGuid,omitempty"`
12555	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12556	ProvisioningState *string `json:"provisioningState,omitempty"`
12557}
12558
12559// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12560// long-running operation.
12561type LoadBalancersCreateOrUpdateFuture struct {
12562	azure.Future
12563}
12564
12565// Result returns the result of the asynchronous operation.
12566// If the operation has not completed it will return an error.
12567func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12568	var done bool
12569	done, err = future.DoneWithContext(context.Background(), client)
12570	if err != nil {
12571		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12572		return
12573	}
12574	if !done {
12575		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
12576		return
12577	}
12578	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12579	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12580		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
12581		if err != nil {
12582			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
12583		}
12584	}
12585	return
12586}
12587
12588// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12589// operation.
12590type LoadBalancersDeleteFuture struct {
12591	azure.Future
12592}
12593
12594// Result returns the result of the asynchronous operation.
12595// If the operation has not completed it will return an error.
12596func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
12597	var done bool
12598	done, err = future.DoneWithContext(context.Background(), client)
12599	if err != nil {
12600		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
12601		return
12602	}
12603	if !done {
12604		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
12605		return
12606	}
12607	ar.Response = future.Response()
12608	return
12609}
12610
12611// LoadBalancerSku SKU of a load balancer
12612type LoadBalancerSku struct {
12613	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
12614	Name LoadBalancerSkuName `json:"name,omitempty"`
12615}
12616
12617// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12618// operation.
12619type LoadBalancersUpdateTagsFuture struct {
12620	azure.Future
12621}
12622
12623// Result returns the result of the asynchronous operation.
12624// If the operation has not completed it will return an error.
12625func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12626	var done bool
12627	done, err = future.DoneWithContext(context.Background(), client)
12628	if err != nil {
12629		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12630		return
12631	}
12632	if !done {
12633		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
12634		return
12635	}
12636	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12637	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12638		lb, err = client.UpdateTagsResponder(lb.Response.Response)
12639		if err != nil {
12640			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
12641		}
12642	}
12643	return
12644}
12645
12646// LoadBalancingRule a load balancing rule for a load balancer.
12647type LoadBalancingRule struct {
12648	autorest.Response `json:"-"`
12649	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
12650	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
12651	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12652	Name *string `json:"name,omitempty"`
12653	// Etag - A unique read-only string that changes whenever the resource is updated.
12654	Etag *string `json:"etag,omitempty"`
12655	// ID - Resource ID.
12656	ID *string `json:"id,omitempty"`
12657}
12658
12659// MarshalJSON is the custom marshaler for LoadBalancingRule.
12660func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
12661	objectMap := make(map[string]interface{})
12662	if lbr.LoadBalancingRulePropertiesFormat != nil {
12663		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
12664	}
12665	if lbr.Name != nil {
12666		objectMap["name"] = lbr.Name
12667	}
12668	if lbr.Etag != nil {
12669		objectMap["etag"] = lbr.Etag
12670	}
12671	if lbr.ID != nil {
12672		objectMap["id"] = lbr.ID
12673	}
12674	return json.Marshal(objectMap)
12675}
12676
12677// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
12678func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
12679	var m map[string]*json.RawMessage
12680	err := json.Unmarshal(body, &m)
12681	if err != nil {
12682		return err
12683	}
12684	for k, v := range m {
12685		switch k {
12686		case "properties":
12687			if v != nil {
12688				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
12689				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
12690				if err != nil {
12691					return err
12692				}
12693				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
12694			}
12695		case "name":
12696			if v != nil {
12697				var name string
12698				err = json.Unmarshal(*v, &name)
12699				if err != nil {
12700					return err
12701				}
12702				lbr.Name = &name
12703			}
12704		case "etag":
12705			if v != nil {
12706				var etag string
12707				err = json.Unmarshal(*v, &etag)
12708				if err != nil {
12709					return err
12710				}
12711				lbr.Etag = &etag
12712			}
12713		case "id":
12714			if v != nil {
12715				var ID string
12716				err = json.Unmarshal(*v, &ID)
12717				if err != nil {
12718					return err
12719				}
12720				lbr.ID = &ID
12721			}
12722		}
12723	}
12724
12725	return nil
12726}
12727
12728// LoadBalancingRulePropertiesFormat properties of the load balancer.
12729type LoadBalancingRulePropertiesFormat struct {
12730	// FrontendIPConfiguration - A reference to frontend IP addresses.
12731	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12732	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
12733	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
12734	// Probe - The reference of the load balancer probe used by the load balancing rule.
12735	Probe *SubResource `json:"probe,omitempty"`
12736	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12737	Protocol TransportProtocol `json:"protocol,omitempty"`
12738	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
12739	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
12740	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
12741	FrontendPort *int32 `json:"frontendPort,omitempty"`
12742	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
12743	BackendPort *int32 `json:"backendPort,omitempty"`
12744	// IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
12745	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12746	// EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
12747	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12748	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
12749	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
12750	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12751	ProvisioningState *string `json:"provisioningState,omitempty"`
12752}
12753
12754// LocalNetworkGateway a common class for general resource information
12755type LocalNetworkGateway struct {
12756	autorest.Response `json:"-"`
12757	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
12758	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
12759	// Etag - A unique read-only string that changes whenever the resource is updated.
12760	Etag *string `json:"etag,omitempty"`
12761	// ID - Resource ID.
12762	ID *string `json:"id,omitempty"`
12763	// Name - READ-ONLY; Resource name.
12764	Name *string `json:"name,omitempty"`
12765	// Type - READ-ONLY; Resource type.
12766	Type *string `json:"type,omitempty"`
12767	// Location - Resource location.
12768	Location *string `json:"location,omitempty"`
12769	// Tags - Resource tags.
12770	Tags map[string]*string `json:"tags"`
12771}
12772
12773// MarshalJSON is the custom marshaler for LocalNetworkGateway.
12774func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
12775	objectMap := make(map[string]interface{})
12776	if lng.LocalNetworkGatewayPropertiesFormat != nil {
12777		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
12778	}
12779	if lng.Etag != nil {
12780		objectMap["etag"] = lng.Etag
12781	}
12782	if lng.ID != nil {
12783		objectMap["id"] = lng.ID
12784	}
12785	if lng.Location != nil {
12786		objectMap["location"] = lng.Location
12787	}
12788	if lng.Tags != nil {
12789		objectMap["tags"] = lng.Tags
12790	}
12791	return json.Marshal(objectMap)
12792}
12793
12794// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
12795func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
12796	var m map[string]*json.RawMessage
12797	err := json.Unmarshal(body, &m)
12798	if err != nil {
12799		return err
12800	}
12801	for k, v := range m {
12802		switch k {
12803		case "properties":
12804			if v != nil {
12805				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
12806				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
12807				if err != nil {
12808					return err
12809				}
12810				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
12811			}
12812		case "etag":
12813			if v != nil {
12814				var etag string
12815				err = json.Unmarshal(*v, &etag)
12816				if err != nil {
12817					return err
12818				}
12819				lng.Etag = &etag
12820			}
12821		case "id":
12822			if v != nil {
12823				var ID string
12824				err = json.Unmarshal(*v, &ID)
12825				if err != nil {
12826					return err
12827				}
12828				lng.ID = &ID
12829			}
12830		case "name":
12831			if v != nil {
12832				var name string
12833				err = json.Unmarshal(*v, &name)
12834				if err != nil {
12835					return err
12836				}
12837				lng.Name = &name
12838			}
12839		case "type":
12840			if v != nil {
12841				var typeVar string
12842				err = json.Unmarshal(*v, &typeVar)
12843				if err != nil {
12844					return err
12845				}
12846				lng.Type = &typeVar
12847			}
12848		case "location":
12849			if v != nil {
12850				var location string
12851				err = json.Unmarshal(*v, &location)
12852				if err != nil {
12853					return err
12854				}
12855				lng.Location = &location
12856			}
12857		case "tags":
12858			if v != nil {
12859				var tags map[string]*string
12860				err = json.Unmarshal(*v, &tags)
12861				if err != nil {
12862					return err
12863				}
12864				lng.Tags = tags
12865			}
12866		}
12867	}
12868
12869	return nil
12870}
12871
12872// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
12873type LocalNetworkGatewayListResult struct {
12874	autorest.Response `json:"-"`
12875	// Value - A list of local network gateways that exists in a resource group.
12876	Value *[]LocalNetworkGateway `json:"value,omitempty"`
12877	// NextLink - READ-ONLY; The URL to get the next set of results.
12878	NextLink *string `json:"nextLink,omitempty"`
12879}
12880
12881// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
12882// values.
12883type LocalNetworkGatewayListResultIterator struct {
12884	i    int
12885	page LocalNetworkGatewayListResultPage
12886}
12887
12888// NextWithContext advances to the next value.  If there was an error making
12889// the request the iterator does not advance and the error is returned.
12890func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
12891	if tracing.IsEnabled() {
12892		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
12893		defer func() {
12894			sc := -1
12895			if iter.Response().Response.Response != nil {
12896				sc = iter.Response().Response.Response.StatusCode
12897			}
12898			tracing.EndSpan(ctx, sc, err)
12899		}()
12900	}
12901	iter.i++
12902	if iter.i < len(iter.page.Values()) {
12903		return nil
12904	}
12905	err = iter.page.NextWithContext(ctx)
12906	if err != nil {
12907		iter.i--
12908		return err
12909	}
12910	iter.i = 0
12911	return nil
12912}
12913
12914// Next advances to the next value.  If there was an error making
12915// the request the iterator does not advance and the error is returned.
12916// Deprecated: Use NextWithContext() instead.
12917func (iter *LocalNetworkGatewayListResultIterator) Next() error {
12918	return iter.NextWithContext(context.Background())
12919}
12920
12921// NotDone returns true if the enumeration should be started or is not yet complete.
12922func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
12923	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12924}
12925
12926// Response returns the raw server response from the last page request.
12927func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
12928	return iter.page.Response()
12929}
12930
12931// Value returns the current value or a zero-initialized value if the
12932// iterator has advanced beyond the end of the collection.
12933func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
12934	if !iter.page.NotDone() {
12935		return LocalNetworkGateway{}
12936	}
12937	return iter.page.Values()[iter.i]
12938}
12939
12940// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
12941func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
12942	return LocalNetworkGatewayListResultIterator{page: page}
12943}
12944
12945// IsEmpty returns true if the ListResult contains no values.
12946func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
12947	return lnglr.Value == nil || len(*lnglr.Value) == 0
12948}
12949
12950// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
12951// It returns nil if no more results exist.
12952func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
12953	if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 {
12954		return nil, nil
12955	}
12956	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12957		autorest.AsJSON(),
12958		autorest.AsGet(),
12959		autorest.WithBaseURL(to.String(lnglr.NextLink)))
12960}
12961
12962// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
12963type LocalNetworkGatewayListResultPage struct {
12964	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
12965	lnglr LocalNetworkGatewayListResult
12966}
12967
12968// NextWithContext advances to the next page of values.  If there was an error making
12969// the request the page does not advance and the error is returned.
12970func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
12971	if tracing.IsEnabled() {
12972		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
12973		defer func() {
12974			sc := -1
12975			if page.Response().Response.Response != nil {
12976				sc = page.Response().Response.Response.StatusCode
12977			}
12978			tracing.EndSpan(ctx, sc, err)
12979		}()
12980	}
12981	next, err := page.fn(ctx, page.lnglr)
12982	if err != nil {
12983		return err
12984	}
12985	page.lnglr = next
12986	return nil
12987}
12988
12989// Next advances to the next page of values.  If there was an error making
12990// the request the page does not advance and the error is returned.
12991// Deprecated: Use NextWithContext() instead.
12992func (page *LocalNetworkGatewayListResultPage) Next() error {
12993	return page.NextWithContext(context.Background())
12994}
12995
12996// NotDone returns true if the page enumeration should be started or is not yet complete.
12997func (page LocalNetworkGatewayListResultPage) NotDone() bool {
12998	return !page.lnglr.IsEmpty()
12999}
13000
13001// Response returns the raw server response from the last page request.
13002func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
13003	return page.lnglr
13004}
13005
13006// Values returns the slice of values for the current page or nil if there are no values.
13007func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
13008	if page.lnglr.IsEmpty() {
13009		return nil
13010	}
13011	return *page.lnglr.Value
13012}
13013
13014// Creates a new instance of the LocalNetworkGatewayListResultPage type.
13015func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
13016	return LocalNetworkGatewayListResultPage{fn: getNextPage}
13017}
13018
13019// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
13020type LocalNetworkGatewayPropertiesFormat struct {
13021	// LocalNetworkAddressSpace - Local network site address space.
13022	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
13023	// GatewayIPAddress - IP address of local network gateway.
13024	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
13025	// BgpSettings - Local network gateway's BGP speaker settings.
13026	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
13027	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
13028	ResourceGUID *string `json:"resourceGuid,omitempty"`
13029	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13030	ProvisioningState *string `json:"provisioningState,omitempty"`
13031}
13032
13033// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13034// long-running operation.
13035type LocalNetworkGatewaysCreateOrUpdateFuture struct {
13036	azure.Future
13037}
13038
13039// Result returns the result of the asynchronous operation.
13040// If the operation has not completed it will return an error.
13041func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13042	var done bool
13043	done, err = future.DoneWithContext(context.Background(), client)
13044	if err != nil {
13045		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13046		return
13047	}
13048	if !done {
13049		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
13050		return
13051	}
13052	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13053	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13054		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
13055		if err != nil {
13056			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
13057		}
13058	}
13059	return
13060}
13061
13062// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
13063// long-running operation.
13064type LocalNetworkGatewaysDeleteFuture struct {
13065	azure.Future
13066}
13067
13068// Result returns the result of the asynchronous operation.
13069// If the operation has not completed it will return an error.
13070func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
13071	var done bool
13072	done, err = future.DoneWithContext(context.Background(), client)
13073	if err != nil {
13074		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
13075		return
13076	}
13077	if !done {
13078		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
13079		return
13080	}
13081	ar.Response = future.Response()
13082	return
13083}
13084
13085// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13086// long-running operation.
13087type LocalNetworkGatewaysUpdateTagsFuture struct {
13088	azure.Future
13089}
13090
13091// Result returns the result of the asynchronous operation.
13092// If the operation has not completed it will return an error.
13093func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13094	var done bool
13095	done, err = future.DoneWithContext(context.Background(), client)
13096	if err != nil {
13097		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13098		return
13099	}
13100	if !done {
13101		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
13102		return
13103	}
13104	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13105	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13106		lng, err = client.UpdateTagsResponder(lng.Response.Response)
13107		if err != nil {
13108			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
13109		}
13110	}
13111	return
13112}
13113
13114// LogSpecification description of logging specification.
13115type LogSpecification struct {
13116	// Name - The name of the specification.
13117	Name *string `json:"name,omitempty"`
13118	// DisplayName - The display name of the specification.
13119	DisplayName *string `json:"displayName,omitempty"`
13120	// BlobDuration - Duration of the blob.
13121	BlobDuration *string `json:"blobDuration,omitempty"`
13122}
13123
13124// MetricSpecification description of metrics specification.
13125type MetricSpecification struct {
13126	// Name - The name of the metric.
13127	Name *string `json:"name,omitempty"`
13128	// DisplayName - The display name of the metric.
13129	DisplayName *string `json:"displayName,omitempty"`
13130	// DisplayDescription - The description of the metric.
13131	DisplayDescription *string `json:"displayDescription,omitempty"`
13132	// Unit - Units the metric to be displayed in.
13133	Unit *string `json:"unit,omitempty"`
13134	// AggregationType - The aggregation type.
13135	AggregationType *string `json:"aggregationType,omitempty"`
13136	// Availabilities - List of availability.
13137	Availabilities *[]Availability `json:"availabilities,omitempty"`
13138	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
13139	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
13140	// FillGapWithZero - Whether gaps would be filled with zeros.
13141	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
13142	// MetricFilterPattern - Pattern for the filter of the metric.
13143	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
13144	// Dimensions - List of dimensions.
13145	Dimensions *[]Dimension `json:"dimensions,omitempty"`
13146	// IsInternal - Whether the metric is internal.
13147	IsInternal *bool `json:"isInternal,omitempty"`
13148	// SourceMdmAccount - The source MDM account.
13149	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
13150	// SourceMdmNamespace - The source MDM namespace.
13151	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
13152	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
13153	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
13154}
13155
13156// NextHopParameters parameters that define the source and destination endpoint.
13157type NextHopParameters struct {
13158	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
13159	TargetResourceID *string `json:"targetResourceId,omitempty"`
13160	// SourceIPAddress - The source IP address.
13161	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
13162	// DestinationIPAddress - The destination IP address.
13163	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
13164	// TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional).
13165	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
13166}
13167
13168// NextHopResult the information about next hop from the specified VM.
13169type NextHopResult struct {
13170	autorest.Response `json:"-"`
13171	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
13172	NextHopType NextHopType `json:"nextHopType,omitempty"`
13173	// NextHopIPAddress - Next hop IP Address
13174	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
13175	// RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.
13176	RouteTableID *string `json:"routeTableId,omitempty"`
13177}
13178
13179// Operation network REST API operation definition.
13180type Operation struct {
13181	// Name - Operation name: {provider}/{resource}/{operation}
13182	Name *string `json:"name,omitempty"`
13183	// Display - Display metadata associated with the operation.
13184	Display *OperationDisplay `json:"display,omitempty"`
13185	// Origin - Origin of the operation.
13186	Origin *string `json:"origin,omitempty"`
13187	// OperationPropertiesFormat - Operation properties format.
13188	*OperationPropertiesFormat `json:"properties,omitempty"`
13189}
13190
13191// MarshalJSON is the custom marshaler for Operation.
13192func (o Operation) MarshalJSON() ([]byte, error) {
13193	objectMap := make(map[string]interface{})
13194	if o.Name != nil {
13195		objectMap["name"] = o.Name
13196	}
13197	if o.Display != nil {
13198		objectMap["display"] = o.Display
13199	}
13200	if o.Origin != nil {
13201		objectMap["origin"] = o.Origin
13202	}
13203	if o.OperationPropertiesFormat != nil {
13204		objectMap["properties"] = o.OperationPropertiesFormat
13205	}
13206	return json.Marshal(objectMap)
13207}
13208
13209// UnmarshalJSON is the custom unmarshaler for Operation struct.
13210func (o *Operation) UnmarshalJSON(body []byte) error {
13211	var m map[string]*json.RawMessage
13212	err := json.Unmarshal(body, &m)
13213	if err != nil {
13214		return err
13215	}
13216	for k, v := range m {
13217		switch k {
13218		case "name":
13219			if v != nil {
13220				var name string
13221				err = json.Unmarshal(*v, &name)
13222				if err != nil {
13223					return err
13224				}
13225				o.Name = &name
13226			}
13227		case "display":
13228			if v != nil {
13229				var display OperationDisplay
13230				err = json.Unmarshal(*v, &display)
13231				if err != nil {
13232					return err
13233				}
13234				o.Display = &display
13235			}
13236		case "origin":
13237			if v != nil {
13238				var origin string
13239				err = json.Unmarshal(*v, &origin)
13240				if err != nil {
13241					return err
13242				}
13243				o.Origin = &origin
13244			}
13245		case "properties":
13246			if v != nil {
13247				var operationPropertiesFormat OperationPropertiesFormat
13248				err = json.Unmarshal(*v, &operationPropertiesFormat)
13249				if err != nil {
13250					return err
13251				}
13252				o.OperationPropertiesFormat = &operationPropertiesFormat
13253			}
13254		}
13255	}
13256
13257	return nil
13258}
13259
13260// OperationDisplay display metadata associated with the operation.
13261type OperationDisplay struct {
13262	// Provider - Service provider: Microsoft Network.
13263	Provider *string `json:"provider,omitempty"`
13264	// Resource - Resource on which the operation is performed.
13265	Resource *string `json:"resource,omitempty"`
13266	// Operation - Type of the operation: get, read, delete, etc.
13267	Operation *string `json:"operation,omitempty"`
13268	// Description - Description of the operation.
13269	Description *string `json:"description,omitempty"`
13270}
13271
13272// OperationListResult result of the request to list Network operations. It contains a list of operations
13273// and a URL link to get the next set of results.
13274type OperationListResult struct {
13275	autorest.Response `json:"-"`
13276	// Value - List of Network operations supported by the Network resource provider.
13277	Value *[]Operation `json:"value,omitempty"`
13278	// NextLink - URL to get the next set of operation list results if there are any.
13279	NextLink *string `json:"nextLink,omitempty"`
13280}
13281
13282// OperationListResultIterator provides access to a complete listing of Operation values.
13283type OperationListResultIterator struct {
13284	i    int
13285	page OperationListResultPage
13286}
13287
13288// NextWithContext advances to the next value.  If there was an error making
13289// the request the iterator does not advance and the error is returned.
13290func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13291	if tracing.IsEnabled() {
13292		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
13293		defer func() {
13294			sc := -1
13295			if iter.Response().Response.Response != nil {
13296				sc = iter.Response().Response.Response.StatusCode
13297			}
13298			tracing.EndSpan(ctx, sc, err)
13299		}()
13300	}
13301	iter.i++
13302	if iter.i < len(iter.page.Values()) {
13303		return nil
13304	}
13305	err = iter.page.NextWithContext(ctx)
13306	if err != nil {
13307		iter.i--
13308		return err
13309	}
13310	iter.i = 0
13311	return nil
13312}
13313
13314// Next advances to the next value.  If there was an error making
13315// the request the iterator does not advance and the error is returned.
13316// Deprecated: Use NextWithContext() instead.
13317func (iter *OperationListResultIterator) Next() error {
13318	return iter.NextWithContext(context.Background())
13319}
13320
13321// NotDone returns true if the enumeration should be started or is not yet complete.
13322func (iter OperationListResultIterator) NotDone() bool {
13323	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13324}
13325
13326// Response returns the raw server response from the last page request.
13327func (iter OperationListResultIterator) Response() OperationListResult {
13328	return iter.page.Response()
13329}
13330
13331// Value returns the current value or a zero-initialized value if the
13332// iterator has advanced beyond the end of the collection.
13333func (iter OperationListResultIterator) Value() Operation {
13334	if !iter.page.NotDone() {
13335		return Operation{}
13336	}
13337	return iter.page.Values()[iter.i]
13338}
13339
13340// Creates a new instance of the OperationListResultIterator type.
13341func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
13342	return OperationListResultIterator{page: page}
13343}
13344
13345// IsEmpty returns true if the ListResult contains no values.
13346func (olr OperationListResult) IsEmpty() bool {
13347	return olr.Value == nil || len(*olr.Value) == 0
13348}
13349
13350// operationListResultPreparer prepares a request to retrieve the next set of results.
13351// It returns nil if no more results exist.
13352func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
13353	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
13354		return nil, nil
13355	}
13356	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13357		autorest.AsJSON(),
13358		autorest.AsGet(),
13359		autorest.WithBaseURL(to.String(olr.NextLink)))
13360}
13361
13362// OperationListResultPage contains a page of Operation values.
13363type OperationListResultPage struct {
13364	fn  func(context.Context, OperationListResult) (OperationListResult, error)
13365	olr OperationListResult
13366}
13367
13368// NextWithContext advances to the next page of values.  If there was an error making
13369// the request the page does not advance and the error is returned.
13370func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
13371	if tracing.IsEnabled() {
13372		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
13373		defer func() {
13374			sc := -1
13375			if page.Response().Response.Response != nil {
13376				sc = page.Response().Response.Response.StatusCode
13377			}
13378			tracing.EndSpan(ctx, sc, err)
13379		}()
13380	}
13381	next, err := page.fn(ctx, page.olr)
13382	if err != nil {
13383		return err
13384	}
13385	page.olr = next
13386	return nil
13387}
13388
13389// Next advances to the next page of values.  If there was an error making
13390// the request the page does not advance and the error is returned.
13391// Deprecated: Use NextWithContext() instead.
13392func (page *OperationListResultPage) Next() error {
13393	return page.NextWithContext(context.Background())
13394}
13395
13396// NotDone returns true if the page enumeration should be started or is not yet complete.
13397func (page OperationListResultPage) NotDone() bool {
13398	return !page.olr.IsEmpty()
13399}
13400
13401// Response returns the raw server response from the last page request.
13402func (page OperationListResultPage) Response() OperationListResult {
13403	return page.olr
13404}
13405
13406// Values returns the slice of values for the current page or nil if there are no values.
13407func (page OperationListResultPage) Values() []Operation {
13408	if page.olr.IsEmpty() {
13409		return nil
13410	}
13411	return *page.olr.Value
13412}
13413
13414// Creates a new instance of the OperationListResultPage type.
13415func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
13416	return OperationListResultPage{fn: getNextPage}
13417}
13418
13419// OperationPropertiesFormat description of operation properties format.
13420type OperationPropertiesFormat struct {
13421	// ServiceSpecification - Specification of the service.
13422	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
13423}
13424
13425// OperationPropertiesFormatServiceSpecification specification of the service.
13426type OperationPropertiesFormatServiceSpecification struct {
13427	// MetricSpecifications - Operation service specification.
13428	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
13429	// LogSpecifications - Operation log specification.
13430	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
13431}
13432
13433// OutboundNatRule outbound NAT pool of the load balancer.
13434type OutboundNatRule struct {
13435	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
13436	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
13437	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13438	Name *string `json:"name,omitempty"`
13439	// Etag - A unique read-only string that changes whenever the resource is updated.
13440	Etag *string `json:"etag,omitempty"`
13441	// ID - Resource ID.
13442	ID *string `json:"id,omitempty"`
13443}
13444
13445// MarshalJSON is the custom marshaler for OutboundNatRule.
13446func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
13447	objectMap := make(map[string]interface{})
13448	if onr.OutboundNatRulePropertiesFormat != nil {
13449		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
13450	}
13451	if onr.Name != nil {
13452		objectMap["name"] = onr.Name
13453	}
13454	if onr.Etag != nil {
13455		objectMap["etag"] = onr.Etag
13456	}
13457	if onr.ID != nil {
13458		objectMap["id"] = onr.ID
13459	}
13460	return json.Marshal(objectMap)
13461}
13462
13463// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
13464func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
13465	var m map[string]*json.RawMessage
13466	err := json.Unmarshal(body, &m)
13467	if err != nil {
13468		return err
13469	}
13470	for k, v := range m {
13471		switch k {
13472		case "properties":
13473			if v != nil {
13474				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
13475				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
13476				if err != nil {
13477					return err
13478				}
13479				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
13480			}
13481		case "name":
13482			if v != nil {
13483				var name string
13484				err = json.Unmarshal(*v, &name)
13485				if err != nil {
13486					return err
13487				}
13488				onr.Name = &name
13489			}
13490		case "etag":
13491			if v != nil {
13492				var etag string
13493				err = json.Unmarshal(*v, &etag)
13494				if err != nil {
13495					return err
13496				}
13497				onr.Etag = &etag
13498			}
13499		case "id":
13500			if v != nil {
13501				var ID string
13502				err = json.Unmarshal(*v, &ID)
13503				if err != nil {
13504					return err
13505				}
13506				onr.ID = &ID
13507			}
13508		}
13509	}
13510
13511	return nil
13512}
13513
13514// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
13515type OutboundNatRulePropertiesFormat struct {
13516	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
13517	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
13518	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
13519	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
13520	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
13521	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
13522	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13523	ProvisioningState *string `json:"provisioningState,omitempty"`
13524}
13525
13526// PacketCapture parameters that define the create packet capture operation.
13527type PacketCapture struct {
13528	*PacketCaptureParameters `json:"properties,omitempty"`
13529}
13530
13531// MarshalJSON is the custom marshaler for PacketCapture.
13532func (pc PacketCapture) MarshalJSON() ([]byte, error) {
13533	objectMap := make(map[string]interface{})
13534	if pc.PacketCaptureParameters != nil {
13535		objectMap["properties"] = pc.PacketCaptureParameters
13536	}
13537	return json.Marshal(objectMap)
13538}
13539
13540// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
13541func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
13542	var m map[string]*json.RawMessage
13543	err := json.Unmarshal(body, &m)
13544	if err != nil {
13545		return err
13546	}
13547	for k, v := range m {
13548		switch k {
13549		case "properties":
13550			if v != nil {
13551				var packetCaptureParameters PacketCaptureParameters
13552				err = json.Unmarshal(*v, &packetCaptureParameters)
13553				if err != nil {
13554					return err
13555				}
13556				pc.PacketCaptureParameters = &packetCaptureParameters
13557			}
13558		}
13559	}
13560
13561	return nil
13562}
13563
13564// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
13565type PacketCaptureFilter struct {
13566	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
13567	Protocol PcProtocol `json:"protocol,omitempty"`
13568	// LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13569	LocalIPAddress *string `json:"localIPAddress,omitempty"`
13570	// RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13571	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
13572	// LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13573	LocalPort *string `json:"localPort,omitempty"`
13574	// RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13575	RemotePort *string `json:"remotePort,omitempty"`
13576}
13577
13578// PacketCaptureListResult list of packet capture sessions.
13579type PacketCaptureListResult struct {
13580	autorest.Response `json:"-"`
13581	// Value - Information about packet capture sessions.
13582	Value *[]PacketCaptureResult `json:"value,omitempty"`
13583}
13584
13585// PacketCaptureParameters parameters that define the create packet capture operation.
13586type PacketCaptureParameters struct {
13587	// Target - The ID of the targeted resource, only VM is currently supported.
13588	Target *string `json:"target,omitempty"`
13589	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13590	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13591	// TotalBytesPerSession - Maximum size of the capture output.
13592	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13593	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13594	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13595	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13596	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13597}
13598
13599// PacketCaptureQueryStatusResult status of packet capture session.
13600type PacketCaptureQueryStatusResult struct {
13601	autorest.Response `json:"-"`
13602	// Name - The name of the packet capture resource.
13603	Name *string `json:"name,omitempty"`
13604	// ID - The ID of the packet capture resource.
13605	ID *string `json:"id,omitempty"`
13606	// CaptureStartTime - The start time of the packet capture session.
13607	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
13608	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
13609	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
13610	// StopReason - The reason the current packet capture session was stopped.
13611	StopReason *string `json:"stopReason,omitempty"`
13612	// PacketCaptureError - List of errors of packet capture session.
13613	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
13614}
13615
13616// PacketCaptureResult information about packet capture session.
13617type PacketCaptureResult struct {
13618	autorest.Response `json:"-"`
13619	// Name - READ-ONLY; Name of the packet capture session.
13620	Name *string `json:"name,omitempty"`
13621	// ID - READ-ONLY; ID of the packet capture operation.
13622	ID                             *string `json:"id,omitempty"`
13623	Etag                           *string `json:"etag,omitempty"`
13624	*PacketCaptureResultProperties `json:"properties,omitempty"`
13625}
13626
13627// MarshalJSON is the custom marshaler for PacketCaptureResult.
13628func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
13629	objectMap := make(map[string]interface{})
13630	if pcr.Etag != nil {
13631		objectMap["etag"] = pcr.Etag
13632	}
13633	if pcr.PacketCaptureResultProperties != nil {
13634		objectMap["properties"] = pcr.PacketCaptureResultProperties
13635	}
13636	return json.Marshal(objectMap)
13637}
13638
13639// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
13640func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
13641	var m map[string]*json.RawMessage
13642	err := json.Unmarshal(body, &m)
13643	if err != nil {
13644		return err
13645	}
13646	for k, v := range m {
13647		switch k {
13648		case "name":
13649			if v != nil {
13650				var name string
13651				err = json.Unmarshal(*v, &name)
13652				if err != nil {
13653					return err
13654				}
13655				pcr.Name = &name
13656			}
13657		case "id":
13658			if v != nil {
13659				var ID string
13660				err = json.Unmarshal(*v, &ID)
13661				if err != nil {
13662					return err
13663				}
13664				pcr.ID = &ID
13665			}
13666		case "etag":
13667			if v != nil {
13668				var etag string
13669				err = json.Unmarshal(*v, &etag)
13670				if err != nil {
13671					return err
13672				}
13673				pcr.Etag = &etag
13674			}
13675		case "properties":
13676			if v != nil {
13677				var packetCaptureResultProperties PacketCaptureResultProperties
13678				err = json.Unmarshal(*v, &packetCaptureResultProperties)
13679				if err != nil {
13680					return err
13681				}
13682				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
13683			}
13684		}
13685	}
13686
13687	return nil
13688}
13689
13690// PacketCaptureResultProperties describes the properties of a packet capture session.
13691type PacketCaptureResultProperties struct {
13692	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13693	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13694	// Target - The ID of the targeted resource, only VM is currently supported.
13695	Target *string `json:"target,omitempty"`
13696	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13697	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13698	// TotalBytesPerSession - Maximum size of the capture output.
13699	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13700	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13701	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13702	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13703	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13704}
13705
13706// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
13707// operation.
13708type PacketCapturesCreateFuture struct {
13709	azure.Future
13710}
13711
13712// Result returns the result of the asynchronous operation.
13713// If the operation has not completed it will return an error.
13714func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
13715	var done bool
13716	done, err = future.DoneWithContext(context.Background(), client)
13717	if err != nil {
13718		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
13719		return
13720	}
13721	if !done {
13722		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
13723		return
13724	}
13725	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13726	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
13727		pcr, err = client.CreateResponder(pcr.Response.Response)
13728		if err != nil {
13729			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
13730		}
13731	}
13732	return
13733}
13734
13735// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13736// operation.
13737type PacketCapturesDeleteFuture struct {
13738	azure.Future
13739}
13740
13741// Result returns the result of the asynchronous operation.
13742// If the operation has not completed it will return an error.
13743func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
13744	var done bool
13745	done, err = future.DoneWithContext(context.Background(), client)
13746	if err != nil {
13747		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
13748		return
13749	}
13750	if !done {
13751		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
13752		return
13753	}
13754	ar.Response = future.Response()
13755	return
13756}
13757
13758// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
13759// operation.
13760type PacketCapturesGetStatusFuture struct {
13761	azure.Future
13762}
13763
13764// Result returns the result of the asynchronous operation.
13765// If the operation has not completed it will return an error.
13766func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
13767	var done bool
13768	done, err = future.DoneWithContext(context.Background(), client)
13769	if err != nil {
13770		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
13771		return
13772	}
13773	if !done {
13774		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
13775		return
13776	}
13777	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13778	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
13779		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
13780		if err != nil {
13781			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
13782		}
13783	}
13784	return
13785}
13786
13787// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
13788// operation.
13789type PacketCapturesStopFuture struct {
13790	azure.Future
13791}
13792
13793// Result returns the result of the asynchronous operation.
13794// If the operation has not completed it will return an error.
13795func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
13796	var done bool
13797	done, err = future.DoneWithContext(context.Background(), client)
13798	if err != nil {
13799		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
13800		return
13801	}
13802	if !done {
13803		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
13804		return
13805	}
13806	ar.Response = future.Response()
13807	return
13808}
13809
13810// PacketCaptureStorageLocation describes the storage location for a packet capture session.
13811type PacketCaptureStorageLocation struct {
13812	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
13813	StorageID *string `json:"storageId,omitempty"`
13814	// StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.
13815	StoragePath *string `json:"storagePath,omitempty"`
13816	// FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.
13817	FilePath *string `json:"filePath,omitempty"`
13818}
13819
13820// PatchRouteFilter route Filter Resource.
13821type PatchRouteFilter struct {
13822	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
13823	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
13824	Name *string `json:"name,omitempty"`
13825	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13826	Etag *string `json:"etag,omitempty"`
13827	// Type - READ-ONLY; Resource type.
13828	Type *string `json:"type,omitempty"`
13829	// Tags - Resource tags.
13830	Tags map[string]*string `json:"tags"`
13831	// ID - Resource ID.
13832	ID *string `json:"id,omitempty"`
13833}
13834
13835// MarshalJSON is the custom marshaler for PatchRouteFilter.
13836func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
13837	objectMap := make(map[string]interface{})
13838	if prf.RouteFilterPropertiesFormat != nil {
13839		objectMap["properties"] = prf.RouteFilterPropertiesFormat
13840	}
13841	if prf.Tags != nil {
13842		objectMap["tags"] = prf.Tags
13843	}
13844	if prf.ID != nil {
13845		objectMap["id"] = prf.ID
13846	}
13847	return json.Marshal(objectMap)
13848}
13849
13850// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
13851func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
13852	var m map[string]*json.RawMessage
13853	err := json.Unmarshal(body, &m)
13854	if err != nil {
13855		return err
13856	}
13857	for k, v := range m {
13858		switch k {
13859		case "properties":
13860			if v != nil {
13861				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
13862				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
13863				if err != nil {
13864					return err
13865				}
13866				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
13867			}
13868		case "name":
13869			if v != nil {
13870				var name string
13871				err = json.Unmarshal(*v, &name)
13872				if err != nil {
13873					return err
13874				}
13875				prf.Name = &name
13876			}
13877		case "etag":
13878			if v != nil {
13879				var etag string
13880				err = json.Unmarshal(*v, &etag)
13881				if err != nil {
13882					return err
13883				}
13884				prf.Etag = &etag
13885			}
13886		case "type":
13887			if v != nil {
13888				var typeVar string
13889				err = json.Unmarshal(*v, &typeVar)
13890				if err != nil {
13891					return err
13892				}
13893				prf.Type = &typeVar
13894			}
13895		case "tags":
13896			if v != nil {
13897				var tags map[string]*string
13898				err = json.Unmarshal(*v, &tags)
13899				if err != nil {
13900					return err
13901				}
13902				prf.Tags = tags
13903			}
13904		case "id":
13905			if v != nil {
13906				var ID string
13907				err = json.Unmarshal(*v, &ID)
13908				if err != nil {
13909					return err
13910				}
13911				prf.ID = &ID
13912			}
13913		}
13914	}
13915
13916	return nil
13917}
13918
13919// PatchRouteFilterRule route Filter Rule Resource
13920type PatchRouteFilterRule struct {
13921	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
13922	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
13923	Name *string `json:"name,omitempty"`
13924	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13925	Etag *string `json:"etag,omitempty"`
13926	// ID - Resource ID.
13927	ID *string `json:"id,omitempty"`
13928}
13929
13930// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
13931func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
13932	objectMap := make(map[string]interface{})
13933	if prfr.RouteFilterRulePropertiesFormat != nil {
13934		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
13935	}
13936	if prfr.ID != nil {
13937		objectMap["id"] = prfr.ID
13938	}
13939	return json.Marshal(objectMap)
13940}
13941
13942// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
13943func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
13944	var m map[string]*json.RawMessage
13945	err := json.Unmarshal(body, &m)
13946	if err != nil {
13947		return err
13948	}
13949	for k, v := range m {
13950		switch k {
13951		case "properties":
13952			if v != nil {
13953				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
13954				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
13955				if err != nil {
13956					return err
13957				}
13958				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
13959			}
13960		case "name":
13961			if v != nil {
13962				var name string
13963				err = json.Unmarshal(*v, &name)
13964				if err != nil {
13965					return err
13966				}
13967				prfr.Name = &name
13968			}
13969		case "etag":
13970			if v != nil {
13971				var etag string
13972				err = json.Unmarshal(*v, &etag)
13973				if err != nil {
13974					return err
13975				}
13976				prfr.Etag = &etag
13977			}
13978		case "id":
13979			if v != nil {
13980				var ID string
13981				err = json.Unmarshal(*v, &ID)
13982				if err != nil {
13983					return err
13984				}
13985				prfr.ID = &ID
13986			}
13987		}
13988	}
13989
13990	return nil
13991}
13992
13993// Policies policies for vpn gateway.
13994type Policies struct {
13995	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
13996	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
13997	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
13998	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
13999}
14000
14001// Probe a load balancer probe.
14002type Probe struct {
14003	autorest.Response `json:"-"`
14004	// ProbePropertiesFormat - Properties of load balancer probe.
14005	*ProbePropertiesFormat `json:"properties,omitempty"`
14006	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
14007	Name *string `json:"name,omitempty"`
14008	// Etag - A unique read-only string that changes whenever the resource is updated.
14009	Etag *string `json:"etag,omitempty"`
14010	// ID - Resource ID.
14011	ID *string `json:"id,omitempty"`
14012}
14013
14014// MarshalJSON is the custom marshaler for Probe.
14015func (p Probe) MarshalJSON() ([]byte, error) {
14016	objectMap := make(map[string]interface{})
14017	if p.ProbePropertiesFormat != nil {
14018		objectMap["properties"] = p.ProbePropertiesFormat
14019	}
14020	if p.Name != nil {
14021		objectMap["name"] = p.Name
14022	}
14023	if p.Etag != nil {
14024		objectMap["etag"] = p.Etag
14025	}
14026	if p.ID != nil {
14027		objectMap["id"] = p.ID
14028	}
14029	return json.Marshal(objectMap)
14030}
14031
14032// UnmarshalJSON is the custom unmarshaler for Probe struct.
14033func (p *Probe) UnmarshalJSON(body []byte) error {
14034	var m map[string]*json.RawMessage
14035	err := json.Unmarshal(body, &m)
14036	if err != nil {
14037		return err
14038	}
14039	for k, v := range m {
14040		switch k {
14041		case "properties":
14042			if v != nil {
14043				var probePropertiesFormat ProbePropertiesFormat
14044				err = json.Unmarshal(*v, &probePropertiesFormat)
14045				if err != nil {
14046					return err
14047				}
14048				p.ProbePropertiesFormat = &probePropertiesFormat
14049			}
14050		case "name":
14051			if v != nil {
14052				var name string
14053				err = json.Unmarshal(*v, &name)
14054				if err != nil {
14055					return err
14056				}
14057				p.Name = &name
14058			}
14059		case "etag":
14060			if v != nil {
14061				var etag string
14062				err = json.Unmarshal(*v, &etag)
14063				if err != nil {
14064					return err
14065				}
14066				p.Etag = &etag
14067			}
14068		case "id":
14069			if v != nil {
14070				var ID string
14071				err = json.Unmarshal(*v, &ID)
14072				if err != nil {
14073					return err
14074				}
14075				p.ID = &ID
14076			}
14077		}
14078	}
14079
14080	return nil
14081}
14082
14083// ProbePropertiesFormat load balancer probe resource.
14084type ProbePropertiesFormat struct {
14085	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
14086	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14087	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
14088	Protocol ProbeProtocol `json:"protocol,omitempty"`
14089	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
14090	Port *int32 `json:"port,omitempty"`
14091	// IntervalInSeconds - The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.
14092	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
14093	// NumberOfProbes - The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.
14094	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
14095	// RequestPath - The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value.
14096	RequestPath *string `json:"requestPath,omitempty"`
14097	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14098	ProvisioningState *string `json:"provisioningState,omitempty"`
14099}
14100
14101// ProtocolConfiguration configuration of the protocol.
14102type ProtocolConfiguration struct {
14103	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
14104}
14105
14106// PublicIPAddress public IP address resource.
14107type PublicIPAddress struct {
14108	autorest.Response `json:"-"`
14109	// Sku - The public IP address SKU.
14110	Sku *PublicIPAddressSku `json:"sku,omitempty"`
14111	// PublicIPAddressPropertiesFormat - Public IP address properties.
14112	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
14113	// Etag - A unique read-only string that changes whenever the resource is updated.
14114	Etag *string `json:"etag,omitempty"`
14115	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14116	Zones *[]string `json:"zones,omitempty"`
14117	// ID - Resource ID.
14118	ID *string `json:"id,omitempty"`
14119	// Name - READ-ONLY; Resource name.
14120	Name *string `json:"name,omitempty"`
14121	// Type - READ-ONLY; Resource type.
14122	Type *string `json:"type,omitempty"`
14123	// Location - Resource location.
14124	Location *string `json:"location,omitempty"`
14125	// Tags - Resource tags.
14126	Tags map[string]*string `json:"tags"`
14127}
14128
14129// MarshalJSON is the custom marshaler for PublicIPAddress.
14130func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
14131	objectMap := make(map[string]interface{})
14132	if pia.Sku != nil {
14133		objectMap["sku"] = pia.Sku
14134	}
14135	if pia.PublicIPAddressPropertiesFormat != nil {
14136		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
14137	}
14138	if pia.Etag != nil {
14139		objectMap["etag"] = pia.Etag
14140	}
14141	if pia.Zones != nil {
14142		objectMap["zones"] = pia.Zones
14143	}
14144	if pia.ID != nil {
14145		objectMap["id"] = pia.ID
14146	}
14147	if pia.Location != nil {
14148		objectMap["location"] = pia.Location
14149	}
14150	if pia.Tags != nil {
14151		objectMap["tags"] = pia.Tags
14152	}
14153	return json.Marshal(objectMap)
14154}
14155
14156// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
14157func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
14158	var m map[string]*json.RawMessage
14159	err := json.Unmarshal(body, &m)
14160	if err != nil {
14161		return err
14162	}
14163	for k, v := range m {
14164		switch k {
14165		case "sku":
14166			if v != nil {
14167				var sku PublicIPAddressSku
14168				err = json.Unmarshal(*v, &sku)
14169				if err != nil {
14170					return err
14171				}
14172				pia.Sku = &sku
14173			}
14174		case "properties":
14175			if v != nil {
14176				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
14177				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
14178				if err != nil {
14179					return err
14180				}
14181				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
14182			}
14183		case "etag":
14184			if v != nil {
14185				var etag string
14186				err = json.Unmarshal(*v, &etag)
14187				if err != nil {
14188					return err
14189				}
14190				pia.Etag = &etag
14191			}
14192		case "zones":
14193			if v != nil {
14194				var zones []string
14195				err = json.Unmarshal(*v, &zones)
14196				if err != nil {
14197					return err
14198				}
14199				pia.Zones = &zones
14200			}
14201		case "id":
14202			if v != nil {
14203				var ID string
14204				err = json.Unmarshal(*v, &ID)
14205				if err != nil {
14206					return err
14207				}
14208				pia.ID = &ID
14209			}
14210		case "name":
14211			if v != nil {
14212				var name string
14213				err = json.Unmarshal(*v, &name)
14214				if err != nil {
14215					return err
14216				}
14217				pia.Name = &name
14218			}
14219		case "type":
14220			if v != nil {
14221				var typeVar string
14222				err = json.Unmarshal(*v, &typeVar)
14223				if err != nil {
14224					return err
14225				}
14226				pia.Type = &typeVar
14227			}
14228		case "location":
14229			if v != nil {
14230				var location string
14231				err = json.Unmarshal(*v, &location)
14232				if err != nil {
14233					return err
14234				}
14235				pia.Location = &location
14236			}
14237		case "tags":
14238			if v != nil {
14239				var tags map[string]*string
14240				err = json.Unmarshal(*v, &tags)
14241				if err != nil {
14242					return err
14243				}
14244				pia.Tags = tags
14245			}
14246		}
14247	}
14248
14249	return nil
14250}
14251
14252// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
14253type PublicIPAddressDNSSettings struct {
14254	// DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system.
14255	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14256	// Fqdn - Gets the FQDN, Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
14257	Fqdn *string `json:"fqdn,omitempty"`
14258	// ReverseFqdn - Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
14259	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
14260}
14261
14262// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14263// long-running operation.
14264type PublicIPAddressesCreateOrUpdateFuture struct {
14265	azure.Future
14266}
14267
14268// Result returns the result of the asynchronous operation.
14269// If the operation has not completed it will return an error.
14270func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14271	var done bool
14272	done, err = future.DoneWithContext(context.Background(), client)
14273	if err != nil {
14274		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14275		return
14276	}
14277	if !done {
14278		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
14279		return
14280	}
14281	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14282	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14283		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
14284		if err != nil {
14285			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
14286		}
14287	}
14288	return
14289}
14290
14291// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14292// operation.
14293type PublicIPAddressesDeleteFuture struct {
14294	azure.Future
14295}
14296
14297// Result returns the result of the asynchronous operation.
14298// If the operation has not completed it will return an error.
14299func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
14300	var done bool
14301	done, err = future.DoneWithContext(context.Background(), client)
14302	if err != nil {
14303		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
14304		return
14305	}
14306	if !done {
14307		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
14308		return
14309	}
14310	ar.Response = future.Response()
14311	return
14312}
14313
14314// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14315// long-running operation.
14316type PublicIPAddressesUpdateTagsFuture struct {
14317	azure.Future
14318}
14319
14320// Result returns the result of the asynchronous operation.
14321// If the operation has not completed it will return an error.
14322func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14323	var done bool
14324	done, err = future.DoneWithContext(context.Background(), client)
14325	if err != nil {
14326		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14327		return
14328	}
14329	if !done {
14330		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
14331		return
14332	}
14333	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14334	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14335		pia, err = client.UpdateTagsResponder(pia.Response.Response)
14336		if err != nil {
14337			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
14338		}
14339	}
14340	return
14341}
14342
14343// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
14344type PublicIPAddressListResult struct {
14345	autorest.Response `json:"-"`
14346	// Value - A list of public IP addresses that exists in a resource group.
14347	Value *[]PublicIPAddress `json:"value,omitempty"`
14348	// NextLink - The URL to get the next set of results.
14349	NextLink *string `json:"nextLink,omitempty"`
14350}
14351
14352// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
14353type PublicIPAddressListResultIterator struct {
14354	i    int
14355	page PublicIPAddressListResultPage
14356}
14357
14358// NextWithContext advances to the next value.  If there was an error making
14359// the request the iterator does not advance and the error is returned.
14360func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
14361	if tracing.IsEnabled() {
14362		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
14363		defer func() {
14364			sc := -1
14365			if iter.Response().Response.Response != nil {
14366				sc = iter.Response().Response.Response.StatusCode
14367			}
14368			tracing.EndSpan(ctx, sc, err)
14369		}()
14370	}
14371	iter.i++
14372	if iter.i < len(iter.page.Values()) {
14373		return nil
14374	}
14375	err = iter.page.NextWithContext(ctx)
14376	if err != nil {
14377		iter.i--
14378		return err
14379	}
14380	iter.i = 0
14381	return nil
14382}
14383
14384// Next advances to the next value.  If there was an error making
14385// the request the iterator does not advance and the error is returned.
14386// Deprecated: Use NextWithContext() instead.
14387func (iter *PublicIPAddressListResultIterator) Next() error {
14388	return iter.NextWithContext(context.Background())
14389}
14390
14391// NotDone returns true if the enumeration should be started or is not yet complete.
14392func (iter PublicIPAddressListResultIterator) NotDone() bool {
14393	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14394}
14395
14396// Response returns the raw server response from the last page request.
14397func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
14398	return iter.page.Response()
14399}
14400
14401// Value returns the current value or a zero-initialized value if the
14402// iterator has advanced beyond the end of the collection.
14403func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
14404	if !iter.page.NotDone() {
14405		return PublicIPAddress{}
14406	}
14407	return iter.page.Values()[iter.i]
14408}
14409
14410// Creates a new instance of the PublicIPAddressListResultIterator type.
14411func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
14412	return PublicIPAddressListResultIterator{page: page}
14413}
14414
14415// IsEmpty returns true if the ListResult contains no values.
14416func (pialr PublicIPAddressListResult) IsEmpty() bool {
14417	return pialr.Value == nil || len(*pialr.Value) == 0
14418}
14419
14420// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
14421// It returns nil if no more results exist.
14422func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
14423	if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 {
14424		return nil, nil
14425	}
14426	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14427		autorest.AsJSON(),
14428		autorest.AsGet(),
14429		autorest.WithBaseURL(to.String(pialr.NextLink)))
14430}
14431
14432// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
14433type PublicIPAddressListResultPage struct {
14434	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
14435	pialr PublicIPAddressListResult
14436}
14437
14438// NextWithContext advances to the next page of values.  If there was an error making
14439// the request the page does not advance and the error is returned.
14440func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
14441	if tracing.IsEnabled() {
14442		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
14443		defer func() {
14444			sc := -1
14445			if page.Response().Response.Response != nil {
14446				sc = page.Response().Response.Response.StatusCode
14447			}
14448			tracing.EndSpan(ctx, sc, err)
14449		}()
14450	}
14451	next, err := page.fn(ctx, page.pialr)
14452	if err != nil {
14453		return err
14454	}
14455	page.pialr = next
14456	return nil
14457}
14458
14459// Next advances to the next page of values.  If there was an error making
14460// the request the page does not advance and the error is returned.
14461// Deprecated: Use NextWithContext() instead.
14462func (page *PublicIPAddressListResultPage) Next() error {
14463	return page.NextWithContext(context.Background())
14464}
14465
14466// NotDone returns true if the page enumeration should be started or is not yet complete.
14467func (page PublicIPAddressListResultPage) NotDone() bool {
14468	return !page.pialr.IsEmpty()
14469}
14470
14471// Response returns the raw server response from the last page request.
14472func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
14473	return page.pialr
14474}
14475
14476// Values returns the slice of values for the current page or nil if there are no values.
14477func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
14478	if page.pialr.IsEmpty() {
14479		return nil
14480	}
14481	return *page.pialr.Value
14482}
14483
14484// Creates a new instance of the PublicIPAddressListResultPage type.
14485func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
14486	return PublicIPAddressListResultPage{fn: getNextPage}
14487}
14488
14489// PublicIPAddressPropertiesFormat public IP address properties.
14490type PublicIPAddressPropertiesFormat struct {
14491	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14492	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
14493	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14494	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14495	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
14496	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
14497	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
14498	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
14499	// IPTags - The list of tags associated with the public IP address.
14500	IPTags *[]IPTag `json:"ipTags,omitempty"`
14501	// IPAddress - The IP address associated with the public IP address resource.
14502	IPAddress *string `json:"ipAddress,omitempty"`
14503	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14504	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14505	// ResourceGUID - The resource GUID property of the public IP resource.
14506	ResourceGUID *string `json:"resourceGuid,omitempty"`
14507	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14508	ProvisioningState *string `json:"provisioningState,omitempty"`
14509}
14510
14511// PublicIPAddressSku SKU of a public IP address
14512type PublicIPAddressSku struct {
14513	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
14514	Name PublicIPAddressSkuName `json:"name,omitempty"`
14515}
14516
14517// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
14518type QueryTroubleshootingParameters struct {
14519	// TargetResourceID - The target resource ID to query the troubleshooting result.
14520	TargetResourceID *string `json:"targetResourceId,omitempty"`
14521}
14522
14523// Resource common resource representation.
14524type Resource struct {
14525	// ID - Resource ID.
14526	ID *string `json:"id,omitempty"`
14527	// Name - READ-ONLY; Resource name.
14528	Name *string `json:"name,omitempty"`
14529	// Type - READ-ONLY; Resource type.
14530	Type *string `json:"type,omitempty"`
14531	// Location - Resource location.
14532	Location *string `json:"location,omitempty"`
14533	// Tags - Resource tags.
14534	Tags map[string]*string `json:"tags"`
14535}
14536
14537// MarshalJSON is the custom marshaler for Resource.
14538func (r Resource) MarshalJSON() ([]byte, error) {
14539	objectMap := make(map[string]interface{})
14540	if r.ID != nil {
14541		objectMap["id"] = r.ID
14542	}
14543	if r.Location != nil {
14544		objectMap["location"] = r.Location
14545	}
14546	if r.Tags != nil {
14547		objectMap["tags"] = r.Tags
14548	}
14549	return json.Marshal(objectMap)
14550}
14551
14552// ResourceNavigationLink resourceNavigationLink resource.
14553type ResourceNavigationLink struct {
14554	// ResourceNavigationLinkFormat - Resource navigation link properties format.
14555	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
14556	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
14557	Name *string `json:"name,omitempty"`
14558	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14559	Etag *string `json:"etag,omitempty"`
14560	// ID - Resource ID.
14561	ID *string `json:"id,omitempty"`
14562}
14563
14564// MarshalJSON is the custom marshaler for ResourceNavigationLink.
14565func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
14566	objectMap := make(map[string]interface{})
14567	if rnl.ResourceNavigationLinkFormat != nil {
14568		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
14569	}
14570	if rnl.Name != nil {
14571		objectMap["name"] = rnl.Name
14572	}
14573	if rnl.ID != nil {
14574		objectMap["id"] = rnl.ID
14575	}
14576	return json.Marshal(objectMap)
14577}
14578
14579// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
14580func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
14581	var m map[string]*json.RawMessage
14582	err := json.Unmarshal(body, &m)
14583	if err != nil {
14584		return err
14585	}
14586	for k, v := range m {
14587		switch k {
14588		case "properties":
14589			if v != nil {
14590				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
14591				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
14592				if err != nil {
14593					return err
14594				}
14595				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
14596			}
14597		case "name":
14598			if v != nil {
14599				var name string
14600				err = json.Unmarshal(*v, &name)
14601				if err != nil {
14602					return err
14603				}
14604				rnl.Name = &name
14605			}
14606		case "etag":
14607			if v != nil {
14608				var etag string
14609				err = json.Unmarshal(*v, &etag)
14610				if err != nil {
14611					return err
14612				}
14613				rnl.Etag = &etag
14614			}
14615		case "id":
14616			if v != nil {
14617				var ID string
14618				err = json.Unmarshal(*v, &ID)
14619				if err != nil {
14620					return err
14621				}
14622				rnl.ID = &ID
14623			}
14624		}
14625	}
14626
14627	return nil
14628}
14629
14630// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
14631type ResourceNavigationLinkFormat struct {
14632	// LinkedResourceType - Resource type of the linked resource.
14633	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
14634	// Link - Link to the external resource
14635	Link *string `json:"link,omitempty"`
14636	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
14637	ProvisioningState *string `json:"provisioningState,omitempty"`
14638}
14639
14640// RetentionPolicyParameters parameters that define the retention policy for flow log.
14641type RetentionPolicyParameters struct {
14642	// Days - Number of days to retain flow log records.
14643	Days *int32 `json:"days,omitempty"`
14644	// Enabled - Flag to enable/disable retention.
14645	Enabled *bool `json:"enabled,omitempty"`
14646}
14647
14648// Route route resource
14649type Route struct {
14650	autorest.Response `json:"-"`
14651	// RoutePropertiesFormat - Properties of the route.
14652	*RoutePropertiesFormat `json:"properties,omitempty"`
14653	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14654	Name *string `json:"name,omitempty"`
14655	// Etag - A unique read-only string that changes whenever the resource is updated.
14656	Etag *string `json:"etag,omitempty"`
14657	// ID - Resource ID.
14658	ID *string `json:"id,omitempty"`
14659}
14660
14661// MarshalJSON is the custom marshaler for Route.
14662func (r Route) MarshalJSON() ([]byte, error) {
14663	objectMap := make(map[string]interface{})
14664	if r.RoutePropertiesFormat != nil {
14665		objectMap["properties"] = r.RoutePropertiesFormat
14666	}
14667	if r.Name != nil {
14668		objectMap["name"] = r.Name
14669	}
14670	if r.Etag != nil {
14671		objectMap["etag"] = r.Etag
14672	}
14673	if r.ID != nil {
14674		objectMap["id"] = r.ID
14675	}
14676	return json.Marshal(objectMap)
14677}
14678
14679// UnmarshalJSON is the custom unmarshaler for Route struct.
14680func (r *Route) UnmarshalJSON(body []byte) error {
14681	var m map[string]*json.RawMessage
14682	err := json.Unmarshal(body, &m)
14683	if err != nil {
14684		return err
14685	}
14686	for k, v := range m {
14687		switch k {
14688		case "properties":
14689			if v != nil {
14690				var routePropertiesFormat RoutePropertiesFormat
14691				err = json.Unmarshal(*v, &routePropertiesFormat)
14692				if err != nil {
14693					return err
14694				}
14695				r.RoutePropertiesFormat = &routePropertiesFormat
14696			}
14697		case "name":
14698			if v != nil {
14699				var name string
14700				err = json.Unmarshal(*v, &name)
14701				if err != nil {
14702					return err
14703				}
14704				r.Name = &name
14705			}
14706		case "etag":
14707			if v != nil {
14708				var etag string
14709				err = json.Unmarshal(*v, &etag)
14710				if err != nil {
14711					return err
14712				}
14713				r.Etag = &etag
14714			}
14715		case "id":
14716			if v != nil {
14717				var ID string
14718				err = json.Unmarshal(*v, &ID)
14719				if err != nil {
14720					return err
14721				}
14722				r.ID = &ID
14723			}
14724		}
14725	}
14726
14727	return nil
14728}
14729
14730// RouteFilter route Filter Resource.
14731type RouteFilter struct {
14732	autorest.Response            `json:"-"`
14733	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
14734	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
14735	Etag *string `json:"etag,omitempty"`
14736	// ID - Resource ID.
14737	ID *string `json:"id,omitempty"`
14738	// Name - READ-ONLY; Resource name.
14739	Name *string `json:"name,omitempty"`
14740	// Type - READ-ONLY; Resource type.
14741	Type *string `json:"type,omitempty"`
14742	// Location - Resource location.
14743	Location *string `json:"location,omitempty"`
14744	// Tags - Resource tags.
14745	Tags map[string]*string `json:"tags"`
14746}
14747
14748// MarshalJSON is the custom marshaler for RouteFilter.
14749func (rf RouteFilter) MarshalJSON() ([]byte, error) {
14750	objectMap := make(map[string]interface{})
14751	if rf.RouteFilterPropertiesFormat != nil {
14752		objectMap["properties"] = rf.RouteFilterPropertiesFormat
14753	}
14754	if rf.ID != nil {
14755		objectMap["id"] = rf.ID
14756	}
14757	if rf.Location != nil {
14758		objectMap["location"] = rf.Location
14759	}
14760	if rf.Tags != nil {
14761		objectMap["tags"] = rf.Tags
14762	}
14763	return json.Marshal(objectMap)
14764}
14765
14766// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
14767func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
14768	var m map[string]*json.RawMessage
14769	err := json.Unmarshal(body, &m)
14770	if err != nil {
14771		return err
14772	}
14773	for k, v := range m {
14774		switch k {
14775		case "properties":
14776			if v != nil {
14777				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
14778				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
14779				if err != nil {
14780					return err
14781				}
14782				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
14783			}
14784		case "etag":
14785			if v != nil {
14786				var etag string
14787				err = json.Unmarshal(*v, &etag)
14788				if err != nil {
14789					return err
14790				}
14791				rf.Etag = &etag
14792			}
14793		case "id":
14794			if v != nil {
14795				var ID string
14796				err = json.Unmarshal(*v, &ID)
14797				if err != nil {
14798					return err
14799				}
14800				rf.ID = &ID
14801			}
14802		case "name":
14803			if v != nil {
14804				var name string
14805				err = json.Unmarshal(*v, &name)
14806				if err != nil {
14807					return err
14808				}
14809				rf.Name = &name
14810			}
14811		case "type":
14812			if v != nil {
14813				var typeVar string
14814				err = json.Unmarshal(*v, &typeVar)
14815				if err != nil {
14816					return err
14817				}
14818				rf.Type = &typeVar
14819			}
14820		case "location":
14821			if v != nil {
14822				var location string
14823				err = json.Unmarshal(*v, &location)
14824				if err != nil {
14825					return err
14826				}
14827				rf.Location = &location
14828			}
14829		case "tags":
14830			if v != nil {
14831				var tags map[string]*string
14832				err = json.Unmarshal(*v, &tags)
14833				if err != nil {
14834					return err
14835				}
14836				rf.Tags = tags
14837			}
14838		}
14839	}
14840
14841	return nil
14842}
14843
14844// RouteFilterListResult response for the ListRouteFilters API service call.
14845type RouteFilterListResult struct {
14846	autorest.Response `json:"-"`
14847	// Value - Gets a list of route filters in a resource group.
14848	Value *[]RouteFilter `json:"value,omitempty"`
14849	// NextLink - The URL to get the next set of results.
14850	NextLink *string `json:"nextLink,omitempty"`
14851}
14852
14853// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
14854type RouteFilterListResultIterator struct {
14855	i    int
14856	page RouteFilterListResultPage
14857}
14858
14859// NextWithContext advances to the next value.  If there was an error making
14860// the request the iterator does not advance and the error is returned.
14861func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
14862	if tracing.IsEnabled() {
14863		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
14864		defer func() {
14865			sc := -1
14866			if iter.Response().Response.Response != nil {
14867				sc = iter.Response().Response.Response.StatusCode
14868			}
14869			tracing.EndSpan(ctx, sc, err)
14870		}()
14871	}
14872	iter.i++
14873	if iter.i < len(iter.page.Values()) {
14874		return nil
14875	}
14876	err = iter.page.NextWithContext(ctx)
14877	if err != nil {
14878		iter.i--
14879		return err
14880	}
14881	iter.i = 0
14882	return nil
14883}
14884
14885// Next advances to the next value.  If there was an error making
14886// the request the iterator does not advance and the error is returned.
14887// Deprecated: Use NextWithContext() instead.
14888func (iter *RouteFilterListResultIterator) Next() error {
14889	return iter.NextWithContext(context.Background())
14890}
14891
14892// NotDone returns true if the enumeration should be started or is not yet complete.
14893func (iter RouteFilterListResultIterator) NotDone() bool {
14894	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14895}
14896
14897// Response returns the raw server response from the last page request.
14898func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
14899	return iter.page.Response()
14900}
14901
14902// Value returns the current value or a zero-initialized value if the
14903// iterator has advanced beyond the end of the collection.
14904func (iter RouteFilterListResultIterator) Value() RouteFilter {
14905	if !iter.page.NotDone() {
14906		return RouteFilter{}
14907	}
14908	return iter.page.Values()[iter.i]
14909}
14910
14911// Creates a new instance of the RouteFilterListResultIterator type.
14912func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
14913	return RouteFilterListResultIterator{page: page}
14914}
14915
14916// IsEmpty returns true if the ListResult contains no values.
14917func (rflr RouteFilterListResult) IsEmpty() bool {
14918	return rflr.Value == nil || len(*rflr.Value) == 0
14919}
14920
14921// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
14922// It returns nil if no more results exist.
14923func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
14924	if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 {
14925		return nil, nil
14926	}
14927	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14928		autorest.AsJSON(),
14929		autorest.AsGet(),
14930		autorest.WithBaseURL(to.String(rflr.NextLink)))
14931}
14932
14933// RouteFilterListResultPage contains a page of RouteFilter values.
14934type RouteFilterListResultPage struct {
14935	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
14936	rflr RouteFilterListResult
14937}
14938
14939// NextWithContext advances to the next page of values.  If there was an error making
14940// the request the page does not advance and the error is returned.
14941func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
14942	if tracing.IsEnabled() {
14943		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
14944		defer func() {
14945			sc := -1
14946			if page.Response().Response.Response != nil {
14947				sc = page.Response().Response.Response.StatusCode
14948			}
14949			tracing.EndSpan(ctx, sc, err)
14950		}()
14951	}
14952	next, err := page.fn(ctx, page.rflr)
14953	if err != nil {
14954		return err
14955	}
14956	page.rflr = next
14957	return nil
14958}
14959
14960// Next advances to the next page of values.  If there was an error making
14961// the request the page does not advance and the error is returned.
14962// Deprecated: Use NextWithContext() instead.
14963func (page *RouteFilterListResultPage) Next() error {
14964	return page.NextWithContext(context.Background())
14965}
14966
14967// NotDone returns true if the page enumeration should be started or is not yet complete.
14968func (page RouteFilterListResultPage) NotDone() bool {
14969	return !page.rflr.IsEmpty()
14970}
14971
14972// Response returns the raw server response from the last page request.
14973func (page RouteFilterListResultPage) Response() RouteFilterListResult {
14974	return page.rflr
14975}
14976
14977// Values returns the slice of values for the current page or nil if there are no values.
14978func (page RouteFilterListResultPage) Values() []RouteFilter {
14979	if page.rflr.IsEmpty() {
14980		return nil
14981	}
14982	return *page.rflr.Value
14983}
14984
14985// Creates a new instance of the RouteFilterListResultPage type.
14986func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
14987	return RouteFilterListResultPage{fn: getNextPage}
14988}
14989
14990// RouteFilterPropertiesFormat route Filter Resource
14991type RouteFilterPropertiesFormat struct {
14992	// Rules - Collection of RouteFilterRules contained within a route filter.
14993	Rules *[]RouteFilterRule `json:"rules,omitempty"`
14994	// Peerings - A collection of references to express route circuit peerings.
14995	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
14996	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
14997	ProvisioningState *string `json:"provisioningState,omitempty"`
14998}
14999
15000// RouteFilterRule route Filter Rule Resource
15001type RouteFilterRule struct {
15002	autorest.Response                `json:"-"`
15003	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
15004	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15005	Name *string `json:"name,omitempty"`
15006	// Location - Resource location.
15007	Location *string `json:"location,omitempty"`
15008	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15009	Etag *string `json:"etag,omitempty"`
15010	// ID - Resource ID.
15011	ID *string `json:"id,omitempty"`
15012}
15013
15014// MarshalJSON is the custom marshaler for RouteFilterRule.
15015func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
15016	objectMap := make(map[string]interface{})
15017	if rfr.RouteFilterRulePropertiesFormat != nil {
15018		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
15019	}
15020	if rfr.Name != nil {
15021		objectMap["name"] = rfr.Name
15022	}
15023	if rfr.Location != nil {
15024		objectMap["location"] = rfr.Location
15025	}
15026	if rfr.ID != nil {
15027		objectMap["id"] = rfr.ID
15028	}
15029	return json.Marshal(objectMap)
15030}
15031
15032// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
15033func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
15034	var m map[string]*json.RawMessage
15035	err := json.Unmarshal(body, &m)
15036	if err != nil {
15037		return err
15038	}
15039	for k, v := range m {
15040		switch k {
15041		case "properties":
15042			if v != nil {
15043				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
15044				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
15045				if err != nil {
15046					return err
15047				}
15048				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
15049			}
15050		case "name":
15051			if v != nil {
15052				var name string
15053				err = json.Unmarshal(*v, &name)
15054				if err != nil {
15055					return err
15056				}
15057				rfr.Name = &name
15058			}
15059		case "location":
15060			if v != nil {
15061				var location string
15062				err = json.Unmarshal(*v, &location)
15063				if err != nil {
15064					return err
15065				}
15066				rfr.Location = &location
15067			}
15068		case "etag":
15069			if v != nil {
15070				var etag string
15071				err = json.Unmarshal(*v, &etag)
15072				if err != nil {
15073					return err
15074				}
15075				rfr.Etag = &etag
15076			}
15077		case "id":
15078			if v != nil {
15079				var ID string
15080				err = json.Unmarshal(*v, &ID)
15081				if err != nil {
15082					return err
15083				}
15084				rfr.ID = &ID
15085			}
15086		}
15087	}
15088
15089	return nil
15090}
15091
15092// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
15093type RouteFilterRuleListResult struct {
15094	autorest.Response `json:"-"`
15095	// Value - Gets a list of RouteFilterRules in a resource group.
15096	Value *[]RouteFilterRule `json:"value,omitempty"`
15097	// NextLink - The URL to get the next set of results.
15098	NextLink *string `json:"nextLink,omitempty"`
15099}
15100
15101// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
15102type RouteFilterRuleListResultIterator struct {
15103	i    int
15104	page RouteFilterRuleListResultPage
15105}
15106
15107// NextWithContext advances to the next value.  If there was an error making
15108// the request the iterator does not advance and the error is returned.
15109func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15110	if tracing.IsEnabled() {
15111		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
15112		defer func() {
15113			sc := -1
15114			if iter.Response().Response.Response != nil {
15115				sc = iter.Response().Response.Response.StatusCode
15116			}
15117			tracing.EndSpan(ctx, sc, err)
15118		}()
15119	}
15120	iter.i++
15121	if iter.i < len(iter.page.Values()) {
15122		return nil
15123	}
15124	err = iter.page.NextWithContext(ctx)
15125	if err != nil {
15126		iter.i--
15127		return err
15128	}
15129	iter.i = 0
15130	return nil
15131}
15132
15133// Next advances to the next value.  If there was an error making
15134// the request the iterator does not advance and the error is returned.
15135// Deprecated: Use NextWithContext() instead.
15136func (iter *RouteFilterRuleListResultIterator) Next() error {
15137	return iter.NextWithContext(context.Background())
15138}
15139
15140// NotDone returns true if the enumeration should be started or is not yet complete.
15141func (iter RouteFilterRuleListResultIterator) NotDone() bool {
15142	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15143}
15144
15145// Response returns the raw server response from the last page request.
15146func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
15147	return iter.page.Response()
15148}
15149
15150// Value returns the current value or a zero-initialized value if the
15151// iterator has advanced beyond the end of the collection.
15152func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
15153	if !iter.page.NotDone() {
15154		return RouteFilterRule{}
15155	}
15156	return iter.page.Values()[iter.i]
15157}
15158
15159// Creates a new instance of the RouteFilterRuleListResultIterator type.
15160func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
15161	return RouteFilterRuleListResultIterator{page: page}
15162}
15163
15164// IsEmpty returns true if the ListResult contains no values.
15165func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
15166	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
15167}
15168
15169// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
15170// It returns nil if no more results exist.
15171func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15172	if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 {
15173		return nil, nil
15174	}
15175	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15176		autorest.AsJSON(),
15177		autorest.AsGet(),
15178		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
15179}
15180
15181// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
15182type RouteFilterRuleListResultPage struct {
15183	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
15184	rfrlr RouteFilterRuleListResult
15185}
15186
15187// NextWithContext advances to the next page of values.  If there was an error making
15188// the request the page does not advance and the error is returned.
15189func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15190	if tracing.IsEnabled() {
15191		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
15192		defer func() {
15193			sc := -1
15194			if page.Response().Response.Response != nil {
15195				sc = page.Response().Response.Response.StatusCode
15196			}
15197			tracing.EndSpan(ctx, sc, err)
15198		}()
15199	}
15200	next, err := page.fn(ctx, page.rfrlr)
15201	if err != nil {
15202		return err
15203	}
15204	page.rfrlr = next
15205	return nil
15206}
15207
15208// Next advances to the next page of values.  If there was an error making
15209// the request the page does not advance and the error is returned.
15210// Deprecated: Use NextWithContext() instead.
15211func (page *RouteFilterRuleListResultPage) Next() error {
15212	return page.NextWithContext(context.Background())
15213}
15214
15215// NotDone returns true if the page enumeration should be started or is not yet complete.
15216func (page RouteFilterRuleListResultPage) NotDone() bool {
15217	return !page.rfrlr.IsEmpty()
15218}
15219
15220// Response returns the raw server response from the last page request.
15221func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
15222	return page.rfrlr
15223}
15224
15225// Values returns the slice of values for the current page or nil if there are no values.
15226func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
15227	if page.rfrlr.IsEmpty() {
15228		return nil
15229	}
15230	return *page.rfrlr.Value
15231}
15232
15233// Creates a new instance of the RouteFilterRuleListResultPage type.
15234func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
15235	return RouteFilterRuleListResultPage{fn: getNextPage}
15236}
15237
15238// RouteFilterRulePropertiesFormat route Filter Rule Resource
15239type RouteFilterRulePropertiesFormat struct {
15240	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
15241	Access Access `json:"access,omitempty"`
15242	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
15243	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
15244	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
15245	Communities *[]string `json:"communities,omitempty"`
15246	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
15247	ProvisioningState *string `json:"provisioningState,omitempty"`
15248}
15249
15250// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15251// long-running operation.
15252type RouteFilterRulesCreateOrUpdateFuture struct {
15253	azure.Future
15254}
15255
15256// Result returns the result of the asynchronous operation.
15257// If the operation has not completed it will return an error.
15258func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15259	var done bool
15260	done, err = future.DoneWithContext(context.Background(), client)
15261	if err != nil {
15262		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15263		return
15264	}
15265	if !done {
15266		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
15267		return
15268	}
15269	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15270	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15271		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
15272		if err != nil {
15273			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15274		}
15275	}
15276	return
15277}
15278
15279// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15280// operation.
15281type RouteFilterRulesDeleteFuture struct {
15282	azure.Future
15283}
15284
15285// Result returns the result of the asynchronous operation.
15286// If the operation has not completed it will return an error.
15287func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
15288	var done bool
15289	done, err = future.DoneWithContext(context.Background(), client)
15290	if err != nil {
15291		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15292		return
15293	}
15294	if !done {
15295		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
15296		return
15297	}
15298	ar.Response = future.Response()
15299	return
15300}
15301
15302// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15303// operation.
15304type RouteFilterRulesUpdateFuture struct {
15305	azure.Future
15306}
15307
15308// Result returns the result of the asynchronous operation.
15309// If the operation has not completed it will return an error.
15310func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15311	var done bool
15312	done, err = future.DoneWithContext(context.Background(), client)
15313	if err != nil {
15314		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
15315		return
15316	}
15317	if !done {
15318		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
15319		return
15320	}
15321	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15322	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15323		rfr, err = client.UpdateResponder(rfr.Response.Response)
15324		if err != nil {
15325			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15326		}
15327	}
15328	return
15329}
15330
15331// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15332// long-running operation.
15333type RouteFiltersCreateOrUpdateFuture struct {
15334	azure.Future
15335}
15336
15337// Result returns the result of the asynchronous operation.
15338// If the operation has not completed it will return an error.
15339func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
15340	var done bool
15341	done, err = future.DoneWithContext(context.Background(), client)
15342	if err != nil {
15343		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15344		return
15345	}
15346	if !done {
15347		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
15348		return
15349	}
15350	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15351	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15352		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
15353		if err != nil {
15354			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15355		}
15356	}
15357	return
15358}
15359
15360// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15361// operation.
15362type RouteFiltersDeleteFuture struct {
15363	azure.Future
15364}
15365
15366// Result returns the result of the asynchronous operation.
15367// If the operation has not completed it will return an error.
15368func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
15369	var done bool
15370	done, err = future.DoneWithContext(context.Background(), client)
15371	if err != nil {
15372		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
15373		return
15374	}
15375	if !done {
15376		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
15377		return
15378	}
15379	ar.Response = future.Response()
15380	return
15381}
15382
15383// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15384// operation.
15385type RouteFiltersUpdateFuture struct {
15386	azure.Future
15387}
15388
15389// Result returns the result of the asynchronous operation.
15390// If the operation has not completed it will return an error.
15391func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
15392	var done bool
15393	done, err = future.DoneWithContext(context.Background(), client)
15394	if err != nil {
15395		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
15396		return
15397	}
15398	if !done {
15399		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
15400		return
15401	}
15402	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15403	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15404		rf, err = client.UpdateResponder(rf.Response.Response)
15405		if err != nil {
15406			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15407		}
15408	}
15409	return
15410}
15411
15412// RouteListResult response for the ListRoute API service call
15413type RouteListResult struct {
15414	autorest.Response `json:"-"`
15415	// Value - Gets a list of routes in a resource group.
15416	Value *[]Route `json:"value,omitempty"`
15417	// NextLink - The URL to get the next set of results.
15418	NextLink *string `json:"nextLink,omitempty"`
15419}
15420
15421// RouteListResultIterator provides access to a complete listing of Route values.
15422type RouteListResultIterator struct {
15423	i    int
15424	page RouteListResultPage
15425}
15426
15427// NextWithContext advances to the next value.  If there was an error making
15428// the request the iterator does not advance and the error is returned.
15429func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
15430	if tracing.IsEnabled() {
15431		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
15432		defer func() {
15433			sc := -1
15434			if iter.Response().Response.Response != nil {
15435				sc = iter.Response().Response.Response.StatusCode
15436			}
15437			tracing.EndSpan(ctx, sc, err)
15438		}()
15439	}
15440	iter.i++
15441	if iter.i < len(iter.page.Values()) {
15442		return nil
15443	}
15444	err = iter.page.NextWithContext(ctx)
15445	if err != nil {
15446		iter.i--
15447		return err
15448	}
15449	iter.i = 0
15450	return nil
15451}
15452
15453// Next advances to the next value.  If there was an error making
15454// the request the iterator does not advance and the error is returned.
15455// Deprecated: Use NextWithContext() instead.
15456func (iter *RouteListResultIterator) Next() error {
15457	return iter.NextWithContext(context.Background())
15458}
15459
15460// NotDone returns true if the enumeration should be started or is not yet complete.
15461func (iter RouteListResultIterator) NotDone() bool {
15462	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15463}
15464
15465// Response returns the raw server response from the last page request.
15466func (iter RouteListResultIterator) Response() RouteListResult {
15467	return iter.page.Response()
15468}
15469
15470// Value returns the current value or a zero-initialized value if the
15471// iterator has advanced beyond the end of the collection.
15472func (iter RouteListResultIterator) Value() Route {
15473	if !iter.page.NotDone() {
15474		return Route{}
15475	}
15476	return iter.page.Values()[iter.i]
15477}
15478
15479// Creates a new instance of the RouteListResultIterator type.
15480func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
15481	return RouteListResultIterator{page: page}
15482}
15483
15484// IsEmpty returns true if the ListResult contains no values.
15485func (rlr RouteListResult) IsEmpty() bool {
15486	return rlr.Value == nil || len(*rlr.Value) == 0
15487}
15488
15489// routeListResultPreparer prepares a request to retrieve the next set of results.
15490// It returns nil if no more results exist.
15491func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
15492	if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
15493		return nil, nil
15494	}
15495	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15496		autorest.AsJSON(),
15497		autorest.AsGet(),
15498		autorest.WithBaseURL(to.String(rlr.NextLink)))
15499}
15500
15501// RouteListResultPage contains a page of Route values.
15502type RouteListResultPage struct {
15503	fn  func(context.Context, RouteListResult) (RouteListResult, error)
15504	rlr RouteListResult
15505}
15506
15507// NextWithContext advances to the next page of values.  If there was an error making
15508// the request the page does not advance and the error is returned.
15509func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
15510	if tracing.IsEnabled() {
15511		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
15512		defer func() {
15513			sc := -1
15514			if page.Response().Response.Response != nil {
15515				sc = page.Response().Response.Response.StatusCode
15516			}
15517			tracing.EndSpan(ctx, sc, err)
15518		}()
15519	}
15520	next, err := page.fn(ctx, page.rlr)
15521	if err != nil {
15522		return err
15523	}
15524	page.rlr = next
15525	return nil
15526}
15527
15528// Next advances to the next page of values.  If there was an error making
15529// the request the page does not advance and the error is returned.
15530// Deprecated: Use NextWithContext() instead.
15531func (page *RouteListResultPage) Next() error {
15532	return page.NextWithContext(context.Background())
15533}
15534
15535// NotDone returns true if the page enumeration should be started or is not yet complete.
15536func (page RouteListResultPage) NotDone() bool {
15537	return !page.rlr.IsEmpty()
15538}
15539
15540// Response returns the raw server response from the last page request.
15541func (page RouteListResultPage) Response() RouteListResult {
15542	return page.rlr
15543}
15544
15545// Values returns the slice of values for the current page or nil if there are no values.
15546func (page RouteListResultPage) Values() []Route {
15547	if page.rlr.IsEmpty() {
15548		return nil
15549	}
15550	return *page.rlr.Value
15551}
15552
15553// Creates a new instance of the RouteListResultPage type.
15554func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
15555	return RouteListResultPage{fn: getNextPage}
15556}
15557
15558// RoutePropertiesFormat route resource
15559type RoutePropertiesFormat struct {
15560	// AddressPrefix - The destination CIDR to which the route applies.
15561	AddressPrefix *string `json:"addressPrefix,omitempty"`
15562	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
15563	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
15564	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
15565	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
15566	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15567	ProvisioningState *string `json:"provisioningState,omitempty"`
15568}
15569
15570// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15571// operation.
15572type RoutesCreateOrUpdateFuture struct {
15573	azure.Future
15574}
15575
15576// Result returns the result of the asynchronous operation.
15577// If the operation has not completed it will return an error.
15578func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
15579	var done bool
15580	done, err = future.DoneWithContext(context.Background(), client)
15581	if err != nil {
15582		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15583		return
15584	}
15585	if !done {
15586		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
15587		return
15588	}
15589	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15590	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
15591		r, err = client.CreateOrUpdateResponder(r.Response.Response)
15592		if err != nil {
15593			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
15594		}
15595	}
15596	return
15597}
15598
15599// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
15600type RoutesDeleteFuture struct {
15601	azure.Future
15602}
15603
15604// Result returns the result of the asynchronous operation.
15605// If the operation has not completed it will return an error.
15606func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
15607	var done bool
15608	done, err = future.DoneWithContext(context.Background(), client)
15609	if err != nil {
15610		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
15611		return
15612	}
15613	if !done {
15614		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
15615		return
15616	}
15617	ar.Response = future.Response()
15618	return
15619}
15620
15621// RouteTable route table resource.
15622type RouteTable struct {
15623	autorest.Response `json:"-"`
15624	// RouteTablePropertiesFormat - Properties of the route table.
15625	*RouteTablePropertiesFormat `json:"properties,omitempty"`
15626	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15627	Etag *string `json:"etag,omitempty"`
15628	// ID - Resource ID.
15629	ID *string `json:"id,omitempty"`
15630	// Name - READ-ONLY; Resource name.
15631	Name *string `json:"name,omitempty"`
15632	// Type - READ-ONLY; Resource type.
15633	Type *string `json:"type,omitempty"`
15634	// Location - Resource location.
15635	Location *string `json:"location,omitempty"`
15636	// Tags - Resource tags.
15637	Tags map[string]*string `json:"tags"`
15638}
15639
15640// MarshalJSON is the custom marshaler for RouteTable.
15641func (rt RouteTable) MarshalJSON() ([]byte, error) {
15642	objectMap := make(map[string]interface{})
15643	if rt.RouteTablePropertiesFormat != nil {
15644		objectMap["properties"] = rt.RouteTablePropertiesFormat
15645	}
15646	if rt.Etag != nil {
15647		objectMap["etag"] = rt.Etag
15648	}
15649	if rt.ID != nil {
15650		objectMap["id"] = rt.ID
15651	}
15652	if rt.Location != nil {
15653		objectMap["location"] = rt.Location
15654	}
15655	if rt.Tags != nil {
15656		objectMap["tags"] = rt.Tags
15657	}
15658	return json.Marshal(objectMap)
15659}
15660
15661// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
15662func (rt *RouteTable) UnmarshalJSON(body []byte) error {
15663	var m map[string]*json.RawMessage
15664	err := json.Unmarshal(body, &m)
15665	if err != nil {
15666		return err
15667	}
15668	for k, v := range m {
15669		switch k {
15670		case "properties":
15671			if v != nil {
15672				var routeTablePropertiesFormat RouteTablePropertiesFormat
15673				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
15674				if err != nil {
15675					return err
15676				}
15677				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
15678			}
15679		case "etag":
15680			if v != nil {
15681				var etag string
15682				err = json.Unmarshal(*v, &etag)
15683				if err != nil {
15684					return err
15685				}
15686				rt.Etag = &etag
15687			}
15688		case "id":
15689			if v != nil {
15690				var ID string
15691				err = json.Unmarshal(*v, &ID)
15692				if err != nil {
15693					return err
15694				}
15695				rt.ID = &ID
15696			}
15697		case "name":
15698			if v != nil {
15699				var name string
15700				err = json.Unmarshal(*v, &name)
15701				if err != nil {
15702					return err
15703				}
15704				rt.Name = &name
15705			}
15706		case "type":
15707			if v != nil {
15708				var typeVar string
15709				err = json.Unmarshal(*v, &typeVar)
15710				if err != nil {
15711					return err
15712				}
15713				rt.Type = &typeVar
15714			}
15715		case "location":
15716			if v != nil {
15717				var location string
15718				err = json.Unmarshal(*v, &location)
15719				if err != nil {
15720					return err
15721				}
15722				rt.Location = &location
15723			}
15724		case "tags":
15725			if v != nil {
15726				var tags map[string]*string
15727				err = json.Unmarshal(*v, &tags)
15728				if err != nil {
15729					return err
15730				}
15731				rt.Tags = tags
15732			}
15733		}
15734	}
15735
15736	return nil
15737}
15738
15739// RouteTableListResult response for the ListRouteTable API service call.
15740type RouteTableListResult struct {
15741	autorest.Response `json:"-"`
15742	// Value - Gets a list of route tables in a resource group.
15743	Value *[]RouteTable `json:"value,omitempty"`
15744	// NextLink - The URL to get the next set of results.
15745	NextLink *string `json:"nextLink,omitempty"`
15746}
15747
15748// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
15749type RouteTableListResultIterator struct {
15750	i    int
15751	page RouteTableListResultPage
15752}
15753
15754// NextWithContext advances to the next value.  If there was an error making
15755// the request the iterator does not advance and the error is returned.
15756func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
15757	if tracing.IsEnabled() {
15758		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
15759		defer func() {
15760			sc := -1
15761			if iter.Response().Response.Response != nil {
15762				sc = iter.Response().Response.Response.StatusCode
15763			}
15764			tracing.EndSpan(ctx, sc, err)
15765		}()
15766	}
15767	iter.i++
15768	if iter.i < len(iter.page.Values()) {
15769		return nil
15770	}
15771	err = iter.page.NextWithContext(ctx)
15772	if err != nil {
15773		iter.i--
15774		return err
15775	}
15776	iter.i = 0
15777	return nil
15778}
15779
15780// Next advances to the next value.  If there was an error making
15781// the request the iterator does not advance and the error is returned.
15782// Deprecated: Use NextWithContext() instead.
15783func (iter *RouteTableListResultIterator) Next() error {
15784	return iter.NextWithContext(context.Background())
15785}
15786
15787// NotDone returns true if the enumeration should be started or is not yet complete.
15788func (iter RouteTableListResultIterator) NotDone() bool {
15789	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15790}
15791
15792// Response returns the raw server response from the last page request.
15793func (iter RouteTableListResultIterator) Response() RouteTableListResult {
15794	return iter.page.Response()
15795}
15796
15797// Value returns the current value or a zero-initialized value if the
15798// iterator has advanced beyond the end of the collection.
15799func (iter RouteTableListResultIterator) Value() RouteTable {
15800	if !iter.page.NotDone() {
15801		return RouteTable{}
15802	}
15803	return iter.page.Values()[iter.i]
15804}
15805
15806// Creates a new instance of the RouteTableListResultIterator type.
15807func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
15808	return RouteTableListResultIterator{page: page}
15809}
15810
15811// IsEmpty returns true if the ListResult contains no values.
15812func (rtlr RouteTableListResult) IsEmpty() bool {
15813	return rtlr.Value == nil || len(*rtlr.Value) == 0
15814}
15815
15816// routeTableListResultPreparer prepares a request to retrieve the next set of results.
15817// It returns nil if no more results exist.
15818func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
15819	if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 {
15820		return nil, nil
15821	}
15822	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15823		autorest.AsJSON(),
15824		autorest.AsGet(),
15825		autorest.WithBaseURL(to.String(rtlr.NextLink)))
15826}
15827
15828// RouteTableListResultPage contains a page of RouteTable values.
15829type RouteTableListResultPage struct {
15830	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
15831	rtlr RouteTableListResult
15832}
15833
15834// NextWithContext advances to the next page of values.  If there was an error making
15835// the request the page does not advance and the error is returned.
15836func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
15837	if tracing.IsEnabled() {
15838		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
15839		defer func() {
15840			sc := -1
15841			if page.Response().Response.Response != nil {
15842				sc = page.Response().Response.Response.StatusCode
15843			}
15844			tracing.EndSpan(ctx, sc, err)
15845		}()
15846	}
15847	next, err := page.fn(ctx, page.rtlr)
15848	if err != nil {
15849		return err
15850	}
15851	page.rtlr = next
15852	return nil
15853}
15854
15855// Next advances to the next page of values.  If there was an error making
15856// the request the page does not advance and the error is returned.
15857// Deprecated: Use NextWithContext() instead.
15858func (page *RouteTableListResultPage) Next() error {
15859	return page.NextWithContext(context.Background())
15860}
15861
15862// NotDone returns true if the page enumeration should be started or is not yet complete.
15863func (page RouteTableListResultPage) NotDone() bool {
15864	return !page.rtlr.IsEmpty()
15865}
15866
15867// Response returns the raw server response from the last page request.
15868func (page RouteTableListResultPage) Response() RouteTableListResult {
15869	return page.rtlr
15870}
15871
15872// Values returns the slice of values for the current page or nil if there are no values.
15873func (page RouteTableListResultPage) Values() []RouteTable {
15874	if page.rtlr.IsEmpty() {
15875		return nil
15876	}
15877	return *page.rtlr.Value
15878}
15879
15880// Creates a new instance of the RouteTableListResultPage type.
15881func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
15882	return RouteTableListResultPage{fn: getNextPage}
15883}
15884
15885// RouteTablePropertiesFormat route Table resource
15886type RouteTablePropertiesFormat struct {
15887	// Routes - Collection of routes contained within a route table.
15888	Routes *[]Route `json:"routes,omitempty"`
15889	// Subnets - READ-ONLY; A collection of references to subnets.
15890	Subnets *[]Subnet `json:"subnets,omitempty"`
15891	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
15892	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
15893	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15894	ProvisioningState *string `json:"provisioningState,omitempty"`
15895}
15896
15897// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15898// long-running operation.
15899type RouteTablesCreateOrUpdateFuture struct {
15900	azure.Future
15901}
15902
15903// Result returns the result of the asynchronous operation.
15904// If the operation has not completed it will return an error.
15905func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
15906	var done bool
15907	done, err = future.DoneWithContext(context.Background(), client)
15908	if err != nil {
15909		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15910		return
15911	}
15912	if !done {
15913		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
15914		return
15915	}
15916	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15917	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
15918		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
15919		if err != nil {
15920			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
15921		}
15922	}
15923	return
15924}
15925
15926// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15927// operation.
15928type RouteTablesDeleteFuture struct {
15929	azure.Future
15930}
15931
15932// Result returns the result of the asynchronous operation.
15933// If the operation has not completed it will return an error.
15934func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
15935	var done bool
15936	done, err = future.DoneWithContext(context.Background(), client)
15937	if err != nil {
15938		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
15939		return
15940	}
15941	if !done {
15942		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
15943		return
15944	}
15945	ar.Response = future.Response()
15946	return
15947}
15948
15949// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
15950// operation.
15951type RouteTablesUpdateTagsFuture struct {
15952	azure.Future
15953}
15954
15955// Result returns the result of the asynchronous operation.
15956// If the operation has not completed it will return an error.
15957func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
15958	var done bool
15959	done, err = future.DoneWithContext(context.Background(), client)
15960	if err != nil {
15961		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
15962		return
15963	}
15964	if !done {
15965		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
15966		return
15967	}
15968	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15969	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
15970		rt, err = client.UpdateTagsResponder(rt.Response.Response)
15971		if err != nil {
15972			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
15973		}
15974	}
15975	return
15976}
15977
15978// SecurityGroup networkSecurityGroup resource.
15979type SecurityGroup struct {
15980	autorest.Response `json:"-"`
15981	// SecurityGroupPropertiesFormat - Properties of the network security group
15982	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
15983	// Etag - A unique read-only string that changes whenever the resource is updated.
15984	Etag *string `json:"etag,omitempty"`
15985	// ID - Resource ID.
15986	ID *string `json:"id,omitempty"`
15987	// Name - READ-ONLY; Resource name.
15988	Name *string `json:"name,omitempty"`
15989	// Type - READ-ONLY; Resource type.
15990	Type *string `json:"type,omitempty"`
15991	// Location - Resource location.
15992	Location *string `json:"location,omitempty"`
15993	// Tags - Resource tags.
15994	Tags map[string]*string `json:"tags"`
15995}
15996
15997// MarshalJSON is the custom marshaler for SecurityGroup.
15998func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
15999	objectMap := make(map[string]interface{})
16000	if sg.SecurityGroupPropertiesFormat != nil {
16001		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
16002	}
16003	if sg.Etag != nil {
16004		objectMap["etag"] = sg.Etag
16005	}
16006	if sg.ID != nil {
16007		objectMap["id"] = sg.ID
16008	}
16009	if sg.Location != nil {
16010		objectMap["location"] = sg.Location
16011	}
16012	if sg.Tags != nil {
16013		objectMap["tags"] = sg.Tags
16014	}
16015	return json.Marshal(objectMap)
16016}
16017
16018// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
16019func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
16020	var m map[string]*json.RawMessage
16021	err := json.Unmarshal(body, &m)
16022	if err != nil {
16023		return err
16024	}
16025	for k, v := range m {
16026		switch k {
16027		case "properties":
16028			if v != nil {
16029				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
16030				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
16031				if err != nil {
16032					return err
16033				}
16034				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
16035			}
16036		case "etag":
16037			if v != nil {
16038				var etag string
16039				err = json.Unmarshal(*v, &etag)
16040				if err != nil {
16041					return err
16042				}
16043				sg.Etag = &etag
16044			}
16045		case "id":
16046			if v != nil {
16047				var ID string
16048				err = json.Unmarshal(*v, &ID)
16049				if err != nil {
16050					return err
16051				}
16052				sg.ID = &ID
16053			}
16054		case "name":
16055			if v != nil {
16056				var name string
16057				err = json.Unmarshal(*v, &name)
16058				if err != nil {
16059					return err
16060				}
16061				sg.Name = &name
16062			}
16063		case "type":
16064			if v != nil {
16065				var typeVar string
16066				err = json.Unmarshal(*v, &typeVar)
16067				if err != nil {
16068					return err
16069				}
16070				sg.Type = &typeVar
16071			}
16072		case "location":
16073			if v != nil {
16074				var location string
16075				err = json.Unmarshal(*v, &location)
16076				if err != nil {
16077					return err
16078				}
16079				sg.Location = &location
16080			}
16081		case "tags":
16082			if v != nil {
16083				var tags map[string]*string
16084				err = json.Unmarshal(*v, &tags)
16085				if err != nil {
16086					return err
16087				}
16088				sg.Tags = tags
16089			}
16090		}
16091	}
16092
16093	return nil
16094}
16095
16096// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
16097type SecurityGroupListResult struct {
16098	autorest.Response `json:"-"`
16099	// Value - A list of NetworkSecurityGroup resources.
16100	Value *[]SecurityGroup `json:"value,omitempty"`
16101	// NextLink - The URL to get the next set of results.
16102	NextLink *string `json:"nextLink,omitempty"`
16103}
16104
16105// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
16106type SecurityGroupListResultIterator struct {
16107	i    int
16108	page SecurityGroupListResultPage
16109}
16110
16111// NextWithContext advances to the next value.  If there was an error making
16112// the request the iterator does not advance and the error is returned.
16113func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
16114	if tracing.IsEnabled() {
16115		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
16116		defer func() {
16117			sc := -1
16118			if iter.Response().Response.Response != nil {
16119				sc = iter.Response().Response.Response.StatusCode
16120			}
16121			tracing.EndSpan(ctx, sc, err)
16122		}()
16123	}
16124	iter.i++
16125	if iter.i < len(iter.page.Values()) {
16126		return nil
16127	}
16128	err = iter.page.NextWithContext(ctx)
16129	if err != nil {
16130		iter.i--
16131		return err
16132	}
16133	iter.i = 0
16134	return nil
16135}
16136
16137// Next advances to the next value.  If there was an error making
16138// the request the iterator does not advance and the error is returned.
16139// Deprecated: Use NextWithContext() instead.
16140func (iter *SecurityGroupListResultIterator) Next() error {
16141	return iter.NextWithContext(context.Background())
16142}
16143
16144// NotDone returns true if the enumeration should be started or is not yet complete.
16145func (iter SecurityGroupListResultIterator) NotDone() bool {
16146	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16147}
16148
16149// Response returns the raw server response from the last page request.
16150func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
16151	return iter.page.Response()
16152}
16153
16154// Value returns the current value or a zero-initialized value if the
16155// iterator has advanced beyond the end of the collection.
16156func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
16157	if !iter.page.NotDone() {
16158		return SecurityGroup{}
16159	}
16160	return iter.page.Values()[iter.i]
16161}
16162
16163// Creates a new instance of the SecurityGroupListResultIterator type.
16164func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
16165	return SecurityGroupListResultIterator{page: page}
16166}
16167
16168// IsEmpty returns true if the ListResult contains no values.
16169func (sglr SecurityGroupListResult) IsEmpty() bool {
16170	return sglr.Value == nil || len(*sglr.Value) == 0
16171}
16172
16173// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
16174// It returns nil if no more results exist.
16175func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
16176	if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
16177		return nil, nil
16178	}
16179	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16180		autorest.AsJSON(),
16181		autorest.AsGet(),
16182		autorest.WithBaseURL(to.String(sglr.NextLink)))
16183}
16184
16185// SecurityGroupListResultPage contains a page of SecurityGroup values.
16186type SecurityGroupListResultPage struct {
16187	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
16188	sglr SecurityGroupListResult
16189}
16190
16191// NextWithContext advances to the next page of values.  If there was an error making
16192// the request the page does not advance and the error is returned.
16193func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
16194	if tracing.IsEnabled() {
16195		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
16196		defer func() {
16197			sc := -1
16198			if page.Response().Response.Response != nil {
16199				sc = page.Response().Response.Response.StatusCode
16200			}
16201			tracing.EndSpan(ctx, sc, err)
16202		}()
16203	}
16204	next, err := page.fn(ctx, page.sglr)
16205	if err != nil {
16206		return err
16207	}
16208	page.sglr = next
16209	return nil
16210}
16211
16212// Next advances to the next page of values.  If there was an error making
16213// the request the page does not advance and the error is returned.
16214// Deprecated: Use NextWithContext() instead.
16215func (page *SecurityGroupListResultPage) Next() error {
16216	return page.NextWithContext(context.Background())
16217}
16218
16219// NotDone returns true if the page enumeration should be started or is not yet complete.
16220func (page SecurityGroupListResultPage) NotDone() bool {
16221	return !page.sglr.IsEmpty()
16222}
16223
16224// Response returns the raw server response from the last page request.
16225func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
16226	return page.sglr
16227}
16228
16229// Values returns the slice of values for the current page or nil if there are no values.
16230func (page SecurityGroupListResultPage) Values() []SecurityGroup {
16231	if page.sglr.IsEmpty() {
16232		return nil
16233	}
16234	return *page.sglr.Value
16235}
16236
16237// Creates a new instance of the SecurityGroupListResultPage type.
16238func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
16239	return SecurityGroupListResultPage{fn: getNextPage}
16240}
16241
16242// SecurityGroupNetworkInterface network interface and all its associated security rules.
16243type SecurityGroupNetworkInterface struct {
16244	// ID - ID of the network interface.
16245	ID                       *string                   `json:"id,omitempty"`
16246	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
16247}
16248
16249// SecurityGroupPropertiesFormat network Security Group resource.
16250type SecurityGroupPropertiesFormat struct {
16251	// SecurityRules - A collection of security rules of the network security group.
16252	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
16253	// DefaultSecurityRules - The default security rules of network security group.
16254	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
16255	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
16256	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
16257	// Subnets - READ-ONLY; A collection of references to subnets.
16258	Subnets *[]Subnet `json:"subnets,omitempty"`
16259	// ResourceGUID - The resource GUID property of the network security group resource.
16260	ResourceGUID *string `json:"resourceGuid,omitempty"`
16261	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16262	ProvisioningState *string `json:"provisioningState,omitempty"`
16263}
16264
16265// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16266// long-running operation.
16267type SecurityGroupsCreateOrUpdateFuture struct {
16268	azure.Future
16269}
16270
16271// Result returns the result of the asynchronous operation.
16272// If the operation has not completed it will return an error.
16273func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16274	var done bool
16275	done, err = future.DoneWithContext(context.Background(), client)
16276	if err != nil {
16277		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16278		return
16279	}
16280	if !done {
16281		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
16282		return
16283	}
16284	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16285	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16286		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
16287		if err != nil {
16288			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
16289		}
16290	}
16291	return
16292}
16293
16294// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16295// operation.
16296type SecurityGroupsDeleteFuture struct {
16297	azure.Future
16298}
16299
16300// Result returns the result of the asynchronous operation.
16301// If the operation has not completed it will return an error.
16302func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
16303	var done bool
16304	done, err = future.DoneWithContext(context.Background(), client)
16305	if err != nil {
16306		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
16307		return
16308	}
16309	if !done {
16310		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
16311		return
16312	}
16313	ar.Response = future.Response()
16314	return
16315}
16316
16317// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16318// long-running operation.
16319type SecurityGroupsUpdateTagsFuture struct {
16320	azure.Future
16321}
16322
16323// Result returns the result of the asynchronous operation.
16324// If the operation has not completed it will return an error.
16325func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16326	var done bool
16327	done, err = future.DoneWithContext(context.Background(), client)
16328	if err != nil {
16329		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16330		return
16331	}
16332	if !done {
16333		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
16334		return
16335	}
16336	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16337	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16338		sg, err = client.UpdateTagsResponder(sg.Response.Response)
16339		if err != nil {
16340			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
16341		}
16342	}
16343	return
16344}
16345
16346// SecurityGroupViewParameters parameters that define the VM to check security groups for.
16347type SecurityGroupViewParameters struct {
16348	// TargetResourceID - ID of the target VM.
16349	TargetResourceID *string `json:"targetResourceId,omitempty"`
16350}
16351
16352// SecurityGroupViewResult the information about security rules applied to the specified VM.
16353type SecurityGroupViewResult struct {
16354	autorest.Response `json:"-"`
16355	// NetworkInterfaces - List of network interfaces on the specified VM.
16356	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
16357}
16358
16359// SecurityRule network security rule.
16360type SecurityRule struct {
16361	autorest.Response `json:"-"`
16362	// SecurityRulePropertiesFormat - Properties of the security rule
16363	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
16364	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16365	Name *string `json:"name,omitempty"`
16366	// Etag - A unique read-only string that changes whenever the resource is updated.
16367	Etag *string `json:"etag,omitempty"`
16368	// ID - Resource ID.
16369	ID *string `json:"id,omitempty"`
16370}
16371
16372// MarshalJSON is the custom marshaler for SecurityRule.
16373func (sr SecurityRule) MarshalJSON() ([]byte, error) {
16374	objectMap := make(map[string]interface{})
16375	if sr.SecurityRulePropertiesFormat != nil {
16376		objectMap["properties"] = sr.SecurityRulePropertiesFormat
16377	}
16378	if sr.Name != nil {
16379		objectMap["name"] = sr.Name
16380	}
16381	if sr.Etag != nil {
16382		objectMap["etag"] = sr.Etag
16383	}
16384	if sr.ID != nil {
16385		objectMap["id"] = sr.ID
16386	}
16387	return json.Marshal(objectMap)
16388}
16389
16390// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
16391func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
16392	var m map[string]*json.RawMessage
16393	err := json.Unmarshal(body, &m)
16394	if err != nil {
16395		return err
16396	}
16397	for k, v := range m {
16398		switch k {
16399		case "properties":
16400			if v != nil {
16401				var securityRulePropertiesFormat SecurityRulePropertiesFormat
16402				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
16403				if err != nil {
16404					return err
16405				}
16406				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
16407			}
16408		case "name":
16409			if v != nil {
16410				var name string
16411				err = json.Unmarshal(*v, &name)
16412				if err != nil {
16413					return err
16414				}
16415				sr.Name = &name
16416			}
16417		case "etag":
16418			if v != nil {
16419				var etag string
16420				err = json.Unmarshal(*v, &etag)
16421				if err != nil {
16422					return err
16423				}
16424				sr.Etag = &etag
16425			}
16426		case "id":
16427			if v != nil {
16428				var ID string
16429				err = json.Unmarshal(*v, &ID)
16430				if err != nil {
16431					return err
16432				}
16433				sr.ID = &ID
16434			}
16435		}
16436	}
16437
16438	return nil
16439}
16440
16441// SecurityRuleAssociations all security rules associated with the network interface.
16442type SecurityRuleAssociations struct {
16443	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
16444	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
16445	// DefaultSecurityRules - Collection of default security rules of the network security group.
16446	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
16447	// EffectiveSecurityRules - Collection of effective security rules.
16448	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
16449}
16450
16451// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
16452// belongs to a network security group.
16453type SecurityRuleListResult struct {
16454	autorest.Response `json:"-"`
16455	// Value - The security rules in a network security group.
16456	Value *[]SecurityRule `json:"value,omitempty"`
16457	// NextLink - The URL to get the next set of results.
16458	NextLink *string `json:"nextLink,omitempty"`
16459}
16460
16461// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
16462type SecurityRuleListResultIterator struct {
16463	i    int
16464	page SecurityRuleListResultPage
16465}
16466
16467// NextWithContext advances to the next value.  If there was an error making
16468// the request the iterator does not advance and the error is returned.
16469func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16470	if tracing.IsEnabled() {
16471		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
16472		defer func() {
16473			sc := -1
16474			if iter.Response().Response.Response != nil {
16475				sc = iter.Response().Response.Response.StatusCode
16476			}
16477			tracing.EndSpan(ctx, sc, err)
16478		}()
16479	}
16480	iter.i++
16481	if iter.i < len(iter.page.Values()) {
16482		return nil
16483	}
16484	err = iter.page.NextWithContext(ctx)
16485	if err != nil {
16486		iter.i--
16487		return err
16488	}
16489	iter.i = 0
16490	return nil
16491}
16492
16493// Next advances to the next value.  If there was an error making
16494// the request the iterator does not advance and the error is returned.
16495// Deprecated: Use NextWithContext() instead.
16496func (iter *SecurityRuleListResultIterator) Next() error {
16497	return iter.NextWithContext(context.Background())
16498}
16499
16500// NotDone returns true if the enumeration should be started or is not yet complete.
16501func (iter SecurityRuleListResultIterator) NotDone() bool {
16502	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16503}
16504
16505// Response returns the raw server response from the last page request.
16506func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
16507	return iter.page.Response()
16508}
16509
16510// Value returns the current value or a zero-initialized value if the
16511// iterator has advanced beyond the end of the collection.
16512func (iter SecurityRuleListResultIterator) Value() SecurityRule {
16513	if !iter.page.NotDone() {
16514		return SecurityRule{}
16515	}
16516	return iter.page.Values()[iter.i]
16517}
16518
16519// Creates a new instance of the SecurityRuleListResultIterator type.
16520func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
16521	return SecurityRuleListResultIterator{page: page}
16522}
16523
16524// IsEmpty returns true if the ListResult contains no values.
16525func (srlr SecurityRuleListResult) IsEmpty() bool {
16526	return srlr.Value == nil || len(*srlr.Value) == 0
16527}
16528
16529// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
16530// It returns nil if no more results exist.
16531func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16532	if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 {
16533		return nil, nil
16534	}
16535	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16536		autorest.AsJSON(),
16537		autorest.AsGet(),
16538		autorest.WithBaseURL(to.String(srlr.NextLink)))
16539}
16540
16541// SecurityRuleListResultPage contains a page of SecurityRule values.
16542type SecurityRuleListResultPage struct {
16543	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
16544	srlr SecurityRuleListResult
16545}
16546
16547// NextWithContext advances to the next page of values.  If there was an error making
16548// the request the page does not advance and the error is returned.
16549func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16550	if tracing.IsEnabled() {
16551		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
16552		defer func() {
16553			sc := -1
16554			if page.Response().Response.Response != nil {
16555				sc = page.Response().Response.Response.StatusCode
16556			}
16557			tracing.EndSpan(ctx, sc, err)
16558		}()
16559	}
16560	next, err := page.fn(ctx, page.srlr)
16561	if err != nil {
16562		return err
16563	}
16564	page.srlr = next
16565	return nil
16566}
16567
16568// Next advances to the next page of values.  If there was an error making
16569// the request the page does not advance and the error is returned.
16570// Deprecated: Use NextWithContext() instead.
16571func (page *SecurityRuleListResultPage) Next() error {
16572	return page.NextWithContext(context.Background())
16573}
16574
16575// NotDone returns true if the page enumeration should be started or is not yet complete.
16576func (page SecurityRuleListResultPage) NotDone() bool {
16577	return !page.srlr.IsEmpty()
16578}
16579
16580// Response returns the raw server response from the last page request.
16581func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
16582	return page.srlr
16583}
16584
16585// Values returns the slice of values for the current page or nil if there are no values.
16586func (page SecurityRuleListResultPage) Values() []SecurityRule {
16587	if page.srlr.IsEmpty() {
16588		return nil
16589	}
16590	return *page.srlr.Value
16591}
16592
16593// Creates a new instance of the SecurityRuleListResultPage type.
16594func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
16595	return SecurityRuleListResultPage{fn: getNextPage}
16596}
16597
16598// SecurityRulePropertiesFormat security rule resource.
16599type SecurityRulePropertiesFormat struct {
16600	// Description - A description for this rule. Restricted to 140 chars.
16601	Description *string `json:"description,omitempty"`
16602	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
16603	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
16604	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
16605	SourcePortRange *string `json:"sourcePortRange,omitempty"`
16606	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
16607	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
16608	// SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
16609	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
16610	// SourceAddressPrefixes - The CIDR or source IP ranges.
16611	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
16612	// SourceApplicationSecurityGroups - The application security group specified as source.
16613	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
16614	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
16615	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
16616	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
16617	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
16618	// DestinationApplicationSecurityGroups - The application security group specified as destination.
16619	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
16620	// SourcePortRanges - The source port ranges.
16621	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
16622	// DestinationPortRanges - The destination port ranges.
16623	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
16624	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
16625	Access SecurityRuleAccess `json:"access,omitempty"`
16626	// Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
16627	Priority *int32 `json:"priority,omitempty"`
16628	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
16629	Direction SecurityRuleDirection `json:"direction,omitempty"`
16630	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16631	ProvisioningState *string `json:"provisioningState,omitempty"`
16632}
16633
16634// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16635// long-running operation.
16636type SecurityRulesCreateOrUpdateFuture struct {
16637	azure.Future
16638}
16639
16640// Result returns the result of the asynchronous operation.
16641// If the operation has not completed it will return an error.
16642func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
16643	var done bool
16644	done, err = future.DoneWithContext(context.Background(), client)
16645	if err != nil {
16646		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16647		return
16648	}
16649	if !done {
16650		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
16651		return
16652	}
16653	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16654	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
16655		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
16656		if err != nil {
16657			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
16658		}
16659	}
16660	return
16661}
16662
16663// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16664// operation.
16665type SecurityRulesDeleteFuture struct {
16666	azure.Future
16667}
16668
16669// Result returns the result of the asynchronous operation.
16670// If the operation has not completed it will return an error.
16671func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
16672	var done bool
16673	done, err = future.DoneWithContext(context.Background(), client)
16674	if err != nil {
16675		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
16676		return
16677	}
16678	if !done {
16679		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
16680		return
16681	}
16682	ar.Response = future.Response()
16683	return
16684}
16685
16686// ServiceEndpointPropertiesFormat the service endpoint properties.
16687type ServiceEndpointPropertiesFormat struct {
16688	// Service - The type of the endpoint service.
16689	Service *string `json:"service,omitempty"`
16690	// Locations - A list of locations.
16691	Locations *[]string `json:"locations,omitempty"`
16692	// ProvisioningState - The provisioning state of the resource.
16693	ProvisioningState *string `json:"provisioningState,omitempty"`
16694}
16695
16696// String ...
16697type String struct {
16698	autorest.Response `json:"-"`
16699	Value             *string `json:"value,omitempty"`
16700}
16701
16702// Subnet subnet in a virtual network resource.
16703type Subnet struct {
16704	autorest.Response `json:"-"`
16705	// SubnetPropertiesFormat - Properties of the subnet.
16706	*SubnetPropertiesFormat `json:"properties,omitempty"`
16707	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16708	Name *string `json:"name,omitempty"`
16709	// Etag - A unique read-only string that changes whenever the resource is updated.
16710	Etag *string `json:"etag,omitempty"`
16711	// ID - Resource ID.
16712	ID *string `json:"id,omitempty"`
16713}
16714
16715// MarshalJSON is the custom marshaler for Subnet.
16716func (s Subnet) MarshalJSON() ([]byte, error) {
16717	objectMap := make(map[string]interface{})
16718	if s.SubnetPropertiesFormat != nil {
16719		objectMap["properties"] = s.SubnetPropertiesFormat
16720	}
16721	if s.Name != nil {
16722		objectMap["name"] = s.Name
16723	}
16724	if s.Etag != nil {
16725		objectMap["etag"] = s.Etag
16726	}
16727	if s.ID != nil {
16728		objectMap["id"] = s.ID
16729	}
16730	return json.Marshal(objectMap)
16731}
16732
16733// UnmarshalJSON is the custom unmarshaler for Subnet struct.
16734func (s *Subnet) UnmarshalJSON(body []byte) error {
16735	var m map[string]*json.RawMessage
16736	err := json.Unmarshal(body, &m)
16737	if err != nil {
16738		return err
16739	}
16740	for k, v := range m {
16741		switch k {
16742		case "properties":
16743			if v != nil {
16744				var subnetPropertiesFormat SubnetPropertiesFormat
16745				err = json.Unmarshal(*v, &subnetPropertiesFormat)
16746				if err != nil {
16747					return err
16748				}
16749				s.SubnetPropertiesFormat = &subnetPropertiesFormat
16750			}
16751		case "name":
16752			if v != nil {
16753				var name string
16754				err = json.Unmarshal(*v, &name)
16755				if err != nil {
16756					return err
16757				}
16758				s.Name = &name
16759			}
16760		case "etag":
16761			if v != nil {
16762				var etag string
16763				err = json.Unmarshal(*v, &etag)
16764				if err != nil {
16765					return err
16766				}
16767				s.Etag = &etag
16768			}
16769		case "id":
16770			if v != nil {
16771				var ID string
16772				err = json.Unmarshal(*v, &ID)
16773				if err != nil {
16774					return err
16775				}
16776				s.ID = &ID
16777			}
16778		}
16779	}
16780
16781	return nil
16782}
16783
16784// SubnetAssociation network interface and its custom security rules.
16785type SubnetAssociation struct {
16786	// ID - READ-ONLY; Subnet ID.
16787	ID *string `json:"id,omitempty"`
16788	// SecurityRules - Collection of custom security rules.
16789	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
16790}
16791
16792// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
16793// network
16794type SubnetListResult struct {
16795	autorest.Response `json:"-"`
16796	// Value - The subnets in a virtual network.
16797	Value *[]Subnet `json:"value,omitempty"`
16798	// NextLink - The URL to get the next set of results.
16799	NextLink *string `json:"nextLink,omitempty"`
16800}
16801
16802// SubnetListResultIterator provides access to a complete listing of Subnet values.
16803type SubnetListResultIterator struct {
16804	i    int
16805	page SubnetListResultPage
16806}
16807
16808// NextWithContext advances to the next value.  If there was an error making
16809// the request the iterator does not advance and the error is returned.
16810func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
16811	if tracing.IsEnabled() {
16812		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
16813		defer func() {
16814			sc := -1
16815			if iter.Response().Response.Response != nil {
16816				sc = iter.Response().Response.Response.StatusCode
16817			}
16818			tracing.EndSpan(ctx, sc, err)
16819		}()
16820	}
16821	iter.i++
16822	if iter.i < len(iter.page.Values()) {
16823		return nil
16824	}
16825	err = iter.page.NextWithContext(ctx)
16826	if err != nil {
16827		iter.i--
16828		return err
16829	}
16830	iter.i = 0
16831	return nil
16832}
16833
16834// Next advances to the next value.  If there was an error making
16835// the request the iterator does not advance and the error is returned.
16836// Deprecated: Use NextWithContext() instead.
16837func (iter *SubnetListResultIterator) Next() error {
16838	return iter.NextWithContext(context.Background())
16839}
16840
16841// NotDone returns true if the enumeration should be started or is not yet complete.
16842func (iter SubnetListResultIterator) NotDone() bool {
16843	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16844}
16845
16846// Response returns the raw server response from the last page request.
16847func (iter SubnetListResultIterator) Response() SubnetListResult {
16848	return iter.page.Response()
16849}
16850
16851// Value returns the current value or a zero-initialized value if the
16852// iterator has advanced beyond the end of the collection.
16853func (iter SubnetListResultIterator) Value() Subnet {
16854	if !iter.page.NotDone() {
16855		return Subnet{}
16856	}
16857	return iter.page.Values()[iter.i]
16858}
16859
16860// Creates a new instance of the SubnetListResultIterator type.
16861func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
16862	return SubnetListResultIterator{page: page}
16863}
16864
16865// IsEmpty returns true if the ListResult contains no values.
16866func (slr SubnetListResult) IsEmpty() bool {
16867	return slr.Value == nil || len(*slr.Value) == 0
16868}
16869
16870// subnetListResultPreparer prepares a request to retrieve the next set of results.
16871// It returns nil if no more results exist.
16872func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
16873	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
16874		return nil, nil
16875	}
16876	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16877		autorest.AsJSON(),
16878		autorest.AsGet(),
16879		autorest.WithBaseURL(to.String(slr.NextLink)))
16880}
16881
16882// SubnetListResultPage contains a page of Subnet values.
16883type SubnetListResultPage struct {
16884	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
16885	slr SubnetListResult
16886}
16887
16888// NextWithContext advances to the next page of values.  If there was an error making
16889// the request the page does not advance and the error is returned.
16890func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
16891	if tracing.IsEnabled() {
16892		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
16893		defer func() {
16894			sc := -1
16895			if page.Response().Response.Response != nil {
16896				sc = page.Response().Response.Response.StatusCode
16897			}
16898			tracing.EndSpan(ctx, sc, err)
16899		}()
16900	}
16901	next, err := page.fn(ctx, page.slr)
16902	if err != nil {
16903		return err
16904	}
16905	page.slr = next
16906	return nil
16907}
16908
16909// Next advances to the next page of values.  If there was an error making
16910// the request the page does not advance and the error is returned.
16911// Deprecated: Use NextWithContext() instead.
16912func (page *SubnetListResultPage) Next() error {
16913	return page.NextWithContext(context.Background())
16914}
16915
16916// NotDone returns true if the page enumeration should be started or is not yet complete.
16917func (page SubnetListResultPage) NotDone() bool {
16918	return !page.slr.IsEmpty()
16919}
16920
16921// Response returns the raw server response from the last page request.
16922func (page SubnetListResultPage) Response() SubnetListResult {
16923	return page.slr
16924}
16925
16926// Values returns the slice of values for the current page or nil if there are no values.
16927func (page SubnetListResultPage) Values() []Subnet {
16928	if page.slr.IsEmpty() {
16929		return nil
16930	}
16931	return *page.slr.Value
16932}
16933
16934// Creates a new instance of the SubnetListResultPage type.
16935func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
16936	return SubnetListResultPage{fn: getNextPage}
16937}
16938
16939// SubnetPropertiesFormat properties of the subnet.
16940type SubnetPropertiesFormat struct {
16941	// AddressPrefix - The address prefix for the subnet.
16942	AddressPrefix *string `json:"addressPrefix,omitempty"`
16943	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
16944	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
16945	// RouteTable - The reference of the RouteTable resource.
16946	RouteTable *RouteTable `json:"routeTable,omitempty"`
16947	// ServiceEndpoints - An array of service endpoints.
16948	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
16949	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
16950	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
16951	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
16952	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
16953	// ProvisioningState - The provisioning state of the resource.
16954	ProvisioningState *string `json:"provisioningState,omitempty"`
16955}
16956
16957// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
16958// operation.
16959type SubnetsCreateOrUpdateFuture struct {
16960	azure.Future
16961}
16962
16963// Result returns the result of the asynchronous operation.
16964// If the operation has not completed it will return an error.
16965func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
16966	var done bool
16967	done, err = future.DoneWithContext(context.Background(), client)
16968	if err != nil {
16969		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16970		return
16971	}
16972	if !done {
16973		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
16974		return
16975	}
16976	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16977	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
16978		s, err = client.CreateOrUpdateResponder(s.Response.Response)
16979		if err != nil {
16980			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
16981		}
16982	}
16983	return
16984}
16985
16986// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16987// operation.
16988type SubnetsDeleteFuture struct {
16989	azure.Future
16990}
16991
16992// Result returns the result of the asynchronous operation.
16993// If the operation has not completed it will return an error.
16994func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
16995	var done bool
16996	done, err = future.DoneWithContext(context.Background(), client)
16997	if err != nil {
16998		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
16999		return
17000	}
17001	if !done {
17002		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
17003		return
17004	}
17005	ar.Response = future.Response()
17006	return
17007}
17008
17009// SubResource reference to another subresource.
17010type SubResource struct {
17011	// ID - Resource ID.
17012	ID *string `json:"id,omitempty"`
17013}
17014
17015// TagsObject tags object for patch operations.
17016type TagsObject struct {
17017	// Tags - Resource tags.
17018	Tags map[string]*string `json:"tags"`
17019}
17020
17021// MarshalJSON is the custom marshaler for TagsObject.
17022func (toVar TagsObject) MarshalJSON() ([]byte, error) {
17023	objectMap := make(map[string]interface{})
17024	if toVar.Tags != nil {
17025		objectMap["tags"] = toVar.Tags
17026	}
17027	return json.Marshal(objectMap)
17028}
17029
17030// Topology topology of the specified resource group.
17031type Topology struct {
17032	autorest.Response `json:"-"`
17033	// ID - READ-ONLY; GUID representing the operation id.
17034	ID *string `json:"id,omitempty"`
17035	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
17036	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
17037	// LastModified - READ-ONLY; The datetime when the topology was last modified.
17038	LastModified *date.Time          `json:"lastModified,omitempty"`
17039	Resources    *[]TopologyResource `json:"resources,omitempty"`
17040}
17041
17042// TopologyAssociation resources that have an association with the parent resource.
17043type TopologyAssociation struct {
17044	// Name - The name of the resource that is associated with the parent resource.
17045	Name *string `json:"name,omitempty"`
17046	// ResourceID - The ID of the resource that is associated with the parent resource.
17047	ResourceID *string `json:"resourceId,omitempty"`
17048	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
17049	AssociationType AssociationType `json:"associationType,omitempty"`
17050}
17051
17052// TopologyParameters parameters that define the representation of topology.
17053type TopologyParameters struct {
17054	// TargetResourceGroupName - The name of the target resource group to perform topology on.
17055	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
17056	// TargetVirtualNetwork - The reference of the Virtual Network resource.
17057	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
17058	// TargetSubnet - The reference of the Subnet resource.
17059	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
17060}
17061
17062// TopologyResource the network resource topology information for the given resource group.
17063type TopologyResource struct {
17064	// Name - Name of the resource.
17065	Name *string `json:"name,omitempty"`
17066	// ID - ID of the resource.
17067	ID *string `json:"id,omitempty"`
17068	// Location - Resource location.
17069	Location *string `json:"location,omitempty"`
17070	// Associations - Holds the associations the resource has with other resources in the resource group.
17071	Associations *[]TopologyAssociation `json:"associations,omitempty"`
17072}
17073
17074// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
17075type TrafficAnalyticsConfigurationProperties struct {
17076	// Enabled - Flag to enable/disable traffic analytics.
17077	Enabled *bool `json:"enabled,omitempty"`
17078	// WorkspaceID - The resource guid of the attached workspace
17079	WorkspaceID *string `json:"workspaceId,omitempty"`
17080	// WorkspaceRegion - The location of the attached workspace
17081	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
17082	// WorkspaceResourceID - Resource Id of the attached workspace
17083	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
17084}
17085
17086// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
17087type TrafficAnalyticsProperties struct {
17088	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
17089}
17090
17091// TroubleshootingDetails information gained from troubleshooting of specified resource.
17092type TroubleshootingDetails struct {
17093	// ID - The id of the get troubleshoot operation.
17094	ID *string `json:"id,omitempty"`
17095	// ReasonType - Reason type of failure.
17096	ReasonType *string `json:"reasonType,omitempty"`
17097	// Summary - A summary of troubleshooting.
17098	Summary *string `json:"summary,omitempty"`
17099	// Detail - Details on troubleshooting results.
17100	Detail *string `json:"detail,omitempty"`
17101	// RecommendedActions - List of recommended actions.
17102	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
17103}
17104
17105// TroubleshootingParameters parameters that define the resource to troubleshoot.
17106type TroubleshootingParameters struct {
17107	// TargetResourceID - The target resource to troubleshoot.
17108	TargetResourceID           *string `json:"targetResourceId,omitempty"`
17109	*TroubleshootingProperties `json:"properties,omitempty"`
17110}
17111
17112// MarshalJSON is the custom marshaler for TroubleshootingParameters.
17113func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
17114	objectMap := make(map[string]interface{})
17115	if tp.TargetResourceID != nil {
17116		objectMap["targetResourceId"] = tp.TargetResourceID
17117	}
17118	if tp.TroubleshootingProperties != nil {
17119		objectMap["properties"] = tp.TroubleshootingProperties
17120	}
17121	return json.Marshal(objectMap)
17122}
17123
17124// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
17125func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
17126	var m map[string]*json.RawMessage
17127	err := json.Unmarshal(body, &m)
17128	if err != nil {
17129		return err
17130	}
17131	for k, v := range m {
17132		switch k {
17133		case "targetResourceId":
17134			if v != nil {
17135				var targetResourceID string
17136				err = json.Unmarshal(*v, &targetResourceID)
17137				if err != nil {
17138					return err
17139				}
17140				tp.TargetResourceID = &targetResourceID
17141			}
17142		case "properties":
17143			if v != nil {
17144				var troubleshootingProperties TroubleshootingProperties
17145				err = json.Unmarshal(*v, &troubleshootingProperties)
17146				if err != nil {
17147					return err
17148				}
17149				tp.TroubleshootingProperties = &troubleshootingProperties
17150			}
17151		}
17152	}
17153
17154	return nil
17155}
17156
17157// TroubleshootingProperties storage location provided for troubleshoot.
17158type TroubleshootingProperties struct {
17159	// StorageID - The ID for the storage account to save the troubleshoot result.
17160	StorageID *string `json:"storageId,omitempty"`
17161	// StoragePath - The path to the blob to save the troubleshoot result in.
17162	StoragePath *string `json:"storagePath,omitempty"`
17163}
17164
17165// TroubleshootingRecommendedActions recommended actions based on discovered issues.
17166type TroubleshootingRecommendedActions struct {
17167	// ActionID - ID of the recommended action.
17168	ActionID *string `json:"actionId,omitempty"`
17169	// ActionText - Description of recommended actions.
17170	ActionText *string `json:"actionText,omitempty"`
17171	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
17172	ActionURI *string `json:"actionUri,omitempty"`
17173	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
17174	ActionURIText *string `json:"actionUriText,omitempty"`
17175}
17176
17177// TroubleshootingResult troubleshooting information gained from specified resource.
17178type TroubleshootingResult struct {
17179	autorest.Response `json:"-"`
17180	// StartTime - The start time of the troubleshooting.
17181	StartTime *date.Time `json:"startTime,omitempty"`
17182	// EndTime - The end time of the troubleshooting.
17183	EndTime *date.Time `json:"endTime,omitempty"`
17184	// Code - The result code of the troubleshooting.
17185	Code *string `json:"code,omitempty"`
17186	// Results - Information from troubleshooting.
17187	Results *[]TroubleshootingDetails `json:"results,omitempty"`
17188}
17189
17190// TunnelConnectionHealth virtualNetworkGatewayConnection properties
17191type TunnelConnectionHealth struct {
17192	// Tunnel - READ-ONLY; Tunnel name.
17193	Tunnel *string `json:"tunnel,omitempty"`
17194	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
17195	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
17196	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
17197	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
17198	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
17199	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
17200	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
17201	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
17202}
17203
17204// Usage describes network resource usage.
17205type Usage struct {
17206	// ID - READ-ONLY; Resource identifier.
17207	ID *string `json:"id,omitempty"`
17208	// Unit - An enum describing the unit of measurement.
17209	Unit *string `json:"unit,omitempty"`
17210	// CurrentValue - The current value of the usage.
17211	CurrentValue *int64 `json:"currentValue,omitempty"`
17212	// Limit - The limit of usage.
17213	Limit *int64 `json:"limit,omitempty"`
17214	// Name - The name of the type of usage.
17215	Name *UsageName `json:"name,omitempty"`
17216}
17217
17218// UsageName the usage names.
17219type UsageName struct {
17220	// Value - A string describing the resource name.
17221	Value *string `json:"value,omitempty"`
17222	// LocalizedValue - A localized string describing the resource name.
17223	LocalizedValue *string `json:"localizedValue,omitempty"`
17224}
17225
17226// UsagesListResult the list usages operation response.
17227type UsagesListResult struct {
17228	autorest.Response `json:"-"`
17229	// Value - The list network resource usages.
17230	Value *[]Usage `json:"value,omitempty"`
17231	// NextLink - URL to get the next set of results.
17232	NextLink *string `json:"nextLink,omitempty"`
17233}
17234
17235// UsagesListResultIterator provides access to a complete listing of Usage values.
17236type UsagesListResultIterator struct {
17237	i    int
17238	page UsagesListResultPage
17239}
17240
17241// NextWithContext advances to the next value.  If there was an error making
17242// the request the iterator does not advance and the error is returned.
17243func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
17244	if tracing.IsEnabled() {
17245		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
17246		defer func() {
17247			sc := -1
17248			if iter.Response().Response.Response != nil {
17249				sc = iter.Response().Response.Response.StatusCode
17250			}
17251			tracing.EndSpan(ctx, sc, err)
17252		}()
17253	}
17254	iter.i++
17255	if iter.i < len(iter.page.Values()) {
17256		return nil
17257	}
17258	err = iter.page.NextWithContext(ctx)
17259	if err != nil {
17260		iter.i--
17261		return err
17262	}
17263	iter.i = 0
17264	return nil
17265}
17266
17267// Next advances to the next value.  If there was an error making
17268// the request the iterator does not advance and the error is returned.
17269// Deprecated: Use NextWithContext() instead.
17270func (iter *UsagesListResultIterator) Next() error {
17271	return iter.NextWithContext(context.Background())
17272}
17273
17274// NotDone returns true if the enumeration should be started or is not yet complete.
17275func (iter UsagesListResultIterator) NotDone() bool {
17276	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17277}
17278
17279// Response returns the raw server response from the last page request.
17280func (iter UsagesListResultIterator) Response() UsagesListResult {
17281	return iter.page.Response()
17282}
17283
17284// Value returns the current value or a zero-initialized value if the
17285// iterator has advanced beyond the end of the collection.
17286func (iter UsagesListResultIterator) Value() Usage {
17287	if !iter.page.NotDone() {
17288		return Usage{}
17289	}
17290	return iter.page.Values()[iter.i]
17291}
17292
17293// Creates a new instance of the UsagesListResultIterator type.
17294func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
17295	return UsagesListResultIterator{page: page}
17296}
17297
17298// IsEmpty returns true if the ListResult contains no values.
17299func (ulr UsagesListResult) IsEmpty() bool {
17300	return ulr.Value == nil || len(*ulr.Value) == 0
17301}
17302
17303// usagesListResultPreparer prepares a request to retrieve the next set of results.
17304// It returns nil if no more results exist.
17305func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
17306	if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 {
17307		return nil, nil
17308	}
17309	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17310		autorest.AsJSON(),
17311		autorest.AsGet(),
17312		autorest.WithBaseURL(to.String(ulr.NextLink)))
17313}
17314
17315// UsagesListResultPage contains a page of Usage values.
17316type UsagesListResultPage struct {
17317	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
17318	ulr UsagesListResult
17319}
17320
17321// NextWithContext advances to the next page of values.  If there was an error making
17322// the request the page does not advance and the error is returned.
17323func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
17324	if tracing.IsEnabled() {
17325		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
17326		defer func() {
17327			sc := -1
17328			if page.Response().Response.Response != nil {
17329				sc = page.Response().Response.Response.StatusCode
17330			}
17331			tracing.EndSpan(ctx, sc, err)
17332		}()
17333	}
17334	next, err := page.fn(ctx, page.ulr)
17335	if err != nil {
17336		return err
17337	}
17338	page.ulr = next
17339	return nil
17340}
17341
17342// Next advances to the next page of values.  If there was an error making
17343// the request the page does not advance and the error is returned.
17344// Deprecated: Use NextWithContext() instead.
17345func (page *UsagesListResultPage) Next() error {
17346	return page.NextWithContext(context.Background())
17347}
17348
17349// NotDone returns true if the page enumeration should be started or is not yet complete.
17350func (page UsagesListResultPage) NotDone() bool {
17351	return !page.ulr.IsEmpty()
17352}
17353
17354// Response returns the raw server response from the last page request.
17355func (page UsagesListResultPage) Response() UsagesListResult {
17356	return page.ulr
17357}
17358
17359// Values returns the slice of values for the current page or nil if there are no values.
17360func (page UsagesListResultPage) Values() []Usage {
17361	if page.ulr.IsEmpty() {
17362		return nil
17363	}
17364	return *page.ulr.Value
17365}
17366
17367// Creates a new instance of the UsagesListResultPage type.
17368func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
17369	return UsagesListResultPage{fn: getNextPage}
17370}
17371
17372// VerificationIPFlowParameters parameters that define the IP flow to be verified.
17373type VerificationIPFlowParameters struct {
17374	// TargetResourceID - The ID of the target resource to perform next-hop on.
17375	TargetResourceID *string `json:"targetResourceId,omitempty"`
17376	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
17377	Direction Direction `json:"direction,omitempty"`
17378	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
17379	Protocol IPFlowProtocol `json:"protocol,omitempty"`
17380	// LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
17381	LocalPort *string `json:"localPort,omitempty"`
17382	// RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
17383	RemotePort *string `json:"remotePort,omitempty"`
17384	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
17385	LocalIPAddress *string `json:"localIPAddress,omitempty"`
17386	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
17387	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
17388	// TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional).
17389	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
17390}
17391
17392// VerificationIPFlowResult results of IP flow verification on the target resource.
17393type VerificationIPFlowResult struct {
17394	autorest.Response `json:"-"`
17395	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
17396	Access Access `json:"access,omitempty"`
17397	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
17398	RuleName *string `json:"ruleName,omitempty"`
17399}
17400
17401// VirtualHub virtualHub Resource.
17402type VirtualHub struct {
17403	autorest.Response     `json:"-"`
17404	*VirtualHubProperties `json:"properties,omitempty"`
17405	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
17406	Etag *string `json:"etag,omitempty"`
17407	// ID - Resource ID.
17408	ID *string `json:"id,omitempty"`
17409	// Name - READ-ONLY; Resource name.
17410	Name *string `json:"name,omitempty"`
17411	// Type - READ-ONLY; Resource type.
17412	Type *string `json:"type,omitempty"`
17413	// Location - Resource location.
17414	Location *string `json:"location,omitempty"`
17415	// Tags - Resource tags.
17416	Tags map[string]*string `json:"tags"`
17417}
17418
17419// MarshalJSON is the custom marshaler for VirtualHub.
17420func (vh VirtualHub) MarshalJSON() ([]byte, error) {
17421	objectMap := make(map[string]interface{})
17422	if vh.VirtualHubProperties != nil {
17423		objectMap["properties"] = vh.VirtualHubProperties
17424	}
17425	if vh.ID != nil {
17426		objectMap["id"] = vh.ID
17427	}
17428	if vh.Location != nil {
17429		objectMap["location"] = vh.Location
17430	}
17431	if vh.Tags != nil {
17432		objectMap["tags"] = vh.Tags
17433	}
17434	return json.Marshal(objectMap)
17435}
17436
17437// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
17438func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
17439	var m map[string]*json.RawMessage
17440	err := json.Unmarshal(body, &m)
17441	if err != nil {
17442		return err
17443	}
17444	for k, v := range m {
17445		switch k {
17446		case "properties":
17447			if v != nil {
17448				var virtualHubProperties VirtualHubProperties
17449				err = json.Unmarshal(*v, &virtualHubProperties)
17450				if err != nil {
17451					return err
17452				}
17453				vh.VirtualHubProperties = &virtualHubProperties
17454			}
17455		case "etag":
17456			if v != nil {
17457				var etag string
17458				err = json.Unmarshal(*v, &etag)
17459				if err != nil {
17460					return err
17461				}
17462				vh.Etag = &etag
17463			}
17464		case "id":
17465			if v != nil {
17466				var ID string
17467				err = json.Unmarshal(*v, &ID)
17468				if err != nil {
17469					return err
17470				}
17471				vh.ID = &ID
17472			}
17473		case "name":
17474			if v != nil {
17475				var name string
17476				err = json.Unmarshal(*v, &name)
17477				if err != nil {
17478					return err
17479				}
17480				vh.Name = &name
17481			}
17482		case "type":
17483			if v != nil {
17484				var typeVar string
17485				err = json.Unmarshal(*v, &typeVar)
17486				if err != nil {
17487					return err
17488				}
17489				vh.Type = &typeVar
17490			}
17491		case "location":
17492			if v != nil {
17493				var location string
17494				err = json.Unmarshal(*v, &location)
17495				if err != nil {
17496					return err
17497				}
17498				vh.Location = &location
17499			}
17500		case "tags":
17501			if v != nil {
17502				var tags map[string]*string
17503				err = json.Unmarshal(*v, &tags)
17504				if err != nil {
17505					return err
17506				}
17507				vh.Tags = tags
17508			}
17509		}
17510	}
17511
17512	return nil
17513}
17514
17515// VirtualHubProperties parameters for VirtualHub
17516type VirtualHubProperties struct {
17517	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
17518	VirtualWan *SubResource `json:"virtualWan,omitempty"`
17519	// HubVirtualNetworkConnections - list of all vnet connections with this VirtualHub.
17520	HubVirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"hubVirtualNetworkConnections,omitempty"`
17521	// AddressPrefix - Address-prefix for this VirtualHub.
17522	AddressPrefix *string `json:"addressPrefix,omitempty"`
17523	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17524	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17525}
17526
17527// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17528// long-running operation.
17529type VirtualHubsCreateOrUpdateFuture struct {
17530	azure.Future
17531}
17532
17533// Result returns the result of the asynchronous operation.
17534// If the operation has not completed it will return an error.
17535func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
17536	var done bool
17537	done, err = future.DoneWithContext(context.Background(), client)
17538	if err != nil {
17539		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17540		return
17541	}
17542	if !done {
17543		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
17544		return
17545	}
17546	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17547	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
17548		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
17549		if err != nil {
17550			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
17551		}
17552	}
17553	return
17554}
17555
17556// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17557// operation.
17558type VirtualHubsDeleteFuture struct {
17559	azure.Future
17560}
17561
17562// Result returns the result of the asynchronous operation.
17563// If the operation has not completed it will return an error.
17564func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) {
17565	var done bool
17566	done, err = future.DoneWithContext(context.Background(), client)
17567	if err != nil {
17568		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
17569		return
17570	}
17571	if !done {
17572		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
17573		return
17574	}
17575	ar.Response = future.Response()
17576	return
17577}
17578
17579// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
17580// operation.
17581type VirtualHubsUpdateTagsFuture struct {
17582	azure.Future
17583}
17584
17585// Result returns the result of the asynchronous operation.
17586// If the operation has not completed it will return an error.
17587func (future *VirtualHubsUpdateTagsFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
17588	var done bool
17589	done, err = future.DoneWithContext(context.Background(), client)
17590	if err != nil {
17591		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17592		return
17593	}
17594	if !done {
17595		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
17596		return
17597	}
17598	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17599	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
17600		vh, err = client.UpdateTagsResponder(vh.Response.Response)
17601		if err != nil {
17602			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
17603		}
17604	}
17605	return
17606}
17607
17608// VirtualNetwork virtual Network resource.
17609type VirtualNetwork struct {
17610	autorest.Response `json:"-"`
17611	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
17612	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
17613	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
17614	Etag *string `json:"etag,omitempty"`
17615	// ID - Resource ID.
17616	ID *string `json:"id,omitempty"`
17617	// Name - READ-ONLY; Resource name.
17618	Name *string `json:"name,omitempty"`
17619	// Type - READ-ONLY; Resource type.
17620	Type *string `json:"type,omitempty"`
17621	// Location - Resource location.
17622	Location *string `json:"location,omitempty"`
17623	// Tags - Resource tags.
17624	Tags map[string]*string `json:"tags"`
17625}
17626
17627// MarshalJSON is the custom marshaler for VirtualNetwork.
17628func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
17629	objectMap := make(map[string]interface{})
17630	if vn.VirtualNetworkPropertiesFormat != nil {
17631		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
17632	}
17633	if vn.Etag != nil {
17634		objectMap["etag"] = vn.Etag
17635	}
17636	if vn.ID != nil {
17637		objectMap["id"] = vn.ID
17638	}
17639	if vn.Location != nil {
17640		objectMap["location"] = vn.Location
17641	}
17642	if vn.Tags != nil {
17643		objectMap["tags"] = vn.Tags
17644	}
17645	return json.Marshal(objectMap)
17646}
17647
17648// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
17649func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
17650	var m map[string]*json.RawMessage
17651	err := json.Unmarshal(body, &m)
17652	if err != nil {
17653		return err
17654	}
17655	for k, v := range m {
17656		switch k {
17657		case "properties":
17658			if v != nil {
17659				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
17660				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
17661				if err != nil {
17662					return err
17663				}
17664				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
17665			}
17666		case "etag":
17667			if v != nil {
17668				var etag string
17669				err = json.Unmarshal(*v, &etag)
17670				if err != nil {
17671					return err
17672				}
17673				vn.Etag = &etag
17674			}
17675		case "id":
17676			if v != nil {
17677				var ID string
17678				err = json.Unmarshal(*v, &ID)
17679				if err != nil {
17680					return err
17681				}
17682				vn.ID = &ID
17683			}
17684		case "name":
17685			if v != nil {
17686				var name string
17687				err = json.Unmarshal(*v, &name)
17688				if err != nil {
17689					return err
17690				}
17691				vn.Name = &name
17692			}
17693		case "type":
17694			if v != nil {
17695				var typeVar string
17696				err = json.Unmarshal(*v, &typeVar)
17697				if err != nil {
17698					return err
17699				}
17700				vn.Type = &typeVar
17701			}
17702		case "location":
17703			if v != nil {
17704				var location string
17705				err = json.Unmarshal(*v, &location)
17706				if err != nil {
17707					return err
17708				}
17709				vn.Location = &location
17710			}
17711		case "tags":
17712			if v != nil {
17713				var tags map[string]*string
17714				err = json.Unmarshal(*v, &tags)
17715				if err != nil {
17716					return err
17717				}
17718				vn.Tags = tags
17719			}
17720		}
17721	}
17722
17723	return nil
17724}
17725
17726// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
17727// resource.
17728type VirtualNetworkConnectionGatewayReference struct {
17729	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
17730	ID *string `json:"id,omitempty"`
17731}
17732
17733// VirtualNetworkGateway a common class for general resource information
17734type VirtualNetworkGateway struct {
17735	autorest.Response `json:"-"`
17736	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
17737	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17738	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
17739	Etag *string `json:"etag,omitempty"`
17740	// ID - Resource ID.
17741	ID *string `json:"id,omitempty"`
17742	// Name - READ-ONLY; Resource name.
17743	Name *string `json:"name,omitempty"`
17744	// Type - READ-ONLY; Resource type.
17745	Type *string `json:"type,omitempty"`
17746	// Location - Resource location.
17747	Location *string `json:"location,omitempty"`
17748	// Tags - Resource tags.
17749	Tags map[string]*string `json:"tags"`
17750}
17751
17752// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
17753func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
17754	objectMap := make(map[string]interface{})
17755	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
17756		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
17757	}
17758	if vng.Etag != nil {
17759		objectMap["etag"] = vng.Etag
17760	}
17761	if vng.ID != nil {
17762		objectMap["id"] = vng.ID
17763	}
17764	if vng.Location != nil {
17765		objectMap["location"] = vng.Location
17766	}
17767	if vng.Tags != nil {
17768		objectMap["tags"] = vng.Tags
17769	}
17770	return json.Marshal(objectMap)
17771}
17772
17773// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
17774func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
17775	var m map[string]*json.RawMessage
17776	err := json.Unmarshal(body, &m)
17777	if err != nil {
17778		return err
17779	}
17780	for k, v := range m {
17781		switch k {
17782		case "properties":
17783			if v != nil {
17784				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
17785				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
17786				if err != nil {
17787					return err
17788				}
17789				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
17790			}
17791		case "etag":
17792			if v != nil {
17793				var etag string
17794				err = json.Unmarshal(*v, &etag)
17795				if err != nil {
17796					return err
17797				}
17798				vng.Etag = &etag
17799			}
17800		case "id":
17801			if v != nil {
17802				var ID string
17803				err = json.Unmarshal(*v, &ID)
17804				if err != nil {
17805					return err
17806				}
17807				vng.ID = &ID
17808			}
17809		case "name":
17810			if v != nil {
17811				var name string
17812				err = json.Unmarshal(*v, &name)
17813				if err != nil {
17814					return err
17815				}
17816				vng.Name = &name
17817			}
17818		case "type":
17819			if v != nil {
17820				var typeVar string
17821				err = json.Unmarshal(*v, &typeVar)
17822				if err != nil {
17823					return err
17824				}
17825				vng.Type = &typeVar
17826			}
17827		case "location":
17828			if v != nil {
17829				var location string
17830				err = json.Unmarshal(*v, &location)
17831				if err != nil {
17832					return err
17833				}
17834				vng.Location = &location
17835			}
17836		case "tags":
17837			if v != nil {
17838				var tags map[string]*string
17839				err = json.Unmarshal(*v, &tags)
17840				if err != nil {
17841					return err
17842				}
17843				vng.Tags = tags
17844			}
17845		}
17846	}
17847
17848	return nil
17849}
17850
17851// VirtualNetworkGatewayConnection a common class for general resource information
17852type VirtualNetworkGatewayConnection struct {
17853	autorest.Response `json:"-"`
17854	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
17855	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
17856	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
17857	Etag *string `json:"etag,omitempty"`
17858	// ID - Resource ID.
17859	ID *string `json:"id,omitempty"`
17860	// Name - READ-ONLY; Resource name.
17861	Name *string `json:"name,omitempty"`
17862	// Type - READ-ONLY; Resource type.
17863	Type *string `json:"type,omitempty"`
17864	// Location - Resource location.
17865	Location *string `json:"location,omitempty"`
17866	// Tags - Resource tags.
17867	Tags map[string]*string `json:"tags"`
17868}
17869
17870// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
17871func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
17872	objectMap := make(map[string]interface{})
17873	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
17874		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
17875	}
17876	if vngc.Etag != nil {
17877		objectMap["etag"] = vngc.Etag
17878	}
17879	if vngc.ID != nil {
17880		objectMap["id"] = vngc.ID
17881	}
17882	if vngc.Location != nil {
17883		objectMap["location"] = vngc.Location
17884	}
17885	if vngc.Tags != nil {
17886		objectMap["tags"] = vngc.Tags
17887	}
17888	return json.Marshal(objectMap)
17889}
17890
17891// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
17892func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
17893	var m map[string]*json.RawMessage
17894	err := json.Unmarshal(body, &m)
17895	if err != nil {
17896		return err
17897	}
17898	for k, v := range m {
17899		switch k {
17900		case "properties":
17901			if v != nil {
17902				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
17903				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
17904				if err != nil {
17905					return err
17906				}
17907				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
17908			}
17909		case "etag":
17910			if v != nil {
17911				var etag string
17912				err = json.Unmarshal(*v, &etag)
17913				if err != nil {
17914					return err
17915				}
17916				vngc.Etag = &etag
17917			}
17918		case "id":
17919			if v != nil {
17920				var ID string
17921				err = json.Unmarshal(*v, &ID)
17922				if err != nil {
17923					return err
17924				}
17925				vngc.ID = &ID
17926			}
17927		case "name":
17928			if v != nil {
17929				var name string
17930				err = json.Unmarshal(*v, &name)
17931				if err != nil {
17932					return err
17933				}
17934				vngc.Name = &name
17935			}
17936		case "type":
17937			if v != nil {
17938				var typeVar string
17939				err = json.Unmarshal(*v, &typeVar)
17940				if err != nil {
17941					return err
17942				}
17943				vngc.Type = &typeVar
17944			}
17945		case "location":
17946			if v != nil {
17947				var location string
17948				err = json.Unmarshal(*v, &location)
17949				if err != nil {
17950					return err
17951				}
17952				vngc.Location = &location
17953			}
17954		case "tags":
17955			if v != nil {
17956				var tags map[string]*string
17957				err = json.Unmarshal(*v, &tags)
17958				if err != nil {
17959					return err
17960				}
17961				vngc.Tags = tags
17962			}
17963		}
17964	}
17965
17966	return nil
17967}
17968
17969// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
17970type VirtualNetworkGatewayConnectionListEntity struct {
17971	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
17972	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
17973	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
17974	Etag *string `json:"etag,omitempty"`
17975	// ID - Resource ID.
17976	ID *string `json:"id,omitempty"`
17977	// Name - READ-ONLY; Resource name.
17978	Name *string `json:"name,omitempty"`
17979	// Type - READ-ONLY; Resource type.
17980	Type *string `json:"type,omitempty"`
17981	// Location - Resource location.
17982	Location *string `json:"location,omitempty"`
17983	// Tags - Resource tags.
17984	Tags map[string]*string `json:"tags"`
17985}
17986
17987// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
17988func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
17989	objectMap := make(map[string]interface{})
17990	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
17991		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
17992	}
17993	if vngcle.Etag != nil {
17994		objectMap["etag"] = vngcle.Etag
17995	}
17996	if vngcle.ID != nil {
17997		objectMap["id"] = vngcle.ID
17998	}
17999	if vngcle.Location != nil {
18000		objectMap["location"] = vngcle.Location
18001	}
18002	if vngcle.Tags != nil {
18003		objectMap["tags"] = vngcle.Tags
18004	}
18005	return json.Marshal(objectMap)
18006}
18007
18008// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
18009func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
18010	var m map[string]*json.RawMessage
18011	err := json.Unmarshal(body, &m)
18012	if err != nil {
18013		return err
18014	}
18015	for k, v := range m {
18016		switch k {
18017		case "properties":
18018			if v != nil {
18019				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
18020				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
18021				if err != nil {
18022					return err
18023				}
18024				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
18025			}
18026		case "etag":
18027			if v != nil {
18028				var etag string
18029				err = json.Unmarshal(*v, &etag)
18030				if err != nil {
18031					return err
18032				}
18033				vngcle.Etag = &etag
18034			}
18035		case "id":
18036			if v != nil {
18037				var ID string
18038				err = json.Unmarshal(*v, &ID)
18039				if err != nil {
18040					return err
18041				}
18042				vngcle.ID = &ID
18043			}
18044		case "name":
18045			if v != nil {
18046				var name string
18047				err = json.Unmarshal(*v, &name)
18048				if err != nil {
18049					return err
18050				}
18051				vngcle.Name = &name
18052			}
18053		case "type":
18054			if v != nil {
18055				var typeVar string
18056				err = json.Unmarshal(*v, &typeVar)
18057				if err != nil {
18058					return err
18059				}
18060				vngcle.Type = &typeVar
18061			}
18062		case "location":
18063			if v != nil {
18064				var location string
18065				err = json.Unmarshal(*v, &location)
18066				if err != nil {
18067					return err
18068				}
18069				vngcle.Location = &location
18070			}
18071		case "tags":
18072			if v != nil {
18073				var tags map[string]*string
18074				err = json.Unmarshal(*v, &tags)
18075				if err != nil {
18076					return err
18077				}
18078				vngcle.Tags = tags
18079			}
18080		}
18081	}
18082
18083	return nil
18084}
18085
18086// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
18087type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
18088	// AuthorizationKey - The authorizationKey.
18089	AuthorizationKey *string `json:"authorizationKey,omitempty"`
18090	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
18091	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
18092	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
18093	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
18094	// LocalNetworkGateway2 - The reference to local network gateway resource.
18095	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
18096	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
18097	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
18098	// RoutingWeight - The routing weight.
18099	RoutingWeight *int32 `json:"routingWeight,omitempty"`
18100	// SharedKey - The IPSec shared key.
18101	SharedKey *string `json:"sharedKey,omitempty"`
18102	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
18103	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
18104	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
18105	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
18106	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
18107	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
18108	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
18109	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
18110	// Peer - The reference to peerings resource.
18111	Peer *SubResource `json:"peer,omitempty"`
18112	// EnableBgp - EnableBgp flag
18113	EnableBgp *bool `json:"enableBgp,omitempty"`
18114	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
18115	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
18116	// IpsecPolicies - The IPSec Policies to be considered by this connection.
18117	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
18118	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
18119	ResourceGUID *string `json:"resourceGuid,omitempty"`
18120	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18121	ProvisioningState *string `json:"provisioningState,omitempty"`
18122}
18123
18124// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
18125// service call
18126type VirtualNetworkGatewayConnectionListResult struct {
18127	autorest.Response `json:"-"`
18128	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
18129	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
18130	// NextLink - READ-ONLY; The URL to get the next set of results.
18131	NextLink *string `json:"nextLink,omitempty"`
18132}
18133
18134// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
18135// VirtualNetworkGatewayConnection values.
18136type VirtualNetworkGatewayConnectionListResultIterator struct {
18137	i    int
18138	page VirtualNetworkGatewayConnectionListResultPage
18139}
18140
18141// NextWithContext advances to the next value.  If there was an error making
18142// the request the iterator does not advance and the error is returned.
18143func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
18144	if tracing.IsEnabled() {
18145		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
18146		defer func() {
18147			sc := -1
18148			if iter.Response().Response.Response != nil {
18149				sc = iter.Response().Response.Response.StatusCode
18150			}
18151			tracing.EndSpan(ctx, sc, err)
18152		}()
18153	}
18154	iter.i++
18155	if iter.i < len(iter.page.Values()) {
18156		return nil
18157	}
18158	err = iter.page.NextWithContext(ctx)
18159	if err != nil {
18160		iter.i--
18161		return err
18162	}
18163	iter.i = 0
18164	return nil
18165}
18166
18167// Next advances to the next value.  If there was an error making
18168// the request the iterator does not advance and the error is returned.
18169// Deprecated: Use NextWithContext() instead.
18170func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
18171	return iter.NextWithContext(context.Background())
18172}
18173
18174// NotDone returns true if the enumeration should be started or is not yet complete.
18175func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
18176	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18177}
18178
18179// Response returns the raw server response from the last page request.
18180func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
18181	return iter.page.Response()
18182}
18183
18184// Value returns the current value or a zero-initialized value if the
18185// iterator has advanced beyond the end of the collection.
18186func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
18187	if !iter.page.NotDone() {
18188		return VirtualNetworkGatewayConnection{}
18189	}
18190	return iter.page.Values()[iter.i]
18191}
18192
18193// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
18194func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
18195	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
18196}
18197
18198// IsEmpty returns true if the ListResult contains no values.
18199func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
18200	return vngclr.Value == nil || len(*vngclr.Value) == 0
18201}
18202
18203// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
18204// It returns nil if no more results exist.
18205func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
18206	if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 {
18207		return nil, nil
18208	}
18209	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18210		autorest.AsJSON(),
18211		autorest.AsGet(),
18212		autorest.WithBaseURL(to.String(vngclr.NextLink)))
18213}
18214
18215// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
18216type VirtualNetworkGatewayConnectionListResultPage struct {
18217	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
18218	vngclr VirtualNetworkGatewayConnectionListResult
18219}
18220
18221// NextWithContext advances to the next page of values.  If there was an error making
18222// the request the page does not advance and the error is returned.
18223func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
18224	if tracing.IsEnabled() {
18225		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
18226		defer func() {
18227			sc := -1
18228			if page.Response().Response.Response != nil {
18229				sc = page.Response().Response.Response.StatusCode
18230			}
18231			tracing.EndSpan(ctx, sc, err)
18232		}()
18233	}
18234	next, err := page.fn(ctx, page.vngclr)
18235	if err != nil {
18236		return err
18237	}
18238	page.vngclr = next
18239	return nil
18240}
18241
18242// Next advances to the next page of values.  If there was an error making
18243// the request the page does not advance and the error is returned.
18244// Deprecated: Use NextWithContext() instead.
18245func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
18246	return page.NextWithContext(context.Background())
18247}
18248
18249// NotDone returns true if the page enumeration should be started or is not yet complete.
18250func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
18251	return !page.vngclr.IsEmpty()
18252}
18253
18254// Response returns the raw server response from the last page request.
18255func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
18256	return page.vngclr
18257}
18258
18259// Values returns the slice of values for the current page or nil if there are no values.
18260func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
18261	if page.vngclr.IsEmpty() {
18262		return nil
18263	}
18264	return *page.vngclr.Value
18265}
18266
18267// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
18268func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
18269	return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage}
18270}
18271
18272// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
18273type VirtualNetworkGatewayConnectionPropertiesFormat struct {
18274	// AuthorizationKey - The authorizationKey.
18275	AuthorizationKey *string `json:"authorizationKey,omitempty"`
18276	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
18277	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
18278	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
18279	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
18280	// LocalNetworkGateway2 - The reference to local network gateway resource.
18281	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
18282	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
18283	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
18284	// RoutingWeight - The routing weight.
18285	RoutingWeight *int32 `json:"routingWeight,omitempty"`
18286	// SharedKey - The IPSec shared key.
18287	SharedKey *string `json:"sharedKey,omitempty"`
18288	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
18289	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
18290	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
18291	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
18292	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
18293	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
18294	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
18295	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
18296	// Peer - The reference to peerings resource.
18297	Peer *SubResource `json:"peer,omitempty"`
18298	// EnableBgp - EnableBgp flag
18299	EnableBgp *bool `json:"enableBgp,omitempty"`
18300	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
18301	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
18302	// IpsecPolicies - The IPSec Policies to be considered by this connection.
18303	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
18304	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
18305	ResourceGUID *string `json:"resourceGuid,omitempty"`
18306	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18307	ProvisioningState *string `json:"provisioningState,omitempty"`
18308}
18309
18310// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
18311// results of a long-running operation.
18312type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
18313	azure.Future
18314}
18315
18316// Result returns the result of the asynchronous operation.
18317// If the operation has not completed it will return an error.
18318func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
18319	var done bool
18320	done, err = future.DoneWithContext(context.Background(), client)
18321	if err != nil {
18322		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18323		return
18324	}
18325	if !done {
18326		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
18327		return
18328	}
18329	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18330	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
18331		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
18332		if err != nil {
18333			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
18334		}
18335	}
18336	return
18337}
18338
18339// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
18340// a long-running operation.
18341type VirtualNetworkGatewayConnectionsDeleteFuture struct {
18342	azure.Future
18343}
18344
18345// Result returns the result of the asynchronous operation.
18346// If the operation has not completed it will return an error.
18347func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
18348	var done bool
18349	done, err = future.DoneWithContext(context.Background(), client)
18350	if err != nil {
18351		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
18352		return
18353	}
18354	if !done {
18355		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
18356		return
18357	}
18358	ar.Response = future.Response()
18359	return
18360}
18361
18362// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
18363// results of a long-running operation.
18364type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
18365	azure.Future
18366}
18367
18368// Result returns the result of the asynchronous operation.
18369// If the operation has not completed it will return an error.
18370func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
18371	var done bool
18372	done, err = future.DoneWithContext(context.Background(), client)
18373	if err != nil {
18374		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
18375		return
18376	}
18377	if !done {
18378		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
18379		return
18380	}
18381	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18382	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
18383		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
18384		if err != nil {
18385			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
18386		}
18387	}
18388	return
18389}
18390
18391// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
18392// results of a long-running operation.
18393type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
18394	azure.Future
18395}
18396
18397// Result returns the result of the asynchronous operation.
18398// If the operation has not completed it will return an error.
18399func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
18400	var done bool
18401	done, err = future.DoneWithContext(context.Background(), client)
18402	if err != nil {
18403		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
18404		return
18405	}
18406	if !done {
18407		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
18408		return
18409	}
18410	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18411	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
18412		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
18413		if err != nil {
18414			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
18415		}
18416	}
18417	return
18418}
18419
18420// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
18421// results of a long-running operation.
18422type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
18423	azure.Future
18424}
18425
18426// Result returns the result of the asynchronous operation.
18427// If the operation has not completed it will return an error.
18428func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
18429	var done bool
18430	done, err = future.DoneWithContext(context.Background(), client)
18431	if err != nil {
18432		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18433		return
18434	}
18435	if !done {
18436		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
18437		return
18438	}
18439	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18440	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
18441		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
18442		if err != nil {
18443			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
18444		}
18445	}
18446	return
18447}
18448
18449// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
18450type VirtualNetworkGatewayIPConfiguration struct {
18451	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
18452	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
18453	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18454	Name *string `json:"name,omitempty"`
18455	// Etag - A unique read-only string that changes whenever the resource is updated.
18456	Etag *string `json:"etag,omitempty"`
18457	// ID - Resource ID.
18458	ID *string `json:"id,omitempty"`
18459}
18460
18461// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
18462func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
18463	objectMap := make(map[string]interface{})
18464	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
18465		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
18466	}
18467	if vngic.Name != nil {
18468		objectMap["name"] = vngic.Name
18469	}
18470	if vngic.Etag != nil {
18471		objectMap["etag"] = vngic.Etag
18472	}
18473	if vngic.ID != nil {
18474		objectMap["id"] = vngic.ID
18475	}
18476	return json.Marshal(objectMap)
18477}
18478
18479// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
18480func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
18481	var m map[string]*json.RawMessage
18482	err := json.Unmarshal(body, &m)
18483	if err != nil {
18484		return err
18485	}
18486	for k, v := range m {
18487		switch k {
18488		case "properties":
18489			if v != nil {
18490				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
18491				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
18492				if err != nil {
18493					return err
18494				}
18495				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
18496			}
18497		case "name":
18498			if v != nil {
18499				var name string
18500				err = json.Unmarshal(*v, &name)
18501				if err != nil {
18502					return err
18503				}
18504				vngic.Name = &name
18505			}
18506		case "etag":
18507			if v != nil {
18508				var etag string
18509				err = json.Unmarshal(*v, &etag)
18510				if err != nil {
18511					return err
18512				}
18513				vngic.Etag = &etag
18514			}
18515		case "id":
18516			if v != nil {
18517				var ID string
18518				err = json.Unmarshal(*v, &ID)
18519				if err != nil {
18520					return err
18521				}
18522				vngic.ID = &ID
18523			}
18524		}
18525	}
18526
18527	return nil
18528}
18529
18530// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
18531type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
18532	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
18533	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
18534	// Subnet - The reference of the subnet resource.
18535	Subnet *SubResource `json:"subnet,omitempty"`
18536	// PublicIPAddress - The reference of the public IP resource.
18537	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
18538	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18539	ProvisioningState *string `json:"provisioningState,omitempty"`
18540}
18541
18542// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
18543// service call
18544type VirtualNetworkGatewayListConnectionsResult struct {
18545	autorest.Response `json:"-"`
18546	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
18547	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
18548	// NextLink - READ-ONLY; The URL to get the next set of results.
18549	NextLink *string `json:"nextLink,omitempty"`
18550}
18551
18552// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
18553// VirtualNetworkGatewayConnectionListEntity values.
18554type VirtualNetworkGatewayListConnectionsResultIterator struct {
18555	i    int
18556	page VirtualNetworkGatewayListConnectionsResultPage
18557}
18558
18559// NextWithContext advances to the next value.  If there was an error making
18560// the request the iterator does not advance and the error is returned.
18561func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
18562	if tracing.IsEnabled() {
18563		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
18564		defer func() {
18565			sc := -1
18566			if iter.Response().Response.Response != nil {
18567				sc = iter.Response().Response.Response.StatusCode
18568			}
18569			tracing.EndSpan(ctx, sc, err)
18570		}()
18571	}
18572	iter.i++
18573	if iter.i < len(iter.page.Values()) {
18574		return nil
18575	}
18576	err = iter.page.NextWithContext(ctx)
18577	if err != nil {
18578		iter.i--
18579		return err
18580	}
18581	iter.i = 0
18582	return nil
18583}
18584
18585// Next advances to the next value.  If there was an error making
18586// the request the iterator does not advance and the error is returned.
18587// Deprecated: Use NextWithContext() instead.
18588func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
18589	return iter.NextWithContext(context.Background())
18590}
18591
18592// NotDone returns true if the enumeration should be started or is not yet complete.
18593func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
18594	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18595}
18596
18597// Response returns the raw server response from the last page request.
18598func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
18599	return iter.page.Response()
18600}
18601
18602// Value returns the current value or a zero-initialized value if the
18603// iterator has advanced beyond the end of the collection.
18604func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
18605	if !iter.page.NotDone() {
18606		return VirtualNetworkGatewayConnectionListEntity{}
18607	}
18608	return iter.page.Values()[iter.i]
18609}
18610
18611// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
18612func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
18613	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
18614}
18615
18616// IsEmpty returns true if the ListResult contains no values.
18617func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
18618	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
18619}
18620
18621// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
18622// It returns nil if no more results exist.
18623func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
18624	if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 {
18625		return nil, nil
18626	}
18627	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18628		autorest.AsJSON(),
18629		autorest.AsGet(),
18630		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
18631}
18632
18633// VirtualNetworkGatewayListConnectionsResultPage contains a page of
18634// VirtualNetworkGatewayConnectionListEntity values.
18635type VirtualNetworkGatewayListConnectionsResultPage struct {
18636	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
18637	vnglcr VirtualNetworkGatewayListConnectionsResult
18638}
18639
18640// NextWithContext advances to the next page of values.  If there was an error making
18641// the request the page does not advance and the error is returned.
18642func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
18643	if tracing.IsEnabled() {
18644		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
18645		defer func() {
18646			sc := -1
18647			if page.Response().Response.Response != nil {
18648				sc = page.Response().Response.Response.StatusCode
18649			}
18650			tracing.EndSpan(ctx, sc, err)
18651		}()
18652	}
18653	next, err := page.fn(ctx, page.vnglcr)
18654	if err != nil {
18655		return err
18656	}
18657	page.vnglcr = next
18658	return nil
18659}
18660
18661// Next advances to the next page of values.  If there was an error making
18662// the request the page does not advance and the error is returned.
18663// Deprecated: Use NextWithContext() instead.
18664func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
18665	return page.NextWithContext(context.Background())
18666}
18667
18668// NotDone returns true if the page enumeration should be started or is not yet complete.
18669func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
18670	return !page.vnglcr.IsEmpty()
18671}
18672
18673// Response returns the raw server response from the last page request.
18674func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
18675	return page.vnglcr
18676}
18677
18678// Values returns the slice of values for the current page or nil if there are no values.
18679func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
18680	if page.vnglcr.IsEmpty() {
18681		return nil
18682	}
18683	return *page.vnglcr.Value
18684}
18685
18686// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
18687func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
18688	return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage}
18689}
18690
18691// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
18692type VirtualNetworkGatewayListResult struct {
18693	autorest.Response `json:"-"`
18694	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
18695	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
18696	// NextLink - READ-ONLY; The URL to get the next set of results.
18697	NextLink *string `json:"nextLink,omitempty"`
18698}
18699
18700// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
18701// values.
18702type VirtualNetworkGatewayListResultIterator struct {
18703	i    int
18704	page VirtualNetworkGatewayListResultPage
18705}
18706
18707// NextWithContext advances to the next value.  If there was an error making
18708// the request the iterator does not advance and the error is returned.
18709func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
18710	if tracing.IsEnabled() {
18711		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
18712		defer func() {
18713			sc := -1
18714			if iter.Response().Response.Response != nil {
18715				sc = iter.Response().Response.Response.StatusCode
18716			}
18717			tracing.EndSpan(ctx, sc, err)
18718		}()
18719	}
18720	iter.i++
18721	if iter.i < len(iter.page.Values()) {
18722		return nil
18723	}
18724	err = iter.page.NextWithContext(ctx)
18725	if err != nil {
18726		iter.i--
18727		return err
18728	}
18729	iter.i = 0
18730	return nil
18731}
18732
18733// Next advances to the next value.  If there was an error making
18734// the request the iterator does not advance and the error is returned.
18735// Deprecated: Use NextWithContext() instead.
18736func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
18737	return iter.NextWithContext(context.Background())
18738}
18739
18740// NotDone returns true if the enumeration should be started or is not yet complete.
18741func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
18742	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18743}
18744
18745// Response returns the raw server response from the last page request.
18746func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
18747	return iter.page.Response()
18748}
18749
18750// Value returns the current value or a zero-initialized value if the
18751// iterator has advanced beyond the end of the collection.
18752func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
18753	if !iter.page.NotDone() {
18754		return VirtualNetworkGateway{}
18755	}
18756	return iter.page.Values()[iter.i]
18757}
18758
18759// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
18760func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
18761	return VirtualNetworkGatewayListResultIterator{page: page}
18762}
18763
18764// IsEmpty returns true if the ListResult contains no values.
18765func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
18766	return vnglr.Value == nil || len(*vnglr.Value) == 0
18767}
18768
18769// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
18770// It returns nil if no more results exist.
18771func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
18772	if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 {
18773		return nil, nil
18774	}
18775	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18776		autorest.AsJSON(),
18777		autorest.AsGet(),
18778		autorest.WithBaseURL(to.String(vnglr.NextLink)))
18779}
18780
18781// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
18782type VirtualNetworkGatewayListResultPage struct {
18783	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
18784	vnglr VirtualNetworkGatewayListResult
18785}
18786
18787// NextWithContext advances to the next page of values.  If there was an error making
18788// the request the page does not advance and the error is returned.
18789func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18790	if tracing.IsEnabled() {
18791		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
18792		defer func() {
18793			sc := -1
18794			if page.Response().Response.Response != nil {
18795				sc = page.Response().Response.Response.StatusCode
18796			}
18797			tracing.EndSpan(ctx, sc, err)
18798		}()
18799	}
18800	next, err := page.fn(ctx, page.vnglr)
18801	if err != nil {
18802		return err
18803	}
18804	page.vnglr = next
18805	return nil
18806}
18807
18808// Next advances to the next page of values.  If there was an error making
18809// the request the page does not advance and the error is returned.
18810// Deprecated: Use NextWithContext() instead.
18811func (page *VirtualNetworkGatewayListResultPage) Next() error {
18812	return page.NextWithContext(context.Background())
18813}
18814
18815// NotDone returns true if the page enumeration should be started or is not yet complete.
18816func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
18817	return !page.vnglr.IsEmpty()
18818}
18819
18820// Response returns the raw server response from the last page request.
18821func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
18822	return page.vnglr
18823}
18824
18825// Values returns the slice of values for the current page or nil if there are no values.
18826func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
18827	if page.vnglr.IsEmpty() {
18828		return nil
18829	}
18830	return *page.vnglr.Value
18831}
18832
18833// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
18834func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
18835	return VirtualNetworkGatewayListResultPage{fn: getNextPage}
18836}
18837
18838// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
18839type VirtualNetworkGatewayPropertiesFormat struct {
18840	// IPConfigurations - IP configurations for virtual network gateway.
18841	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
18842	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
18843	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
18844	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
18845	VpnType VpnType `json:"vpnType,omitempty"`
18846	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
18847	EnableBgp *bool `json:"enableBgp,omitempty"`
18848	// ActiveActive - ActiveActive flag
18849	ActiveActive *bool `json:"activeActive,omitempty"`
18850	// GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
18851	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
18852	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
18853	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
18854	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
18855	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
18856	// BgpSettings - Virtual network gateway's BGP speaker settings.
18857	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
18858	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
18859	ResourceGUID *string `json:"resourceGuid,omitempty"`
18860	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18861	ProvisioningState *string `json:"provisioningState,omitempty"`
18862}
18863
18864// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18865// long-running operation.
18866type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
18867	azure.Future
18868}
18869
18870// Result returns the result of the asynchronous operation.
18871// If the operation has not completed it will return an error.
18872func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
18873	var done bool
18874	done, err = future.DoneWithContext(context.Background(), client)
18875	if err != nil {
18876		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18877		return
18878	}
18879	if !done {
18880		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
18881		return
18882	}
18883	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18884	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
18885		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
18886		if err != nil {
18887			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
18888		}
18889	}
18890	return
18891}
18892
18893// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
18894// long-running operation.
18895type VirtualNetworkGatewaysDeleteFuture struct {
18896	azure.Future
18897}
18898
18899// Result returns the result of the asynchronous operation.
18900// If the operation has not completed it will return an error.
18901func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
18902	var done bool
18903	done, err = future.DoneWithContext(context.Background(), client)
18904	if err != nil {
18905		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18906		return
18907	}
18908	if !done {
18909		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
18910		return
18911	}
18912	ar.Response = future.Response()
18913	return
18914}
18915
18916// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
18917// results of a long-running operation.
18918type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
18919	azure.Future
18920}
18921
18922// Result returns the result of the asynchronous operation.
18923// If the operation has not completed it will return an error.
18924func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
18925	var done bool
18926	done, err = future.DoneWithContext(context.Background(), client)
18927	if err != nil {
18928		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
18929		return
18930	}
18931	if !done {
18932		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
18933		return
18934	}
18935	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18936	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
18937		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
18938		if err != nil {
18939			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
18940		}
18941	}
18942	return
18943}
18944
18945// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
18946// of a long-running operation.
18947type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
18948	azure.Future
18949}
18950
18951// Result returns the result of the asynchronous operation.
18952// If the operation has not completed it will return an error.
18953func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
18954	var done bool
18955	done, err = future.DoneWithContext(context.Background(), client)
18956	if err != nil {
18957		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
18958		return
18959	}
18960	if !done {
18961		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
18962		return
18963	}
18964	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18965	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
18966		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
18967		if err != nil {
18968			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
18969		}
18970	}
18971	return
18972}
18973
18974// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
18975// of a long-running operation.
18976type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
18977	azure.Future
18978}
18979
18980// Result returns the result of the asynchronous operation.
18981// If the operation has not completed it will return an error.
18982func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
18983	var done bool
18984	done, err = future.DoneWithContext(context.Background(), client)
18985	if err != nil {
18986		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
18987		return
18988	}
18989	if !done {
18990		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
18991		return
18992	}
18993	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18994	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
18995		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
18996		if err != nil {
18997			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
18998		}
18999	}
19000	return
19001}
19002
19003// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
19004// a long-running operation.
19005type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
19006	azure.Future
19007}
19008
19009// Result returns the result of the asynchronous operation.
19010// If the operation has not completed it will return an error.
19011func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
19012	var done bool
19013	done, err = future.DoneWithContext(context.Background(), client)
19014	if err != nil {
19015		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
19016		return
19017	}
19018	if !done {
19019		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
19020		return
19021	}
19022	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19023	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
19024		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
19025		if err != nil {
19026			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
19027		}
19028	}
19029	return
19030}
19031
19032// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
19033// a long-running operation.
19034type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
19035	azure.Future
19036}
19037
19038// Result returns the result of the asynchronous operation.
19039// If the operation has not completed it will return an error.
19040func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
19041	var done bool
19042	done, err = future.DoneWithContext(context.Background(), client)
19043	if err != nil {
19044		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
19045		return
19046	}
19047	if !done {
19048		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
19049		return
19050	}
19051	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19052	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
19053		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
19054		if err != nil {
19055			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
19056		}
19057	}
19058	return
19059}
19060
19061// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
19062// results of a long-running operation.
19063type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
19064	azure.Future
19065}
19066
19067// Result returns the result of the asynchronous operation.
19068// If the operation has not completed it will return an error.
19069func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
19070	var done bool
19071	done, err = future.DoneWithContext(context.Background(), client)
19072	if err != nil {
19073		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
19074		return
19075	}
19076	if !done {
19077		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
19078		return
19079	}
19080	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19081	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
19082		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
19083		if err != nil {
19084			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
19085		}
19086	}
19087	return
19088}
19089
19090// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
19091// results of a long-running operation.
19092type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
19093	azure.Future
19094}
19095
19096// Result returns the result of the asynchronous operation.
19097// If the operation has not completed it will return an error.
19098func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
19099	var done bool
19100	done, err = future.DoneWithContext(context.Background(), client)
19101	if err != nil {
19102		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
19103		return
19104	}
19105	if !done {
19106		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
19107		return
19108	}
19109	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19110	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
19111		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
19112		if err != nil {
19113			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
19114		}
19115	}
19116	return
19117}
19118
19119// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
19120type VirtualNetworkGatewaySku struct {
19121	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
19122	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
19123	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
19124	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
19125	// Capacity - The capacity.
19126	Capacity *int32 `json:"capacity,omitempty"`
19127}
19128
19129// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
19130// long-running operation.
19131type VirtualNetworkGatewaysResetFuture struct {
19132	azure.Future
19133}
19134
19135// Result returns the result of the asynchronous operation.
19136// If the operation has not completed it will return an error.
19137func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
19138	var done bool
19139	done, err = future.DoneWithContext(context.Background(), client)
19140	if err != nil {
19141		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
19142		return
19143	}
19144	if !done {
19145		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
19146		return
19147	}
19148	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19149	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
19150		vng, err = client.ResetResponder(vng.Response.Response)
19151		if err != nil {
19152			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
19153		}
19154	}
19155	return
19156}
19157
19158// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
19159// results of a long-running operation.
19160type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
19161	azure.Future
19162}
19163
19164// Result returns the result of the asynchronous operation.
19165// If the operation has not completed it will return an error.
19166func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
19167	var done bool
19168	done, err = future.DoneWithContext(context.Background(), client)
19169	if err != nil {
19170		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
19171		return
19172	}
19173	if !done {
19174		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
19175		return
19176	}
19177	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19178	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
19179		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
19180		if err != nil {
19181			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
19182		}
19183	}
19184	return
19185}
19186
19187// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19188// long-running operation.
19189type VirtualNetworkGatewaysUpdateTagsFuture struct {
19190	azure.Future
19191}
19192
19193// Result returns the result of the asynchronous operation.
19194// If the operation has not completed it will return an error.
19195func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
19196	var done bool
19197	done, err = future.DoneWithContext(context.Background(), client)
19198	if err != nil {
19199		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19200		return
19201	}
19202	if !done {
19203		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
19204		return
19205	}
19206	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19207	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
19208		vng, err = client.UpdateTagsResponder(vng.Response.Response)
19209		if err != nil {
19210			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
19211		}
19212	}
19213	return
19214}
19215
19216// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
19217type VirtualNetworkListResult struct {
19218	autorest.Response `json:"-"`
19219	// Value - Gets a list of VirtualNetwork resources in a resource group.
19220	Value *[]VirtualNetwork `json:"value,omitempty"`
19221	// NextLink - The URL to get the next set of results.
19222	NextLink *string `json:"nextLink,omitempty"`
19223}
19224
19225// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
19226type VirtualNetworkListResultIterator struct {
19227	i    int
19228	page VirtualNetworkListResultPage
19229}
19230
19231// NextWithContext advances to the next value.  If there was an error making
19232// the request the iterator does not advance and the error is returned.
19233func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
19234	if tracing.IsEnabled() {
19235		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
19236		defer func() {
19237			sc := -1
19238			if iter.Response().Response.Response != nil {
19239				sc = iter.Response().Response.Response.StatusCode
19240			}
19241			tracing.EndSpan(ctx, sc, err)
19242		}()
19243	}
19244	iter.i++
19245	if iter.i < len(iter.page.Values()) {
19246		return nil
19247	}
19248	err = iter.page.NextWithContext(ctx)
19249	if err != nil {
19250		iter.i--
19251		return err
19252	}
19253	iter.i = 0
19254	return nil
19255}
19256
19257// Next advances to the next value.  If there was an error making
19258// the request the iterator does not advance and the error is returned.
19259// Deprecated: Use NextWithContext() instead.
19260func (iter *VirtualNetworkListResultIterator) Next() error {
19261	return iter.NextWithContext(context.Background())
19262}
19263
19264// NotDone returns true if the enumeration should be started or is not yet complete.
19265func (iter VirtualNetworkListResultIterator) NotDone() bool {
19266	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19267}
19268
19269// Response returns the raw server response from the last page request.
19270func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
19271	return iter.page.Response()
19272}
19273
19274// Value returns the current value or a zero-initialized value if the
19275// iterator has advanced beyond the end of the collection.
19276func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
19277	if !iter.page.NotDone() {
19278		return VirtualNetwork{}
19279	}
19280	return iter.page.Values()[iter.i]
19281}
19282
19283// Creates a new instance of the VirtualNetworkListResultIterator type.
19284func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
19285	return VirtualNetworkListResultIterator{page: page}
19286}
19287
19288// IsEmpty returns true if the ListResult contains no values.
19289func (vnlr VirtualNetworkListResult) IsEmpty() bool {
19290	return vnlr.Value == nil || len(*vnlr.Value) == 0
19291}
19292
19293// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
19294// It returns nil if no more results exist.
19295func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
19296	if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 {
19297		return nil, nil
19298	}
19299	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19300		autorest.AsJSON(),
19301		autorest.AsGet(),
19302		autorest.WithBaseURL(to.String(vnlr.NextLink)))
19303}
19304
19305// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
19306type VirtualNetworkListResultPage struct {
19307	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
19308	vnlr VirtualNetworkListResult
19309}
19310
19311// NextWithContext advances to the next page of values.  If there was an error making
19312// the request the page does not advance and the error is returned.
19313func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
19314	if tracing.IsEnabled() {
19315		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
19316		defer func() {
19317			sc := -1
19318			if page.Response().Response.Response != nil {
19319				sc = page.Response().Response.Response.StatusCode
19320			}
19321			tracing.EndSpan(ctx, sc, err)
19322		}()
19323	}
19324	next, err := page.fn(ctx, page.vnlr)
19325	if err != nil {
19326		return err
19327	}
19328	page.vnlr = next
19329	return nil
19330}
19331
19332// Next advances to the next page of values.  If there was an error making
19333// the request the page does not advance and the error is returned.
19334// Deprecated: Use NextWithContext() instead.
19335func (page *VirtualNetworkListResultPage) Next() error {
19336	return page.NextWithContext(context.Background())
19337}
19338
19339// NotDone returns true if the page enumeration should be started or is not yet complete.
19340func (page VirtualNetworkListResultPage) NotDone() bool {
19341	return !page.vnlr.IsEmpty()
19342}
19343
19344// Response returns the raw server response from the last page request.
19345func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
19346	return page.vnlr
19347}
19348
19349// Values returns the slice of values for the current page or nil if there are no values.
19350func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
19351	if page.vnlr.IsEmpty() {
19352		return nil
19353	}
19354	return *page.vnlr.Value
19355}
19356
19357// Creates a new instance of the VirtualNetworkListResultPage type.
19358func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
19359	return VirtualNetworkListResultPage{fn: getNextPage}
19360}
19361
19362// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
19363type VirtualNetworkListUsageResult struct {
19364	autorest.Response `json:"-"`
19365	// Value - READ-ONLY; VirtualNetwork usage stats.
19366	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
19367	// NextLink - The URL to get the next set of results.
19368	NextLink *string `json:"nextLink,omitempty"`
19369}
19370
19371// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
19372// values.
19373type VirtualNetworkListUsageResultIterator struct {
19374	i    int
19375	page VirtualNetworkListUsageResultPage
19376}
19377
19378// NextWithContext advances to the next value.  If there was an error making
19379// the request the iterator does not advance and the error is returned.
19380func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
19381	if tracing.IsEnabled() {
19382		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
19383		defer func() {
19384			sc := -1
19385			if iter.Response().Response.Response != nil {
19386				sc = iter.Response().Response.Response.StatusCode
19387			}
19388			tracing.EndSpan(ctx, sc, err)
19389		}()
19390	}
19391	iter.i++
19392	if iter.i < len(iter.page.Values()) {
19393		return nil
19394	}
19395	err = iter.page.NextWithContext(ctx)
19396	if err != nil {
19397		iter.i--
19398		return err
19399	}
19400	iter.i = 0
19401	return nil
19402}
19403
19404// Next advances to the next value.  If there was an error making
19405// the request the iterator does not advance and the error is returned.
19406// Deprecated: Use NextWithContext() instead.
19407func (iter *VirtualNetworkListUsageResultIterator) Next() error {
19408	return iter.NextWithContext(context.Background())
19409}
19410
19411// NotDone returns true if the enumeration should be started or is not yet complete.
19412func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
19413	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19414}
19415
19416// Response returns the raw server response from the last page request.
19417func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
19418	return iter.page.Response()
19419}
19420
19421// Value returns the current value or a zero-initialized value if the
19422// iterator has advanced beyond the end of the collection.
19423func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
19424	if !iter.page.NotDone() {
19425		return VirtualNetworkUsage{}
19426	}
19427	return iter.page.Values()[iter.i]
19428}
19429
19430// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
19431func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
19432	return VirtualNetworkListUsageResultIterator{page: page}
19433}
19434
19435// IsEmpty returns true if the ListResult contains no values.
19436func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
19437	return vnlur.Value == nil || len(*vnlur.Value) == 0
19438}
19439
19440// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
19441// It returns nil if no more results exist.
19442func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
19443	if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 {
19444		return nil, nil
19445	}
19446	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19447		autorest.AsJSON(),
19448		autorest.AsGet(),
19449		autorest.WithBaseURL(to.String(vnlur.NextLink)))
19450}
19451
19452// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
19453type VirtualNetworkListUsageResultPage struct {
19454	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
19455	vnlur VirtualNetworkListUsageResult
19456}
19457
19458// NextWithContext advances to the next page of values.  If there was an error making
19459// the request the page does not advance and the error is returned.
19460func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
19461	if tracing.IsEnabled() {
19462		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
19463		defer func() {
19464			sc := -1
19465			if page.Response().Response.Response != nil {
19466				sc = page.Response().Response.Response.StatusCode
19467			}
19468			tracing.EndSpan(ctx, sc, err)
19469		}()
19470	}
19471	next, err := page.fn(ctx, page.vnlur)
19472	if err != nil {
19473		return err
19474	}
19475	page.vnlur = next
19476	return nil
19477}
19478
19479// Next advances to the next page of values.  If there was an error making
19480// the request the page does not advance and the error is returned.
19481// Deprecated: Use NextWithContext() instead.
19482func (page *VirtualNetworkListUsageResultPage) Next() error {
19483	return page.NextWithContext(context.Background())
19484}
19485
19486// NotDone returns true if the page enumeration should be started or is not yet complete.
19487func (page VirtualNetworkListUsageResultPage) NotDone() bool {
19488	return !page.vnlur.IsEmpty()
19489}
19490
19491// Response returns the raw server response from the last page request.
19492func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
19493	return page.vnlur
19494}
19495
19496// Values returns the slice of values for the current page or nil if there are no values.
19497func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
19498	if page.vnlur.IsEmpty() {
19499		return nil
19500	}
19501	return *page.vnlur.Value
19502}
19503
19504// Creates a new instance of the VirtualNetworkListUsageResultPage type.
19505func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
19506	return VirtualNetworkListUsageResultPage{fn: getNextPage}
19507}
19508
19509// VirtualNetworkPeering peerings in a virtual network resource.
19510type VirtualNetworkPeering struct {
19511	autorest.Response `json:"-"`
19512	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
19513	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
19514	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19515	Name *string `json:"name,omitempty"`
19516	// Etag - A unique read-only string that changes whenever the resource is updated.
19517	Etag *string `json:"etag,omitempty"`
19518	// ID - Resource ID.
19519	ID *string `json:"id,omitempty"`
19520}
19521
19522// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
19523func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
19524	objectMap := make(map[string]interface{})
19525	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
19526		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
19527	}
19528	if vnp.Name != nil {
19529		objectMap["name"] = vnp.Name
19530	}
19531	if vnp.Etag != nil {
19532		objectMap["etag"] = vnp.Etag
19533	}
19534	if vnp.ID != nil {
19535		objectMap["id"] = vnp.ID
19536	}
19537	return json.Marshal(objectMap)
19538}
19539
19540// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
19541func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
19542	var m map[string]*json.RawMessage
19543	err := json.Unmarshal(body, &m)
19544	if err != nil {
19545		return err
19546	}
19547	for k, v := range m {
19548		switch k {
19549		case "properties":
19550			if v != nil {
19551				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
19552				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
19553				if err != nil {
19554					return err
19555				}
19556				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
19557			}
19558		case "name":
19559			if v != nil {
19560				var name string
19561				err = json.Unmarshal(*v, &name)
19562				if err != nil {
19563					return err
19564				}
19565				vnp.Name = &name
19566			}
19567		case "etag":
19568			if v != nil {
19569				var etag string
19570				err = json.Unmarshal(*v, &etag)
19571				if err != nil {
19572					return err
19573				}
19574				vnp.Etag = &etag
19575			}
19576		case "id":
19577			if v != nil {
19578				var ID string
19579				err = json.Unmarshal(*v, &ID)
19580				if err != nil {
19581					return err
19582				}
19583				vnp.ID = &ID
19584			}
19585		}
19586	}
19587
19588	return nil
19589}
19590
19591// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
19592// belong to a virtual network.
19593type VirtualNetworkPeeringListResult struct {
19594	autorest.Response `json:"-"`
19595	// Value - The peerings in a virtual network.
19596	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
19597	// NextLink - The URL to get the next set of results.
19598	NextLink *string `json:"nextLink,omitempty"`
19599}
19600
19601// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
19602// values.
19603type VirtualNetworkPeeringListResultIterator struct {
19604	i    int
19605	page VirtualNetworkPeeringListResultPage
19606}
19607
19608// NextWithContext advances to the next value.  If there was an error making
19609// the request the iterator does not advance and the error is returned.
19610func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
19611	if tracing.IsEnabled() {
19612		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
19613		defer func() {
19614			sc := -1
19615			if iter.Response().Response.Response != nil {
19616				sc = iter.Response().Response.Response.StatusCode
19617			}
19618			tracing.EndSpan(ctx, sc, err)
19619		}()
19620	}
19621	iter.i++
19622	if iter.i < len(iter.page.Values()) {
19623		return nil
19624	}
19625	err = iter.page.NextWithContext(ctx)
19626	if err != nil {
19627		iter.i--
19628		return err
19629	}
19630	iter.i = 0
19631	return nil
19632}
19633
19634// Next advances to the next value.  If there was an error making
19635// the request the iterator does not advance and the error is returned.
19636// Deprecated: Use NextWithContext() instead.
19637func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
19638	return iter.NextWithContext(context.Background())
19639}
19640
19641// NotDone returns true if the enumeration should be started or is not yet complete.
19642func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
19643	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19644}
19645
19646// Response returns the raw server response from the last page request.
19647func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
19648	return iter.page.Response()
19649}
19650
19651// Value returns the current value or a zero-initialized value if the
19652// iterator has advanced beyond the end of the collection.
19653func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
19654	if !iter.page.NotDone() {
19655		return VirtualNetworkPeering{}
19656	}
19657	return iter.page.Values()[iter.i]
19658}
19659
19660// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
19661func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
19662	return VirtualNetworkPeeringListResultIterator{page: page}
19663}
19664
19665// IsEmpty returns true if the ListResult contains no values.
19666func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
19667	return vnplr.Value == nil || len(*vnplr.Value) == 0
19668}
19669
19670// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
19671// It returns nil if no more results exist.
19672func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
19673	if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 {
19674		return nil, nil
19675	}
19676	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19677		autorest.AsJSON(),
19678		autorest.AsGet(),
19679		autorest.WithBaseURL(to.String(vnplr.NextLink)))
19680}
19681
19682// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
19683type VirtualNetworkPeeringListResultPage struct {
19684	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
19685	vnplr VirtualNetworkPeeringListResult
19686}
19687
19688// NextWithContext advances to the next page of values.  If there was an error making
19689// the request the page does not advance and the error is returned.
19690func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
19691	if tracing.IsEnabled() {
19692		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
19693		defer func() {
19694			sc := -1
19695			if page.Response().Response.Response != nil {
19696				sc = page.Response().Response.Response.StatusCode
19697			}
19698			tracing.EndSpan(ctx, sc, err)
19699		}()
19700	}
19701	next, err := page.fn(ctx, page.vnplr)
19702	if err != nil {
19703		return err
19704	}
19705	page.vnplr = next
19706	return nil
19707}
19708
19709// Next advances to the next page of values.  If there was an error making
19710// the request the page does not advance and the error is returned.
19711// Deprecated: Use NextWithContext() instead.
19712func (page *VirtualNetworkPeeringListResultPage) Next() error {
19713	return page.NextWithContext(context.Background())
19714}
19715
19716// NotDone returns true if the page enumeration should be started or is not yet complete.
19717func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
19718	return !page.vnplr.IsEmpty()
19719}
19720
19721// Response returns the raw server response from the last page request.
19722func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
19723	return page.vnplr
19724}
19725
19726// Values returns the slice of values for the current page or nil if there are no values.
19727func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
19728	if page.vnplr.IsEmpty() {
19729		return nil
19730	}
19731	return *page.vnplr.Value
19732}
19733
19734// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
19735func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
19736	return VirtualNetworkPeeringListResultPage{fn: getNextPage}
19737}
19738
19739// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
19740type VirtualNetworkPeeringPropertiesFormat struct {
19741	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
19742	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
19743	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
19744	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
19745	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
19746	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
19747	// UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
19748	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
19749	// RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
19750	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
19751	// RemoteAddressSpace - The reference of the remote virtual network address space.
19752	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
19753	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
19754	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
19755	// ProvisioningState - The provisioning state of the resource.
19756	ProvisioningState *string `json:"provisioningState,omitempty"`
19757}
19758
19759// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19760// long-running operation.
19761type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
19762	azure.Future
19763}
19764
19765// Result returns the result of the asynchronous operation.
19766// If the operation has not completed it will return an error.
19767func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
19768	var done bool
19769	done, err = future.DoneWithContext(context.Background(), client)
19770	if err != nil {
19771		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19772		return
19773	}
19774	if !done {
19775		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
19776		return
19777	}
19778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19779	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
19780		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
19781		if err != nil {
19782			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
19783		}
19784	}
19785	return
19786}
19787
19788// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
19789// long-running operation.
19790type VirtualNetworkPeeringsDeleteFuture struct {
19791	azure.Future
19792}
19793
19794// Result returns the result of the asynchronous operation.
19795// If the operation has not completed it will return an error.
19796func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
19797	var done bool
19798	done, err = future.DoneWithContext(context.Background(), client)
19799	if err != nil {
19800		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
19801		return
19802	}
19803	if !done {
19804		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
19805		return
19806	}
19807	ar.Response = future.Response()
19808	return
19809}
19810
19811// VirtualNetworkPropertiesFormat properties of the virtual network.
19812type VirtualNetworkPropertiesFormat struct {
19813	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
19814	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
19815	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
19816	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
19817	// Subnets - A list of subnets in a Virtual Network.
19818	Subnets *[]Subnet `json:"subnets,omitempty"`
19819	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
19820	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
19821	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
19822	ResourceGUID *string `json:"resourceGuid,omitempty"`
19823	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19824	ProvisioningState *string `json:"provisioningState,omitempty"`
19825	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
19826	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
19827	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
19828	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
19829	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
19830	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
19831}
19832
19833// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19834// long-running operation.
19835type VirtualNetworksCreateOrUpdateFuture struct {
19836	azure.Future
19837}
19838
19839// Result returns the result of the asynchronous operation.
19840// If the operation has not completed it will return an error.
19841func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
19842	var done bool
19843	done, err = future.DoneWithContext(context.Background(), client)
19844	if err != nil {
19845		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19846		return
19847	}
19848	if !done {
19849		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
19850		return
19851	}
19852	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19853	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
19854		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
19855		if err != nil {
19856			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
19857		}
19858	}
19859	return
19860}
19861
19862// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19863// operation.
19864type VirtualNetworksDeleteFuture struct {
19865	azure.Future
19866}
19867
19868// Result returns the result of the asynchronous operation.
19869// If the operation has not completed it will return an error.
19870func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
19871	var done bool
19872	done, err = future.DoneWithContext(context.Background(), client)
19873	if err != nil {
19874		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
19875		return
19876	}
19877	if !done {
19878		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
19879		return
19880	}
19881	ar.Response = future.Response()
19882	return
19883}
19884
19885// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19886// long-running operation.
19887type VirtualNetworksUpdateTagsFuture struct {
19888	azure.Future
19889}
19890
19891// Result returns the result of the asynchronous operation.
19892// If the operation has not completed it will return an error.
19893func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
19894	var done bool
19895	done, err = future.DoneWithContext(context.Background(), client)
19896	if err != nil {
19897		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19898		return
19899	}
19900	if !done {
19901		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
19902		return
19903	}
19904	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19905	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
19906		vn, err = client.UpdateTagsResponder(vn.Response.Response)
19907		if err != nil {
19908			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
19909		}
19910	}
19911	return
19912}
19913
19914// VirtualNetworkUsage usage details for subnet.
19915type VirtualNetworkUsage struct {
19916	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
19917	CurrentValue *float64 `json:"currentValue,omitempty"`
19918	// ID - READ-ONLY; Subnet identifier.
19919	ID *string `json:"id,omitempty"`
19920	// Limit - READ-ONLY; Indicates the size of the subnet.
19921	Limit *float64 `json:"limit,omitempty"`
19922	// Name - READ-ONLY; The name containing common and localized value for usage.
19923	Name *VirtualNetworkUsageName `json:"name,omitempty"`
19924	// Unit - READ-ONLY; Usage units. Returns 'Count'
19925	Unit *string `json:"unit,omitempty"`
19926}
19927
19928// VirtualNetworkUsageName usage strings container.
19929type VirtualNetworkUsageName struct {
19930	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
19931	LocalizedValue *string `json:"localizedValue,omitempty"`
19932	// Value - READ-ONLY; Subnet size and usage string.
19933	Value *string `json:"value,omitempty"`
19934}
19935
19936// VirtualWAN virtualWAN Resource.
19937type VirtualWAN struct {
19938	autorest.Response     `json:"-"`
19939	*VirtualWanProperties `json:"properties,omitempty"`
19940	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19941	Etag *string `json:"etag,omitempty"`
19942	// ID - Resource ID.
19943	ID *string `json:"id,omitempty"`
19944	// Name - READ-ONLY; Resource name.
19945	Name *string `json:"name,omitempty"`
19946	// Type - READ-ONLY; Resource type.
19947	Type *string `json:"type,omitempty"`
19948	// Location - Resource location.
19949	Location *string `json:"location,omitempty"`
19950	// Tags - Resource tags.
19951	Tags map[string]*string `json:"tags"`
19952}
19953
19954// MarshalJSON is the custom marshaler for VirtualWAN.
19955func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
19956	objectMap := make(map[string]interface{})
19957	if vw.VirtualWanProperties != nil {
19958		objectMap["properties"] = vw.VirtualWanProperties
19959	}
19960	if vw.ID != nil {
19961		objectMap["id"] = vw.ID
19962	}
19963	if vw.Location != nil {
19964		objectMap["location"] = vw.Location
19965	}
19966	if vw.Tags != nil {
19967		objectMap["tags"] = vw.Tags
19968	}
19969	return json.Marshal(objectMap)
19970}
19971
19972// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
19973func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
19974	var m map[string]*json.RawMessage
19975	err := json.Unmarshal(body, &m)
19976	if err != nil {
19977		return err
19978	}
19979	for k, v := range m {
19980		switch k {
19981		case "properties":
19982			if v != nil {
19983				var virtualWanProperties VirtualWanProperties
19984				err = json.Unmarshal(*v, &virtualWanProperties)
19985				if err != nil {
19986					return err
19987				}
19988				vw.VirtualWanProperties = &virtualWanProperties
19989			}
19990		case "etag":
19991			if v != nil {
19992				var etag string
19993				err = json.Unmarshal(*v, &etag)
19994				if err != nil {
19995					return err
19996				}
19997				vw.Etag = &etag
19998			}
19999		case "id":
20000			if v != nil {
20001				var ID string
20002				err = json.Unmarshal(*v, &ID)
20003				if err != nil {
20004					return err
20005				}
20006				vw.ID = &ID
20007			}
20008		case "name":
20009			if v != nil {
20010				var name string
20011				err = json.Unmarshal(*v, &name)
20012				if err != nil {
20013					return err
20014				}
20015				vw.Name = &name
20016			}
20017		case "type":
20018			if v != nil {
20019				var typeVar string
20020				err = json.Unmarshal(*v, &typeVar)
20021				if err != nil {
20022					return err
20023				}
20024				vw.Type = &typeVar
20025			}
20026		case "location":
20027			if v != nil {
20028				var location string
20029				err = json.Unmarshal(*v, &location)
20030				if err != nil {
20031					return err
20032				}
20033				vw.Location = &location
20034			}
20035		case "tags":
20036			if v != nil {
20037				var tags map[string]*string
20038				err = json.Unmarshal(*v, &tags)
20039				if err != nil {
20040					return err
20041				}
20042				vw.Tags = tags
20043			}
20044		}
20045	}
20046
20047	return nil
20048}
20049
20050// VirtualWanProperties parameters for VirtualWAN
20051type VirtualWanProperties struct {
20052	// DisableVpnEncryption - Vpn encryption to be disabled or not.
20053	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
20054	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
20055	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
20056	// VpnSites - READ-ONLY
20057	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
20058	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20059	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20060}
20061
20062// VirtualWANsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20063// long-running operation.
20064type VirtualWANsCreateOrUpdateFuture struct {
20065	azure.Future
20066}
20067
20068// Result returns the result of the asynchronous operation.
20069// If the operation has not completed it will return an error.
20070func (future *VirtualWANsCreateOrUpdateFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) {
20071	var done bool
20072	done, err = future.DoneWithContext(context.Background(), client)
20073	if err != nil {
20074		err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20075		return
20076	}
20077	if !done {
20078		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsCreateOrUpdateFuture")
20079		return
20080	}
20081	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20082	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
20083		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
20084		if err != nil {
20085			err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
20086		}
20087	}
20088	return
20089}
20090
20091// VirtualWANsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20092// operation.
20093type VirtualWANsDeleteFuture struct {
20094	azure.Future
20095}
20096
20097// Result returns the result of the asynchronous operation.
20098// If the operation has not completed it will return an error.
20099func (future *VirtualWANsDeleteFuture) Result(client VirtualWANsClient) (ar autorest.Response, err error) {
20100	var done bool
20101	done, err = future.DoneWithContext(context.Background(), client)
20102	if err != nil {
20103		err = autorest.NewErrorWithError(err, "network.VirtualWANsDeleteFuture", "Result", future.Response(), "Polling failure")
20104		return
20105	}
20106	if !done {
20107		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsDeleteFuture")
20108		return
20109	}
20110	ar.Response = future.Response()
20111	return
20112}
20113
20114// VirtualWANsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
20115// operation.
20116type VirtualWANsUpdateTagsFuture struct {
20117	azure.Future
20118}
20119
20120// Result returns the result of the asynchronous operation.
20121// If the operation has not completed it will return an error.
20122func (future *VirtualWANsUpdateTagsFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) {
20123	var done bool
20124	done, err = future.DoneWithContext(context.Background(), client)
20125	if err != nil {
20126		err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20127		return
20128	}
20129	if !done {
20130		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsUpdateTagsFuture")
20131		return
20132	}
20133	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20134	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
20135		vw, err = client.UpdateTagsResponder(vw.Response.Response)
20136		if err != nil {
20137			err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
20138		}
20139	}
20140	return
20141}
20142
20143// VpnClientConfiguration vpnClientConfiguration for P2S client.
20144type VpnClientConfiguration struct {
20145	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
20146	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
20147	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
20148	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
20149	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
20150	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
20151	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
20152	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
20153	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
20154	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
20155	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
20156	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
20157	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
20158	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
20159}
20160
20161// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
20162type VpnClientIPsecParameters struct {
20163	autorest.Response `json:"-"`
20164	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
20165	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
20166	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
20167	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
20168	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
20169	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
20170	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
20171	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
20172	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
20173	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
20174	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
20175	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
20176	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
20177	DhGroup DhGroup `json:"dhGroup,omitempty"`
20178	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
20179	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
20180}
20181
20182// VpnClientParameters vpn Client Parameters for package generation
20183type VpnClientParameters struct {
20184	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
20185	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
20186	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
20187	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
20188	// RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication.
20189	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
20190	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
20191	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
20192}
20193
20194// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
20195type VpnClientRevokedCertificate struct {
20196	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
20197	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
20198	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20199	Name *string `json:"name,omitempty"`
20200	// Etag - A unique read-only string that changes whenever the resource is updated.
20201	Etag *string `json:"etag,omitempty"`
20202	// ID - Resource ID.
20203	ID *string `json:"id,omitempty"`
20204}
20205
20206// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
20207func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
20208	objectMap := make(map[string]interface{})
20209	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
20210		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
20211	}
20212	if vcrc.Name != nil {
20213		objectMap["name"] = vcrc.Name
20214	}
20215	if vcrc.Etag != nil {
20216		objectMap["etag"] = vcrc.Etag
20217	}
20218	if vcrc.ID != nil {
20219		objectMap["id"] = vcrc.ID
20220	}
20221	return json.Marshal(objectMap)
20222}
20223
20224// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
20225func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
20226	var m map[string]*json.RawMessage
20227	err := json.Unmarshal(body, &m)
20228	if err != nil {
20229		return err
20230	}
20231	for k, v := range m {
20232		switch k {
20233		case "properties":
20234			if v != nil {
20235				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
20236				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
20237				if err != nil {
20238					return err
20239				}
20240				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
20241			}
20242		case "name":
20243			if v != nil {
20244				var name string
20245				err = json.Unmarshal(*v, &name)
20246				if err != nil {
20247					return err
20248				}
20249				vcrc.Name = &name
20250			}
20251		case "etag":
20252			if v != nil {
20253				var etag string
20254				err = json.Unmarshal(*v, &etag)
20255				if err != nil {
20256					return err
20257				}
20258				vcrc.Etag = &etag
20259			}
20260		case "id":
20261			if v != nil {
20262				var ID string
20263				err = json.Unmarshal(*v, &ID)
20264				if err != nil {
20265					return err
20266				}
20267				vcrc.ID = &ID
20268			}
20269		}
20270	}
20271
20272	return nil
20273}
20274
20275// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
20276// network gateway.
20277type VpnClientRevokedCertificatePropertiesFormat struct {
20278	// Thumbprint - The revoked VPN client certificate thumbprint.
20279	Thumbprint *string `json:"thumbprint,omitempty"`
20280	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20281	ProvisioningState *string `json:"provisioningState,omitempty"`
20282}
20283
20284// VpnClientRootCertificate VPN client root certificate of virtual network gateway
20285type VpnClientRootCertificate struct {
20286	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
20287	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
20288	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20289	Name *string `json:"name,omitempty"`
20290	// Etag - A unique read-only string that changes whenever the resource is updated.
20291	Etag *string `json:"etag,omitempty"`
20292	// ID - Resource ID.
20293	ID *string `json:"id,omitempty"`
20294}
20295
20296// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
20297func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
20298	objectMap := make(map[string]interface{})
20299	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
20300		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
20301	}
20302	if vcrc.Name != nil {
20303		objectMap["name"] = vcrc.Name
20304	}
20305	if vcrc.Etag != nil {
20306		objectMap["etag"] = vcrc.Etag
20307	}
20308	if vcrc.ID != nil {
20309		objectMap["id"] = vcrc.ID
20310	}
20311	return json.Marshal(objectMap)
20312}
20313
20314// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
20315func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
20316	var m map[string]*json.RawMessage
20317	err := json.Unmarshal(body, &m)
20318	if err != nil {
20319		return err
20320	}
20321	for k, v := range m {
20322		switch k {
20323		case "properties":
20324			if v != nil {
20325				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
20326				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
20327				if err != nil {
20328					return err
20329				}
20330				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
20331			}
20332		case "name":
20333			if v != nil {
20334				var name string
20335				err = json.Unmarshal(*v, &name)
20336				if err != nil {
20337					return err
20338				}
20339				vcrc.Name = &name
20340			}
20341		case "etag":
20342			if v != nil {
20343				var etag string
20344				err = json.Unmarshal(*v, &etag)
20345				if err != nil {
20346					return err
20347				}
20348				vcrc.Etag = &etag
20349			}
20350		case "id":
20351			if v != nil {
20352				var ID string
20353				err = json.Unmarshal(*v, &ID)
20354				if err != nil {
20355					return err
20356				}
20357				vcrc.ID = &ID
20358			}
20359		}
20360	}
20361
20362	return nil
20363}
20364
20365// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
20366type VpnClientRootCertificatePropertiesFormat struct {
20367	// PublicCertData - The certificate public data.
20368	PublicCertData *string `json:"publicCertData,omitempty"`
20369	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20370	ProvisioningState *string `json:"provisioningState,omitempty"`
20371}
20372
20373// VpnConnection vpnConnection Resource.
20374type VpnConnection struct {
20375	autorest.Response        `json:"-"`
20376	*VpnConnectionProperties `json:"properties,omitempty"`
20377	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20378	Name *string `json:"name,omitempty"`
20379	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
20380	Etag *string `json:"etag,omitempty"`
20381	// ID - Resource ID.
20382	ID *string `json:"id,omitempty"`
20383}
20384
20385// MarshalJSON is the custom marshaler for VpnConnection.
20386func (vc VpnConnection) MarshalJSON() ([]byte, error) {
20387	objectMap := make(map[string]interface{})
20388	if vc.VpnConnectionProperties != nil {
20389		objectMap["properties"] = vc.VpnConnectionProperties
20390	}
20391	if vc.Name != nil {
20392		objectMap["name"] = vc.Name
20393	}
20394	if vc.ID != nil {
20395		objectMap["id"] = vc.ID
20396	}
20397	return json.Marshal(objectMap)
20398}
20399
20400// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
20401func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
20402	var m map[string]*json.RawMessage
20403	err := json.Unmarshal(body, &m)
20404	if err != nil {
20405		return err
20406	}
20407	for k, v := range m {
20408		switch k {
20409		case "properties":
20410			if v != nil {
20411				var vpnConnectionProperties VpnConnectionProperties
20412				err = json.Unmarshal(*v, &vpnConnectionProperties)
20413				if err != nil {
20414					return err
20415				}
20416				vc.VpnConnectionProperties = &vpnConnectionProperties
20417			}
20418		case "name":
20419			if v != nil {
20420				var name string
20421				err = json.Unmarshal(*v, &name)
20422				if err != nil {
20423					return err
20424				}
20425				vc.Name = &name
20426			}
20427		case "etag":
20428			if v != nil {
20429				var etag string
20430				err = json.Unmarshal(*v, &etag)
20431				if err != nil {
20432					return err
20433				}
20434				vc.Etag = &etag
20435			}
20436		case "id":
20437			if v != nil {
20438				var ID string
20439				err = json.Unmarshal(*v, &ID)
20440				if err != nil {
20441					return err
20442				}
20443				vc.ID = &ID
20444			}
20445		}
20446	}
20447
20448	return nil
20449}
20450
20451// VpnConnectionProperties parameters for VpnConnection
20452type VpnConnectionProperties struct {
20453	// RemoteVpnSite - Id of the connected vpn site.
20454	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
20455	// RoutingWeight - routing weight for vpn connection.
20456	RoutingWeight *int32 `json:"routingWeight,omitempty"`
20457	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
20458	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
20459	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
20460	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
20461	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
20462	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
20463	// ConnectionBandwidth - READ-ONLY; Expected bandwidth in MBPS.
20464	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
20465	// SharedKey - SharedKey for the vpn connection.
20466	SharedKey *string `json:"sharedKey,omitempty"`
20467	// EnableBgp - EnableBgp flag
20468	EnableBgp *bool `json:"enableBgp,omitempty"`
20469	// IpsecPolicies - The IPSec Policies to be considered by this connection.
20470	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
20471	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20472	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20473}
20474
20475// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20476// long-running operation.
20477type VpnConnectionsCreateOrUpdateFuture struct {
20478	azure.Future
20479}
20480
20481// Result returns the result of the asynchronous operation.
20482// If the operation has not completed it will return an error.
20483func (future *VpnConnectionsCreateOrUpdateFuture) Result(client VpnConnectionsClient) (vc VpnConnection, err error) {
20484	var done bool
20485	done, err = future.DoneWithContext(context.Background(), client)
20486	if err != nil {
20487		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20488		return
20489	}
20490	if !done {
20491		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
20492		return
20493	}
20494	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20495	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
20496		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
20497		if err != nil {
20498			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
20499		}
20500	}
20501	return
20502}
20503
20504// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20505// operation.
20506type VpnConnectionsDeleteFuture struct {
20507	azure.Future
20508}
20509
20510// Result returns the result of the asynchronous operation.
20511// If the operation has not completed it will return an error.
20512func (future *VpnConnectionsDeleteFuture) Result(client VpnConnectionsClient) (ar autorest.Response, err error) {
20513	var done bool
20514	done, err = future.DoneWithContext(context.Background(), client)
20515	if err != nil {
20516		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
20517		return
20518	}
20519	if !done {
20520		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
20521		return
20522	}
20523	ar.Response = future.Response()
20524	return
20525}
20526
20527// VpnDeviceScriptParameters vpn device configuration script generation parameters
20528type VpnDeviceScriptParameters struct {
20529	// Vendor - The vendor for the vpn device.
20530	Vendor *string `json:"vendor,omitempty"`
20531	// DeviceFamily - The device family for the vpn device.
20532	DeviceFamily *string `json:"deviceFamily,omitempty"`
20533	// FirmwareVersion - The firmware version for the vpn device.
20534	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
20535}
20536
20537// VpnGateway vpnGateway Resource.
20538type VpnGateway struct {
20539	autorest.Response     `json:"-"`
20540	*VpnGatewayProperties `json:"properties,omitempty"`
20541	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
20542	Etag *string `json:"etag,omitempty"`
20543	// ID - Resource ID.
20544	ID *string `json:"id,omitempty"`
20545	// Name - READ-ONLY; Resource name.
20546	Name *string `json:"name,omitempty"`
20547	// Type - READ-ONLY; Resource type.
20548	Type *string `json:"type,omitempty"`
20549	// Location - Resource location.
20550	Location *string `json:"location,omitempty"`
20551	// Tags - Resource tags.
20552	Tags map[string]*string `json:"tags"`
20553}
20554
20555// MarshalJSON is the custom marshaler for VpnGateway.
20556func (vg VpnGateway) MarshalJSON() ([]byte, error) {
20557	objectMap := make(map[string]interface{})
20558	if vg.VpnGatewayProperties != nil {
20559		objectMap["properties"] = vg.VpnGatewayProperties
20560	}
20561	if vg.ID != nil {
20562		objectMap["id"] = vg.ID
20563	}
20564	if vg.Location != nil {
20565		objectMap["location"] = vg.Location
20566	}
20567	if vg.Tags != nil {
20568		objectMap["tags"] = vg.Tags
20569	}
20570	return json.Marshal(objectMap)
20571}
20572
20573// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
20574func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
20575	var m map[string]*json.RawMessage
20576	err := json.Unmarshal(body, &m)
20577	if err != nil {
20578		return err
20579	}
20580	for k, v := range m {
20581		switch k {
20582		case "properties":
20583			if v != nil {
20584				var vpnGatewayProperties VpnGatewayProperties
20585				err = json.Unmarshal(*v, &vpnGatewayProperties)
20586				if err != nil {
20587					return err
20588				}
20589				vg.VpnGatewayProperties = &vpnGatewayProperties
20590			}
20591		case "etag":
20592			if v != nil {
20593				var etag string
20594				err = json.Unmarshal(*v, &etag)
20595				if err != nil {
20596					return err
20597				}
20598				vg.Etag = &etag
20599			}
20600		case "id":
20601			if v != nil {
20602				var ID string
20603				err = json.Unmarshal(*v, &ID)
20604				if err != nil {
20605					return err
20606				}
20607				vg.ID = &ID
20608			}
20609		case "name":
20610			if v != nil {
20611				var name string
20612				err = json.Unmarshal(*v, &name)
20613				if err != nil {
20614					return err
20615				}
20616				vg.Name = &name
20617			}
20618		case "type":
20619			if v != nil {
20620				var typeVar string
20621				err = json.Unmarshal(*v, &typeVar)
20622				if err != nil {
20623					return err
20624				}
20625				vg.Type = &typeVar
20626			}
20627		case "location":
20628			if v != nil {
20629				var location string
20630				err = json.Unmarshal(*v, &location)
20631				if err != nil {
20632					return err
20633				}
20634				vg.Location = &location
20635			}
20636		case "tags":
20637			if v != nil {
20638				var tags map[string]*string
20639				err = json.Unmarshal(*v, &tags)
20640				if err != nil {
20641					return err
20642				}
20643				vg.Tags = tags
20644			}
20645		}
20646	}
20647
20648	return nil
20649}
20650
20651// VpnGatewayProperties parameters for VpnGateway
20652type VpnGatewayProperties struct {
20653	// VirtualHub - The VirtualHub to which the gateway belongs
20654	VirtualHub *SubResource `json:"virtualHub,omitempty"`
20655	// Connections - list of all vpn connections to the gateway.
20656	Connections *[]VpnConnection `json:"connections,omitempty"`
20657	// BgpSettings - Local network gateway's BGP speaker settings.
20658	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
20659	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20660	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20661	// Policies - The policies applied to this vpn gateway.
20662	Policies *Policies `json:"policies,omitempty"`
20663}
20664
20665// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20666// long-running operation.
20667type VpnGatewaysCreateOrUpdateFuture struct {
20668	azure.Future
20669}
20670
20671// Result returns the result of the asynchronous operation.
20672// If the operation has not completed it will return an error.
20673func (future *VpnGatewaysCreateOrUpdateFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
20674	var done bool
20675	done, err = future.DoneWithContext(context.Background(), client)
20676	if err != nil {
20677		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20678		return
20679	}
20680	if !done {
20681		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
20682		return
20683	}
20684	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20685	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
20686		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
20687		if err != nil {
20688			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
20689		}
20690	}
20691	return
20692}
20693
20694// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20695// operation.
20696type VpnGatewaysDeleteFuture struct {
20697	azure.Future
20698}
20699
20700// Result returns the result of the asynchronous operation.
20701// If the operation has not completed it will return an error.
20702func (future *VpnGatewaysDeleteFuture) Result(client VpnGatewaysClient) (ar autorest.Response, err error) {
20703	var done bool
20704	done, err = future.DoneWithContext(context.Background(), client)
20705	if err != nil {
20706		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20707		return
20708	}
20709	if !done {
20710		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
20711		return
20712	}
20713	ar.Response = future.Response()
20714	return
20715}
20716
20717// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
20718// operation.
20719type VpnGatewaysUpdateTagsFuture struct {
20720	azure.Future
20721}
20722
20723// Result returns the result of the asynchronous operation.
20724// If the operation has not completed it will return an error.
20725func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
20726	var done bool
20727	done, err = future.DoneWithContext(context.Background(), client)
20728	if err != nil {
20729		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20730		return
20731	}
20732	if !done {
20733		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
20734		return
20735	}
20736	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20737	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
20738		vg, err = client.UpdateTagsResponder(vg.Response.Response)
20739		if err != nil {
20740			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
20741		}
20742	}
20743	return
20744}
20745
20746// VpnSite vpnSite Resource.
20747type VpnSite struct {
20748	autorest.Response  `json:"-"`
20749	*VpnSiteProperties `json:"properties,omitempty"`
20750	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
20751	Etag *string `json:"etag,omitempty"`
20752	// ID - Resource ID.
20753	ID *string `json:"id,omitempty"`
20754	// Name - READ-ONLY; Resource name.
20755	Name *string `json:"name,omitempty"`
20756	// Type - READ-ONLY; Resource type.
20757	Type *string `json:"type,omitempty"`
20758	// Location - Resource location.
20759	Location *string `json:"location,omitempty"`
20760	// Tags - Resource tags.
20761	Tags map[string]*string `json:"tags"`
20762}
20763
20764// MarshalJSON is the custom marshaler for VpnSite.
20765func (vs VpnSite) MarshalJSON() ([]byte, error) {
20766	objectMap := make(map[string]interface{})
20767	if vs.VpnSiteProperties != nil {
20768		objectMap["properties"] = vs.VpnSiteProperties
20769	}
20770	if vs.ID != nil {
20771		objectMap["id"] = vs.ID
20772	}
20773	if vs.Location != nil {
20774		objectMap["location"] = vs.Location
20775	}
20776	if vs.Tags != nil {
20777		objectMap["tags"] = vs.Tags
20778	}
20779	return json.Marshal(objectMap)
20780}
20781
20782// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
20783func (vs *VpnSite) UnmarshalJSON(body []byte) error {
20784	var m map[string]*json.RawMessage
20785	err := json.Unmarshal(body, &m)
20786	if err != nil {
20787		return err
20788	}
20789	for k, v := range m {
20790		switch k {
20791		case "properties":
20792			if v != nil {
20793				var vpnSiteProperties VpnSiteProperties
20794				err = json.Unmarshal(*v, &vpnSiteProperties)
20795				if err != nil {
20796					return err
20797				}
20798				vs.VpnSiteProperties = &vpnSiteProperties
20799			}
20800		case "etag":
20801			if v != nil {
20802				var etag string
20803				err = json.Unmarshal(*v, &etag)
20804				if err != nil {
20805					return err
20806				}
20807				vs.Etag = &etag
20808			}
20809		case "id":
20810			if v != nil {
20811				var ID string
20812				err = json.Unmarshal(*v, &ID)
20813				if err != nil {
20814					return err
20815				}
20816				vs.ID = &ID
20817			}
20818		case "name":
20819			if v != nil {
20820				var name string
20821				err = json.Unmarshal(*v, &name)
20822				if err != nil {
20823					return err
20824				}
20825				vs.Name = &name
20826			}
20827		case "type":
20828			if v != nil {
20829				var typeVar string
20830				err = json.Unmarshal(*v, &typeVar)
20831				if err != nil {
20832					return err
20833				}
20834				vs.Type = &typeVar
20835			}
20836		case "location":
20837			if v != nil {
20838				var location string
20839				err = json.Unmarshal(*v, &location)
20840				if err != nil {
20841					return err
20842				}
20843				vs.Location = &location
20844			}
20845		case "tags":
20846			if v != nil {
20847				var tags map[string]*string
20848				err = json.Unmarshal(*v, &tags)
20849				if err != nil {
20850					return err
20851				}
20852				vs.Tags = tags
20853			}
20854		}
20855	}
20856
20857	return nil
20858}
20859
20860// VpnSiteID vpnSite Resource.
20861type VpnSiteID struct {
20862	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
20863	VpnSite *string `json:"vpnSite,omitempty"`
20864}
20865
20866// VpnSiteProperties parameters for VpnSite
20867type VpnSiteProperties struct {
20868	// VirtualWAN - The VirtualWAN to which the vpnSite belongs
20869	VirtualWAN *SubResource `json:"virtualWAN,omitempty"`
20870	// DeviceProperties - The device properties
20871	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
20872	// IPAddress - The ip-address for the vpn-site.
20873	IPAddress *string `json:"ipAddress,omitempty"`
20874	// SiteKey - The key for vpn-site that can be used for connections.
20875	SiteKey *string `json:"siteKey,omitempty"`
20876	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
20877	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
20878	// BgpProperties - The set of bgp properties.
20879	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
20880	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20881	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20882}
20883
20884// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
20885// long-running operation.
20886type VpnSitesConfigurationDownloadFuture struct {
20887	azure.Future
20888}
20889
20890// Result returns the result of the asynchronous operation.
20891// If the operation has not completed it will return an error.
20892func (future *VpnSitesConfigurationDownloadFuture) Result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
20893	var done bool
20894	done, err = future.DoneWithContext(context.Background(), client)
20895	if err != nil {
20896		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
20897		return
20898	}
20899	if !done {
20900		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
20901		return
20902	}
20903	ar.Response = future.Response()
20904	return
20905}
20906
20907// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
20908// operation.
20909type VpnSitesCreateOrUpdateFuture struct {
20910	azure.Future
20911}
20912
20913// Result returns the result of the asynchronous operation.
20914// If the operation has not completed it will return an error.
20915func (future *VpnSitesCreateOrUpdateFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
20916	var done bool
20917	done, err = future.DoneWithContext(context.Background(), client)
20918	if err != nil {
20919		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20920		return
20921	}
20922	if !done {
20923		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
20924		return
20925	}
20926	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20927	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
20928		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
20929		if err != nil {
20930			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
20931		}
20932	}
20933	return
20934}
20935
20936// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20937// operation.
20938type VpnSitesDeleteFuture struct {
20939	azure.Future
20940}
20941
20942// Result returns the result of the asynchronous operation.
20943// If the operation has not completed it will return an error.
20944func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.Response, err error) {
20945	var done bool
20946	done, err = future.DoneWithContext(context.Background(), client)
20947	if err != nil {
20948		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
20949		return
20950	}
20951	if !done {
20952		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
20953		return
20954	}
20955	ar.Response = future.Response()
20956	return
20957}
20958
20959// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
20960// operation.
20961type VpnSitesUpdateTagsFuture struct {
20962	azure.Future
20963}
20964
20965// Result returns the result of the asynchronous operation.
20966// If the operation has not completed it will return an error.
20967func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
20968	var done bool
20969	done, err = future.DoneWithContext(context.Background(), client)
20970	if err != nil {
20971		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20972		return
20973	}
20974	if !done {
20975		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
20976		return
20977	}
20978	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20979	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
20980		vs, err = client.UpdateTagsResponder(vs.Response.Response)
20981		if err != nil {
20982			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
20983		}
20984	}
20985	return
20986}
20987
20988// Watcher network watcher in a resource group.
20989type Watcher struct {
20990	autorest.Response `json:"-"`
20991	// Etag - A unique read-only string that changes whenever the resource is updated.
20992	Etag                     *string `json:"etag,omitempty"`
20993	*WatcherPropertiesFormat `json:"properties,omitempty"`
20994	// ID - Resource ID.
20995	ID *string `json:"id,omitempty"`
20996	// Name - READ-ONLY; Resource name.
20997	Name *string `json:"name,omitempty"`
20998	// Type - READ-ONLY; Resource type.
20999	Type *string `json:"type,omitempty"`
21000	// Location - Resource location.
21001	Location *string `json:"location,omitempty"`
21002	// Tags - Resource tags.
21003	Tags map[string]*string `json:"tags"`
21004}
21005
21006// MarshalJSON is the custom marshaler for Watcher.
21007func (w Watcher) MarshalJSON() ([]byte, error) {
21008	objectMap := make(map[string]interface{})
21009	if w.Etag != nil {
21010		objectMap["etag"] = w.Etag
21011	}
21012	if w.WatcherPropertiesFormat != nil {
21013		objectMap["properties"] = w.WatcherPropertiesFormat
21014	}
21015	if w.ID != nil {
21016		objectMap["id"] = w.ID
21017	}
21018	if w.Location != nil {
21019		objectMap["location"] = w.Location
21020	}
21021	if w.Tags != nil {
21022		objectMap["tags"] = w.Tags
21023	}
21024	return json.Marshal(objectMap)
21025}
21026
21027// UnmarshalJSON is the custom unmarshaler for Watcher struct.
21028func (w *Watcher) UnmarshalJSON(body []byte) error {
21029	var m map[string]*json.RawMessage
21030	err := json.Unmarshal(body, &m)
21031	if err != nil {
21032		return err
21033	}
21034	for k, v := range m {
21035		switch k {
21036		case "etag":
21037			if v != nil {
21038				var etag string
21039				err = json.Unmarshal(*v, &etag)
21040				if err != nil {
21041					return err
21042				}
21043				w.Etag = &etag
21044			}
21045		case "properties":
21046			if v != nil {
21047				var watcherPropertiesFormat WatcherPropertiesFormat
21048				err = json.Unmarshal(*v, &watcherPropertiesFormat)
21049				if err != nil {
21050					return err
21051				}
21052				w.WatcherPropertiesFormat = &watcherPropertiesFormat
21053			}
21054		case "id":
21055			if v != nil {
21056				var ID string
21057				err = json.Unmarshal(*v, &ID)
21058				if err != nil {
21059					return err
21060				}
21061				w.ID = &ID
21062			}
21063		case "name":
21064			if v != nil {
21065				var name string
21066				err = json.Unmarshal(*v, &name)
21067				if err != nil {
21068					return err
21069				}
21070				w.Name = &name
21071			}
21072		case "type":
21073			if v != nil {
21074				var typeVar string
21075				err = json.Unmarshal(*v, &typeVar)
21076				if err != nil {
21077					return err
21078				}
21079				w.Type = &typeVar
21080			}
21081		case "location":
21082			if v != nil {
21083				var location string
21084				err = json.Unmarshal(*v, &location)
21085				if err != nil {
21086					return err
21087				}
21088				w.Location = &location
21089			}
21090		case "tags":
21091			if v != nil {
21092				var tags map[string]*string
21093				err = json.Unmarshal(*v, &tags)
21094				if err != nil {
21095					return err
21096				}
21097				w.Tags = tags
21098			}
21099		}
21100	}
21101
21102	return nil
21103}
21104
21105// WatcherListResult list of network watcher resources.
21106type WatcherListResult struct {
21107	autorest.Response `json:"-"`
21108	Value             *[]Watcher `json:"value,omitempty"`
21109}
21110
21111// WatcherPropertiesFormat the network watcher properties.
21112type WatcherPropertiesFormat struct {
21113	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21114	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21115}
21116
21117// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
21118// long-running operation.
21119type WatchersCheckConnectivityFuture struct {
21120	azure.Future
21121}
21122
21123// Result returns the result of the asynchronous operation.
21124// If the operation has not completed it will return an error.
21125func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
21126	var done bool
21127	done, err = future.DoneWithContext(context.Background(), client)
21128	if err != nil {
21129		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
21130		return
21131	}
21132	if !done {
21133		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
21134		return
21135	}
21136	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21137	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
21138		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
21139		if err != nil {
21140			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
21141		}
21142	}
21143	return
21144}
21145
21146// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21147// operation.
21148type WatchersDeleteFuture struct {
21149	azure.Future
21150}
21151
21152// Result returns the result of the asynchronous operation.
21153// If the operation has not completed it will return an error.
21154func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
21155	var done bool
21156	done, err = future.DoneWithContext(context.Background(), client)
21157	if err != nil {
21158		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
21159		return
21160	}
21161	if !done {
21162		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
21163		return
21164	}
21165	ar.Response = future.Response()
21166	return
21167}
21168
21169// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
21170// long-running operation.
21171type WatchersGetAzureReachabilityReportFuture struct {
21172	azure.Future
21173}
21174
21175// Result returns the result of the asynchronous operation.
21176// If the operation has not completed it will return an error.
21177func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
21178	var done bool
21179	done, err = future.DoneWithContext(context.Background(), client)
21180	if err != nil {
21181		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
21182		return
21183	}
21184	if !done {
21185		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
21186		return
21187	}
21188	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21189	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
21190		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
21191		if err != nil {
21192			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
21193		}
21194	}
21195	return
21196}
21197
21198// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
21199// long-running operation.
21200type WatchersGetFlowLogStatusFuture struct {
21201	azure.Future
21202}
21203
21204// Result returns the result of the asynchronous operation.
21205// If the operation has not completed it will return an error.
21206func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
21207	var done bool
21208	done, err = future.DoneWithContext(context.Background(), client)
21209	if err != nil {
21210		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
21211		return
21212	}
21213	if !done {
21214		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
21215		return
21216	}
21217	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21218	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
21219		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
21220		if err != nil {
21221			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
21222		}
21223	}
21224	return
21225}
21226
21227// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
21228// operation.
21229type WatchersGetNextHopFuture struct {
21230	azure.Future
21231}
21232
21233// Result returns the result of the asynchronous operation.
21234// If the operation has not completed it will return an error.
21235func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
21236	var done bool
21237	done, err = future.DoneWithContext(context.Background(), client)
21238	if err != nil {
21239		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
21240		return
21241	}
21242	if !done {
21243		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
21244		return
21245	}
21246	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21247	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
21248		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
21249		if err != nil {
21250			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
21251		}
21252	}
21253	return
21254}
21255
21256// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
21257// long-running operation.
21258type WatchersGetTroubleshootingFuture struct {
21259	azure.Future
21260}
21261
21262// Result returns the result of the asynchronous operation.
21263// If the operation has not completed it will return an error.
21264func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
21265	var done bool
21266	done, err = future.DoneWithContext(context.Background(), client)
21267	if err != nil {
21268		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
21269		return
21270	}
21271	if !done {
21272		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
21273		return
21274	}
21275	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21276	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
21277		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
21278		if err != nil {
21279			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
21280		}
21281	}
21282	return
21283}
21284
21285// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
21286// long-running operation.
21287type WatchersGetTroubleshootingResultFuture struct {
21288	azure.Future
21289}
21290
21291// Result returns the result of the asynchronous operation.
21292// If the operation has not completed it will return an error.
21293func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
21294	var done bool
21295	done, err = future.DoneWithContext(context.Background(), client)
21296	if err != nil {
21297		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
21298		return
21299	}
21300	if !done {
21301		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
21302		return
21303	}
21304	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21305	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
21306		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
21307		if err != nil {
21308			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
21309		}
21310	}
21311	return
21312}
21313
21314// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
21315// long-running operation.
21316type WatchersGetVMSecurityRulesFuture struct {
21317	azure.Future
21318}
21319
21320// Result returns the result of the asynchronous operation.
21321// If the operation has not completed it will return an error.
21322func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
21323	var done bool
21324	done, err = future.DoneWithContext(context.Background(), client)
21325	if err != nil {
21326		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
21327		return
21328	}
21329	if !done {
21330		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
21331		return
21332	}
21333	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21334	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
21335		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
21336		if err != nil {
21337			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
21338		}
21339	}
21340	return
21341}
21342
21343// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
21344// long-running operation.
21345type WatchersListAvailableProvidersFuture struct {
21346	azure.Future
21347}
21348
21349// Result returns the result of the asynchronous operation.
21350// If the operation has not completed it will return an error.
21351func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
21352	var done bool
21353	done, err = future.DoneWithContext(context.Background(), client)
21354	if err != nil {
21355		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
21356		return
21357	}
21358	if !done {
21359		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
21360		return
21361	}
21362	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21363	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
21364		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
21365		if err != nil {
21366			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
21367		}
21368	}
21369	return
21370}
21371
21372// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
21373// long-running operation.
21374type WatchersSetFlowLogConfigurationFuture struct {
21375	azure.Future
21376}
21377
21378// Result returns the result of the asynchronous operation.
21379// If the operation has not completed it will return an error.
21380func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
21381	var done bool
21382	done, err = future.DoneWithContext(context.Background(), client)
21383	if err != nil {
21384		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
21385		return
21386	}
21387	if !done {
21388		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
21389		return
21390	}
21391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21392	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
21393		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
21394		if err != nil {
21395			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
21396		}
21397	}
21398	return
21399}
21400
21401// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
21402// operation.
21403type WatchersVerifyIPFlowFuture struct {
21404	azure.Future
21405}
21406
21407// Result returns the result of the asynchronous operation.
21408// If the operation has not completed it will return an error.
21409func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
21410	var done bool
21411	done, err = future.DoneWithContext(context.Background(), client)
21412	if err != nil {
21413		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
21414		return
21415	}
21416	if !done {
21417		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
21418		return
21419	}
21420	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21421	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
21422		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
21423		if err != nil {
21424			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
21425		}
21426	}
21427	return
21428}
21429