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-07-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// Protocol1 enumerates the values for protocol 1.
1158type Protocol1 string
1159
1160const (
1161	// Protocol1All ...
1162	Protocol1All Protocol1 = "All"
1163	// Protocol1TCP ...
1164	Protocol1TCP Protocol1 = "Tcp"
1165	// Protocol1UDP ...
1166	Protocol1UDP Protocol1 = "Udp"
1167)
1168
1169// PossibleProtocol1Values returns an array of possible values for the Protocol1 const type.
1170func PossibleProtocol1Values() []Protocol1 {
1171	return []Protocol1{Protocol1All, Protocol1TCP, Protocol1UDP}
1172}
1173
1174// ProvisioningState enumerates the values for provisioning state.
1175type ProvisioningState string
1176
1177const (
1178	// Deleting ...
1179	Deleting ProvisioningState = "Deleting"
1180	// Failed ...
1181	Failed ProvisioningState = "Failed"
1182	// Succeeded ...
1183	Succeeded ProvisioningState = "Succeeded"
1184	// Updating ...
1185	Updating ProvisioningState = "Updating"
1186)
1187
1188// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
1189func PossibleProvisioningStateValues() []ProvisioningState {
1190	return []ProvisioningState{Deleting, Failed, Succeeded, Updating}
1191}
1192
1193// PublicIPAddressSkuName enumerates the values for public ip address sku name.
1194type PublicIPAddressSkuName string
1195
1196const (
1197	// PublicIPAddressSkuNameBasic ...
1198	PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic"
1199	// PublicIPAddressSkuNameStandard ...
1200	PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard"
1201)
1202
1203// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type.
1204func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
1205	return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard}
1206}
1207
1208// PublicIPPrefixSkuName enumerates the values for public ip prefix sku name.
1209type PublicIPPrefixSkuName string
1210
1211const (
1212	// PublicIPPrefixSkuNameStandard ...
1213	PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard"
1214)
1215
1216// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type.
1217func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName {
1218	return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard}
1219}
1220
1221// RouteNextHopType enumerates the values for route next hop type.
1222type RouteNextHopType string
1223
1224const (
1225	// RouteNextHopTypeInternet ...
1226	RouteNextHopTypeInternet RouteNextHopType = "Internet"
1227	// RouteNextHopTypeNone ...
1228	RouteNextHopTypeNone RouteNextHopType = "None"
1229	// RouteNextHopTypeVirtualAppliance ...
1230	RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance"
1231	// RouteNextHopTypeVirtualNetworkGateway ...
1232	RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway"
1233	// RouteNextHopTypeVnetLocal ...
1234	RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal"
1235)
1236
1237// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type.
1238func PossibleRouteNextHopTypeValues() []RouteNextHopType {
1239	return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal}
1240}
1241
1242// SecurityRuleAccess enumerates the values for security rule access.
1243type SecurityRuleAccess string
1244
1245const (
1246	// SecurityRuleAccessAllow ...
1247	SecurityRuleAccessAllow SecurityRuleAccess = "Allow"
1248	// SecurityRuleAccessDeny ...
1249	SecurityRuleAccessDeny SecurityRuleAccess = "Deny"
1250)
1251
1252// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type.
1253func PossibleSecurityRuleAccessValues() []SecurityRuleAccess {
1254	return []SecurityRuleAccess{SecurityRuleAccessAllow, SecurityRuleAccessDeny}
1255}
1256
1257// SecurityRuleDirection enumerates the values for security rule direction.
1258type SecurityRuleDirection string
1259
1260const (
1261	// SecurityRuleDirectionInbound ...
1262	SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound"
1263	// SecurityRuleDirectionOutbound ...
1264	SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound"
1265)
1266
1267// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type.
1268func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection {
1269	return []SecurityRuleDirection{SecurityRuleDirectionInbound, SecurityRuleDirectionOutbound}
1270}
1271
1272// SecurityRuleProtocol enumerates the values for security rule protocol.
1273type SecurityRuleProtocol string
1274
1275const (
1276	// SecurityRuleProtocolAsterisk ...
1277	SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*"
1278	// SecurityRuleProtocolTCP ...
1279	SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp"
1280	// SecurityRuleProtocolUDP ...
1281	SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp"
1282)
1283
1284// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type.
1285func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol {
1286	return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP}
1287}
1288
1289// ServiceProviderProvisioningState enumerates the values for service provider provisioning state.
1290type ServiceProviderProvisioningState string
1291
1292const (
1293	// Deprovisioning ...
1294	Deprovisioning ServiceProviderProvisioningState = "Deprovisioning"
1295	// NotProvisioned ...
1296	NotProvisioned ServiceProviderProvisioningState = "NotProvisioned"
1297	// Provisioned ...
1298	Provisioned ServiceProviderProvisioningState = "Provisioned"
1299	// Provisioning ...
1300	Provisioning ServiceProviderProvisioningState = "Provisioning"
1301)
1302
1303// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type.
1304func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState {
1305	return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning}
1306}
1307
1308// Severity enumerates the values for severity.
1309type Severity string
1310
1311const (
1312	// SeverityError ...
1313	SeverityError Severity = "Error"
1314	// SeverityWarning ...
1315	SeverityWarning Severity = "Warning"
1316)
1317
1318// PossibleSeverityValues returns an array of possible values for the Severity const type.
1319func PossibleSeverityValues() []Severity {
1320	return []Severity{SeverityError, SeverityWarning}
1321}
1322
1323// TransportProtocol enumerates the values for transport protocol.
1324type TransportProtocol string
1325
1326const (
1327	// TransportProtocolAll ...
1328	TransportProtocolAll TransportProtocol = "All"
1329	// TransportProtocolTCP ...
1330	TransportProtocolTCP TransportProtocol = "Tcp"
1331	// TransportProtocolUDP ...
1332	TransportProtocolUDP TransportProtocol = "Udp"
1333)
1334
1335// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type.
1336func PossibleTransportProtocolValues() []TransportProtocol {
1337	return []TransportProtocol{TransportProtocolAll, TransportProtocolTCP, TransportProtocolUDP}
1338}
1339
1340// TunnelConnectionStatus enumerates the values for tunnel connection status.
1341type TunnelConnectionStatus string
1342
1343const (
1344	// TunnelConnectionStatusConnected ...
1345	TunnelConnectionStatusConnected TunnelConnectionStatus = "Connected"
1346	// TunnelConnectionStatusConnecting ...
1347	TunnelConnectionStatusConnecting TunnelConnectionStatus = "Connecting"
1348	// TunnelConnectionStatusNotConnected ...
1349	TunnelConnectionStatusNotConnected TunnelConnectionStatus = "NotConnected"
1350	// TunnelConnectionStatusUnknown ...
1351	TunnelConnectionStatusUnknown TunnelConnectionStatus = "Unknown"
1352)
1353
1354// PossibleTunnelConnectionStatusValues returns an array of possible values for the TunnelConnectionStatus const type.
1355func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus {
1356	return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown}
1357}
1358
1359// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status.
1360type VirtualNetworkGatewayConnectionStatus string
1361
1362const (
1363	// VirtualNetworkGatewayConnectionStatusConnected ...
1364	VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected"
1365	// VirtualNetworkGatewayConnectionStatusConnecting ...
1366	VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting"
1367	// VirtualNetworkGatewayConnectionStatusNotConnected ...
1368	VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected"
1369	// VirtualNetworkGatewayConnectionStatusUnknown ...
1370	VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown"
1371)
1372
1373// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type.
1374func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus {
1375	return []VirtualNetworkGatewayConnectionStatus{VirtualNetworkGatewayConnectionStatusConnected, VirtualNetworkGatewayConnectionStatusConnecting, VirtualNetworkGatewayConnectionStatusNotConnected, VirtualNetworkGatewayConnectionStatusUnknown}
1376}
1377
1378// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type.
1379type VirtualNetworkGatewayConnectionType string
1380
1381const (
1382	// ExpressRoute ...
1383	ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute"
1384	// IPsec ...
1385	IPsec VirtualNetworkGatewayConnectionType = "IPsec"
1386	// Vnet2Vnet ...
1387	Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet"
1388	// VPNClient ...
1389	VPNClient VirtualNetworkGatewayConnectionType = "VPNClient"
1390)
1391
1392// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type.
1393func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType {
1394	return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient}
1395}
1396
1397// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name.
1398type VirtualNetworkGatewaySkuName string
1399
1400const (
1401	// VirtualNetworkGatewaySkuNameBasic ...
1402	VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
1403	// VirtualNetworkGatewaySkuNameErGw1AZ ...
1404	VirtualNetworkGatewaySkuNameErGw1AZ VirtualNetworkGatewaySkuName = "ErGw1AZ"
1405	// VirtualNetworkGatewaySkuNameErGw2AZ ...
1406	VirtualNetworkGatewaySkuNameErGw2AZ VirtualNetworkGatewaySkuName = "ErGw2AZ"
1407	// VirtualNetworkGatewaySkuNameErGw3AZ ...
1408	VirtualNetworkGatewaySkuNameErGw3AZ VirtualNetworkGatewaySkuName = "ErGw3AZ"
1409	// VirtualNetworkGatewaySkuNameHighPerformance ...
1410	VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
1411	// VirtualNetworkGatewaySkuNameStandard ...
1412	VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard"
1413	// VirtualNetworkGatewaySkuNameUltraPerformance ...
1414	VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance"
1415	// VirtualNetworkGatewaySkuNameVpnGw1 ...
1416	VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1"
1417	// VirtualNetworkGatewaySkuNameVpnGw1AZ ...
1418	VirtualNetworkGatewaySkuNameVpnGw1AZ VirtualNetworkGatewaySkuName = "VpnGw1AZ"
1419	// VirtualNetworkGatewaySkuNameVpnGw2 ...
1420	VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2"
1421	// VirtualNetworkGatewaySkuNameVpnGw2AZ ...
1422	VirtualNetworkGatewaySkuNameVpnGw2AZ VirtualNetworkGatewaySkuName = "VpnGw2AZ"
1423	// VirtualNetworkGatewaySkuNameVpnGw3 ...
1424	VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3"
1425	// VirtualNetworkGatewaySkuNameVpnGw3AZ ...
1426	VirtualNetworkGatewaySkuNameVpnGw3AZ VirtualNetworkGatewaySkuName = "VpnGw3AZ"
1427)
1428
1429// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
1430func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
1431	return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameErGw1AZ, VirtualNetworkGatewaySkuNameErGw2AZ, VirtualNetworkGatewaySkuNameErGw3AZ, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard, VirtualNetworkGatewaySkuNameUltraPerformance, VirtualNetworkGatewaySkuNameVpnGw1, VirtualNetworkGatewaySkuNameVpnGw1AZ, VirtualNetworkGatewaySkuNameVpnGw2, VirtualNetworkGatewaySkuNameVpnGw2AZ, VirtualNetworkGatewaySkuNameVpnGw3, VirtualNetworkGatewaySkuNameVpnGw3AZ}
1432}
1433
1434// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
1435type VirtualNetworkGatewaySkuTier string
1436
1437const (
1438	// VirtualNetworkGatewaySkuTierBasic ...
1439	VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
1440	// VirtualNetworkGatewaySkuTierErGw1AZ ...
1441	VirtualNetworkGatewaySkuTierErGw1AZ VirtualNetworkGatewaySkuTier = "ErGw1AZ"
1442	// VirtualNetworkGatewaySkuTierErGw2AZ ...
1443	VirtualNetworkGatewaySkuTierErGw2AZ VirtualNetworkGatewaySkuTier = "ErGw2AZ"
1444	// VirtualNetworkGatewaySkuTierErGw3AZ ...
1445	VirtualNetworkGatewaySkuTierErGw3AZ VirtualNetworkGatewaySkuTier = "ErGw3AZ"
1446	// VirtualNetworkGatewaySkuTierHighPerformance ...
1447	VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
1448	// VirtualNetworkGatewaySkuTierStandard ...
1449	VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard"
1450	// VirtualNetworkGatewaySkuTierUltraPerformance ...
1451	VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance"
1452	// VirtualNetworkGatewaySkuTierVpnGw1 ...
1453	VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1"
1454	// VirtualNetworkGatewaySkuTierVpnGw1AZ ...
1455	VirtualNetworkGatewaySkuTierVpnGw1AZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ"
1456	// VirtualNetworkGatewaySkuTierVpnGw2 ...
1457	VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2"
1458	// VirtualNetworkGatewaySkuTierVpnGw2AZ ...
1459	VirtualNetworkGatewaySkuTierVpnGw2AZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ"
1460	// VirtualNetworkGatewaySkuTierVpnGw3 ...
1461	VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3"
1462	// VirtualNetworkGatewaySkuTierVpnGw3AZ ...
1463	VirtualNetworkGatewaySkuTierVpnGw3AZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ"
1464)
1465
1466// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
1467func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
1468	return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierErGw1AZ, VirtualNetworkGatewaySkuTierErGw2AZ, VirtualNetworkGatewaySkuTierErGw3AZ, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard, VirtualNetworkGatewaySkuTierUltraPerformance, VirtualNetworkGatewaySkuTierVpnGw1, VirtualNetworkGatewaySkuTierVpnGw1AZ, VirtualNetworkGatewaySkuTierVpnGw2, VirtualNetworkGatewaySkuTierVpnGw2AZ, VirtualNetworkGatewaySkuTierVpnGw3, VirtualNetworkGatewaySkuTierVpnGw3AZ}
1469}
1470
1471// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
1472type VirtualNetworkGatewayType string
1473
1474const (
1475	// VirtualNetworkGatewayTypeExpressRoute ...
1476	VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute"
1477	// VirtualNetworkGatewayTypeVpn ...
1478	VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn"
1479)
1480
1481// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type.
1482func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
1483	return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn}
1484}
1485
1486// VirtualNetworkPeeringState enumerates the values for virtual network peering state.
1487type VirtualNetworkPeeringState string
1488
1489const (
1490	// VirtualNetworkPeeringStateConnected ...
1491	VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected"
1492	// VirtualNetworkPeeringStateDisconnected ...
1493	VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected"
1494	// VirtualNetworkPeeringStateInitiated ...
1495	VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated"
1496)
1497
1498// PossibleVirtualNetworkPeeringStateValues returns an array of possible values for the VirtualNetworkPeeringState const type.
1499func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState {
1500	return []VirtualNetworkPeeringState{VirtualNetworkPeeringStateConnected, VirtualNetworkPeeringStateDisconnected, VirtualNetworkPeeringStateInitiated}
1501}
1502
1503// VpnClientProtocol enumerates the values for vpn client protocol.
1504type VpnClientProtocol string
1505
1506const (
1507	// IkeV2 ...
1508	IkeV2 VpnClientProtocol = "IkeV2"
1509	// OpenVPN ...
1510	OpenVPN VpnClientProtocol = "OpenVPN"
1511	// SSTP ...
1512	SSTP VpnClientProtocol = "SSTP"
1513)
1514
1515// PossibleVpnClientProtocolValues returns an array of possible values for the VpnClientProtocol const type.
1516func PossibleVpnClientProtocolValues() []VpnClientProtocol {
1517	return []VpnClientProtocol{IkeV2, OpenVPN, SSTP}
1518}
1519
1520// VpnConnectionStatus enumerates the values for vpn connection status.
1521type VpnConnectionStatus string
1522
1523const (
1524	// VpnConnectionStatusConnected ...
1525	VpnConnectionStatusConnected VpnConnectionStatus = "Connected"
1526	// VpnConnectionStatusConnecting ...
1527	VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting"
1528	// VpnConnectionStatusNotConnected ...
1529	VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected"
1530	// VpnConnectionStatusUnknown ...
1531	VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown"
1532)
1533
1534// PossibleVpnConnectionStatusValues returns an array of possible values for the VpnConnectionStatus const type.
1535func PossibleVpnConnectionStatusValues() []VpnConnectionStatus {
1536	return []VpnConnectionStatus{VpnConnectionStatusConnected, VpnConnectionStatusConnecting, VpnConnectionStatusNotConnected, VpnConnectionStatusUnknown}
1537}
1538
1539// VpnType enumerates the values for vpn type.
1540type VpnType string
1541
1542const (
1543	// PolicyBased ...
1544	PolicyBased VpnType = "PolicyBased"
1545	// RouteBased ...
1546	RouteBased VpnType = "RouteBased"
1547)
1548
1549// PossibleVpnTypeValues returns an array of possible values for the VpnType const type.
1550func PossibleVpnTypeValues() []VpnType {
1551	return []VpnType{PolicyBased, RouteBased}
1552}
1553
1554// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
1555// virtual network.
1556type AddressSpace struct {
1557	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
1558	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
1559}
1560
1561// ApplicationGateway application gateway resource
1562type ApplicationGateway struct {
1563	autorest.Response                   `json:"-"`
1564	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
1565	// Etag - A unique read-only string that changes whenever the resource is updated.
1566	Etag *string `json:"etag,omitempty"`
1567	// Zones - A list of availability zones denoting where the resource needs to come from.
1568	Zones *[]string `json:"zones,omitempty"`
1569	// ID - Resource ID.
1570	ID *string `json:"id,omitempty"`
1571	// Name - READ-ONLY; Resource name.
1572	Name *string `json:"name,omitempty"`
1573	// Type - READ-ONLY; Resource type.
1574	Type *string `json:"type,omitempty"`
1575	// Location - Resource location.
1576	Location *string `json:"location,omitempty"`
1577	// Tags - Resource tags.
1578	Tags map[string]*string `json:"tags"`
1579}
1580
1581// MarshalJSON is the custom marshaler for ApplicationGateway.
1582func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
1583	objectMap := make(map[string]interface{})
1584	if ag.ApplicationGatewayPropertiesFormat != nil {
1585		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
1586	}
1587	if ag.Etag != nil {
1588		objectMap["etag"] = ag.Etag
1589	}
1590	if ag.Zones != nil {
1591		objectMap["zones"] = ag.Zones
1592	}
1593	if ag.ID != nil {
1594		objectMap["id"] = ag.ID
1595	}
1596	if ag.Location != nil {
1597		objectMap["location"] = ag.Location
1598	}
1599	if ag.Tags != nil {
1600		objectMap["tags"] = ag.Tags
1601	}
1602	return json.Marshal(objectMap)
1603}
1604
1605// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
1606func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
1607	var m map[string]*json.RawMessage
1608	err := json.Unmarshal(body, &m)
1609	if err != nil {
1610		return err
1611	}
1612	for k, v := range m {
1613		switch k {
1614		case "properties":
1615			if v != nil {
1616				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
1617				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
1618				if err != nil {
1619					return err
1620				}
1621				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
1622			}
1623		case "etag":
1624			if v != nil {
1625				var etag string
1626				err = json.Unmarshal(*v, &etag)
1627				if err != nil {
1628					return err
1629				}
1630				ag.Etag = &etag
1631			}
1632		case "zones":
1633			if v != nil {
1634				var zones []string
1635				err = json.Unmarshal(*v, &zones)
1636				if err != nil {
1637					return err
1638				}
1639				ag.Zones = &zones
1640			}
1641		case "id":
1642			if v != nil {
1643				var ID string
1644				err = json.Unmarshal(*v, &ID)
1645				if err != nil {
1646					return err
1647				}
1648				ag.ID = &ID
1649			}
1650		case "name":
1651			if v != nil {
1652				var name string
1653				err = json.Unmarshal(*v, &name)
1654				if err != nil {
1655					return err
1656				}
1657				ag.Name = &name
1658			}
1659		case "type":
1660			if v != nil {
1661				var typeVar string
1662				err = json.Unmarshal(*v, &typeVar)
1663				if err != nil {
1664					return err
1665				}
1666				ag.Type = &typeVar
1667			}
1668		case "location":
1669			if v != nil {
1670				var location string
1671				err = json.Unmarshal(*v, &location)
1672				if err != nil {
1673					return err
1674				}
1675				ag.Location = &location
1676			}
1677		case "tags":
1678			if v != nil {
1679				var tags map[string]*string
1680				err = json.Unmarshal(*v, &tags)
1681				if err != nil {
1682					return err
1683				}
1684				ag.Tags = tags
1685			}
1686		}
1687	}
1688
1689	return nil
1690}
1691
1692// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
1693type ApplicationGatewayAuthenticationCertificate struct {
1694	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
1695	// Name - Name of the authentication certificate that is unique within an Application Gateway.
1696	Name *string `json:"name,omitempty"`
1697	// Etag - A unique read-only string that changes whenever the resource is updated.
1698	Etag *string `json:"etag,omitempty"`
1699	// Type - Type of the resource.
1700	Type *string `json:"type,omitempty"`
1701	// ID - Resource ID.
1702	ID *string `json:"id,omitempty"`
1703}
1704
1705// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
1706func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
1707	objectMap := make(map[string]interface{})
1708	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
1709		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
1710	}
1711	if agac.Name != nil {
1712		objectMap["name"] = agac.Name
1713	}
1714	if agac.Etag != nil {
1715		objectMap["etag"] = agac.Etag
1716	}
1717	if agac.Type != nil {
1718		objectMap["type"] = agac.Type
1719	}
1720	if agac.ID != nil {
1721		objectMap["id"] = agac.ID
1722	}
1723	return json.Marshal(objectMap)
1724}
1725
1726// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
1727func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
1728	var m map[string]*json.RawMessage
1729	err := json.Unmarshal(body, &m)
1730	if err != nil {
1731		return err
1732	}
1733	for k, v := range m {
1734		switch k {
1735		case "properties":
1736			if v != nil {
1737				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
1738				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
1739				if err != nil {
1740					return err
1741				}
1742				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
1743			}
1744		case "name":
1745			if v != nil {
1746				var name string
1747				err = json.Unmarshal(*v, &name)
1748				if err != nil {
1749					return err
1750				}
1751				agac.Name = &name
1752			}
1753		case "etag":
1754			if v != nil {
1755				var etag string
1756				err = json.Unmarshal(*v, &etag)
1757				if err != nil {
1758					return err
1759				}
1760				agac.Etag = &etag
1761			}
1762		case "type":
1763			if v != nil {
1764				var typeVar string
1765				err = json.Unmarshal(*v, &typeVar)
1766				if err != nil {
1767					return err
1768				}
1769				agac.Type = &typeVar
1770			}
1771		case "id":
1772			if v != nil {
1773				var ID string
1774				err = json.Unmarshal(*v, &ID)
1775				if err != nil {
1776					return err
1777				}
1778				agac.ID = &ID
1779			}
1780		}
1781	}
1782
1783	return nil
1784}
1785
1786// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
1787// application gateway.
1788type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
1789	// Data - Certificate public data.
1790	Data *string `json:"data,omitempty"`
1791	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1792	ProvisioningState *string `json:"provisioningState,omitempty"`
1793}
1794
1795// ApplicationGatewayAutoscaleBounds application Gateway autoscale bounds on number of Application Gateway
1796// instance.
1797type ApplicationGatewayAutoscaleBounds struct {
1798	// Min - Lower bound on number of Application Gateway instances.
1799	Min *int32 `json:"min,omitempty"`
1800	// Max - Upper bound on number of Application Gateway instances.
1801	Max *int32 `json:"max,omitempty"`
1802}
1803
1804// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
1805type ApplicationGatewayAutoscaleConfiguration struct {
1806	// Bounds - Autoscale bounds
1807	Bounds *ApplicationGatewayAutoscaleBounds `json:"bounds,omitempty"`
1808}
1809
1810// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
1811// call.
1812type ApplicationGatewayAvailableSslOptions struct {
1813	autorest.Response                                      `json:"-"`
1814	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
1815	// ID - Resource ID.
1816	ID *string `json:"id,omitempty"`
1817	// Name - READ-ONLY; Resource name.
1818	Name *string `json:"name,omitempty"`
1819	// Type - READ-ONLY; Resource type.
1820	Type *string `json:"type,omitempty"`
1821	// Location - Resource location.
1822	Location *string `json:"location,omitempty"`
1823	// Tags - Resource tags.
1824	Tags map[string]*string `json:"tags"`
1825}
1826
1827// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
1828func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
1829	objectMap := make(map[string]interface{})
1830	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
1831		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
1832	}
1833	if agaso.ID != nil {
1834		objectMap["id"] = agaso.ID
1835	}
1836	if agaso.Location != nil {
1837		objectMap["location"] = agaso.Location
1838	}
1839	if agaso.Tags != nil {
1840		objectMap["tags"] = agaso.Tags
1841	}
1842	return json.Marshal(objectMap)
1843}
1844
1845// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
1846func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
1847	var m map[string]*json.RawMessage
1848	err := json.Unmarshal(body, &m)
1849	if err != nil {
1850		return err
1851	}
1852	for k, v := range m {
1853		switch k {
1854		case "properties":
1855			if v != nil {
1856				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
1857				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
1858				if err != nil {
1859					return err
1860				}
1861				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
1862			}
1863		case "id":
1864			if v != nil {
1865				var ID string
1866				err = json.Unmarshal(*v, &ID)
1867				if err != nil {
1868					return err
1869				}
1870				agaso.ID = &ID
1871			}
1872		case "name":
1873			if v != nil {
1874				var name string
1875				err = json.Unmarshal(*v, &name)
1876				if err != nil {
1877					return err
1878				}
1879				agaso.Name = &name
1880			}
1881		case "type":
1882			if v != nil {
1883				var typeVar string
1884				err = json.Unmarshal(*v, &typeVar)
1885				if err != nil {
1886					return err
1887				}
1888				agaso.Type = &typeVar
1889			}
1890		case "location":
1891			if v != nil {
1892				var location string
1893				err = json.Unmarshal(*v, &location)
1894				if err != nil {
1895					return err
1896				}
1897				agaso.Location = &location
1898			}
1899		case "tags":
1900			if v != nil {
1901				var tags map[string]*string
1902				err = json.Unmarshal(*v, &tags)
1903				if err != nil {
1904					return err
1905				}
1906				agaso.Tags = tags
1907			}
1908		}
1909	}
1910
1911	return nil
1912}
1913
1914// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
1915// ApplicationGatewayAvailableSslOptions
1916type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
1917	// PredefinedPolicies - List of available Ssl predefined policy.
1918	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
1919	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
1920	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
1921	// AvailableCipherSuites - List of available Ssl cipher suites.
1922	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
1923	// AvailableProtocols - List of available Ssl protocols.
1924	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
1925}
1926
1927// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
1928// service call.
1929type ApplicationGatewayAvailableSslPredefinedPolicies struct {
1930	autorest.Response `json:"-"`
1931	// Value - List of available Ssl predefined policy.
1932	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
1933	// NextLink - URL to get the next set of results.
1934	NextLink *string `json:"nextLink,omitempty"`
1935}
1936
1937// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
1938// ApplicationGatewaySslPredefinedPolicy values.
1939type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
1940	i    int
1941	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
1942}
1943
1944// NextWithContext advances to the next value.  If there was an error making
1945// the request the iterator does not advance and the error is returned.
1946func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
1947	if tracing.IsEnabled() {
1948		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
1949		defer func() {
1950			sc := -1
1951			if iter.Response().Response.Response != nil {
1952				sc = iter.Response().Response.Response.StatusCode
1953			}
1954			tracing.EndSpan(ctx, sc, err)
1955		}()
1956	}
1957	iter.i++
1958	if iter.i < len(iter.page.Values()) {
1959		return nil
1960	}
1961	err = iter.page.NextWithContext(ctx)
1962	if err != nil {
1963		iter.i--
1964		return err
1965	}
1966	iter.i = 0
1967	return nil
1968}
1969
1970// Next advances to the next value.  If there was an error making
1971// the request the iterator does not advance and the error is returned.
1972// Deprecated: Use NextWithContext() instead.
1973func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
1974	return iter.NextWithContext(context.Background())
1975}
1976
1977// NotDone returns true if the enumeration should be started or is not yet complete.
1978func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
1979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1980}
1981
1982// Response returns the raw server response from the last page request.
1983func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
1984	return iter.page.Response()
1985}
1986
1987// Value returns the current value or a zero-initialized value if the
1988// iterator has advanced beyond the end of the collection.
1989func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
1990	if !iter.page.NotDone() {
1991		return ApplicationGatewaySslPredefinedPolicy{}
1992	}
1993	return iter.page.Values()[iter.i]
1994}
1995
1996// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
1997func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
1998	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
1999}
2000
2001// IsEmpty returns true if the ListResult contains no values.
2002func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
2003	return agaspp.Value == nil || len(*agaspp.Value) == 0
2004}
2005
2006// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
2007// It returns nil if no more results exist.
2008func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
2009	if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 {
2010		return nil, nil
2011	}
2012	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2013		autorest.AsJSON(),
2014		autorest.AsGet(),
2015		autorest.WithBaseURL(to.String(agaspp.NextLink)))
2016}
2017
2018// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
2019// ApplicationGatewaySslPredefinedPolicy values.
2020type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
2021	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
2022	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
2023}
2024
2025// NextWithContext advances to the next page of values.  If there was an error making
2026// the request the page does not advance and the error is returned.
2027func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
2028	if tracing.IsEnabled() {
2029		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
2030		defer func() {
2031			sc := -1
2032			if page.Response().Response.Response != nil {
2033				sc = page.Response().Response.Response.StatusCode
2034			}
2035			tracing.EndSpan(ctx, sc, err)
2036		}()
2037	}
2038	next, err := page.fn(ctx, page.agaspp)
2039	if err != nil {
2040		return err
2041	}
2042	page.agaspp = next
2043	return nil
2044}
2045
2046// Next advances to the next page of values.  If there was an error making
2047// the request the page does not advance and the error is returned.
2048// Deprecated: Use NextWithContext() instead.
2049func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
2050	return page.NextWithContext(context.Background())
2051}
2052
2053// NotDone returns true if the page enumeration should be started or is not yet complete.
2054func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
2055	return !page.agaspp.IsEmpty()
2056}
2057
2058// Response returns the raw server response from the last page request.
2059func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
2060	return page.agaspp
2061}
2062
2063// Values returns the slice of values for the current page or nil if there are no values.
2064func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
2065	if page.agaspp.IsEmpty() {
2066		return nil
2067	}
2068	return *page.agaspp.Value
2069}
2070
2071// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
2072func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
2073	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage}
2074}
2075
2076// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
2077// service call.
2078type ApplicationGatewayAvailableWafRuleSetsResult struct {
2079	autorest.Response `json:"-"`
2080	// Value - The list of application gateway rule sets.
2081	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
2082}
2083
2084// ApplicationGatewayBackendAddress backend address of an application gateway.
2085type ApplicationGatewayBackendAddress struct {
2086	// Fqdn - Fully qualified domain name (FQDN).
2087	Fqdn *string `json:"fqdn,omitempty"`
2088	// IPAddress - IP address
2089	IPAddress *string `json:"ipAddress,omitempty"`
2090}
2091
2092// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
2093type ApplicationGatewayBackendAddressPool struct {
2094	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
2095	// Name - Name of the backend address pool that is unique within an Application Gateway.
2096	Name *string `json:"name,omitempty"`
2097	// Etag - A unique read-only string that changes whenever the resource is updated.
2098	Etag *string `json:"etag,omitempty"`
2099	// Type - Type of the resource.
2100	Type *string `json:"type,omitempty"`
2101	// ID - Resource ID.
2102	ID *string `json:"id,omitempty"`
2103}
2104
2105// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
2106func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
2107	objectMap := make(map[string]interface{})
2108	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
2109		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
2110	}
2111	if agbap.Name != nil {
2112		objectMap["name"] = agbap.Name
2113	}
2114	if agbap.Etag != nil {
2115		objectMap["etag"] = agbap.Etag
2116	}
2117	if agbap.Type != nil {
2118		objectMap["type"] = agbap.Type
2119	}
2120	if agbap.ID != nil {
2121		objectMap["id"] = agbap.ID
2122	}
2123	return json.Marshal(objectMap)
2124}
2125
2126// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
2127func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
2128	var m map[string]*json.RawMessage
2129	err := json.Unmarshal(body, &m)
2130	if err != nil {
2131		return err
2132	}
2133	for k, v := range m {
2134		switch k {
2135		case "properties":
2136			if v != nil {
2137				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
2138				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
2139				if err != nil {
2140					return err
2141				}
2142				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
2143			}
2144		case "name":
2145			if v != nil {
2146				var name string
2147				err = json.Unmarshal(*v, &name)
2148				if err != nil {
2149					return err
2150				}
2151				agbap.Name = &name
2152			}
2153		case "etag":
2154			if v != nil {
2155				var etag string
2156				err = json.Unmarshal(*v, &etag)
2157				if err != nil {
2158					return err
2159				}
2160				agbap.Etag = &etag
2161			}
2162		case "type":
2163			if v != nil {
2164				var typeVar string
2165				err = json.Unmarshal(*v, &typeVar)
2166				if err != nil {
2167					return err
2168				}
2169				agbap.Type = &typeVar
2170			}
2171		case "id":
2172			if v != nil {
2173				var ID string
2174				err = json.Unmarshal(*v, &ID)
2175				if err != nil {
2176					return err
2177				}
2178				agbap.ID = &ID
2179			}
2180		}
2181	}
2182
2183	return nil
2184}
2185
2186// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
2187// application gateway.
2188type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
2189	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
2190	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
2191	// BackendAddresses - Backend addresses
2192	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
2193	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2194	ProvisioningState *string `json:"provisioningState,omitempty"`
2195}
2196
2197// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
2198type ApplicationGatewayBackendHealth struct {
2199	autorest.Response   `json:"-"`
2200	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
2201}
2202
2203// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
2204type ApplicationGatewayBackendHealthHTTPSettings struct {
2205	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
2206	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
2207	// Servers - List of ApplicationGatewayBackendHealthServer resources.
2208	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
2209}
2210
2211// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
2212type ApplicationGatewayBackendHealthPool struct {
2213	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
2214	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
2215	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
2216	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
2217}
2218
2219// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
2220type ApplicationGatewayBackendHealthServer struct {
2221	// Address - IP address or FQDN of backend server.
2222	Address *string `json:"address,omitempty"`
2223	// IPConfiguration - Reference of IP configuration of backend server.
2224	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
2225	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
2226	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
2227}
2228
2229// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
2230type ApplicationGatewayBackendHTTPSettings struct {
2231	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
2232	// Name - Name of the backend http settings that is unique within an Application Gateway.
2233	Name *string `json:"name,omitempty"`
2234	// Etag - A unique read-only string that changes whenever the resource is updated.
2235	Etag *string `json:"etag,omitempty"`
2236	// Type - Type of the resource.
2237	Type *string `json:"type,omitempty"`
2238	// ID - Resource ID.
2239	ID *string `json:"id,omitempty"`
2240}
2241
2242// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
2243func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
2244	objectMap := make(map[string]interface{})
2245	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
2246		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
2247	}
2248	if agbhs.Name != nil {
2249		objectMap["name"] = agbhs.Name
2250	}
2251	if agbhs.Etag != nil {
2252		objectMap["etag"] = agbhs.Etag
2253	}
2254	if agbhs.Type != nil {
2255		objectMap["type"] = agbhs.Type
2256	}
2257	if agbhs.ID != nil {
2258		objectMap["id"] = agbhs.ID
2259	}
2260	return json.Marshal(objectMap)
2261}
2262
2263// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
2264func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
2265	var m map[string]*json.RawMessage
2266	err := json.Unmarshal(body, &m)
2267	if err != nil {
2268		return err
2269	}
2270	for k, v := range m {
2271		switch k {
2272		case "properties":
2273			if v != nil {
2274				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
2275				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
2276				if err != nil {
2277					return err
2278				}
2279				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
2280			}
2281		case "name":
2282			if v != nil {
2283				var name string
2284				err = json.Unmarshal(*v, &name)
2285				if err != nil {
2286					return err
2287				}
2288				agbhs.Name = &name
2289			}
2290		case "etag":
2291			if v != nil {
2292				var etag string
2293				err = json.Unmarshal(*v, &etag)
2294				if err != nil {
2295					return err
2296				}
2297				agbhs.Etag = &etag
2298			}
2299		case "type":
2300			if v != nil {
2301				var typeVar string
2302				err = json.Unmarshal(*v, &typeVar)
2303				if err != nil {
2304					return err
2305				}
2306				agbhs.Type = &typeVar
2307			}
2308		case "id":
2309			if v != nil {
2310				var ID string
2311				err = json.Unmarshal(*v, &ID)
2312				if err != nil {
2313					return err
2314				}
2315				agbhs.ID = &ID
2316			}
2317		}
2318	}
2319
2320	return nil
2321}
2322
2323// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
2324// application gateway.
2325type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
2326	// Port - The destination port on the backend.
2327	Port *int32 `json:"port,omitempty"`
2328	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
2329	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2330	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
2331	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
2332	// 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.
2333	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
2334	// Probe - Probe resource of an application gateway.
2335	Probe *SubResource `json:"probe,omitempty"`
2336	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
2337	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
2338	// ConnectionDraining - Connection draining of the backend http settings resource.
2339	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
2340	// HostName - Host header to be sent to the backend servers.
2341	HostName *string `json:"hostName,omitempty"`
2342	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
2343	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
2344	// AffinityCookieName - Cookie name to use for the affinity cookie.
2345	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
2346	// ProbeEnabled - Whether the probe is enabled. Default value is false.
2347	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
2348	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
2349	Path *string `json:"path,omitempty"`
2350	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2351	ProvisioningState *string `json:"provisioningState,omitempty"`
2352}
2353
2354// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
2355// be active for a specified time after the backend server got removed from the configuration.
2356type ApplicationGatewayConnectionDraining struct {
2357	// Enabled - Whether connection draining is enabled or not.
2358	Enabled *bool `json:"enabled,omitempty"`
2359	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
2360	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
2361}
2362
2363// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
2364// rule group.
2365type ApplicationGatewayFirewallDisabledRuleGroup struct {
2366	// RuleGroupName - The name of the rule group that will be disabled.
2367	RuleGroupName *string `json:"ruleGroupName,omitempty"`
2368	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
2369	Rules *[]int32 `json:"rules,omitempty"`
2370}
2371
2372// ApplicationGatewayFirewallRule a web application firewall rule.
2373type ApplicationGatewayFirewallRule struct {
2374	// RuleID - The identifier of the web application firewall rule.
2375	RuleID *int32 `json:"ruleId,omitempty"`
2376	// Description - The description of the web application firewall rule.
2377	Description *string `json:"description,omitempty"`
2378}
2379
2380// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
2381type ApplicationGatewayFirewallRuleGroup struct {
2382	// RuleGroupName - The name of the web application firewall rule group.
2383	RuleGroupName *string `json:"ruleGroupName,omitempty"`
2384	// Description - The description of the web application firewall rule group.
2385	Description *string `json:"description,omitempty"`
2386	// Rules - The rules of the web application firewall rule group.
2387	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
2388}
2389
2390// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
2391type ApplicationGatewayFirewallRuleSet struct {
2392	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
2393	// ID - Resource ID.
2394	ID *string `json:"id,omitempty"`
2395	// Name - READ-ONLY; Resource name.
2396	Name *string `json:"name,omitempty"`
2397	// Type - READ-ONLY; Resource type.
2398	Type *string `json:"type,omitempty"`
2399	// Location - Resource location.
2400	Location *string `json:"location,omitempty"`
2401	// Tags - Resource tags.
2402	Tags map[string]*string `json:"tags"`
2403}
2404
2405// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
2406func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
2407	objectMap := make(map[string]interface{})
2408	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
2409		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
2410	}
2411	if agfrs.ID != nil {
2412		objectMap["id"] = agfrs.ID
2413	}
2414	if agfrs.Location != nil {
2415		objectMap["location"] = agfrs.Location
2416	}
2417	if agfrs.Tags != nil {
2418		objectMap["tags"] = agfrs.Tags
2419	}
2420	return json.Marshal(objectMap)
2421}
2422
2423// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
2424func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
2425	var m map[string]*json.RawMessage
2426	err := json.Unmarshal(body, &m)
2427	if err != nil {
2428		return err
2429	}
2430	for k, v := range m {
2431		switch k {
2432		case "properties":
2433			if v != nil {
2434				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
2435				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
2436				if err != nil {
2437					return err
2438				}
2439				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
2440			}
2441		case "id":
2442			if v != nil {
2443				var ID string
2444				err = json.Unmarshal(*v, &ID)
2445				if err != nil {
2446					return err
2447				}
2448				agfrs.ID = &ID
2449			}
2450		case "name":
2451			if v != nil {
2452				var name string
2453				err = json.Unmarshal(*v, &name)
2454				if err != nil {
2455					return err
2456				}
2457				agfrs.Name = &name
2458			}
2459		case "type":
2460			if v != nil {
2461				var typeVar string
2462				err = json.Unmarshal(*v, &typeVar)
2463				if err != nil {
2464					return err
2465				}
2466				agfrs.Type = &typeVar
2467			}
2468		case "location":
2469			if v != nil {
2470				var location string
2471				err = json.Unmarshal(*v, &location)
2472				if err != nil {
2473					return err
2474				}
2475				agfrs.Location = &location
2476			}
2477		case "tags":
2478			if v != nil {
2479				var tags map[string]*string
2480				err = json.Unmarshal(*v, &tags)
2481				if err != nil {
2482					return err
2483				}
2484				agfrs.Tags = tags
2485			}
2486		}
2487	}
2488
2489	return nil
2490}
2491
2492// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
2493type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
2494	// ProvisioningState - The provisioning state of the web application firewall rule set.
2495	ProvisioningState *string `json:"provisioningState,omitempty"`
2496	// RuleSetType - The type of the web application firewall rule set.
2497	RuleSetType *string `json:"ruleSetType,omitempty"`
2498	// RuleSetVersion - The version of the web application firewall rule set type.
2499	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2500	// RuleGroups - The rule groups of the web application firewall rule set.
2501	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
2502}
2503
2504// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
2505type ApplicationGatewayFrontendIPConfiguration struct {
2506	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
2507	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
2508	Name *string `json:"name,omitempty"`
2509	// Etag - A unique read-only string that changes whenever the resource is updated.
2510	Etag *string `json:"etag,omitempty"`
2511	// Type - Type of the resource.
2512	Type *string `json:"type,omitempty"`
2513	// ID - Resource ID.
2514	ID *string `json:"id,omitempty"`
2515}
2516
2517// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
2518func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
2519	objectMap := make(map[string]interface{})
2520	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
2521		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
2522	}
2523	if agfic.Name != nil {
2524		objectMap["name"] = agfic.Name
2525	}
2526	if agfic.Etag != nil {
2527		objectMap["etag"] = agfic.Etag
2528	}
2529	if agfic.Type != nil {
2530		objectMap["type"] = agfic.Type
2531	}
2532	if agfic.ID != nil {
2533		objectMap["id"] = agfic.ID
2534	}
2535	return json.Marshal(objectMap)
2536}
2537
2538// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
2539func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
2540	var m map[string]*json.RawMessage
2541	err := json.Unmarshal(body, &m)
2542	if err != nil {
2543		return err
2544	}
2545	for k, v := range m {
2546		switch k {
2547		case "properties":
2548			if v != nil {
2549				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
2550				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
2551				if err != nil {
2552					return err
2553				}
2554				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
2555			}
2556		case "name":
2557			if v != nil {
2558				var name string
2559				err = json.Unmarshal(*v, &name)
2560				if err != nil {
2561					return err
2562				}
2563				agfic.Name = &name
2564			}
2565		case "etag":
2566			if v != nil {
2567				var etag string
2568				err = json.Unmarshal(*v, &etag)
2569				if err != nil {
2570					return err
2571				}
2572				agfic.Etag = &etag
2573			}
2574		case "type":
2575			if v != nil {
2576				var typeVar string
2577				err = json.Unmarshal(*v, &typeVar)
2578				if err != nil {
2579					return err
2580				}
2581				agfic.Type = &typeVar
2582			}
2583		case "id":
2584			if v != nil {
2585				var ID string
2586				err = json.Unmarshal(*v, &ID)
2587				if err != nil {
2588					return err
2589				}
2590				agfic.ID = &ID
2591			}
2592		}
2593	}
2594
2595	return nil
2596}
2597
2598// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
2599// application gateway.
2600type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
2601	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
2602	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
2603	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
2604	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
2605	// Subnet - Reference of the subnet resource.
2606	Subnet *SubResource `json:"subnet,omitempty"`
2607	// PublicIPAddress - Reference of the PublicIP resource.
2608	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
2609	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2610	ProvisioningState *string `json:"provisioningState,omitempty"`
2611}
2612
2613// ApplicationGatewayFrontendPort frontend port of an application gateway.
2614type ApplicationGatewayFrontendPort struct {
2615	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
2616	// Name - Name of the frontend port that is unique within an Application Gateway
2617	Name *string `json:"name,omitempty"`
2618	// Etag - A unique read-only string that changes whenever the resource is updated.
2619	Etag *string `json:"etag,omitempty"`
2620	// Type - Type of the resource.
2621	Type *string `json:"type,omitempty"`
2622	// ID - Resource ID.
2623	ID *string `json:"id,omitempty"`
2624}
2625
2626// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
2627func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
2628	objectMap := make(map[string]interface{})
2629	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
2630		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
2631	}
2632	if agfp.Name != nil {
2633		objectMap["name"] = agfp.Name
2634	}
2635	if agfp.Etag != nil {
2636		objectMap["etag"] = agfp.Etag
2637	}
2638	if agfp.Type != nil {
2639		objectMap["type"] = agfp.Type
2640	}
2641	if agfp.ID != nil {
2642		objectMap["id"] = agfp.ID
2643	}
2644	return json.Marshal(objectMap)
2645}
2646
2647// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
2648func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
2649	var m map[string]*json.RawMessage
2650	err := json.Unmarshal(body, &m)
2651	if err != nil {
2652		return err
2653	}
2654	for k, v := range m {
2655		switch k {
2656		case "properties":
2657			if v != nil {
2658				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
2659				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
2660				if err != nil {
2661					return err
2662				}
2663				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
2664			}
2665		case "name":
2666			if v != nil {
2667				var name string
2668				err = json.Unmarshal(*v, &name)
2669				if err != nil {
2670					return err
2671				}
2672				agfp.Name = &name
2673			}
2674		case "etag":
2675			if v != nil {
2676				var etag string
2677				err = json.Unmarshal(*v, &etag)
2678				if err != nil {
2679					return err
2680				}
2681				agfp.Etag = &etag
2682			}
2683		case "type":
2684			if v != nil {
2685				var typeVar string
2686				err = json.Unmarshal(*v, &typeVar)
2687				if err != nil {
2688					return err
2689				}
2690				agfp.Type = &typeVar
2691			}
2692		case "id":
2693			if v != nil {
2694				var ID string
2695				err = json.Unmarshal(*v, &ID)
2696				if err != nil {
2697					return err
2698				}
2699				agfp.ID = &ID
2700			}
2701		}
2702	}
2703
2704	return nil
2705}
2706
2707// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
2708type ApplicationGatewayFrontendPortPropertiesFormat struct {
2709	// Port - Frontend port
2710	Port *int32 `json:"port,omitempty"`
2711	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2712	ProvisioningState *string `json:"provisioningState,omitempty"`
2713}
2714
2715// ApplicationGatewayHTTPListener http listener of an application gateway.
2716type ApplicationGatewayHTTPListener struct {
2717	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
2718	// Name - Name of the HTTP listener that is unique within an Application Gateway.
2719	Name *string `json:"name,omitempty"`
2720	// Etag - A unique read-only string that changes whenever the resource is updated.
2721	Etag *string `json:"etag,omitempty"`
2722	// Type - Type of the resource.
2723	Type *string `json:"type,omitempty"`
2724	// ID - Resource ID.
2725	ID *string `json:"id,omitempty"`
2726}
2727
2728// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
2729func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
2730	objectMap := make(map[string]interface{})
2731	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
2732		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
2733	}
2734	if aghl.Name != nil {
2735		objectMap["name"] = aghl.Name
2736	}
2737	if aghl.Etag != nil {
2738		objectMap["etag"] = aghl.Etag
2739	}
2740	if aghl.Type != nil {
2741		objectMap["type"] = aghl.Type
2742	}
2743	if aghl.ID != nil {
2744		objectMap["id"] = aghl.ID
2745	}
2746	return json.Marshal(objectMap)
2747}
2748
2749// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
2750func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
2751	var m map[string]*json.RawMessage
2752	err := json.Unmarshal(body, &m)
2753	if err != nil {
2754		return err
2755	}
2756	for k, v := range m {
2757		switch k {
2758		case "properties":
2759			if v != nil {
2760				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
2761				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
2762				if err != nil {
2763					return err
2764				}
2765				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
2766			}
2767		case "name":
2768			if v != nil {
2769				var name string
2770				err = json.Unmarshal(*v, &name)
2771				if err != nil {
2772					return err
2773				}
2774				aghl.Name = &name
2775			}
2776		case "etag":
2777			if v != nil {
2778				var etag string
2779				err = json.Unmarshal(*v, &etag)
2780				if err != nil {
2781					return err
2782				}
2783				aghl.Etag = &etag
2784			}
2785		case "type":
2786			if v != nil {
2787				var typeVar string
2788				err = json.Unmarshal(*v, &typeVar)
2789				if err != nil {
2790					return err
2791				}
2792				aghl.Type = &typeVar
2793			}
2794		case "id":
2795			if v != nil {
2796				var ID string
2797				err = json.Unmarshal(*v, &ID)
2798				if err != nil {
2799					return err
2800				}
2801				aghl.ID = &ID
2802			}
2803		}
2804	}
2805
2806	return nil
2807}
2808
2809// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
2810type ApplicationGatewayHTTPListenerPropertiesFormat struct {
2811	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
2812	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
2813	// FrontendPort - Frontend port resource of an application gateway.
2814	FrontendPort *SubResource `json:"frontendPort,omitempty"`
2815	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
2816	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
2817	// HostName - Host name of HTTP listener.
2818	HostName *string `json:"hostName,omitempty"`
2819	// SslCertificate - SSL certificate resource of an application gateway.
2820	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
2821	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
2822	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
2823	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2824	ProvisioningState *string `json:"provisioningState,omitempty"`
2825}
2826
2827// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
2828// private IP configuration is allowed.
2829type ApplicationGatewayIPConfiguration struct {
2830	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
2831	// Name - Name of the IP configuration that is unique within an Application Gateway.
2832	Name *string `json:"name,omitempty"`
2833	// Etag - A unique read-only string that changes whenever the resource is updated.
2834	Etag *string `json:"etag,omitempty"`
2835	// Type - Type of the resource.
2836	Type *string `json:"type,omitempty"`
2837	// ID - Resource ID.
2838	ID *string `json:"id,omitempty"`
2839}
2840
2841// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
2842func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
2843	objectMap := make(map[string]interface{})
2844	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
2845		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
2846	}
2847	if agic.Name != nil {
2848		objectMap["name"] = agic.Name
2849	}
2850	if agic.Etag != nil {
2851		objectMap["etag"] = agic.Etag
2852	}
2853	if agic.Type != nil {
2854		objectMap["type"] = agic.Type
2855	}
2856	if agic.ID != nil {
2857		objectMap["id"] = agic.ID
2858	}
2859	return json.Marshal(objectMap)
2860}
2861
2862// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
2863func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
2864	var m map[string]*json.RawMessage
2865	err := json.Unmarshal(body, &m)
2866	if err != nil {
2867		return err
2868	}
2869	for k, v := range m {
2870		switch k {
2871		case "properties":
2872			if v != nil {
2873				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
2874				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
2875				if err != nil {
2876					return err
2877				}
2878				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
2879			}
2880		case "name":
2881			if v != nil {
2882				var name string
2883				err = json.Unmarshal(*v, &name)
2884				if err != nil {
2885					return err
2886				}
2887				agic.Name = &name
2888			}
2889		case "etag":
2890			if v != nil {
2891				var etag string
2892				err = json.Unmarshal(*v, &etag)
2893				if err != nil {
2894					return err
2895				}
2896				agic.Etag = &etag
2897			}
2898		case "type":
2899			if v != nil {
2900				var typeVar string
2901				err = json.Unmarshal(*v, &typeVar)
2902				if err != nil {
2903					return err
2904				}
2905				agic.Type = &typeVar
2906			}
2907		case "id":
2908			if v != nil {
2909				var ID string
2910				err = json.Unmarshal(*v, &ID)
2911				if err != nil {
2912					return err
2913				}
2914				agic.ID = &ID
2915			}
2916		}
2917	}
2918
2919	return nil
2920}
2921
2922// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
2923// gateway.
2924type ApplicationGatewayIPConfigurationPropertiesFormat struct {
2925	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
2926	Subnet *SubResource `json:"subnet,omitempty"`
2927	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2928	ProvisioningState *string `json:"provisioningState,omitempty"`
2929}
2930
2931// ApplicationGatewayListResult response for ListApplicationGateways API service call.
2932type ApplicationGatewayListResult struct {
2933	autorest.Response `json:"-"`
2934	// Value - List of an application gateways in a resource group.
2935	Value *[]ApplicationGateway `json:"value,omitempty"`
2936	// NextLink - URL to get the next set of results.
2937	NextLink *string `json:"nextLink,omitempty"`
2938}
2939
2940// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
2941type ApplicationGatewayListResultIterator struct {
2942	i    int
2943	page ApplicationGatewayListResultPage
2944}
2945
2946// NextWithContext advances to the next value.  If there was an error making
2947// the request the iterator does not advance and the error is returned.
2948func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
2949	if tracing.IsEnabled() {
2950		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
2951		defer func() {
2952			sc := -1
2953			if iter.Response().Response.Response != nil {
2954				sc = iter.Response().Response.Response.StatusCode
2955			}
2956			tracing.EndSpan(ctx, sc, err)
2957		}()
2958	}
2959	iter.i++
2960	if iter.i < len(iter.page.Values()) {
2961		return nil
2962	}
2963	err = iter.page.NextWithContext(ctx)
2964	if err != nil {
2965		iter.i--
2966		return err
2967	}
2968	iter.i = 0
2969	return nil
2970}
2971
2972// Next advances to the next value.  If there was an error making
2973// the request the iterator does not advance and the error is returned.
2974// Deprecated: Use NextWithContext() instead.
2975func (iter *ApplicationGatewayListResultIterator) Next() error {
2976	return iter.NextWithContext(context.Background())
2977}
2978
2979// NotDone returns true if the enumeration should be started or is not yet complete.
2980func (iter ApplicationGatewayListResultIterator) NotDone() bool {
2981	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2982}
2983
2984// Response returns the raw server response from the last page request.
2985func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
2986	return iter.page.Response()
2987}
2988
2989// Value returns the current value or a zero-initialized value if the
2990// iterator has advanced beyond the end of the collection.
2991func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
2992	if !iter.page.NotDone() {
2993		return ApplicationGateway{}
2994	}
2995	return iter.page.Values()[iter.i]
2996}
2997
2998// Creates a new instance of the ApplicationGatewayListResultIterator type.
2999func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
3000	return ApplicationGatewayListResultIterator{page: page}
3001}
3002
3003// IsEmpty returns true if the ListResult contains no values.
3004func (aglr ApplicationGatewayListResult) IsEmpty() bool {
3005	return aglr.Value == nil || len(*aglr.Value) == 0
3006}
3007
3008// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
3009// It returns nil if no more results exist.
3010func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
3011	if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 {
3012		return nil, nil
3013	}
3014	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3015		autorest.AsJSON(),
3016		autorest.AsGet(),
3017		autorest.WithBaseURL(to.String(aglr.NextLink)))
3018}
3019
3020// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
3021type ApplicationGatewayListResultPage struct {
3022	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
3023	aglr ApplicationGatewayListResult
3024}
3025
3026// NextWithContext advances to the next page of values.  If there was an error making
3027// the request the page does not advance and the error is returned.
3028func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
3029	if tracing.IsEnabled() {
3030		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
3031		defer func() {
3032			sc := -1
3033			if page.Response().Response.Response != nil {
3034				sc = page.Response().Response.Response.StatusCode
3035			}
3036			tracing.EndSpan(ctx, sc, err)
3037		}()
3038	}
3039	next, err := page.fn(ctx, page.aglr)
3040	if err != nil {
3041		return err
3042	}
3043	page.aglr = next
3044	return nil
3045}
3046
3047// Next advances to the next page of values.  If there was an error making
3048// the request the page does not advance and the error is returned.
3049// Deprecated: Use NextWithContext() instead.
3050func (page *ApplicationGatewayListResultPage) Next() error {
3051	return page.NextWithContext(context.Background())
3052}
3053
3054// NotDone returns true if the page enumeration should be started or is not yet complete.
3055func (page ApplicationGatewayListResultPage) NotDone() bool {
3056	return !page.aglr.IsEmpty()
3057}
3058
3059// Response returns the raw server response from the last page request.
3060func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
3061	return page.aglr
3062}
3063
3064// Values returns the slice of values for the current page or nil if there are no values.
3065func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
3066	if page.aglr.IsEmpty() {
3067		return nil
3068	}
3069	return *page.aglr.Value
3070}
3071
3072// Creates a new instance of the ApplicationGatewayListResultPage type.
3073func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
3074	return ApplicationGatewayListResultPage{fn: getNextPage}
3075}
3076
3077// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
3078type ApplicationGatewayPathRule struct {
3079	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
3080	// Name - Name of the path rule that is unique within an Application Gateway.
3081	Name *string `json:"name,omitempty"`
3082	// Etag - A unique read-only string that changes whenever the resource is updated.
3083	Etag *string `json:"etag,omitempty"`
3084	// Type - Type of the resource.
3085	Type *string `json:"type,omitempty"`
3086	// ID - Resource ID.
3087	ID *string `json:"id,omitempty"`
3088}
3089
3090// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
3091func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
3092	objectMap := make(map[string]interface{})
3093	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
3094		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
3095	}
3096	if agpr.Name != nil {
3097		objectMap["name"] = agpr.Name
3098	}
3099	if agpr.Etag != nil {
3100		objectMap["etag"] = agpr.Etag
3101	}
3102	if agpr.Type != nil {
3103		objectMap["type"] = agpr.Type
3104	}
3105	if agpr.ID != nil {
3106		objectMap["id"] = agpr.ID
3107	}
3108	return json.Marshal(objectMap)
3109}
3110
3111// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
3112func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
3113	var m map[string]*json.RawMessage
3114	err := json.Unmarshal(body, &m)
3115	if err != nil {
3116		return err
3117	}
3118	for k, v := range m {
3119		switch k {
3120		case "properties":
3121			if v != nil {
3122				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
3123				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
3124				if err != nil {
3125					return err
3126				}
3127				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
3128			}
3129		case "name":
3130			if v != nil {
3131				var name string
3132				err = json.Unmarshal(*v, &name)
3133				if err != nil {
3134					return err
3135				}
3136				agpr.Name = &name
3137			}
3138		case "etag":
3139			if v != nil {
3140				var etag string
3141				err = json.Unmarshal(*v, &etag)
3142				if err != nil {
3143					return err
3144				}
3145				agpr.Etag = &etag
3146			}
3147		case "type":
3148			if v != nil {
3149				var typeVar string
3150				err = json.Unmarshal(*v, &typeVar)
3151				if err != nil {
3152					return err
3153				}
3154				agpr.Type = &typeVar
3155			}
3156		case "id":
3157			if v != nil {
3158				var ID string
3159				err = json.Unmarshal(*v, &ID)
3160				if err != nil {
3161					return err
3162				}
3163				agpr.ID = &ID
3164			}
3165		}
3166	}
3167
3168	return nil
3169}
3170
3171// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
3172type ApplicationGatewayPathRulePropertiesFormat struct {
3173	// Paths - Path rules of URL path map.
3174	Paths *[]string `json:"paths,omitempty"`
3175	// BackendAddressPool - Backend address pool resource of URL path map path rule.
3176	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3177	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
3178	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3179	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
3180	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3181	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3182	ProvisioningState *string `json:"provisioningState,omitempty"`
3183}
3184
3185// ApplicationGatewayProbe probe of the application gateway.
3186type ApplicationGatewayProbe struct {
3187	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
3188	// Name - Name of the probe that is unique within an Application Gateway.
3189	Name *string `json:"name,omitempty"`
3190	// Etag - A unique read-only string that changes whenever the resource is updated.
3191	Etag *string `json:"etag,omitempty"`
3192	// Type - Type of the resource.
3193	Type *string `json:"type,omitempty"`
3194	// ID - Resource ID.
3195	ID *string `json:"id,omitempty"`
3196}
3197
3198// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
3199func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
3200	objectMap := make(map[string]interface{})
3201	if agp.ApplicationGatewayProbePropertiesFormat != nil {
3202		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
3203	}
3204	if agp.Name != nil {
3205		objectMap["name"] = agp.Name
3206	}
3207	if agp.Etag != nil {
3208		objectMap["etag"] = agp.Etag
3209	}
3210	if agp.Type != nil {
3211		objectMap["type"] = agp.Type
3212	}
3213	if agp.ID != nil {
3214		objectMap["id"] = agp.ID
3215	}
3216	return json.Marshal(objectMap)
3217}
3218
3219// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
3220func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
3221	var m map[string]*json.RawMessage
3222	err := json.Unmarshal(body, &m)
3223	if err != nil {
3224		return err
3225	}
3226	for k, v := range m {
3227		switch k {
3228		case "properties":
3229			if v != nil {
3230				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
3231				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
3232				if err != nil {
3233					return err
3234				}
3235				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
3236			}
3237		case "name":
3238			if v != nil {
3239				var name string
3240				err = json.Unmarshal(*v, &name)
3241				if err != nil {
3242					return err
3243				}
3244				agp.Name = &name
3245			}
3246		case "etag":
3247			if v != nil {
3248				var etag string
3249				err = json.Unmarshal(*v, &etag)
3250				if err != nil {
3251					return err
3252				}
3253				agp.Etag = &etag
3254			}
3255		case "type":
3256			if v != nil {
3257				var typeVar string
3258				err = json.Unmarshal(*v, &typeVar)
3259				if err != nil {
3260					return err
3261				}
3262				agp.Type = &typeVar
3263			}
3264		case "id":
3265			if v != nil {
3266				var ID string
3267				err = json.Unmarshal(*v, &ID)
3268				if err != nil {
3269					return err
3270				}
3271				agp.ID = &ID
3272			}
3273		}
3274	}
3275
3276	return nil
3277}
3278
3279// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
3280type ApplicationGatewayProbeHealthResponseMatch struct {
3281	// Body - Body that must be contained in the health response. Default value is empty.
3282	Body *string `json:"body,omitempty"`
3283	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
3284	StatusCodes *[]string `json:"statusCodes,omitempty"`
3285}
3286
3287// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
3288type ApplicationGatewayProbePropertiesFormat struct {
3289	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
3290	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
3291	// Host - Host name to send the probe to.
3292	Host *string `json:"host,omitempty"`
3293	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
3294	Path *string `json:"path,omitempty"`
3295	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
3296	Interval *int32 `json:"interval,omitempty"`
3297	// 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.
3298	Timeout *int32 `json:"timeout,omitempty"`
3299	// 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.
3300	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
3301	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
3302	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
3303	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
3304	MinServers *int32 `json:"minServers,omitempty"`
3305	// Match - Criterion for classifying a healthy probe response.
3306	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
3307	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3308	ProvisioningState *string `json:"provisioningState,omitempty"`
3309}
3310
3311// ApplicationGatewayPropertiesFormat properties of the application gateway.
3312type ApplicationGatewayPropertiesFormat struct {
3313	// Sku - SKU of the application gateway resource.
3314	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
3315	// SslPolicy - SSL policy of the application gateway resource.
3316	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
3317	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
3318	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
3319	// GatewayIPConfigurations - Subnets of application the gateway resource.
3320	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
3321	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
3322	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
3323	// SslCertificates - SSL certificates of the application gateway resource.
3324	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
3325	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
3326	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
3327	// FrontendPorts - Frontend ports of the application gateway resource.
3328	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
3329	// Probes - Probes of the application gateway resource.
3330	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
3331	// BackendAddressPools - Backend address pool of the application gateway resource.
3332	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
3333	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
3334	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
3335	// HTTPListeners - Http listeners of the application gateway resource.
3336	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
3337	// URLPathMaps - URL path map of the application gateway resource.
3338	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
3339	// RequestRoutingRules - Request routing rules of the application gateway resource.
3340	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
3341	// RedirectConfigurations - Redirect configurations of the application gateway resource.
3342	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
3343	// WebApplicationFirewallConfiguration - Web application firewall configuration.
3344	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
3345	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
3346	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
3347	// EnableFips - Whether FIPS is enabled on the application gateway resource.
3348	EnableFips *bool `json:"enableFips,omitempty"`
3349	// AutoscaleConfiguration - Autoscale Configuration.
3350	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
3351	// ResourceGUID - Resource GUID property of the application gateway resource.
3352	ResourceGUID *string `json:"resourceGuid,omitempty"`
3353	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3354	ProvisioningState *string `json:"provisioningState,omitempty"`
3355}
3356
3357// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
3358type ApplicationGatewayRedirectConfiguration struct {
3359	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
3360	// Name - Name of the redirect configuration that is unique within an Application Gateway.
3361	Name *string `json:"name,omitempty"`
3362	// Etag - A unique read-only string that changes whenever the resource is updated.
3363	Etag *string `json:"etag,omitempty"`
3364	// Type - Type of the resource.
3365	Type *string `json:"type,omitempty"`
3366	// ID - Resource ID.
3367	ID *string `json:"id,omitempty"`
3368}
3369
3370// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
3371func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
3372	objectMap := make(map[string]interface{})
3373	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
3374		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
3375	}
3376	if agrc.Name != nil {
3377		objectMap["name"] = agrc.Name
3378	}
3379	if agrc.Etag != nil {
3380		objectMap["etag"] = agrc.Etag
3381	}
3382	if agrc.Type != nil {
3383		objectMap["type"] = agrc.Type
3384	}
3385	if agrc.ID != nil {
3386		objectMap["id"] = agrc.ID
3387	}
3388	return json.Marshal(objectMap)
3389}
3390
3391// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
3392func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
3393	var m map[string]*json.RawMessage
3394	err := json.Unmarshal(body, &m)
3395	if err != nil {
3396		return err
3397	}
3398	for k, v := range m {
3399		switch k {
3400		case "properties":
3401			if v != nil {
3402				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
3403				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
3404				if err != nil {
3405					return err
3406				}
3407				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
3408			}
3409		case "name":
3410			if v != nil {
3411				var name string
3412				err = json.Unmarshal(*v, &name)
3413				if err != nil {
3414					return err
3415				}
3416				agrc.Name = &name
3417			}
3418		case "etag":
3419			if v != nil {
3420				var etag string
3421				err = json.Unmarshal(*v, &etag)
3422				if err != nil {
3423					return err
3424				}
3425				agrc.Etag = &etag
3426			}
3427		case "type":
3428			if v != nil {
3429				var typeVar string
3430				err = json.Unmarshal(*v, &typeVar)
3431				if err != nil {
3432					return err
3433				}
3434				agrc.Type = &typeVar
3435			}
3436		case "id":
3437			if v != nil {
3438				var ID string
3439				err = json.Unmarshal(*v, &ID)
3440				if err != nil {
3441					return err
3442				}
3443				agrc.ID = &ID
3444			}
3445		}
3446	}
3447
3448	return nil
3449}
3450
3451// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
3452// application gateway.
3453type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
3454	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
3455	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
3456	// TargetListener - Reference to a listener to redirect the request to.
3457	TargetListener *SubResource `json:"targetListener,omitempty"`
3458	// TargetURL - Url to redirect the request to.
3459	TargetURL *string `json:"targetUrl,omitempty"`
3460	// IncludePath - Include path in the redirected url.
3461	IncludePath *bool `json:"includePath,omitempty"`
3462	// IncludeQueryString - Include query string in the redirected url.
3463	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
3464	// RequestRoutingRules - Request routing specifying redirect configuration.
3465	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
3466	// URLPathMaps - Url path maps specifying default redirect configuration.
3467	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
3468	// PathRules - Path rules specifying redirect configuration.
3469	PathRules *[]SubResource `json:"pathRules,omitempty"`
3470}
3471
3472// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
3473type ApplicationGatewayRequestRoutingRule struct {
3474	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
3475	// Name - Name of the request routing rule that is unique within an Application Gateway.
3476	Name *string `json:"name,omitempty"`
3477	// Etag - A unique read-only string that changes whenever the resource is updated.
3478	Etag *string `json:"etag,omitempty"`
3479	// Type - Type of the resource.
3480	Type *string `json:"type,omitempty"`
3481	// ID - Resource ID.
3482	ID *string `json:"id,omitempty"`
3483}
3484
3485// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
3486func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
3487	objectMap := make(map[string]interface{})
3488	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
3489		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
3490	}
3491	if agrrr.Name != nil {
3492		objectMap["name"] = agrrr.Name
3493	}
3494	if agrrr.Etag != nil {
3495		objectMap["etag"] = agrrr.Etag
3496	}
3497	if agrrr.Type != nil {
3498		objectMap["type"] = agrrr.Type
3499	}
3500	if agrrr.ID != nil {
3501		objectMap["id"] = agrrr.ID
3502	}
3503	return json.Marshal(objectMap)
3504}
3505
3506// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
3507func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
3508	var m map[string]*json.RawMessage
3509	err := json.Unmarshal(body, &m)
3510	if err != nil {
3511		return err
3512	}
3513	for k, v := range m {
3514		switch k {
3515		case "properties":
3516			if v != nil {
3517				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
3518				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
3519				if err != nil {
3520					return err
3521				}
3522				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
3523			}
3524		case "name":
3525			if v != nil {
3526				var name string
3527				err = json.Unmarshal(*v, &name)
3528				if err != nil {
3529					return err
3530				}
3531				agrrr.Name = &name
3532			}
3533		case "etag":
3534			if v != nil {
3535				var etag string
3536				err = json.Unmarshal(*v, &etag)
3537				if err != nil {
3538					return err
3539				}
3540				agrrr.Etag = &etag
3541			}
3542		case "type":
3543			if v != nil {
3544				var typeVar string
3545				err = json.Unmarshal(*v, &typeVar)
3546				if err != nil {
3547					return err
3548				}
3549				agrrr.Type = &typeVar
3550			}
3551		case "id":
3552			if v != nil {
3553				var ID string
3554				err = json.Unmarshal(*v, &ID)
3555				if err != nil {
3556					return err
3557				}
3558				agrrr.ID = &ID
3559			}
3560		}
3561	}
3562
3563	return nil
3564}
3565
3566// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
3567// application gateway.
3568type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
3569	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
3570	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
3571	// BackendAddressPool - Backend address pool resource of the application gateway.
3572	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
3573	// BackendHTTPSettings - Backend http settings resource of the application gateway.
3574	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
3575	// HTTPListener - Http listener resource of the application gateway.
3576	HTTPListener *SubResource `json:"httpListener,omitempty"`
3577	// URLPathMap - URL path map resource of the application gateway.
3578	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
3579	// RedirectConfiguration - Redirect configuration resource of the application gateway.
3580	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
3581	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3582	ProvisioningState *string `json:"provisioningState,omitempty"`
3583}
3584
3585// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
3586// long-running operation.
3587type ApplicationGatewaysBackendHealthFuture struct {
3588	azure.Future
3589}
3590
3591// Result returns the result of the asynchronous operation.
3592// If the operation has not completed it will return an error.
3593func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
3594	var done bool
3595	done, err = future.DoneWithContext(context.Background(), client)
3596	if err != nil {
3597		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
3598		return
3599	}
3600	if !done {
3601		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
3602		return
3603	}
3604	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3605	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
3606		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
3607		if err != nil {
3608			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
3609		}
3610	}
3611	return
3612}
3613
3614// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3615// long-running operation.
3616type ApplicationGatewaysCreateOrUpdateFuture struct {
3617	azure.Future
3618}
3619
3620// Result returns the result of the asynchronous operation.
3621// If the operation has not completed it will return an error.
3622func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
3623	var done bool
3624	done, err = future.DoneWithContext(context.Background(), client)
3625	if err != nil {
3626		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3627		return
3628	}
3629	if !done {
3630		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
3631		return
3632	}
3633	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3634	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
3635		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
3636		if err != nil {
3637			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
3638		}
3639	}
3640	return
3641}
3642
3643// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
3644// long-running operation.
3645type ApplicationGatewaysDeleteFuture struct {
3646	azure.Future
3647}
3648
3649// Result returns the result of the asynchronous operation.
3650// If the operation has not completed it will return an error.
3651func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3652	var done bool
3653	done, err = future.DoneWithContext(context.Background(), client)
3654	if err != nil {
3655		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
3656		return
3657	}
3658	if !done {
3659		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
3660		return
3661	}
3662	ar.Response = future.Response()
3663	return
3664}
3665
3666// ApplicationGatewaySku SKU of an application gateway
3667type ApplicationGatewaySku struct {
3668	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
3669	Name ApplicationGatewaySkuName `json:"name,omitempty"`
3670	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
3671	Tier ApplicationGatewayTier `json:"tier,omitempty"`
3672	// Capacity - Capacity (instance count) of an application gateway.
3673	Capacity *int32 `json:"capacity,omitempty"`
3674}
3675
3676// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
3677type ApplicationGatewaySslCertificate struct {
3678	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
3679	// Name - Name of the SSL certificate that is unique within an Application Gateway.
3680	Name *string `json:"name,omitempty"`
3681	// Etag - A unique read-only string that changes whenever the resource is updated.
3682	Etag *string `json:"etag,omitempty"`
3683	// Type - Type of the resource.
3684	Type *string `json:"type,omitempty"`
3685	// ID - Resource ID.
3686	ID *string `json:"id,omitempty"`
3687}
3688
3689// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
3690func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
3691	objectMap := make(map[string]interface{})
3692	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
3693		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
3694	}
3695	if agsc.Name != nil {
3696		objectMap["name"] = agsc.Name
3697	}
3698	if agsc.Etag != nil {
3699		objectMap["etag"] = agsc.Etag
3700	}
3701	if agsc.Type != nil {
3702		objectMap["type"] = agsc.Type
3703	}
3704	if agsc.ID != nil {
3705		objectMap["id"] = agsc.ID
3706	}
3707	return json.Marshal(objectMap)
3708}
3709
3710// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
3711func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
3712	var m map[string]*json.RawMessage
3713	err := json.Unmarshal(body, &m)
3714	if err != nil {
3715		return err
3716	}
3717	for k, v := range m {
3718		switch k {
3719		case "properties":
3720			if v != nil {
3721				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
3722				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
3723				if err != nil {
3724					return err
3725				}
3726				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
3727			}
3728		case "name":
3729			if v != nil {
3730				var name string
3731				err = json.Unmarshal(*v, &name)
3732				if err != nil {
3733					return err
3734				}
3735				agsc.Name = &name
3736			}
3737		case "etag":
3738			if v != nil {
3739				var etag string
3740				err = json.Unmarshal(*v, &etag)
3741				if err != nil {
3742					return err
3743				}
3744				agsc.Etag = &etag
3745			}
3746		case "type":
3747			if v != nil {
3748				var typeVar string
3749				err = json.Unmarshal(*v, &typeVar)
3750				if err != nil {
3751					return err
3752				}
3753				agsc.Type = &typeVar
3754			}
3755		case "id":
3756			if v != nil {
3757				var ID string
3758				err = json.Unmarshal(*v, &ID)
3759				if err != nil {
3760					return err
3761				}
3762				agsc.ID = &ID
3763			}
3764		}
3765	}
3766
3767	return nil
3768}
3769
3770// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
3771// gateway.
3772type ApplicationGatewaySslCertificatePropertiesFormat struct {
3773	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
3774	Data *string `json:"data,omitempty"`
3775	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
3776	Password *string `json:"password,omitempty"`
3777	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
3778	PublicCertData *string `json:"publicCertData,omitempty"`
3779	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
3780	ProvisioningState *string `json:"provisioningState,omitempty"`
3781}
3782
3783// ApplicationGatewaySslPolicy application Gateway Ssl policy.
3784type ApplicationGatewaySslPolicy struct {
3785	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
3786	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
3787	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
3788	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
3789	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
3790	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
3791	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
3792	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3793	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3794	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3795}
3796
3797// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
3798type ApplicationGatewaySslPredefinedPolicy struct {
3799	autorest.Response `json:"-"`
3800	// Name - Name of the Ssl predefined policy.
3801	Name                                                   *string `json:"name,omitempty"`
3802	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
3803	// ID - Resource ID.
3804	ID *string `json:"id,omitempty"`
3805}
3806
3807// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
3808func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
3809	objectMap := make(map[string]interface{})
3810	if agspp.Name != nil {
3811		objectMap["name"] = agspp.Name
3812	}
3813	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
3814		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3815	}
3816	if agspp.ID != nil {
3817		objectMap["id"] = agspp.ID
3818	}
3819	return json.Marshal(objectMap)
3820}
3821
3822// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
3823func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
3824	var m map[string]*json.RawMessage
3825	err := json.Unmarshal(body, &m)
3826	if err != nil {
3827		return err
3828	}
3829	for k, v := range m {
3830		switch k {
3831		case "name":
3832			if v != nil {
3833				var name string
3834				err = json.Unmarshal(*v, &name)
3835				if err != nil {
3836					return err
3837				}
3838				agspp.Name = &name
3839			}
3840		case "properties":
3841			if v != nil {
3842				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
3843				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
3844				if err != nil {
3845					return err
3846				}
3847				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
3848			}
3849		case "id":
3850			if v != nil {
3851				var ID string
3852				err = json.Unmarshal(*v, &ID)
3853				if err != nil {
3854					return err
3855				}
3856				agspp.ID = &ID
3857			}
3858		}
3859	}
3860
3861	return nil
3862}
3863
3864// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
3865// ApplicationGatewaySslPredefinedPolicy
3866type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
3867	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
3868	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
3869	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
3870	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
3871}
3872
3873// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
3874// long-running operation.
3875type ApplicationGatewaysStartFuture struct {
3876	azure.Future
3877}
3878
3879// Result returns the result of the asynchronous operation.
3880// If the operation has not completed it will return an error.
3881func (future *ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3882	var done bool
3883	done, err = future.DoneWithContext(context.Background(), client)
3884	if err != nil {
3885		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
3886		return
3887	}
3888	if !done {
3889		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
3890		return
3891	}
3892	ar.Response = future.Response()
3893	return
3894}
3895
3896// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
3897// operation.
3898type ApplicationGatewaysStopFuture struct {
3899	azure.Future
3900}
3901
3902// Result returns the result of the asynchronous operation.
3903// If the operation has not completed it will return an error.
3904func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
3905	var done bool
3906	done, err = future.DoneWithContext(context.Background(), client)
3907	if err != nil {
3908		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
3909		return
3910	}
3911	if !done {
3912		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
3913		return
3914	}
3915	ar.Response = future.Response()
3916	return
3917}
3918
3919// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3920// long-running operation.
3921type ApplicationGatewaysUpdateTagsFuture struct {
3922	azure.Future
3923}
3924
3925// Result returns the result of the asynchronous operation.
3926// If the operation has not completed it will return an error.
3927func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
3928	var done bool
3929	done, err = future.DoneWithContext(context.Background(), client)
3930	if err != nil {
3931		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3932		return
3933	}
3934	if !done {
3935		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
3936		return
3937	}
3938	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3939	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
3940		ag, err = client.UpdateTagsResponder(ag.Response.Response)
3941		if err != nil {
3942			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
3943		}
3944	}
3945	return
3946}
3947
3948// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
3949// PathBasedRouting.
3950type ApplicationGatewayURLPathMap struct {
3951	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
3952	// Name - Name of the URL path map that is unique within an Application Gateway.
3953	Name *string `json:"name,omitempty"`
3954	// Etag - A unique read-only string that changes whenever the resource is updated.
3955	Etag *string `json:"etag,omitempty"`
3956	// Type - Type of the resource.
3957	Type *string `json:"type,omitempty"`
3958	// ID - Resource ID.
3959	ID *string `json:"id,omitempty"`
3960}
3961
3962// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
3963func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
3964	objectMap := make(map[string]interface{})
3965	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
3966		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
3967	}
3968	if agupm.Name != nil {
3969		objectMap["name"] = agupm.Name
3970	}
3971	if agupm.Etag != nil {
3972		objectMap["etag"] = agupm.Etag
3973	}
3974	if agupm.Type != nil {
3975		objectMap["type"] = agupm.Type
3976	}
3977	if agupm.ID != nil {
3978		objectMap["id"] = agupm.ID
3979	}
3980	return json.Marshal(objectMap)
3981}
3982
3983// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
3984func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
3985	var m map[string]*json.RawMessage
3986	err := json.Unmarshal(body, &m)
3987	if err != nil {
3988		return err
3989	}
3990	for k, v := range m {
3991		switch k {
3992		case "properties":
3993			if v != nil {
3994				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
3995				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
3996				if err != nil {
3997					return err
3998				}
3999				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
4000			}
4001		case "name":
4002			if v != nil {
4003				var name string
4004				err = json.Unmarshal(*v, &name)
4005				if err != nil {
4006					return err
4007				}
4008				agupm.Name = &name
4009			}
4010		case "etag":
4011			if v != nil {
4012				var etag string
4013				err = json.Unmarshal(*v, &etag)
4014				if err != nil {
4015					return err
4016				}
4017				agupm.Etag = &etag
4018			}
4019		case "type":
4020			if v != nil {
4021				var typeVar string
4022				err = json.Unmarshal(*v, &typeVar)
4023				if err != nil {
4024					return err
4025				}
4026				agupm.Type = &typeVar
4027			}
4028		case "id":
4029			if v != nil {
4030				var ID string
4031				err = json.Unmarshal(*v, &ID)
4032				if err != nil {
4033					return err
4034				}
4035				agupm.ID = &ID
4036			}
4037		}
4038	}
4039
4040	return nil
4041}
4042
4043// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
4044type ApplicationGatewayURLPathMapPropertiesFormat struct {
4045	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
4046	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
4047	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
4048	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
4049	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
4050	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
4051	// PathRules - Path rule of URL path map resource.
4052	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
4053	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4054	ProvisioningState *string `json:"provisioningState,omitempty"`
4055}
4056
4057// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
4058// configuration.
4059type ApplicationGatewayWebApplicationFirewallConfiguration struct {
4060	// Enabled - Whether the web application firewall is enabled or not.
4061	Enabled *bool `json:"enabled,omitempty"`
4062	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
4063	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
4064	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
4065	RuleSetType *string `json:"ruleSetType,omitempty"`
4066	// RuleSetVersion - The version of the rule set type.
4067	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
4068	// DisabledRuleGroups - The disabled rule groups.
4069	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
4070	// RequestBodyCheck - Whether allow WAF to check request Body.
4071	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
4072	// MaxRequestBodySize - Maximum request body size for WAF.
4073	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
4074}
4075
4076// ApplicationSecurityGroup an application security group in a resource group.
4077type ApplicationSecurityGroup struct {
4078	autorest.Response `json:"-"`
4079	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
4080	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
4081	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4082	Etag *string `json:"etag,omitempty"`
4083	// ID - Resource ID.
4084	ID *string `json:"id,omitempty"`
4085	// Name - READ-ONLY; Resource name.
4086	Name *string `json:"name,omitempty"`
4087	// Type - READ-ONLY; Resource type.
4088	Type *string `json:"type,omitempty"`
4089	// Location - Resource location.
4090	Location *string `json:"location,omitempty"`
4091	// Tags - Resource tags.
4092	Tags map[string]*string `json:"tags"`
4093}
4094
4095// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
4096func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
4097	objectMap := make(map[string]interface{})
4098	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
4099		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
4100	}
4101	if asg.ID != nil {
4102		objectMap["id"] = asg.ID
4103	}
4104	if asg.Location != nil {
4105		objectMap["location"] = asg.Location
4106	}
4107	if asg.Tags != nil {
4108		objectMap["tags"] = asg.Tags
4109	}
4110	return json.Marshal(objectMap)
4111}
4112
4113// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
4114func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
4115	var m map[string]*json.RawMessage
4116	err := json.Unmarshal(body, &m)
4117	if err != nil {
4118		return err
4119	}
4120	for k, v := range m {
4121		switch k {
4122		case "properties":
4123			if v != nil {
4124				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
4125				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
4126				if err != nil {
4127					return err
4128				}
4129				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
4130			}
4131		case "etag":
4132			if v != nil {
4133				var etag string
4134				err = json.Unmarshal(*v, &etag)
4135				if err != nil {
4136					return err
4137				}
4138				asg.Etag = &etag
4139			}
4140		case "id":
4141			if v != nil {
4142				var ID string
4143				err = json.Unmarshal(*v, &ID)
4144				if err != nil {
4145					return err
4146				}
4147				asg.ID = &ID
4148			}
4149		case "name":
4150			if v != nil {
4151				var name string
4152				err = json.Unmarshal(*v, &name)
4153				if err != nil {
4154					return err
4155				}
4156				asg.Name = &name
4157			}
4158		case "type":
4159			if v != nil {
4160				var typeVar string
4161				err = json.Unmarshal(*v, &typeVar)
4162				if err != nil {
4163					return err
4164				}
4165				asg.Type = &typeVar
4166			}
4167		case "location":
4168			if v != nil {
4169				var location string
4170				err = json.Unmarshal(*v, &location)
4171				if err != nil {
4172					return err
4173				}
4174				asg.Location = &location
4175			}
4176		case "tags":
4177			if v != nil {
4178				var tags map[string]*string
4179				err = json.Unmarshal(*v, &tags)
4180				if err != nil {
4181					return err
4182				}
4183				asg.Tags = tags
4184			}
4185		}
4186	}
4187
4188	return nil
4189}
4190
4191// ApplicationSecurityGroupListResult a list of application security groups.
4192type ApplicationSecurityGroupListResult struct {
4193	autorest.Response `json:"-"`
4194	// Value - A list of application security groups.
4195	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
4196	// NextLink - READ-ONLY; The URL to get the next set of results.
4197	NextLink *string `json:"nextLink,omitempty"`
4198}
4199
4200// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
4201// ApplicationSecurityGroup values.
4202type ApplicationSecurityGroupListResultIterator struct {
4203	i    int
4204	page ApplicationSecurityGroupListResultPage
4205}
4206
4207// NextWithContext advances to the next value.  If there was an error making
4208// the request the iterator does not advance and the error is returned.
4209func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
4210	if tracing.IsEnabled() {
4211		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
4212		defer func() {
4213			sc := -1
4214			if iter.Response().Response.Response != nil {
4215				sc = iter.Response().Response.Response.StatusCode
4216			}
4217			tracing.EndSpan(ctx, sc, err)
4218		}()
4219	}
4220	iter.i++
4221	if iter.i < len(iter.page.Values()) {
4222		return nil
4223	}
4224	err = iter.page.NextWithContext(ctx)
4225	if err != nil {
4226		iter.i--
4227		return err
4228	}
4229	iter.i = 0
4230	return nil
4231}
4232
4233// Next advances to the next value.  If there was an error making
4234// the request the iterator does not advance and the error is returned.
4235// Deprecated: Use NextWithContext() instead.
4236func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
4237	return iter.NextWithContext(context.Background())
4238}
4239
4240// NotDone returns true if the enumeration should be started or is not yet complete.
4241func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
4242	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4243}
4244
4245// Response returns the raw server response from the last page request.
4246func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
4247	return iter.page.Response()
4248}
4249
4250// Value returns the current value or a zero-initialized value if the
4251// iterator has advanced beyond the end of the collection.
4252func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
4253	if !iter.page.NotDone() {
4254		return ApplicationSecurityGroup{}
4255	}
4256	return iter.page.Values()[iter.i]
4257}
4258
4259// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
4260func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
4261	return ApplicationSecurityGroupListResultIterator{page: page}
4262}
4263
4264// IsEmpty returns true if the ListResult contains no values.
4265func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
4266	return asglr.Value == nil || len(*asglr.Value) == 0
4267}
4268
4269// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
4270// It returns nil if no more results exist.
4271func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
4272	if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 {
4273		return nil, nil
4274	}
4275	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4276		autorest.AsJSON(),
4277		autorest.AsGet(),
4278		autorest.WithBaseURL(to.String(asglr.NextLink)))
4279}
4280
4281// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
4282type ApplicationSecurityGroupListResultPage struct {
4283	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
4284	asglr ApplicationSecurityGroupListResult
4285}
4286
4287// NextWithContext advances to the next page of values.  If there was an error making
4288// the request the page does not advance and the error is returned.
4289func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
4290	if tracing.IsEnabled() {
4291		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
4292		defer func() {
4293			sc := -1
4294			if page.Response().Response.Response != nil {
4295				sc = page.Response().Response.Response.StatusCode
4296			}
4297			tracing.EndSpan(ctx, sc, err)
4298		}()
4299	}
4300	next, err := page.fn(ctx, page.asglr)
4301	if err != nil {
4302		return err
4303	}
4304	page.asglr = next
4305	return nil
4306}
4307
4308// Next advances to the next page of values.  If there was an error making
4309// the request the page does not advance and the error is returned.
4310// Deprecated: Use NextWithContext() instead.
4311func (page *ApplicationSecurityGroupListResultPage) Next() error {
4312	return page.NextWithContext(context.Background())
4313}
4314
4315// NotDone returns true if the page enumeration should be started or is not yet complete.
4316func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
4317	return !page.asglr.IsEmpty()
4318}
4319
4320// Response returns the raw server response from the last page request.
4321func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
4322	return page.asglr
4323}
4324
4325// Values returns the slice of values for the current page or nil if there are no values.
4326func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
4327	if page.asglr.IsEmpty() {
4328		return nil
4329	}
4330	return *page.asglr.Value
4331}
4332
4333// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
4334func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
4335	return ApplicationSecurityGroupListResultPage{fn: getNextPage}
4336}
4337
4338// ApplicationSecurityGroupPropertiesFormat application security group properties.
4339type ApplicationSecurityGroupPropertiesFormat struct {
4340	// 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.
4341	ResourceGUID *string `json:"resourceGuid,omitempty"`
4342	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
4343	ProvisioningState *string `json:"provisioningState,omitempty"`
4344}
4345
4346// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4347// of a long-running operation.
4348type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
4349	azure.Future
4350}
4351
4352// Result returns the result of the asynchronous operation.
4353// If the operation has not completed it will return an error.
4354func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
4355	var done bool
4356	done, err = future.DoneWithContext(context.Background(), client)
4357	if err != nil {
4358		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4359		return
4360	}
4361	if !done {
4362		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
4363		return
4364	}
4365	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4366	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
4367		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
4368		if err != nil {
4369			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
4370		}
4371	}
4372	return
4373}
4374
4375// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
4376// long-running operation.
4377type ApplicationSecurityGroupsDeleteFuture struct {
4378	azure.Future
4379}
4380
4381// Result returns the result of the asynchronous operation.
4382// If the operation has not completed it will return an error.
4383func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
4384	var done bool
4385	done, err = future.DoneWithContext(context.Background(), client)
4386	if err != nil {
4387		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
4388		return
4389	}
4390	if !done {
4391		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
4392		return
4393	}
4394	ar.Response = future.Response()
4395	return
4396}
4397
4398// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
4399// that belongs to an ExpressRouteCircuit.
4400type AuthorizationListResult struct {
4401	autorest.Response `json:"-"`
4402	// Value - The authorizations in an ExpressRoute Circuit.
4403	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
4404	// NextLink - The URL to get the next set of results.
4405	NextLink *string `json:"nextLink,omitempty"`
4406}
4407
4408// AuthorizationListResultIterator provides access to a complete listing of
4409// ExpressRouteCircuitAuthorization values.
4410type AuthorizationListResultIterator struct {
4411	i    int
4412	page AuthorizationListResultPage
4413}
4414
4415// NextWithContext advances to the next value.  If there was an error making
4416// the request the iterator does not advance and the error is returned.
4417func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
4418	if tracing.IsEnabled() {
4419		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
4420		defer func() {
4421			sc := -1
4422			if iter.Response().Response.Response != nil {
4423				sc = iter.Response().Response.Response.StatusCode
4424			}
4425			tracing.EndSpan(ctx, sc, err)
4426		}()
4427	}
4428	iter.i++
4429	if iter.i < len(iter.page.Values()) {
4430		return nil
4431	}
4432	err = iter.page.NextWithContext(ctx)
4433	if err != nil {
4434		iter.i--
4435		return err
4436	}
4437	iter.i = 0
4438	return nil
4439}
4440
4441// Next advances to the next value.  If there was an error making
4442// the request the iterator does not advance and the error is returned.
4443// Deprecated: Use NextWithContext() instead.
4444func (iter *AuthorizationListResultIterator) Next() error {
4445	return iter.NextWithContext(context.Background())
4446}
4447
4448// NotDone returns true if the enumeration should be started or is not yet complete.
4449func (iter AuthorizationListResultIterator) NotDone() bool {
4450	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4451}
4452
4453// Response returns the raw server response from the last page request.
4454func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
4455	return iter.page.Response()
4456}
4457
4458// Value returns the current value or a zero-initialized value if the
4459// iterator has advanced beyond the end of the collection.
4460func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
4461	if !iter.page.NotDone() {
4462		return ExpressRouteCircuitAuthorization{}
4463	}
4464	return iter.page.Values()[iter.i]
4465}
4466
4467// Creates a new instance of the AuthorizationListResultIterator type.
4468func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
4469	return AuthorizationListResultIterator{page: page}
4470}
4471
4472// IsEmpty returns true if the ListResult contains no values.
4473func (alr AuthorizationListResult) IsEmpty() bool {
4474	return alr.Value == nil || len(*alr.Value) == 0
4475}
4476
4477// authorizationListResultPreparer prepares a request to retrieve the next set of results.
4478// It returns nil if no more results exist.
4479func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
4480	if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
4481		return nil, nil
4482	}
4483	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4484		autorest.AsJSON(),
4485		autorest.AsGet(),
4486		autorest.WithBaseURL(to.String(alr.NextLink)))
4487}
4488
4489// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
4490type AuthorizationListResultPage struct {
4491	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
4492	alr AuthorizationListResult
4493}
4494
4495// NextWithContext advances to the next page of values.  If there was an error making
4496// the request the page does not advance and the error is returned.
4497func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
4498	if tracing.IsEnabled() {
4499		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
4500		defer func() {
4501			sc := -1
4502			if page.Response().Response.Response != nil {
4503				sc = page.Response().Response.Response.StatusCode
4504			}
4505			tracing.EndSpan(ctx, sc, err)
4506		}()
4507	}
4508	next, err := page.fn(ctx, page.alr)
4509	if err != nil {
4510		return err
4511	}
4512	page.alr = next
4513	return nil
4514}
4515
4516// Next advances to the next page of values.  If there was an error making
4517// the request the page does not advance and the error is returned.
4518// Deprecated: Use NextWithContext() instead.
4519func (page *AuthorizationListResultPage) Next() error {
4520	return page.NextWithContext(context.Background())
4521}
4522
4523// NotDone returns true if the page enumeration should be started or is not yet complete.
4524func (page AuthorizationListResultPage) NotDone() bool {
4525	return !page.alr.IsEmpty()
4526}
4527
4528// Response returns the raw server response from the last page request.
4529func (page AuthorizationListResultPage) Response() AuthorizationListResult {
4530	return page.alr
4531}
4532
4533// Values returns the slice of values for the current page or nil if there are no values.
4534func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
4535	if page.alr.IsEmpty() {
4536		return nil
4537	}
4538	return *page.alr.Value
4539}
4540
4541// Creates a new instance of the AuthorizationListResultPage type.
4542func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
4543	return AuthorizationListResultPage{fn: getNextPage}
4544}
4545
4546// AuthorizationPropertiesFormat ...
4547type AuthorizationPropertiesFormat struct {
4548	// AuthorizationKey - The authorization key.
4549	AuthorizationKey *string `json:"authorizationKey,omitempty"`
4550	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
4551	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
4552	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4553	ProvisioningState *string `json:"provisioningState,omitempty"`
4554}
4555
4556// Availability availability of the metric.
4557type Availability struct {
4558	// TimeGrain - The time grain of the availability.
4559	TimeGrain *string `json:"timeGrain,omitempty"`
4560	// Retention - The retention of the availability.
4561	Retention *string `json:"retention,omitempty"`
4562	// BlobDuration - Duration of the availability blob.
4563	BlobDuration *string `json:"blobDuration,omitempty"`
4564}
4565
4566// AvailableProvidersList list of available countries with details.
4567type AvailableProvidersList struct {
4568	autorest.Response `json:"-"`
4569	// Countries - List of available countries.
4570	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4571}
4572
4573// AvailableProvidersListCity city or town details.
4574type AvailableProvidersListCity struct {
4575	// CityName - The city or town name.
4576	CityName *string `json:"cityName,omitempty"`
4577	// Providers - A list of Internet service providers.
4578	Providers *[]string `json:"providers,omitempty"`
4579}
4580
4581// AvailableProvidersListCountry country details.
4582type AvailableProvidersListCountry struct {
4583	// CountryName - The country name.
4584	CountryName *string `json:"countryName,omitempty"`
4585	// Providers - A list of Internet service providers.
4586	Providers *[]string `json:"providers,omitempty"`
4587	// States - List of available states in the country.
4588	States *[]AvailableProvidersListState `json:"states,omitempty"`
4589}
4590
4591// AvailableProvidersListParameters constraints that determine the list of available Internet service
4592// providers.
4593type AvailableProvidersListParameters struct {
4594	// AzureLocations - A list of Azure regions.
4595	AzureLocations *[]string `json:"azureLocations,omitempty"`
4596	// Country - The country for available providers list.
4597	Country *string `json:"country,omitempty"`
4598	// State - The state for available providers list.
4599	State *string `json:"state,omitempty"`
4600	// City - The city or town for available providers list.
4601	City *string `json:"city,omitempty"`
4602}
4603
4604// AvailableProvidersListState state details.
4605type AvailableProvidersListState struct {
4606	// StateName - The state name.
4607	StateName *string `json:"stateName,omitempty"`
4608	// Providers - A list of Internet service providers.
4609	Providers *[]string `json:"providers,omitempty"`
4610	// Cities - List of available cities or towns in the state.
4611	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4612}
4613
4614// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4615// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4616// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4617// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4618// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4619// and error information regarding the failure.
4620type AzureAsyncOperationResult struct {
4621	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4622	Status OperationStatus `json:"status,omitempty"`
4623	Error  *Error          `json:"error,omitempty"`
4624}
4625
4626// AzureFirewall azure Firewall resource
4627type AzureFirewall struct {
4628	autorest.Response              `json:"-"`
4629	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4630	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4631	Etag *string `json:"etag,omitempty"`
4632	// ID - Resource ID.
4633	ID *string `json:"id,omitempty"`
4634	// Name - READ-ONLY; Resource name.
4635	Name *string `json:"name,omitempty"`
4636	// Type - READ-ONLY; Resource type.
4637	Type *string `json:"type,omitempty"`
4638	// Location - Resource location.
4639	Location *string `json:"location,omitempty"`
4640	// Tags - Resource tags.
4641	Tags map[string]*string `json:"tags"`
4642}
4643
4644// MarshalJSON is the custom marshaler for AzureFirewall.
4645func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4646	objectMap := make(map[string]interface{})
4647	if af.AzureFirewallPropertiesFormat != nil {
4648		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4649	}
4650	if af.ID != nil {
4651		objectMap["id"] = af.ID
4652	}
4653	if af.Location != nil {
4654		objectMap["location"] = af.Location
4655	}
4656	if af.Tags != nil {
4657		objectMap["tags"] = af.Tags
4658	}
4659	return json.Marshal(objectMap)
4660}
4661
4662// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4663func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4664	var m map[string]*json.RawMessage
4665	err := json.Unmarshal(body, &m)
4666	if err != nil {
4667		return err
4668	}
4669	for k, v := range m {
4670		switch k {
4671		case "properties":
4672			if v != nil {
4673				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4674				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4675				if err != nil {
4676					return err
4677				}
4678				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4679			}
4680		case "etag":
4681			if v != nil {
4682				var etag string
4683				err = json.Unmarshal(*v, &etag)
4684				if err != nil {
4685					return err
4686				}
4687				af.Etag = &etag
4688			}
4689		case "id":
4690			if v != nil {
4691				var ID string
4692				err = json.Unmarshal(*v, &ID)
4693				if err != nil {
4694					return err
4695				}
4696				af.ID = &ID
4697			}
4698		case "name":
4699			if v != nil {
4700				var name string
4701				err = json.Unmarshal(*v, &name)
4702				if err != nil {
4703					return err
4704				}
4705				af.Name = &name
4706			}
4707		case "type":
4708			if v != nil {
4709				var typeVar string
4710				err = json.Unmarshal(*v, &typeVar)
4711				if err != nil {
4712					return err
4713				}
4714				af.Type = &typeVar
4715			}
4716		case "location":
4717			if v != nil {
4718				var location string
4719				err = json.Unmarshal(*v, &location)
4720				if err != nil {
4721					return err
4722				}
4723				af.Location = &location
4724			}
4725		case "tags":
4726			if v != nil {
4727				var tags map[string]*string
4728				err = json.Unmarshal(*v, &tags)
4729				if err != nil {
4730					return err
4731				}
4732				af.Tags = tags
4733			}
4734		}
4735	}
4736
4737	return nil
4738}
4739
4740// AzureFirewallApplicationRule properties of an application rule.
4741type AzureFirewallApplicationRule struct {
4742	// Name - Name of the application rule.
4743	Name *string `json:"name,omitempty"`
4744	// Description - Description of the rule.
4745	Description *string `json:"description,omitempty"`
4746	// SourceAddresses - List of source IP addresses for this rule.
4747	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4748	// Protocols - Array of ApplicationRuleProtocols.
4749	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4750	// TargetUrls - List of URLs for this rule.
4751	TargetUrls *[]string `json:"targetUrls,omitempty"`
4752}
4753
4754// AzureFirewallApplicationRuleCollection application rule collection resource
4755type AzureFirewallApplicationRuleCollection struct {
4756	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4757	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4758	Name *string `json:"name,omitempty"`
4759	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4760	Etag *string `json:"etag,omitempty"`
4761	// ID - Resource ID.
4762	ID *string `json:"id,omitempty"`
4763}
4764
4765// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4766func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4767	objectMap := make(map[string]interface{})
4768	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4769		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4770	}
4771	if afarc.Name != nil {
4772		objectMap["name"] = afarc.Name
4773	}
4774	if afarc.ID != nil {
4775		objectMap["id"] = afarc.ID
4776	}
4777	return json.Marshal(objectMap)
4778}
4779
4780// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4781func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4782	var m map[string]*json.RawMessage
4783	err := json.Unmarshal(body, &m)
4784	if err != nil {
4785		return err
4786	}
4787	for k, v := range m {
4788		switch k {
4789		case "properties":
4790			if v != nil {
4791				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4792				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4793				if err != nil {
4794					return err
4795				}
4796				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4797			}
4798		case "name":
4799			if v != nil {
4800				var name string
4801				err = json.Unmarshal(*v, &name)
4802				if err != nil {
4803					return err
4804				}
4805				afarc.Name = &name
4806			}
4807		case "etag":
4808			if v != nil {
4809				var etag string
4810				err = json.Unmarshal(*v, &etag)
4811				if err != nil {
4812					return err
4813				}
4814				afarc.Etag = &etag
4815			}
4816		case "id":
4817			if v != nil {
4818				var ID string
4819				err = json.Unmarshal(*v, &ID)
4820				if err != nil {
4821					return err
4822				}
4823				afarc.ID = &ID
4824			}
4825		}
4826	}
4827
4828	return nil
4829}
4830
4831// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4832type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4833	// Priority - Priority of the application rule collection resource.
4834	Priority *int32 `json:"priority,omitempty"`
4835	// Action - The action type of a rule collection
4836	Action *AzureFirewallRCAction `json:"action,omitempty"`
4837	// Rules - Collection of rules used by a application rule collection.
4838	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4839	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4840	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4841}
4842
4843// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4844type AzureFirewallApplicationRuleProtocol struct {
4845	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4846	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4847	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4848	Port *int32 `json:"port,omitempty"`
4849}
4850
4851// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4852type AzureFirewallIPConfiguration struct {
4853	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4854	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4855	Name *string `json:"name,omitempty"`
4856	// Etag - A unique read-only string that changes whenever the resource is updated.
4857	Etag *string `json:"etag,omitempty"`
4858	// ID - Resource ID.
4859	ID *string `json:"id,omitempty"`
4860}
4861
4862// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4863func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4864	objectMap := make(map[string]interface{})
4865	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4866		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4867	}
4868	if afic.Name != nil {
4869		objectMap["name"] = afic.Name
4870	}
4871	if afic.Etag != nil {
4872		objectMap["etag"] = afic.Etag
4873	}
4874	if afic.ID != nil {
4875		objectMap["id"] = afic.ID
4876	}
4877	return json.Marshal(objectMap)
4878}
4879
4880// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4881func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4882	var m map[string]*json.RawMessage
4883	err := json.Unmarshal(body, &m)
4884	if err != nil {
4885		return err
4886	}
4887	for k, v := range m {
4888		switch k {
4889		case "properties":
4890			if v != nil {
4891				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4892				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4893				if err != nil {
4894					return err
4895				}
4896				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4897			}
4898		case "name":
4899			if v != nil {
4900				var name string
4901				err = json.Unmarshal(*v, &name)
4902				if err != nil {
4903					return err
4904				}
4905				afic.Name = &name
4906			}
4907		case "etag":
4908			if v != nil {
4909				var etag string
4910				err = json.Unmarshal(*v, &etag)
4911				if err != nil {
4912					return err
4913				}
4914				afic.Etag = &etag
4915			}
4916		case "id":
4917			if v != nil {
4918				var ID string
4919				err = json.Unmarshal(*v, &ID)
4920				if err != nil {
4921					return err
4922				}
4923				afic.ID = &ID
4924			}
4925		}
4926	}
4927
4928	return nil
4929}
4930
4931// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4932type AzureFirewallIPConfigurationPropertiesFormat struct {
4933	// PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4934	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4935	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4936	Subnet *SubResource `json:"subnet,omitempty"`
4937	// InternalPublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input.
4938	InternalPublicIPAddress *SubResource `json:"internalPublicIpAddress,omitempty"`
4939	// PublicIPAddress - Reference of the PublicIP resource. This field is populated in the output.
4940	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4941	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4942	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4943}
4944
4945// AzureFirewallListResult response for ListAzureFirewalls API service call.
4946type AzureFirewallListResult struct {
4947	autorest.Response `json:"-"`
4948	// Value - List of a Azure Firewalls in a resource group.
4949	Value *[]AzureFirewall `json:"value,omitempty"`
4950	// NextLink - URL to get the next set of results.
4951	NextLink *string `json:"nextLink,omitempty"`
4952}
4953
4954// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4955type AzureFirewallListResultIterator struct {
4956	i    int
4957	page AzureFirewallListResultPage
4958}
4959
4960// NextWithContext advances to the next value.  If there was an error making
4961// the request the iterator does not advance and the error is returned.
4962func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4963	if tracing.IsEnabled() {
4964		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4965		defer func() {
4966			sc := -1
4967			if iter.Response().Response.Response != nil {
4968				sc = iter.Response().Response.Response.StatusCode
4969			}
4970			tracing.EndSpan(ctx, sc, err)
4971		}()
4972	}
4973	iter.i++
4974	if iter.i < len(iter.page.Values()) {
4975		return nil
4976	}
4977	err = iter.page.NextWithContext(ctx)
4978	if err != nil {
4979		iter.i--
4980		return err
4981	}
4982	iter.i = 0
4983	return nil
4984}
4985
4986// Next advances to the next value.  If there was an error making
4987// the request the iterator does not advance and the error is returned.
4988// Deprecated: Use NextWithContext() instead.
4989func (iter *AzureFirewallListResultIterator) Next() error {
4990	return iter.NextWithContext(context.Background())
4991}
4992
4993// NotDone returns true if the enumeration should be started or is not yet complete.
4994func (iter AzureFirewallListResultIterator) NotDone() bool {
4995	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4996}
4997
4998// Response returns the raw server response from the last page request.
4999func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
5000	return iter.page.Response()
5001}
5002
5003// Value returns the current value or a zero-initialized value if the
5004// iterator has advanced beyond the end of the collection.
5005func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
5006	if !iter.page.NotDone() {
5007		return AzureFirewall{}
5008	}
5009	return iter.page.Values()[iter.i]
5010}
5011
5012// Creates a new instance of the AzureFirewallListResultIterator type.
5013func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
5014	return AzureFirewallListResultIterator{page: page}
5015}
5016
5017// IsEmpty returns true if the ListResult contains no values.
5018func (aflr AzureFirewallListResult) IsEmpty() bool {
5019	return aflr.Value == nil || len(*aflr.Value) == 0
5020}
5021
5022// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
5023// It returns nil if no more results exist.
5024func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
5025	if aflr.NextLink == nil || len(to.String(aflr.NextLink)) < 1 {
5026		return nil, nil
5027	}
5028	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5029		autorest.AsJSON(),
5030		autorest.AsGet(),
5031		autorest.WithBaseURL(to.String(aflr.NextLink)))
5032}
5033
5034// AzureFirewallListResultPage contains a page of AzureFirewall values.
5035type AzureFirewallListResultPage struct {
5036	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
5037	aflr AzureFirewallListResult
5038}
5039
5040// NextWithContext advances to the next page of values.  If there was an error making
5041// the request the page does not advance and the error is returned.
5042func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
5043	if tracing.IsEnabled() {
5044		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
5045		defer func() {
5046			sc := -1
5047			if page.Response().Response.Response != nil {
5048				sc = page.Response().Response.Response.StatusCode
5049			}
5050			tracing.EndSpan(ctx, sc, err)
5051		}()
5052	}
5053	next, err := page.fn(ctx, page.aflr)
5054	if err != nil {
5055		return err
5056	}
5057	page.aflr = next
5058	return nil
5059}
5060
5061// Next advances to the next page of values.  If there was an error making
5062// the request the page does not advance and the error is returned.
5063// Deprecated: Use NextWithContext() instead.
5064func (page *AzureFirewallListResultPage) Next() error {
5065	return page.NextWithContext(context.Background())
5066}
5067
5068// NotDone returns true if the page enumeration should be started or is not yet complete.
5069func (page AzureFirewallListResultPage) NotDone() bool {
5070	return !page.aflr.IsEmpty()
5071}
5072
5073// Response returns the raw server response from the last page request.
5074func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
5075	return page.aflr
5076}
5077
5078// Values returns the slice of values for the current page or nil if there are no values.
5079func (page AzureFirewallListResultPage) Values() []AzureFirewall {
5080	if page.aflr.IsEmpty() {
5081		return nil
5082	}
5083	return *page.aflr.Value
5084}
5085
5086// Creates a new instance of the AzureFirewallListResultPage type.
5087func NewAzureFirewallListResultPage(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
5088	return AzureFirewallListResultPage{fn: getNextPage}
5089}
5090
5091// AzureFirewallNetworkRule properties of the network rule.
5092type AzureFirewallNetworkRule struct {
5093	// Name - Name of the network rule.
5094	Name *string `json:"name,omitempty"`
5095	// Description - Description of the rule.
5096	Description *string `json:"description,omitempty"`
5097	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
5098	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
5099	// SourceAddresses - List of source IP addresses for this rule.
5100	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
5101	// DestinationAddresses - List of destination IP addresses.
5102	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5103	// DestinationPorts - List of destination ports.
5104	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5105}
5106
5107// AzureFirewallNetworkRuleCollection network rule collection resource
5108type AzureFirewallNetworkRuleCollection struct {
5109	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5110	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5111	Name *string `json:"name,omitempty"`
5112	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5113	Etag *string `json:"etag,omitempty"`
5114	// ID - Resource ID.
5115	ID *string `json:"id,omitempty"`
5116}
5117
5118// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5119func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5120	objectMap := make(map[string]interface{})
5121	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5122		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5123	}
5124	if afnrc.Name != nil {
5125		objectMap["name"] = afnrc.Name
5126	}
5127	if afnrc.ID != nil {
5128		objectMap["id"] = afnrc.ID
5129	}
5130	return json.Marshal(objectMap)
5131}
5132
5133// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5134func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5135	var m map[string]*json.RawMessage
5136	err := json.Unmarshal(body, &m)
5137	if err != nil {
5138		return err
5139	}
5140	for k, v := range m {
5141		switch k {
5142		case "properties":
5143			if v != nil {
5144				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5145				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5146				if err != nil {
5147					return err
5148				}
5149				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5150			}
5151		case "name":
5152			if v != nil {
5153				var name string
5154				err = json.Unmarshal(*v, &name)
5155				if err != nil {
5156					return err
5157				}
5158				afnrc.Name = &name
5159			}
5160		case "etag":
5161			if v != nil {
5162				var etag string
5163				err = json.Unmarshal(*v, &etag)
5164				if err != nil {
5165					return err
5166				}
5167				afnrc.Etag = &etag
5168			}
5169		case "id":
5170			if v != nil {
5171				var ID string
5172				err = json.Unmarshal(*v, &ID)
5173				if err != nil {
5174					return err
5175				}
5176				afnrc.ID = &ID
5177			}
5178		}
5179	}
5180
5181	return nil
5182}
5183
5184// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5185type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5186	// Priority - Priority of the network rule collection resource.
5187	Priority *int32 `json:"priority,omitempty"`
5188	// Action - The action type of a rule collection
5189	Action *AzureFirewallRCAction `json:"action,omitempty"`
5190	// Rules - Collection of rules used by a network rule collection.
5191	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5192	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5193	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5194}
5195
5196// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5197type AzureFirewallPropertiesFormat struct {
5198	// ApplicationRuleCollections - Collection of application rule collections used by a Azure Firewall.
5199	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5200	// NetworkRuleCollections - Collection of network rule collections used by a Azure Firewall.
5201	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5202	// IPConfigurations - IP configuration of the Azure Firewall resource.
5203	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5204	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5205	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5206}
5207
5208// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5209type AzureFirewallRCAction struct {
5210	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5211	Type AzureFirewallRCActionType `json:"type,omitempty"`
5212}
5213
5214// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5215// long-running operation.
5216type AzureFirewallsCreateOrUpdateFuture struct {
5217	azure.Future
5218}
5219
5220// Result returns the result of the asynchronous operation.
5221// If the operation has not completed it will return an error.
5222func (future *AzureFirewallsCreateOrUpdateFuture) Result(client AzureFirewallsClient) (af AzureFirewall, err error) {
5223	var done bool
5224	done, err = future.DoneWithContext(context.Background(), client)
5225	if err != nil {
5226		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5227		return
5228	}
5229	if !done {
5230		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
5231		return
5232	}
5233	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5234	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
5235		af, err = client.CreateOrUpdateResponder(af.Response.Response)
5236		if err != nil {
5237			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
5238		}
5239	}
5240	return
5241}
5242
5243// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5244// operation.
5245type AzureFirewallsDeleteFuture struct {
5246	azure.Future
5247}
5248
5249// Result returns the result of the asynchronous operation.
5250// If the operation has not completed it will return an error.
5251func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (ar autorest.Response, err error) {
5252	var done bool
5253	done, err = future.DoneWithContext(context.Background(), client)
5254	if err != nil {
5255		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
5256		return
5257	}
5258	if !done {
5259		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
5260		return
5261	}
5262	ar.Response = future.Response()
5263	return
5264}
5265
5266// AzureReachabilityReport azure reachability report details.
5267type AzureReachabilityReport struct {
5268	autorest.Response `json:"-"`
5269	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5270	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
5271	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5272	// ReachabilityReport - List of Azure reachability report items.
5273	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5274}
5275
5276// AzureReachabilityReportItem azure reachability report details for a given provider location.
5277type AzureReachabilityReportItem struct {
5278	// Provider - The Internet service provider.
5279	Provider *string `json:"provider,omitempty"`
5280	// AzureLocation - The Azure region.
5281	AzureLocation *string `json:"azureLocation,omitempty"`
5282	// Latencies - List of latency details for each of the time series.
5283	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5284}
5285
5286// AzureReachabilityReportLatencyInfo details on latency for a time series.
5287type AzureReachabilityReportLatencyInfo struct {
5288	// TimeStamp - The time stamp.
5289	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5290	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5291	Score *int32 `json:"score,omitempty"`
5292}
5293
5294// AzureReachabilityReportLocation parameters that define a geographic location.
5295type AzureReachabilityReportLocation struct {
5296	// Country - The name of the country.
5297	Country *string `json:"country,omitempty"`
5298	// State - The name of the state.
5299	State *string `json:"state,omitempty"`
5300	// City - The name of the city or town.
5301	City *string `json:"city,omitempty"`
5302}
5303
5304// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5305type AzureReachabilityReportParameters struct {
5306	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5307	// Providers - List of Internet service providers.
5308	Providers *[]string `json:"providers,omitempty"`
5309	// AzureLocations - Optional Azure regions to scope the query to.
5310	AzureLocations *[]string `json:"azureLocations,omitempty"`
5311	// StartTime - The start time for the Azure reachability report.
5312	StartTime *date.Time `json:"startTime,omitempty"`
5313	// EndTime - The end time for the Azure reachability report.
5314	EndTime *date.Time `json:"endTime,omitempty"`
5315}
5316
5317// BackendAddressPool pool of backend IP addresses.
5318type BackendAddressPool struct {
5319	autorest.Response `json:"-"`
5320	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5321	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5322	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5323	Name *string `json:"name,omitempty"`
5324	// Etag - A unique read-only string that changes whenever the resource is updated.
5325	Etag *string `json:"etag,omitempty"`
5326	// ID - Resource ID.
5327	ID *string `json:"id,omitempty"`
5328}
5329
5330// MarshalJSON is the custom marshaler for BackendAddressPool.
5331func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5332	objectMap := make(map[string]interface{})
5333	if bap.BackendAddressPoolPropertiesFormat != nil {
5334		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5335	}
5336	if bap.Name != nil {
5337		objectMap["name"] = bap.Name
5338	}
5339	if bap.Etag != nil {
5340		objectMap["etag"] = bap.Etag
5341	}
5342	if bap.ID != nil {
5343		objectMap["id"] = bap.ID
5344	}
5345	return json.Marshal(objectMap)
5346}
5347
5348// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5349func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5350	var m map[string]*json.RawMessage
5351	err := json.Unmarshal(body, &m)
5352	if err != nil {
5353		return err
5354	}
5355	for k, v := range m {
5356		switch k {
5357		case "properties":
5358			if v != nil {
5359				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5360				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5361				if err != nil {
5362					return err
5363				}
5364				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5365			}
5366		case "name":
5367			if v != nil {
5368				var name string
5369				err = json.Unmarshal(*v, &name)
5370				if err != nil {
5371					return err
5372				}
5373				bap.Name = &name
5374			}
5375		case "etag":
5376			if v != nil {
5377				var etag string
5378				err = json.Unmarshal(*v, &etag)
5379				if err != nil {
5380					return err
5381				}
5382				bap.Etag = &etag
5383			}
5384		case "id":
5385			if v != nil {
5386				var ID string
5387				err = json.Unmarshal(*v, &ID)
5388				if err != nil {
5389					return err
5390				}
5391				bap.ID = &ID
5392			}
5393		}
5394	}
5395
5396	return nil
5397}
5398
5399// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5400type BackendAddressPoolPropertiesFormat struct {
5401	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5402	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5403	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5404	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5405	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5406	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5407	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5408	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5409	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5410	ProvisioningState *string `json:"provisioningState,omitempty"`
5411}
5412
5413// BGPCommunity contains bgp community information offered in Service Community resources.
5414type BGPCommunity struct {
5415	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5416	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5417	// CommunityName - The name of the bgp community. e.g. Skype.
5418	CommunityName *string `json:"communityName,omitempty"`
5419	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5420	CommunityValue *string `json:"communityValue,omitempty"`
5421	// CommunityPrefixes - The prefixes that the bgp community contains.
5422	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5423	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5424	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5425	// ServiceGroup - The service group of the bgp community contains.
5426	ServiceGroup *string `json:"serviceGroup,omitempty"`
5427}
5428
5429// BgpPeerStatus BGP peer status details
5430type BgpPeerStatus struct {
5431	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5432	LocalAddress *string `json:"localAddress,omitempty"`
5433	// Neighbor - READ-ONLY; The remote BGP peer
5434	Neighbor *string `json:"neighbor,omitempty"`
5435	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5436	Asn *int32 `json:"asn,omitempty"`
5437	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5438	State BgpPeerState `json:"state,omitempty"`
5439	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5440	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5441	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5442	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5443	// MessagesSent - READ-ONLY; The number of BGP messages sent
5444	MessagesSent *int64 `json:"messagesSent,omitempty"`
5445	// MessagesReceived - READ-ONLY; The number of BGP messages received
5446	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5447}
5448
5449// BgpPeerStatusListResult response for list BGP peer status API service call
5450type BgpPeerStatusListResult struct {
5451	autorest.Response `json:"-"`
5452	// Value - List of BGP peers
5453	Value *[]BgpPeerStatus `json:"value,omitempty"`
5454}
5455
5456// BgpServiceCommunity service Community Properties.
5457type BgpServiceCommunity struct {
5458	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5459	// ID - Resource ID.
5460	ID *string `json:"id,omitempty"`
5461	// Name - READ-ONLY; Resource name.
5462	Name *string `json:"name,omitempty"`
5463	// Type - READ-ONLY; Resource type.
5464	Type *string `json:"type,omitempty"`
5465	// Location - Resource location.
5466	Location *string `json:"location,omitempty"`
5467	// Tags - Resource tags.
5468	Tags map[string]*string `json:"tags"`
5469}
5470
5471// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5472func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5473	objectMap := make(map[string]interface{})
5474	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5475		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5476	}
5477	if bsc.ID != nil {
5478		objectMap["id"] = bsc.ID
5479	}
5480	if bsc.Location != nil {
5481		objectMap["location"] = bsc.Location
5482	}
5483	if bsc.Tags != nil {
5484		objectMap["tags"] = bsc.Tags
5485	}
5486	return json.Marshal(objectMap)
5487}
5488
5489// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5490func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5491	var m map[string]*json.RawMessage
5492	err := json.Unmarshal(body, &m)
5493	if err != nil {
5494		return err
5495	}
5496	for k, v := range m {
5497		switch k {
5498		case "properties":
5499			if v != nil {
5500				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5501				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5502				if err != nil {
5503					return err
5504				}
5505				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5506			}
5507		case "id":
5508			if v != nil {
5509				var ID string
5510				err = json.Unmarshal(*v, &ID)
5511				if err != nil {
5512					return err
5513				}
5514				bsc.ID = &ID
5515			}
5516		case "name":
5517			if v != nil {
5518				var name string
5519				err = json.Unmarshal(*v, &name)
5520				if err != nil {
5521					return err
5522				}
5523				bsc.Name = &name
5524			}
5525		case "type":
5526			if v != nil {
5527				var typeVar string
5528				err = json.Unmarshal(*v, &typeVar)
5529				if err != nil {
5530					return err
5531				}
5532				bsc.Type = &typeVar
5533			}
5534		case "location":
5535			if v != nil {
5536				var location string
5537				err = json.Unmarshal(*v, &location)
5538				if err != nil {
5539					return err
5540				}
5541				bsc.Location = &location
5542			}
5543		case "tags":
5544			if v != nil {
5545				var tags map[string]*string
5546				err = json.Unmarshal(*v, &tags)
5547				if err != nil {
5548					return err
5549				}
5550				bsc.Tags = tags
5551			}
5552		}
5553	}
5554
5555	return nil
5556}
5557
5558// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5559type BgpServiceCommunityListResult struct {
5560	autorest.Response `json:"-"`
5561	// Value - A list of service community resources.
5562	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5563	// NextLink - The URL to get the next set of results.
5564	NextLink *string `json:"nextLink,omitempty"`
5565}
5566
5567// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5568// values.
5569type BgpServiceCommunityListResultIterator struct {
5570	i    int
5571	page BgpServiceCommunityListResultPage
5572}
5573
5574// NextWithContext advances to the next value.  If there was an error making
5575// the request the iterator does not advance and the error is returned.
5576func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5577	if tracing.IsEnabled() {
5578		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5579		defer func() {
5580			sc := -1
5581			if iter.Response().Response.Response != nil {
5582				sc = iter.Response().Response.Response.StatusCode
5583			}
5584			tracing.EndSpan(ctx, sc, err)
5585		}()
5586	}
5587	iter.i++
5588	if iter.i < len(iter.page.Values()) {
5589		return nil
5590	}
5591	err = iter.page.NextWithContext(ctx)
5592	if err != nil {
5593		iter.i--
5594		return err
5595	}
5596	iter.i = 0
5597	return nil
5598}
5599
5600// Next advances to the next value.  If there was an error making
5601// the request the iterator does not advance and the error is returned.
5602// Deprecated: Use NextWithContext() instead.
5603func (iter *BgpServiceCommunityListResultIterator) Next() error {
5604	return iter.NextWithContext(context.Background())
5605}
5606
5607// NotDone returns true if the enumeration should be started or is not yet complete.
5608func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5609	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5610}
5611
5612// Response returns the raw server response from the last page request.
5613func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5614	return iter.page.Response()
5615}
5616
5617// Value returns the current value or a zero-initialized value if the
5618// iterator has advanced beyond the end of the collection.
5619func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5620	if !iter.page.NotDone() {
5621		return BgpServiceCommunity{}
5622	}
5623	return iter.page.Values()[iter.i]
5624}
5625
5626// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5627func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5628	return BgpServiceCommunityListResultIterator{page: page}
5629}
5630
5631// IsEmpty returns true if the ListResult contains no values.
5632func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5633	return bsclr.Value == nil || len(*bsclr.Value) == 0
5634}
5635
5636// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5637// It returns nil if no more results exist.
5638func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5639	if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 {
5640		return nil, nil
5641	}
5642	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5643		autorest.AsJSON(),
5644		autorest.AsGet(),
5645		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5646}
5647
5648// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5649type BgpServiceCommunityListResultPage struct {
5650	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5651	bsclr BgpServiceCommunityListResult
5652}
5653
5654// NextWithContext advances to the next page of values.  If there was an error making
5655// the request the page does not advance and the error is returned.
5656func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5657	if tracing.IsEnabled() {
5658		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5659		defer func() {
5660			sc := -1
5661			if page.Response().Response.Response != nil {
5662				sc = page.Response().Response.Response.StatusCode
5663			}
5664			tracing.EndSpan(ctx, sc, err)
5665		}()
5666	}
5667	next, err := page.fn(ctx, page.bsclr)
5668	if err != nil {
5669		return err
5670	}
5671	page.bsclr = next
5672	return nil
5673}
5674
5675// Next advances to the next page of values.  If there was an error making
5676// the request the page does not advance and the error is returned.
5677// Deprecated: Use NextWithContext() instead.
5678func (page *BgpServiceCommunityListResultPage) Next() error {
5679	return page.NextWithContext(context.Background())
5680}
5681
5682// NotDone returns true if the page enumeration should be started or is not yet complete.
5683func (page BgpServiceCommunityListResultPage) NotDone() bool {
5684	return !page.bsclr.IsEmpty()
5685}
5686
5687// Response returns the raw server response from the last page request.
5688func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5689	return page.bsclr
5690}
5691
5692// Values returns the slice of values for the current page or nil if there are no values.
5693func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5694	if page.bsclr.IsEmpty() {
5695		return nil
5696	}
5697	return *page.bsclr.Value
5698}
5699
5700// Creates a new instance of the BgpServiceCommunityListResultPage type.
5701func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5702	return BgpServiceCommunityListResultPage{fn: getNextPage}
5703}
5704
5705// BgpServiceCommunityPropertiesFormat properties of Service Community.
5706type BgpServiceCommunityPropertiesFormat struct {
5707	// ServiceName - The name of the bgp community. e.g. Skype.
5708	ServiceName *string `json:"serviceName,omitempty"`
5709	// BgpCommunities - Get a list of bgp communities.
5710	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5711}
5712
5713// BgpSettings BGP settings details
5714type BgpSettings struct {
5715	// Asn - The BGP speaker's ASN.
5716	Asn *int64 `json:"asn,omitempty"`
5717	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5718	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5719	// PeerWeight - The weight added to routes learned from this BGP speaker.
5720	PeerWeight *int32 `json:"peerWeight,omitempty"`
5721}
5722
5723// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5724type ConfigurationDiagnosticParameters struct {
5725	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5726	TargetResourceID *string `json:"targetResourceId,omitempty"`
5727	// Queries - List of traffic queries.
5728	Queries *[]TrafficQuery `json:"queries,omitempty"`
5729}
5730
5731// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5732type ConfigurationDiagnosticResponse struct {
5733	autorest.Response `json:"-"`
5734	// Results - READ-ONLY; List of network configuration diagnostic results.
5735	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5736}
5737
5738// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5739// query.
5740type ConfigurationDiagnosticResult struct {
5741	TrafficQuery               *TrafficQuery        `json:"trafficQuery,omitempty"`
5742	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
5743}
5744
5745// ConnectionMonitor parameters that define the operation to create a connection monitor.
5746type ConnectionMonitor struct {
5747	// Location - Connection monitor location.
5748	Location *string `json:"location,omitempty"`
5749	// Tags - Connection monitor tags.
5750	Tags                         map[string]*string `json:"tags"`
5751	*ConnectionMonitorParameters `json:"properties,omitempty"`
5752}
5753
5754// MarshalJSON is the custom marshaler for ConnectionMonitor.
5755func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5756	objectMap := make(map[string]interface{})
5757	if cm.Location != nil {
5758		objectMap["location"] = cm.Location
5759	}
5760	if cm.Tags != nil {
5761		objectMap["tags"] = cm.Tags
5762	}
5763	if cm.ConnectionMonitorParameters != nil {
5764		objectMap["properties"] = cm.ConnectionMonitorParameters
5765	}
5766	return json.Marshal(objectMap)
5767}
5768
5769// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5770func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5771	var m map[string]*json.RawMessage
5772	err := json.Unmarshal(body, &m)
5773	if err != nil {
5774		return err
5775	}
5776	for k, v := range m {
5777		switch k {
5778		case "location":
5779			if v != nil {
5780				var location string
5781				err = json.Unmarshal(*v, &location)
5782				if err != nil {
5783					return err
5784				}
5785				cm.Location = &location
5786			}
5787		case "tags":
5788			if v != nil {
5789				var tags map[string]*string
5790				err = json.Unmarshal(*v, &tags)
5791				if err != nil {
5792					return err
5793				}
5794				cm.Tags = tags
5795			}
5796		case "properties":
5797			if v != nil {
5798				var connectionMonitorParameters ConnectionMonitorParameters
5799				err = json.Unmarshal(*v, &connectionMonitorParameters)
5800				if err != nil {
5801					return err
5802				}
5803				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5804			}
5805		}
5806	}
5807
5808	return nil
5809}
5810
5811// ConnectionMonitorDestination describes the destination of connection monitor.
5812type ConnectionMonitorDestination struct {
5813	// ResourceID - The ID of the resource used as the destination by connection monitor.
5814	ResourceID *string `json:"resourceId,omitempty"`
5815	// Address - Address of the connection monitor destination (IP or domain name).
5816	Address *string `json:"address,omitempty"`
5817	// Port - The destination port used by connection monitor.
5818	Port *int32 `json:"port,omitempty"`
5819}
5820
5821// ConnectionMonitorListResult list of connection monitors.
5822type ConnectionMonitorListResult struct {
5823	autorest.Response `json:"-"`
5824	// Value - Information about connection monitors.
5825	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5826}
5827
5828// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5829type ConnectionMonitorParameters struct {
5830	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5831	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5832	// AutoStart - Determines if the connection monitor will start automatically once created.
5833	AutoStart *bool `json:"autoStart,omitempty"`
5834	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5835	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5836}
5837
5838// ConnectionMonitorQueryResult list of connection states snapshots.
5839type ConnectionMonitorQueryResult struct {
5840	autorest.Response `json:"-"`
5841	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5842	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5843	// States - Information about connection states.
5844	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5845}
5846
5847// ConnectionMonitorResult information about the connection monitor.
5848type ConnectionMonitorResult struct {
5849	autorest.Response `json:"-"`
5850	// Name - READ-ONLY; Name of the connection monitor.
5851	Name *string `json:"name,omitempty"`
5852	// ID - READ-ONLY; ID of the connection monitor.
5853	ID   *string `json:"id,omitempty"`
5854	Etag *string `json:"etag,omitempty"`
5855	// Type - READ-ONLY; Connection monitor type.
5856	Type *string `json:"type,omitempty"`
5857	// Location - Connection monitor location.
5858	Location *string `json:"location,omitempty"`
5859	// Tags - Connection monitor tags.
5860	Tags                               map[string]*string `json:"tags"`
5861	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5862}
5863
5864// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5865func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5866	objectMap := make(map[string]interface{})
5867	if cmr.Etag != nil {
5868		objectMap["etag"] = cmr.Etag
5869	}
5870	if cmr.Location != nil {
5871		objectMap["location"] = cmr.Location
5872	}
5873	if cmr.Tags != nil {
5874		objectMap["tags"] = cmr.Tags
5875	}
5876	if cmr.ConnectionMonitorResultProperties != nil {
5877		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5878	}
5879	return json.Marshal(objectMap)
5880}
5881
5882// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5883func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5884	var m map[string]*json.RawMessage
5885	err := json.Unmarshal(body, &m)
5886	if err != nil {
5887		return err
5888	}
5889	for k, v := range m {
5890		switch k {
5891		case "name":
5892			if v != nil {
5893				var name string
5894				err = json.Unmarshal(*v, &name)
5895				if err != nil {
5896					return err
5897				}
5898				cmr.Name = &name
5899			}
5900		case "id":
5901			if v != nil {
5902				var ID string
5903				err = json.Unmarshal(*v, &ID)
5904				if err != nil {
5905					return err
5906				}
5907				cmr.ID = &ID
5908			}
5909		case "etag":
5910			if v != nil {
5911				var etag string
5912				err = json.Unmarshal(*v, &etag)
5913				if err != nil {
5914					return err
5915				}
5916				cmr.Etag = &etag
5917			}
5918		case "type":
5919			if v != nil {
5920				var typeVar string
5921				err = json.Unmarshal(*v, &typeVar)
5922				if err != nil {
5923					return err
5924				}
5925				cmr.Type = &typeVar
5926			}
5927		case "location":
5928			if v != nil {
5929				var location string
5930				err = json.Unmarshal(*v, &location)
5931				if err != nil {
5932					return err
5933				}
5934				cmr.Location = &location
5935			}
5936		case "tags":
5937			if v != nil {
5938				var tags map[string]*string
5939				err = json.Unmarshal(*v, &tags)
5940				if err != nil {
5941					return err
5942				}
5943				cmr.Tags = tags
5944			}
5945		case "properties":
5946			if v != nil {
5947				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5948				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5949				if err != nil {
5950					return err
5951				}
5952				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5953			}
5954		}
5955	}
5956
5957	return nil
5958}
5959
5960// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5961type ConnectionMonitorResultProperties struct {
5962	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5963	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5964	// StartTime - The date and time when the connection monitor was started.
5965	StartTime *date.Time `json:"startTime,omitempty"`
5966	// MonitoringStatus - The monitoring status of the connection monitor.
5967	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5968	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5969	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5970	// AutoStart - Determines if the connection monitor will start automatically once created.
5971	AutoStart *bool `json:"autoStart,omitempty"`
5972	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5973	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5974}
5975
5976// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5977// long-running operation.
5978type ConnectionMonitorsCreateOrUpdateFuture struct {
5979	azure.Future
5980}
5981
5982// Result returns the result of the asynchronous operation.
5983// If the operation has not completed it will return an error.
5984func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5985	var done bool
5986	done, err = future.DoneWithContext(context.Background(), client)
5987	if err != nil {
5988		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5989		return
5990	}
5991	if !done {
5992		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5993		return
5994	}
5995	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5996	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5997		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5998		if err != nil {
5999			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
6000		}
6001	}
6002	return
6003}
6004
6005// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6006// long-running operation.
6007type ConnectionMonitorsDeleteFuture struct {
6008	azure.Future
6009}
6010
6011// Result returns the result of the asynchronous operation.
6012// If the operation has not completed it will return an error.
6013func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6014	var done bool
6015	done, err = future.DoneWithContext(context.Background(), client)
6016	if err != nil {
6017		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
6018		return
6019	}
6020	if !done {
6021		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
6022		return
6023	}
6024	ar.Response = future.Response()
6025	return
6026}
6027
6028// ConnectionMonitorSource describes the source of connection monitor.
6029type ConnectionMonitorSource struct {
6030	// ResourceID - The ID of the resource used as the source by connection monitor.
6031	ResourceID *string `json:"resourceId,omitempty"`
6032	// Port - The source port used by connection monitor.
6033	Port *int32 `json:"port,omitempty"`
6034}
6035
6036// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
6037// operation.
6038type ConnectionMonitorsQueryFuture struct {
6039	azure.Future
6040}
6041
6042// Result returns the result of the asynchronous operation.
6043// If the operation has not completed it will return an error.
6044func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
6045	var done bool
6046	done, err = future.DoneWithContext(context.Background(), client)
6047	if err != nil {
6048		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
6049		return
6050	}
6051	if !done {
6052		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
6053		return
6054	}
6055	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6056	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
6057		cmqr, err = client.QueryResponder(cmqr.Response.Response)
6058		if err != nil {
6059			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
6060		}
6061	}
6062	return
6063}
6064
6065// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
6066// operation.
6067type ConnectionMonitorsStartFuture struct {
6068	azure.Future
6069}
6070
6071// Result returns the result of the asynchronous operation.
6072// If the operation has not completed it will return an error.
6073func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6074	var done bool
6075	done, err = future.DoneWithContext(context.Background(), client)
6076	if err != nil {
6077		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
6078		return
6079	}
6080	if !done {
6081		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
6082		return
6083	}
6084	ar.Response = future.Response()
6085	return
6086}
6087
6088// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
6089// operation.
6090type ConnectionMonitorsStopFuture struct {
6091	azure.Future
6092}
6093
6094// Result returns the result of the asynchronous operation.
6095// If the operation has not completed it will return an error.
6096func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
6097	var done bool
6098	done, err = future.DoneWithContext(context.Background(), client)
6099	if err != nil {
6100		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
6101		return
6102	}
6103	if !done {
6104		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
6105		return
6106	}
6107	ar.Response = future.Response()
6108	return
6109}
6110
6111// ConnectionResetSharedKey the virtual network connection reset shared key
6112type ConnectionResetSharedKey struct {
6113	autorest.Response `json:"-"`
6114	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
6115	KeyLength *int32 `json:"keyLength,omitempty"`
6116}
6117
6118// ConnectionSharedKey response for GetConnectionSharedKey API service call
6119type ConnectionSharedKey struct {
6120	autorest.Response `json:"-"`
6121	// Value - The virtual network connection shared key value.
6122	Value *string `json:"value,omitempty"`
6123	// ID - Resource ID.
6124	ID *string `json:"id,omitempty"`
6125}
6126
6127// ConnectionStateSnapshot connection state snapshot.
6128type ConnectionStateSnapshot struct {
6129	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
6130	ConnectionState ConnectionState `json:"connectionState,omitempty"`
6131	// StartTime - The start time of the connection snapshot.
6132	StartTime *date.Time `json:"startTime,omitempty"`
6133	// EndTime - The end time of the connection snapshot.
6134	EndTime *date.Time `json:"endTime,omitempty"`
6135	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
6136	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
6137	// AvgLatencyInMs - Average latency in ms.
6138	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6139	// MinLatencyInMs - Minimum latency in ms.
6140	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6141	// MaxLatencyInMs - Maximum latency in ms.
6142	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6143	// ProbesSent - The number of sent probes.
6144	ProbesSent *int32 `json:"probesSent,omitempty"`
6145	// ProbesFailed - The number of failed probes.
6146	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6147	// Hops - READ-ONLY; List of hops between the source and the destination.
6148	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6149}
6150
6151// ConnectivityDestination parameters that define destination of connection.
6152type ConnectivityDestination struct {
6153	// ResourceID - The ID of the resource to which a connection attempt will be made.
6154	ResourceID *string `json:"resourceId,omitempty"`
6155	// Address - The IP address or URI the resource to which a connection attempt will be made.
6156	Address *string `json:"address,omitempty"`
6157	// Port - Port on which check connectivity will be performed.
6158	Port *int32 `json:"port,omitempty"`
6159}
6160
6161// ConnectivityHop information about a hop between the source and the destination.
6162type ConnectivityHop struct {
6163	// Type - READ-ONLY; The type of the hop.
6164	Type *string `json:"type,omitempty"`
6165	// ID - READ-ONLY; The ID of the hop.
6166	ID *string `json:"id,omitempty"`
6167	// Address - READ-ONLY; The IP address of the hop.
6168	Address *string `json:"address,omitempty"`
6169	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6170	ResourceID *string `json:"resourceId,omitempty"`
6171	// NextHopIds - READ-ONLY; List of next hop identifiers.
6172	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6173	// Issues - READ-ONLY; List of issues.
6174	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6175}
6176
6177// ConnectivityInformation information on the connectivity status.
6178type ConnectivityInformation struct {
6179	autorest.Response `json:"-"`
6180	// Hops - READ-ONLY; List of hops between the source and the destination.
6181	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6182	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6183	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6184	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6185	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6186	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6187	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6188	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6189	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6190	// ProbesSent - READ-ONLY; Total number of probes sent.
6191	ProbesSent *int32 `json:"probesSent,omitempty"`
6192	// ProbesFailed - READ-ONLY; Number of failed probes.
6193	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6194}
6195
6196// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6197type ConnectivityIssue struct {
6198	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6199	Origin Origin `json:"origin,omitempty"`
6200	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6201	Severity Severity `json:"severity,omitempty"`
6202	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6203	Type IssueType `json:"type,omitempty"`
6204	// Context - READ-ONLY; Provides additional context on the issue.
6205	Context *[]map[string]*string `json:"context,omitempty"`
6206}
6207
6208// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6209type ConnectivityParameters struct {
6210	Source      *ConnectivitySource      `json:"source,omitempty"`
6211	Destination *ConnectivityDestination `json:"destination,omitempty"`
6212	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6213	Protocol              Protocol               `json:"protocol,omitempty"`
6214	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6215}
6216
6217// ConnectivitySource parameters that define the source of the connection.
6218type ConnectivitySource struct {
6219	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6220	ResourceID *string `json:"resourceId,omitempty"`
6221	// Port - The source port from which a connectivity check will be performed.
6222	Port *int32 `json:"port,omitempty"`
6223}
6224
6225// DdosProtectionPlan a DDoS protection plan in a resource group.
6226type DdosProtectionPlan struct {
6227	autorest.Response `json:"-"`
6228	// ID - READ-ONLY; Resource ID.
6229	ID *string `json:"id,omitempty"`
6230	// Name - READ-ONLY; Resource name.
6231	Name *string `json:"name,omitempty"`
6232	// Type - READ-ONLY; Resource type.
6233	Type *string `json:"type,omitempty"`
6234	// Location - Resource location.
6235	Location *string `json:"location,omitempty"`
6236	// Tags - Resource tags.
6237	Tags map[string]*string `json:"tags"`
6238	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6239	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6240	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6241	Etag *string `json:"etag,omitempty"`
6242}
6243
6244// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6245func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6246	objectMap := make(map[string]interface{})
6247	if dpp.Location != nil {
6248		objectMap["location"] = dpp.Location
6249	}
6250	if dpp.Tags != nil {
6251		objectMap["tags"] = dpp.Tags
6252	}
6253	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6254		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6255	}
6256	return json.Marshal(objectMap)
6257}
6258
6259// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6260func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6261	var m map[string]*json.RawMessage
6262	err := json.Unmarshal(body, &m)
6263	if err != nil {
6264		return err
6265	}
6266	for k, v := range m {
6267		switch k {
6268		case "id":
6269			if v != nil {
6270				var ID string
6271				err = json.Unmarshal(*v, &ID)
6272				if err != nil {
6273					return err
6274				}
6275				dpp.ID = &ID
6276			}
6277		case "name":
6278			if v != nil {
6279				var name string
6280				err = json.Unmarshal(*v, &name)
6281				if err != nil {
6282					return err
6283				}
6284				dpp.Name = &name
6285			}
6286		case "type":
6287			if v != nil {
6288				var typeVar string
6289				err = json.Unmarshal(*v, &typeVar)
6290				if err != nil {
6291					return err
6292				}
6293				dpp.Type = &typeVar
6294			}
6295		case "location":
6296			if v != nil {
6297				var location string
6298				err = json.Unmarshal(*v, &location)
6299				if err != nil {
6300					return err
6301				}
6302				dpp.Location = &location
6303			}
6304		case "tags":
6305			if v != nil {
6306				var tags map[string]*string
6307				err = json.Unmarshal(*v, &tags)
6308				if err != nil {
6309					return err
6310				}
6311				dpp.Tags = tags
6312			}
6313		case "properties":
6314			if v != nil {
6315				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6316				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6317				if err != nil {
6318					return err
6319				}
6320				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6321			}
6322		case "etag":
6323			if v != nil {
6324				var etag string
6325				err = json.Unmarshal(*v, &etag)
6326				if err != nil {
6327					return err
6328				}
6329				dpp.Etag = &etag
6330			}
6331		}
6332	}
6333
6334	return nil
6335}
6336
6337// DdosProtectionPlanListResult a list of DDoS protection plans.
6338type DdosProtectionPlanListResult struct {
6339	autorest.Response `json:"-"`
6340	// Value - A list of DDoS protection plans.
6341	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6342	// NextLink - READ-ONLY; The URL to get the next set of results.
6343	NextLink *string `json:"nextLink,omitempty"`
6344}
6345
6346// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6347type DdosProtectionPlanListResultIterator struct {
6348	i    int
6349	page DdosProtectionPlanListResultPage
6350}
6351
6352// NextWithContext advances to the next value.  If there was an error making
6353// the request the iterator does not advance and the error is returned.
6354func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6355	if tracing.IsEnabled() {
6356		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6357		defer func() {
6358			sc := -1
6359			if iter.Response().Response.Response != nil {
6360				sc = iter.Response().Response.Response.StatusCode
6361			}
6362			tracing.EndSpan(ctx, sc, err)
6363		}()
6364	}
6365	iter.i++
6366	if iter.i < len(iter.page.Values()) {
6367		return nil
6368	}
6369	err = iter.page.NextWithContext(ctx)
6370	if err != nil {
6371		iter.i--
6372		return err
6373	}
6374	iter.i = 0
6375	return nil
6376}
6377
6378// Next advances to the next value.  If there was an error making
6379// the request the iterator does not advance and the error is returned.
6380// Deprecated: Use NextWithContext() instead.
6381func (iter *DdosProtectionPlanListResultIterator) Next() error {
6382	return iter.NextWithContext(context.Background())
6383}
6384
6385// NotDone returns true if the enumeration should be started or is not yet complete.
6386func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6387	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6388}
6389
6390// Response returns the raw server response from the last page request.
6391func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6392	return iter.page.Response()
6393}
6394
6395// Value returns the current value or a zero-initialized value if the
6396// iterator has advanced beyond the end of the collection.
6397func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6398	if !iter.page.NotDone() {
6399		return DdosProtectionPlan{}
6400	}
6401	return iter.page.Values()[iter.i]
6402}
6403
6404// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6405func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6406	return DdosProtectionPlanListResultIterator{page: page}
6407}
6408
6409// IsEmpty returns true if the ListResult contains no values.
6410func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6411	return dpplr.Value == nil || len(*dpplr.Value) == 0
6412}
6413
6414// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6415// It returns nil if no more results exist.
6416func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6417	if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 {
6418		return nil, nil
6419	}
6420	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6421		autorest.AsJSON(),
6422		autorest.AsGet(),
6423		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6424}
6425
6426// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6427type DdosProtectionPlanListResultPage struct {
6428	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6429	dpplr DdosProtectionPlanListResult
6430}
6431
6432// NextWithContext advances to the next page of values.  If there was an error making
6433// the request the page does not advance and the error is returned.
6434func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6435	if tracing.IsEnabled() {
6436		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6437		defer func() {
6438			sc := -1
6439			if page.Response().Response.Response != nil {
6440				sc = page.Response().Response.Response.StatusCode
6441			}
6442			tracing.EndSpan(ctx, sc, err)
6443		}()
6444	}
6445	next, err := page.fn(ctx, page.dpplr)
6446	if err != nil {
6447		return err
6448	}
6449	page.dpplr = next
6450	return nil
6451}
6452
6453// Next advances to the next page of values.  If there was an error making
6454// the request the page does not advance and the error is returned.
6455// Deprecated: Use NextWithContext() instead.
6456func (page *DdosProtectionPlanListResultPage) Next() error {
6457	return page.NextWithContext(context.Background())
6458}
6459
6460// NotDone returns true if the page enumeration should be started or is not yet complete.
6461func (page DdosProtectionPlanListResultPage) NotDone() bool {
6462	return !page.dpplr.IsEmpty()
6463}
6464
6465// Response returns the raw server response from the last page request.
6466func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6467	return page.dpplr
6468}
6469
6470// Values returns the slice of values for the current page or nil if there are no values.
6471func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6472	if page.dpplr.IsEmpty() {
6473		return nil
6474	}
6475	return *page.dpplr.Value
6476}
6477
6478// Creates a new instance of the DdosProtectionPlanListResultPage type.
6479func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6480	return DdosProtectionPlanListResultPage{fn: getNextPage}
6481}
6482
6483// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6484type DdosProtectionPlanPropertiesFormat struct {
6485	// 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.
6486	ResourceGUID *string `json:"resourceGuid,omitempty"`
6487	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6488	ProvisioningState *string `json:"provisioningState,omitempty"`
6489	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6490	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6491}
6492
6493// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6494// long-running operation.
6495type DdosProtectionPlansCreateOrUpdateFuture struct {
6496	azure.Future
6497}
6498
6499// Result returns the result of the asynchronous operation.
6500// If the operation has not completed it will return an error.
6501func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
6502	var done bool
6503	done, err = future.DoneWithContext(context.Background(), client)
6504	if err != nil {
6505		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6506		return
6507	}
6508	if !done {
6509		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
6510		return
6511	}
6512	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6513	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
6514		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
6515		if err != nil {
6516			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
6517		}
6518	}
6519	return
6520}
6521
6522// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6523// long-running operation.
6524type DdosProtectionPlansDeleteFuture struct {
6525	azure.Future
6526}
6527
6528// Result returns the result of the asynchronous operation.
6529// If the operation has not completed it will return an error.
6530func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
6531	var done bool
6532	done, err = future.DoneWithContext(context.Background(), client)
6533	if err != nil {
6534		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
6535		return
6536	}
6537	if !done {
6538		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
6539		return
6540	}
6541	ar.Response = future.Response()
6542	return
6543}
6544
6545// DeviceProperties list of properties of the device.
6546type DeviceProperties struct {
6547	// DeviceVendor - Name of the device Vendor.
6548	DeviceVendor *string `json:"deviceVendor,omitempty"`
6549	// DeviceModel - Model of the device.
6550	DeviceModel *string `json:"deviceModel,omitempty"`
6551	// LinkSpeedInMbps - Link speed.
6552	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6553}
6554
6555// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6556// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6557type DhcpOptions struct {
6558	// DNSServers - The list of DNS servers IP addresses.
6559	DNSServers *[]string `json:"dnsServers,omitempty"`
6560}
6561
6562// Dimension dimension of the metric.
6563type Dimension struct {
6564	// Name - The name of the dimension.
6565	Name *string `json:"name,omitempty"`
6566	// DisplayName - The display name of the dimension.
6567	DisplayName *string `json:"displayName,omitempty"`
6568	// InternalName - The internal name of the dimension.
6569	InternalName *string `json:"internalName,omitempty"`
6570}
6571
6572// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6573type DNSNameAvailabilityResult struct {
6574	autorest.Response `json:"-"`
6575	// Available - Domain availability (True/False).
6576	Available *bool `json:"available,omitempty"`
6577}
6578
6579// EffectiveNetworkSecurityGroup effective network security group.
6580type EffectiveNetworkSecurityGroup struct {
6581	// NetworkSecurityGroup - The ID of network security group that is applied.
6582	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6583	// Association - Associated resources.
6584	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6585	// EffectiveSecurityRules - A collection of effective security rules.
6586	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6587	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6588	TagMap map[string][]string `json:"tagMap"`
6589}
6590
6591// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6592func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6593	objectMap := make(map[string]interface{})
6594	if ensg.NetworkSecurityGroup != nil {
6595		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6596	}
6597	if ensg.Association != nil {
6598		objectMap["association"] = ensg.Association
6599	}
6600	if ensg.EffectiveSecurityRules != nil {
6601		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6602	}
6603	if ensg.TagMap != nil {
6604		objectMap["tagMap"] = ensg.TagMap
6605	}
6606	return json.Marshal(objectMap)
6607}
6608
6609// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6610type EffectiveNetworkSecurityGroupAssociation struct {
6611	// Subnet - The ID of the subnet if assigned.
6612	Subnet *SubResource `json:"subnet,omitempty"`
6613	// NetworkInterface - The ID of the network interface if assigned.
6614	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6615}
6616
6617// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6618// call.
6619type EffectiveNetworkSecurityGroupListResult struct {
6620	autorest.Response `json:"-"`
6621	// Value - A list of effective network security groups.
6622	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6623	// NextLink - READ-ONLY; The URL to get the next set of results.
6624	NextLink *string `json:"nextLink,omitempty"`
6625}
6626
6627// EffectiveNetworkSecurityRule effective network security rules.
6628type EffectiveNetworkSecurityRule struct {
6629	// Name - The name of the security rule specified by the user (if created by the user).
6630	Name *string `json:"name,omitempty"`
6631	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6632	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6633	// SourcePortRange - The source port or range.
6634	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6635	// DestinationPortRange - The destination port or range.
6636	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6637	// 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 (*)
6638	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6639	// 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 (*)
6640	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6641	// SourceAddressPrefix - The source address prefix.
6642	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6643	// DestinationAddressPrefix - The destination address prefix.
6644	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6645	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6646	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6647	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6648	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6649	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6650	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6651	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6652	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6653	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6654	Access SecurityRuleAccess `json:"access,omitempty"`
6655	// Priority - The priority of the rule.
6656	Priority *int32 `json:"priority,omitempty"`
6657	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6658	Direction SecurityRuleDirection `json:"direction,omitempty"`
6659}
6660
6661// EffectiveRoute effective Route
6662type EffectiveRoute struct {
6663	// Name - The name of the user defined route. This is optional.
6664	Name *string `json:"name,omitempty"`
6665	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6666	Source EffectiveRouteSource `json:"source,omitempty"`
6667	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
6668	State EffectiveRouteState `json:"state,omitempty"`
6669	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6670	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6671	// NextHopIPAddress - The IP address of the next hop of the effective route.
6672	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6673	// 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'
6674	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6675}
6676
6677// EffectiveRouteListResult response for list effective route API service call.
6678type EffectiveRouteListResult struct {
6679	autorest.Response `json:"-"`
6680	// Value - A list of effective routes.
6681	Value *[]EffectiveRoute `json:"value,omitempty"`
6682	// NextLink - READ-ONLY; The URL to get the next set of results.
6683	NextLink *string `json:"nextLink,omitempty"`
6684}
6685
6686// EndpointServiceResult endpoint service.
6687type EndpointServiceResult struct {
6688	// Name - READ-ONLY; Name of the endpoint service.
6689	Name *string `json:"name,omitempty"`
6690	// Type - READ-ONLY; Type of the endpoint service.
6691	Type *string `json:"type,omitempty"`
6692	// ID - Resource ID.
6693	ID *string `json:"id,omitempty"`
6694}
6695
6696// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
6697type EndpointServicesListResult struct {
6698	autorest.Response `json:"-"`
6699	// Value - List of available endpoint services in a region.
6700	Value *[]EndpointServiceResult `json:"value,omitempty"`
6701	// NextLink - The URL to get the next set of results.
6702	NextLink *string `json:"nextLink,omitempty"`
6703}
6704
6705// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
6706// values.
6707type EndpointServicesListResultIterator struct {
6708	i    int
6709	page EndpointServicesListResultPage
6710}
6711
6712// NextWithContext advances to the next value.  If there was an error making
6713// the request the iterator does not advance and the error is returned.
6714func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
6715	if tracing.IsEnabled() {
6716		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
6717		defer func() {
6718			sc := -1
6719			if iter.Response().Response.Response != nil {
6720				sc = iter.Response().Response.Response.StatusCode
6721			}
6722			tracing.EndSpan(ctx, sc, err)
6723		}()
6724	}
6725	iter.i++
6726	if iter.i < len(iter.page.Values()) {
6727		return nil
6728	}
6729	err = iter.page.NextWithContext(ctx)
6730	if err != nil {
6731		iter.i--
6732		return err
6733	}
6734	iter.i = 0
6735	return nil
6736}
6737
6738// Next advances to the next value.  If there was an error making
6739// the request the iterator does not advance and the error is returned.
6740// Deprecated: Use NextWithContext() instead.
6741func (iter *EndpointServicesListResultIterator) Next() error {
6742	return iter.NextWithContext(context.Background())
6743}
6744
6745// NotDone returns true if the enumeration should be started or is not yet complete.
6746func (iter EndpointServicesListResultIterator) NotDone() bool {
6747	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6748}
6749
6750// Response returns the raw server response from the last page request.
6751func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
6752	return iter.page.Response()
6753}
6754
6755// Value returns the current value or a zero-initialized value if the
6756// iterator has advanced beyond the end of the collection.
6757func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
6758	if !iter.page.NotDone() {
6759		return EndpointServiceResult{}
6760	}
6761	return iter.page.Values()[iter.i]
6762}
6763
6764// Creates a new instance of the EndpointServicesListResultIterator type.
6765func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
6766	return EndpointServicesListResultIterator{page: page}
6767}
6768
6769// IsEmpty returns true if the ListResult contains no values.
6770func (eslr EndpointServicesListResult) IsEmpty() bool {
6771	return eslr.Value == nil || len(*eslr.Value) == 0
6772}
6773
6774// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
6775// It returns nil if no more results exist.
6776func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
6777	if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 {
6778		return nil, nil
6779	}
6780	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6781		autorest.AsJSON(),
6782		autorest.AsGet(),
6783		autorest.WithBaseURL(to.String(eslr.NextLink)))
6784}
6785
6786// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
6787type EndpointServicesListResultPage struct {
6788	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
6789	eslr EndpointServicesListResult
6790}
6791
6792// NextWithContext advances to the next page of values.  If there was an error making
6793// the request the page does not advance and the error is returned.
6794func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
6795	if tracing.IsEnabled() {
6796		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
6797		defer func() {
6798			sc := -1
6799			if page.Response().Response.Response != nil {
6800				sc = page.Response().Response.Response.StatusCode
6801			}
6802			tracing.EndSpan(ctx, sc, err)
6803		}()
6804	}
6805	next, err := page.fn(ctx, page.eslr)
6806	if err != nil {
6807		return err
6808	}
6809	page.eslr = next
6810	return nil
6811}
6812
6813// Next advances to the next page of values.  If there was an error making
6814// the request the page does not advance and the error is returned.
6815// Deprecated: Use NextWithContext() instead.
6816func (page *EndpointServicesListResultPage) Next() error {
6817	return page.NextWithContext(context.Background())
6818}
6819
6820// NotDone returns true if the page enumeration should be started or is not yet complete.
6821func (page EndpointServicesListResultPage) NotDone() bool {
6822	return !page.eslr.IsEmpty()
6823}
6824
6825// Response returns the raw server response from the last page request.
6826func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
6827	return page.eslr
6828}
6829
6830// Values returns the slice of values for the current page or nil if there are no values.
6831func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
6832	if page.eslr.IsEmpty() {
6833		return nil
6834	}
6835	return *page.eslr.Value
6836}
6837
6838// Creates a new instance of the EndpointServicesListResultPage type.
6839func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
6840	return EndpointServicesListResultPage{fn: getNextPage}
6841}
6842
6843// Error ...
6844type Error struct {
6845	Code       *string         `json:"code,omitempty"`
6846	Message    *string         `json:"message,omitempty"`
6847	Target     *string         `json:"target,omitempty"`
6848	Details    *[]ErrorDetails `json:"details,omitempty"`
6849	InnerError *string         `json:"innerError,omitempty"`
6850}
6851
6852// ErrorDetails ...
6853type ErrorDetails struct {
6854	Code    *string `json:"code,omitempty"`
6855	Target  *string `json:"target,omitempty"`
6856	Message *string `json:"message,omitempty"`
6857}
6858
6859// ErrorResponse the error object.
6860type ErrorResponse struct {
6861	Error *ErrorDetails `json:"error,omitempty"`
6862}
6863
6864// EvaluatedNetworkSecurityGroup results of network security group evaluation.
6865type EvaluatedNetworkSecurityGroup struct {
6866	// NetworkSecurityGroupID - Network security group ID.
6867	NetworkSecurityGroupID *string      `json:"networkSecurityGroupId,omitempty"`
6868	MatchedRule            *MatchedRule `json:"matchedRule,omitempty"`
6869	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
6870	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
6871}
6872
6873// ExpressRouteCircuit expressRouteCircuit resource
6874type ExpressRouteCircuit struct {
6875	autorest.Response `json:"-"`
6876	// Sku - The SKU.
6877	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
6878	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
6879	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6880	Etag *string `json:"etag,omitempty"`
6881	// ID - Resource ID.
6882	ID *string `json:"id,omitempty"`
6883	// Name - READ-ONLY; Resource name.
6884	Name *string `json:"name,omitempty"`
6885	// Type - READ-ONLY; Resource type.
6886	Type *string `json:"type,omitempty"`
6887	// Location - Resource location.
6888	Location *string `json:"location,omitempty"`
6889	// Tags - Resource tags.
6890	Tags map[string]*string `json:"tags"`
6891}
6892
6893// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
6894func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
6895	objectMap := make(map[string]interface{})
6896	if erc.Sku != nil {
6897		objectMap["sku"] = erc.Sku
6898	}
6899	if erc.ExpressRouteCircuitPropertiesFormat != nil {
6900		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
6901	}
6902	if erc.ID != nil {
6903		objectMap["id"] = erc.ID
6904	}
6905	if erc.Location != nil {
6906		objectMap["location"] = erc.Location
6907	}
6908	if erc.Tags != nil {
6909		objectMap["tags"] = erc.Tags
6910	}
6911	return json.Marshal(objectMap)
6912}
6913
6914// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
6915func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
6916	var m map[string]*json.RawMessage
6917	err := json.Unmarshal(body, &m)
6918	if err != nil {
6919		return err
6920	}
6921	for k, v := range m {
6922		switch k {
6923		case "sku":
6924			if v != nil {
6925				var sku ExpressRouteCircuitSku
6926				err = json.Unmarshal(*v, &sku)
6927				if err != nil {
6928					return err
6929				}
6930				erc.Sku = &sku
6931			}
6932		case "properties":
6933			if v != nil {
6934				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
6935				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
6936				if err != nil {
6937					return err
6938				}
6939				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
6940			}
6941		case "etag":
6942			if v != nil {
6943				var etag string
6944				err = json.Unmarshal(*v, &etag)
6945				if err != nil {
6946					return err
6947				}
6948				erc.Etag = &etag
6949			}
6950		case "id":
6951			if v != nil {
6952				var ID string
6953				err = json.Unmarshal(*v, &ID)
6954				if err != nil {
6955					return err
6956				}
6957				erc.ID = &ID
6958			}
6959		case "name":
6960			if v != nil {
6961				var name string
6962				err = json.Unmarshal(*v, &name)
6963				if err != nil {
6964					return err
6965				}
6966				erc.Name = &name
6967			}
6968		case "type":
6969			if v != nil {
6970				var typeVar string
6971				err = json.Unmarshal(*v, &typeVar)
6972				if err != nil {
6973					return err
6974				}
6975				erc.Type = &typeVar
6976			}
6977		case "location":
6978			if v != nil {
6979				var location string
6980				err = json.Unmarshal(*v, &location)
6981				if err != nil {
6982					return err
6983				}
6984				erc.Location = &location
6985			}
6986		case "tags":
6987			if v != nil {
6988				var tags map[string]*string
6989				err = json.Unmarshal(*v, &tags)
6990				if err != nil {
6991					return err
6992				}
6993				erc.Tags = tags
6994			}
6995		}
6996	}
6997
6998	return nil
6999}
7000
7001// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7002type ExpressRouteCircuitArpTable struct {
7003	// Age - Entry age in minutes
7004	Age *int32 `json:"age,omitempty"`
7005	// Interface - Interface address
7006	Interface *string `json:"interface,omitempty"`
7007	// IPAddress - The IP address.
7008	IPAddress *string `json:"ipAddress,omitempty"`
7009	// MacAddress - The MAC address.
7010	MacAddress *string `json:"macAddress,omitempty"`
7011}
7012
7013// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7014type ExpressRouteCircuitAuthorization struct {
7015	autorest.Response              `json:"-"`
7016	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7017	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7018	Name *string `json:"name,omitempty"`
7019	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7020	Etag *string `json:"etag,omitempty"`
7021	// ID - Resource ID.
7022	ID *string `json:"id,omitempty"`
7023}
7024
7025// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7026func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7027	objectMap := make(map[string]interface{})
7028	if erca.AuthorizationPropertiesFormat != nil {
7029		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7030	}
7031	if erca.Name != nil {
7032		objectMap["name"] = erca.Name
7033	}
7034	if erca.ID != nil {
7035		objectMap["id"] = erca.ID
7036	}
7037	return json.Marshal(objectMap)
7038}
7039
7040// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7041func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7042	var m map[string]*json.RawMessage
7043	err := json.Unmarshal(body, &m)
7044	if err != nil {
7045		return err
7046	}
7047	for k, v := range m {
7048		switch k {
7049		case "properties":
7050			if v != nil {
7051				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7052				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7053				if err != nil {
7054					return err
7055				}
7056				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7057			}
7058		case "name":
7059			if v != nil {
7060				var name string
7061				err = json.Unmarshal(*v, &name)
7062				if err != nil {
7063					return err
7064				}
7065				erca.Name = &name
7066			}
7067		case "etag":
7068			if v != nil {
7069				var etag string
7070				err = json.Unmarshal(*v, &etag)
7071				if err != nil {
7072					return err
7073				}
7074				erca.Etag = &etag
7075			}
7076		case "id":
7077			if v != nil {
7078				var ID string
7079				err = json.Unmarshal(*v, &ID)
7080				if err != nil {
7081					return err
7082				}
7083				erca.ID = &ID
7084			}
7085		}
7086	}
7087
7088	return nil
7089}
7090
7091// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7092// results of a long-running operation.
7093type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7094	azure.Future
7095}
7096
7097// Result returns the result of the asynchronous operation.
7098// If the operation has not completed it will return an error.
7099func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7100	var done bool
7101	done, err = future.DoneWithContext(context.Background(), client)
7102	if err != nil {
7103		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7104		return
7105	}
7106	if !done {
7107		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7108		return
7109	}
7110	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7111	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7112		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7113		if err != nil {
7114			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7115		}
7116	}
7117	return
7118}
7119
7120// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7121// of a long-running operation.
7122type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7123	azure.Future
7124}
7125
7126// Result returns the result of the asynchronous operation.
7127// If the operation has not completed it will return an error.
7128func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7129	var done bool
7130	done, err = future.DoneWithContext(context.Background(), client)
7131	if err != nil {
7132		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7133		return
7134	}
7135	if !done {
7136		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7137		return
7138	}
7139	ar.Response = future.Response()
7140	return
7141}
7142
7143// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7144// resource.
7145type ExpressRouteCircuitConnection struct {
7146	autorest.Response                              `json:"-"`
7147	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7148	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7149	Name *string `json:"name,omitempty"`
7150	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7151	Etag *string `json:"etag,omitempty"`
7152	// ID - Resource ID.
7153	ID *string `json:"id,omitempty"`
7154}
7155
7156// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7157func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7158	objectMap := make(map[string]interface{})
7159	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7160		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7161	}
7162	if ercc.Name != nil {
7163		objectMap["name"] = ercc.Name
7164	}
7165	if ercc.ID != nil {
7166		objectMap["id"] = ercc.ID
7167	}
7168	return json.Marshal(objectMap)
7169}
7170
7171// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7172func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7173	var m map[string]*json.RawMessage
7174	err := json.Unmarshal(body, &m)
7175	if err != nil {
7176		return err
7177	}
7178	for k, v := range m {
7179		switch k {
7180		case "properties":
7181			if v != nil {
7182				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7183				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7184				if err != nil {
7185					return err
7186				}
7187				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7188			}
7189		case "name":
7190			if v != nil {
7191				var name string
7192				err = json.Unmarshal(*v, &name)
7193				if err != nil {
7194					return err
7195				}
7196				ercc.Name = &name
7197			}
7198		case "etag":
7199			if v != nil {
7200				var etag string
7201				err = json.Unmarshal(*v, &etag)
7202				if err != nil {
7203					return err
7204				}
7205				ercc.Etag = &etag
7206			}
7207		case "id":
7208			if v != nil {
7209				var ID string
7210				err = json.Unmarshal(*v, &ID)
7211				if err != nil {
7212					return err
7213				}
7214				ercc.ID = &ID
7215			}
7216		}
7217	}
7218
7219	return nil
7220}
7221
7222// ExpressRouteCircuitConnectionPropertiesFormat ...
7223type ExpressRouteCircuitConnectionPropertiesFormat struct {
7224	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7225	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7226	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7227	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7228	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7229	AddressPrefix *string `json:"addressPrefix,omitempty"`
7230	// AuthorizationKey - The authorization key.
7231	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7232	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7233	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7234	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7235	ProvisioningState *string `json:"provisioningState,omitempty"`
7236}
7237
7238// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7239// results of a long-running operation.
7240type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7241	azure.Future
7242}
7243
7244// Result returns the result of the asynchronous operation.
7245// If the operation has not completed it will return an error.
7246func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
7247	var done bool
7248	done, err = future.DoneWithContext(context.Background(), client)
7249	if err != nil {
7250		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7251		return
7252	}
7253	if !done {
7254		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
7255		return
7256	}
7257	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7258	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7259		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
7260		if err != nil {
7261			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
7262		}
7263	}
7264	return
7265}
7266
7267// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7268// long-running operation.
7269type ExpressRouteCircuitConnectionsDeleteFuture struct {
7270	azure.Future
7271}
7272
7273// Result returns the result of the asynchronous operation.
7274// If the operation has not completed it will return an error.
7275func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
7276	var done bool
7277	done, err = future.DoneWithContext(context.Background(), client)
7278	if err != nil {
7279		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
7280		return
7281	}
7282	if !done {
7283		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
7284		return
7285	}
7286	ar.Response = future.Response()
7287	return
7288}
7289
7290// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7291type ExpressRouteCircuitListResult struct {
7292	autorest.Response `json:"-"`
7293	// Value - A list of ExpressRouteCircuits in a resource group.
7294	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7295	// NextLink - The URL to get the next set of results.
7296	NextLink *string `json:"nextLink,omitempty"`
7297}
7298
7299// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7300// values.
7301type ExpressRouteCircuitListResultIterator struct {
7302	i    int
7303	page ExpressRouteCircuitListResultPage
7304}
7305
7306// NextWithContext advances to the next value.  If there was an error making
7307// the request the iterator does not advance and the error is returned.
7308func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7309	if tracing.IsEnabled() {
7310		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7311		defer func() {
7312			sc := -1
7313			if iter.Response().Response.Response != nil {
7314				sc = iter.Response().Response.Response.StatusCode
7315			}
7316			tracing.EndSpan(ctx, sc, err)
7317		}()
7318	}
7319	iter.i++
7320	if iter.i < len(iter.page.Values()) {
7321		return nil
7322	}
7323	err = iter.page.NextWithContext(ctx)
7324	if err != nil {
7325		iter.i--
7326		return err
7327	}
7328	iter.i = 0
7329	return nil
7330}
7331
7332// Next advances to the next value.  If there was an error making
7333// the request the iterator does not advance and the error is returned.
7334// Deprecated: Use NextWithContext() instead.
7335func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7336	return iter.NextWithContext(context.Background())
7337}
7338
7339// NotDone returns true if the enumeration should be started or is not yet complete.
7340func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7341	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7342}
7343
7344// Response returns the raw server response from the last page request.
7345func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7346	return iter.page.Response()
7347}
7348
7349// Value returns the current value or a zero-initialized value if the
7350// iterator has advanced beyond the end of the collection.
7351func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7352	if !iter.page.NotDone() {
7353		return ExpressRouteCircuit{}
7354	}
7355	return iter.page.Values()[iter.i]
7356}
7357
7358// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7359func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7360	return ExpressRouteCircuitListResultIterator{page: page}
7361}
7362
7363// IsEmpty returns true if the ListResult contains no values.
7364func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7365	return erclr.Value == nil || len(*erclr.Value) == 0
7366}
7367
7368// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7369// It returns nil if no more results exist.
7370func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7371	if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 {
7372		return nil, nil
7373	}
7374	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7375		autorest.AsJSON(),
7376		autorest.AsGet(),
7377		autorest.WithBaseURL(to.String(erclr.NextLink)))
7378}
7379
7380// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7381type ExpressRouteCircuitListResultPage struct {
7382	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7383	erclr ExpressRouteCircuitListResult
7384}
7385
7386// NextWithContext advances to the next page of values.  If there was an error making
7387// the request the page does not advance and the error is returned.
7388func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7389	if tracing.IsEnabled() {
7390		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7391		defer func() {
7392			sc := -1
7393			if page.Response().Response.Response != nil {
7394				sc = page.Response().Response.Response.StatusCode
7395			}
7396			tracing.EndSpan(ctx, sc, err)
7397		}()
7398	}
7399	next, err := page.fn(ctx, page.erclr)
7400	if err != nil {
7401		return err
7402	}
7403	page.erclr = next
7404	return nil
7405}
7406
7407// Next advances to the next page of values.  If there was an error making
7408// the request the page does not advance and the error is returned.
7409// Deprecated: Use NextWithContext() instead.
7410func (page *ExpressRouteCircuitListResultPage) Next() error {
7411	return page.NextWithContext(context.Background())
7412}
7413
7414// NotDone returns true if the page enumeration should be started or is not yet complete.
7415func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7416	return !page.erclr.IsEmpty()
7417}
7418
7419// Response returns the raw server response from the last page request.
7420func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
7421	return page.erclr
7422}
7423
7424// Values returns the slice of values for the current page or nil if there are no values.
7425func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
7426	if page.erclr.IsEmpty() {
7427		return nil
7428	}
7429	return *page.erclr.Value
7430}
7431
7432// Creates a new instance of the ExpressRouteCircuitListResultPage type.
7433func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
7434	return ExpressRouteCircuitListResultPage{fn: getNextPage}
7435}
7436
7437// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
7438type ExpressRouteCircuitPeering struct {
7439	autorest.Response                           `json:"-"`
7440	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
7441	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7442	Name *string `json:"name,omitempty"`
7443	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7444	Etag *string `json:"etag,omitempty"`
7445	// ID - Resource ID.
7446	ID *string `json:"id,omitempty"`
7447}
7448
7449// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
7450func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
7451	objectMap := make(map[string]interface{})
7452	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
7453		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
7454	}
7455	if ercp.Name != nil {
7456		objectMap["name"] = ercp.Name
7457	}
7458	if ercp.ID != nil {
7459		objectMap["id"] = ercp.ID
7460	}
7461	return json.Marshal(objectMap)
7462}
7463
7464// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
7465func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
7466	var m map[string]*json.RawMessage
7467	err := json.Unmarshal(body, &m)
7468	if err != nil {
7469		return err
7470	}
7471	for k, v := range m {
7472		switch k {
7473		case "properties":
7474			if v != nil {
7475				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
7476				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
7477				if err != nil {
7478					return err
7479				}
7480				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
7481			}
7482		case "name":
7483			if v != nil {
7484				var name string
7485				err = json.Unmarshal(*v, &name)
7486				if err != nil {
7487					return err
7488				}
7489				ercp.Name = &name
7490			}
7491		case "etag":
7492			if v != nil {
7493				var etag string
7494				err = json.Unmarshal(*v, &etag)
7495				if err != nil {
7496					return err
7497				}
7498				ercp.Etag = &etag
7499			}
7500		case "id":
7501			if v != nil {
7502				var ID string
7503				err = json.Unmarshal(*v, &ID)
7504				if err != nil {
7505					return err
7506				}
7507				ercp.ID = &ID
7508			}
7509		}
7510	}
7511
7512	return nil
7513}
7514
7515// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
7516type ExpressRouteCircuitPeeringConfig struct {
7517	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
7518	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
7519	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
7520	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
7521	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
7522	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
7523	// LegacyMode - The legacy mode of the peering.
7524	LegacyMode *int32 `json:"legacyMode,omitempty"`
7525	// CustomerASN - The CustomerASN of the peering.
7526	CustomerASN *int32 `json:"customerASN,omitempty"`
7527	// RoutingRegistryName - The RoutingRegistryName of the configuration.
7528	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
7529}
7530
7531// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
7532// that belong to an ExpressRouteCircuit.
7533type ExpressRouteCircuitPeeringListResult struct {
7534	autorest.Response `json:"-"`
7535	// Value - The peerings in an express route circuit.
7536	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
7537	// NextLink - The URL to get the next set of results.
7538	NextLink *string `json:"nextLink,omitempty"`
7539}
7540
7541// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
7542// ExpressRouteCircuitPeering values.
7543type ExpressRouteCircuitPeeringListResultIterator struct {
7544	i    int
7545	page ExpressRouteCircuitPeeringListResultPage
7546}
7547
7548// NextWithContext advances to the next value.  If there was an error making
7549// the request the iterator does not advance and the error is returned.
7550func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
7551	if tracing.IsEnabled() {
7552		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
7553		defer func() {
7554			sc := -1
7555			if iter.Response().Response.Response != nil {
7556				sc = iter.Response().Response.Response.StatusCode
7557			}
7558			tracing.EndSpan(ctx, sc, err)
7559		}()
7560	}
7561	iter.i++
7562	if iter.i < len(iter.page.Values()) {
7563		return nil
7564	}
7565	err = iter.page.NextWithContext(ctx)
7566	if err != nil {
7567		iter.i--
7568		return err
7569	}
7570	iter.i = 0
7571	return nil
7572}
7573
7574// Next advances to the next value.  If there was an error making
7575// the request the iterator does not advance and the error is returned.
7576// Deprecated: Use NextWithContext() instead.
7577func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
7578	return iter.NextWithContext(context.Background())
7579}
7580
7581// NotDone returns true if the enumeration should be started or is not yet complete.
7582func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
7583	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7584}
7585
7586// Response returns the raw server response from the last page request.
7587func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
7588	return iter.page.Response()
7589}
7590
7591// Value returns the current value or a zero-initialized value if the
7592// iterator has advanced beyond the end of the collection.
7593func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
7594	if !iter.page.NotDone() {
7595		return ExpressRouteCircuitPeering{}
7596	}
7597	return iter.page.Values()[iter.i]
7598}
7599
7600// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
7601func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
7602	return ExpressRouteCircuitPeeringListResultIterator{page: page}
7603}
7604
7605// IsEmpty returns true if the ListResult contains no values.
7606func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
7607	return ercplr.Value == nil || len(*ercplr.Value) == 0
7608}
7609
7610// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
7611// It returns nil if no more results exist.
7612func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
7613	if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 {
7614		return nil, nil
7615	}
7616	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7617		autorest.AsJSON(),
7618		autorest.AsGet(),
7619		autorest.WithBaseURL(to.String(ercplr.NextLink)))
7620}
7621
7622// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
7623type ExpressRouteCircuitPeeringListResultPage struct {
7624	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
7625	ercplr ExpressRouteCircuitPeeringListResult
7626}
7627
7628// NextWithContext advances to the next page of values.  If there was an error making
7629// the request the page does not advance and the error is returned.
7630func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
7631	if tracing.IsEnabled() {
7632		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
7633		defer func() {
7634			sc := -1
7635			if page.Response().Response.Response != nil {
7636				sc = page.Response().Response.Response.StatusCode
7637			}
7638			tracing.EndSpan(ctx, sc, err)
7639		}()
7640	}
7641	next, err := page.fn(ctx, page.ercplr)
7642	if err != nil {
7643		return err
7644	}
7645	page.ercplr = next
7646	return nil
7647}
7648
7649// Next advances to the next page of values.  If there was an error making
7650// the request the page does not advance and the error is returned.
7651// Deprecated: Use NextWithContext() instead.
7652func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
7653	return page.NextWithContext(context.Background())
7654}
7655
7656// NotDone returns true if the page enumeration should be started or is not yet complete.
7657func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
7658	return !page.ercplr.IsEmpty()
7659}
7660
7661// Response returns the raw server response from the last page request.
7662func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
7663	return page.ercplr
7664}
7665
7666// Values returns the slice of values for the current page or nil if there are no values.
7667func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
7668	if page.ercplr.IsEmpty() {
7669		return nil
7670	}
7671	return *page.ercplr.Value
7672}
7673
7674// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
7675func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
7676	return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage}
7677}
7678
7679// ExpressRouteCircuitPeeringPropertiesFormat ...
7680type ExpressRouteCircuitPeeringPropertiesFormat struct {
7681	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7682	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7683	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7684	State ExpressRoutePeeringState `json:"state,omitempty"`
7685	// AzureASN - The Azure ASN.
7686	AzureASN *int32 `json:"azureASN,omitempty"`
7687	// PeerASN - The peer ASN.
7688	PeerASN *int64 `json:"peerASN,omitempty"`
7689	// PrimaryPeerAddressPrefix - The primary address prefix.
7690	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7691	// SecondaryPeerAddressPrefix - The secondary address prefix.
7692	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7693	// PrimaryAzurePort - The primary port.
7694	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7695	// SecondaryAzurePort - The secondary port.
7696	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7697	// SharedKey - The shared key.
7698	SharedKey *string `json:"sharedKey,omitempty"`
7699	// VlanID - The VLAN ID.
7700	VlanID *int32 `json:"vlanId,omitempty"`
7701	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7702	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7703	// Stats - Gets peering stats.
7704	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
7705	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7706	ProvisioningState *string `json:"provisioningState,omitempty"`
7707	// GatewayManagerEtag - The GatewayManager Etag.
7708	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7709	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7710	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7711	// RouteFilter - The reference of the RouteFilter resource.
7712	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7713	// Ipv6PeeringConfig - The IPv6 peering configuration.
7714	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7715	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
7716	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
7717}
7718
7719// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
7720// of a long-running operation.
7721type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
7722	azure.Future
7723}
7724
7725// Result returns the result of the asynchronous operation.
7726// If the operation has not completed it will return an error.
7727func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
7728	var done bool
7729	done, err = future.DoneWithContext(context.Background(), client)
7730	if err != nil {
7731		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7732		return
7733	}
7734	if !done {
7735		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
7736		return
7737	}
7738	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7739	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
7740		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
7741		if err != nil {
7742			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
7743		}
7744	}
7745	return
7746}
7747
7748// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
7749// long-running operation.
7750type ExpressRouteCircuitPeeringsDeleteFuture struct {
7751	azure.Future
7752}
7753
7754// Result returns the result of the asynchronous operation.
7755// If the operation has not completed it will return an error.
7756func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
7757	var done bool
7758	done, err = future.DoneWithContext(context.Background(), client)
7759	if err != nil {
7760		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
7761		return
7762	}
7763	if !done {
7764		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
7765		return
7766	}
7767	ar.Response = future.Response()
7768	return
7769}
7770
7771// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
7772type ExpressRouteCircuitPropertiesFormat struct {
7773	// AllowClassicOperations - Allow classic operations
7774	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
7775	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
7776	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
7777	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
7778	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
7779	// Authorizations - The list of authorizations.
7780	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
7781	// Peerings - The list of peerings.
7782	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
7783	// ServiceKey - The ServiceKey.
7784	ServiceKey *string `json:"serviceKey,omitempty"`
7785	// ServiceProviderNotes - The ServiceProviderNotes.
7786	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
7787	// ServiceProviderProperties - The ServiceProviderProperties.
7788	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
7789	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7790	ProvisioningState *string `json:"provisioningState,omitempty"`
7791	// GatewayManagerEtag - The GatewayManager Etag.
7792	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7793	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
7794	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
7795}
7796
7797// ExpressRouteCircuitReference ...
7798type ExpressRouteCircuitReference struct {
7799	// ID - Corresponding Express Route Circuit Id.
7800	ID *string `json:"id,omitempty"`
7801}
7802
7803// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
7804type ExpressRouteCircuitRoutesTable struct {
7805	// NetworkProperty - IP address of a network entity
7806	NetworkProperty *string `json:"network,omitempty"`
7807	// NextHop - NextHop address
7808	NextHop *string `json:"nextHop,omitempty"`
7809	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
7810	LocPrf *string `json:"locPrf,omitempty"`
7811	// Weight - Route Weight.
7812	Weight *int32 `json:"weight,omitempty"`
7813	// Path - Autonomous system paths to the destination network.
7814	Path *string `json:"path,omitempty"`
7815}
7816
7817// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
7818type ExpressRouteCircuitRoutesTableSummary struct {
7819	// Neighbor - IP address of the neighbor.
7820	Neighbor *string `json:"neighbor,omitempty"`
7821	// V - BGP version number spoken to the neighbor.
7822	V *int32 `json:"v,omitempty"`
7823	// As - Autonomous system number.
7824	As *int32 `json:"as,omitempty"`
7825	// 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.
7826	UpDown *string `json:"upDown,omitempty"`
7827	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
7828	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
7829}
7830
7831// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
7832// Circuits API.
7833type ExpressRouteCircuitsArpTableListResult struct {
7834	autorest.Response `json:"-"`
7835	// Value - Gets list of the ARP table.
7836	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
7837	// NextLink - The URL to get the next set of results.
7838	NextLink *string `json:"nextLink,omitempty"`
7839}
7840
7841// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7842// long-running operation.
7843type ExpressRouteCircuitsCreateOrUpdateFuture struct {
7844	azure.Future
7845}
7846
7847// Result returns the result of the asynchronous operation.
7848// If the operation has not completed it will return an error.
7849func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
7850	var done bool
7851	done, err = future.DoneWithContext(context.Background(), client)
7852	if err != nil {
7853		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7854		return
7855	}
7856	if !done {
7857		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
7858		return
7859	}
7860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7861	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
7862		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
7863		if err != nil {
7864			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
7865		}
7866	}
7867	return
7868}
7869
7870// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
7871// long-running operation.
7872type ExpressRouteCircuitsDeleteFuture struct {
7873	azure.Future
7874}
7875
7876// Result returns the result of the asynchronous operation.
7877// If the operation has not completed it will return an error.
7878func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
7879	var done bool
7880	done, err = future.DoneWithContext(context.Background(), client)
7881	if err != nil {
7882		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
7883		return
7884	}
7885	if !done {
7886		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
7887		return
7888	}
7889	ar.Response = future.Response()
7890	return
7891}
7892
7893// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
7894// ExpressRouteCircuit.
7895type ExpressRouteCircuitServiceProviderProperties struct {
7896	// ServiceProviderName - The serviceProviderName.
7897	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
7898	// PeeringLocation - The peering location.
7899	PeeringLocation *string `json:"peeringLocation,omitempty"`
7900	// BandwidthInMbps - The BandwidthInMbps.
7901	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
7902}
7903
7904// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
7905type ExpressRouteCircuitSku struct {
7906	// Name - The name of the SKU.
7907	Name *string `json:"name,omitempty"`
7908	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'
7909	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
7910	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
7911	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
7912}
7913
7914// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
7915// long-running operation.
7916type ExpressRouteCircuitsListArpTableFuture struct {
7917	azure.Future
7918}
7919
7920// Result returns the result of the asynchronous operation.
7921// If the operation has not completed it will return an error.
7922func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
7923	var done bool
7924	done, err = future.DoneWithContext(context.Background(), client)
7925	if err != nil {
7926		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
7927		return
7928	}
7929	if !done {
7930		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
7931		return
7932	}
7933	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7934	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
7935		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
7936		if err != nil {
7937			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
7938		}
7939	}
7940	return
7941}
7942
7943// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
7944// long-running operation.
7945type ExpressRouteCircuitsListRoutesTableFuture struct {
7946	azure.Future
7947}
7948
7949// Result returns the result of the asynchronous operation.
7950// If the operation has not completed it will return an error.
7951func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
7952	var done bool
7953	done, err = future.DoneWithContext(context.Background(), client)
7954	if err != nil {
7955		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
7956		return
7957	}
7958	if !done {
7959		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
7960		return
7961	}
7962	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7963	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
7964		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
7965		if err != nil {
7966			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
7967		}
7968	}
7969	return
7970}
7971
7972// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
7973// results of a long-running operation.
7974type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
7975	azure.Future
7976}
7977
7978// Result returns the result of the asynchronous operation.
7979// If the operation has not completed it will return an error.
7980func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
7981	var done bool
7982	done, err = future.DoneWithContext(context.Background(), client)
7983	if err != nil {
7984		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
7985		return
7986	}
7987	if !done {
7988		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
7989		return
7990	}
7991	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7992	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
7993		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
7994		if err != nil {
7995			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
7996		}
7997	}
7998	return
7999}
8000
8001// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
8002// Circuits API.
8003type ExpressRouteCircuitsRoutesTableListResult struct {
8004	autorest.Response `json:"-"`
8005	// Value - The list of routes table.
8006	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
8007	// NextLink - The URL to get the next set of results.
8008	NextLink *string `json:"nextLink,omitempty"`
8009}
8010
8011// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
8012// Express Route Circuits API.
8013type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
8014	autorest.Response `json:"-"`
8015	// Value - A list of the routes table.
8016	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
8017	// NextLink - The URL to get the next set of results.
8018	NextLink *string `json:"nextLink,omitempty"`
8019}
8020
8021// ExpressRouteCircuitStats contains stats associated with the peering.
8022type ExpressRouteCircuitStats struct {
8023	autorest.Response `json:"-"`
8024	// PrimarybytesIn - Gets BytesIn of the peering.
8025	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
8026	// PrimarybytesOut - Gets BytesOut of the peering.
8027	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
8028	// SecondarybytesIn - Gets BytesIn of the peering.
8029	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
8030	// SecondarybytesOut - Gets BytesOut of the peering.
8031	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
8032}
8033
8034// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8035// long-running operation.
8036type ExpressRouteCircuitsUpdateTagsFuture struct {
8037	azure.Future
8038}
8039
8040// Result returns the result of the asynchronous operation.
8041// If the operation has not completed it will return an error.
8042func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8043	var done bool
8044	done, err = future.DoneWithContext(context.Background(), client)
8045	if err != nil {
8046		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8047		return
8048	}
8049	if !done {
8050		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
8051		return
8052	}
8053	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8054	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8055		erc, err = client.UpdateTagsResponder(erc.Response.Response)
8056		if err != nil {
8057			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
8058		}
8059	}
8060	return
8061}
8062
8063// ExpressRouteCrossConnection expressRouteCrossConnection resource
8064type ExpressRouteCrossConnection struct {
8065	autorest.Response                      `json:"-"`
8066	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
8067	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8068	Etag *string `json:"etag,omitempty"`
8069	// ID - Resource ID.
8070	ID *string `json:"id,omitempty"`
8071	// Name - READ-ONLY; Resource name.
8072	Name *string `json:"name,omitempty"`
8073	// Type - READ-ONLY; Resource type.
8074	Type *string `json:"type,omitempty"`
8075	// Location - Resource location.
8076	Location *string `json:"location,omitempty"`
8077	// Tags - Resource tags.
8078	Tags map[string]*string `json:"tags"`
8079}
8080
8081// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
8082func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
8083	objectMap := make(map[string]interface{})
8084	if ercc.ExpressRouteCrossConnectionProperties != nil {
8085		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
8086	}
8087	if ercc.ID != nil {
8088		objectMap["id"] = ercc.ID
8089	}
8090	if ercc.Location != nil {
8091		objectMap["location"] = ercc.Location
8092	}
8093	if ercc.Tags != nil {
8094		objectMap["tags"] = ercc.Tags
8095	}
8096	return json.Marshal(objectMap)
8097}
8098
8099// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
8100func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
8101	var m map[string]*json.RawMessage
8102	err := json.Unmarshal(body, &m)
8103	if err != nil {
8104		return err
8105	}
8106	for k, v := range m {
8107		switch k {
8108		case "properties":
8109			if v != nil {
8110				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
8111				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
8112				if err != nil {
8113					return err
8114				}
8115				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
8116			}
8117		case "etag":
8118			if v != nil {
8119				var etag string
8120				err = json.Unmarshal(*v, &etag)
8121				if err != nil {
8122					return err
8123				}
8124				ercc.Etag = &etag
8125			}
8126		case "id":
8127			if v != nil {
8128				var ID string
8129				err = json.Unmarshal(*v, &ID)
8130				if err != nil {
8131					return err
8132				}
8133				ercc.ID = &ID
8134			}
8135		case "name":
8136			if v != nil {
8137				var name string
8138				err = json.Unmarshal(*v, &name)
8139				if err != nil {
8140					return err
8141				}
8142				ercc.Name = &name
8143			}
8144		case "type":
8145			if v != nil {
8146				var typeVar string
8147				err = json.Unmarshal(*v, &typeVar)
8148				if err != nil {
8149					return err
8150				}
8151				ercc.Type = &typeVar
8152			}
8153		case "location":
8154			if v != nil {
8155				var location string
8156				err = json.Unmarshal(*v, &location)
8157				if err != nil {
8158					return err
8159				}
8160				ercc.Location = &location
8161			}
8162		case "tags":
8163			if v != nil {
8164				var tags map[string]*string
8165				err = json.Unmarshal(*v, &tags)
8166				if err != nil {
8167					return err
8168				}
8169				ercc.Tags = tags
8170			}
8171		}
8172	}
8173
8174	return nil
8175}
8176
8177// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
8178type ExpressRouteCrossConnectionListResult struct {
8179	autorest.Response `json:"-"`
8180	// Value - A list of ExpressRouteCrossConnection resources.
8181	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
8182	// NextLink - READ-ONLY; The URL to get the next set of results.
8183	NextLink *string `json:"nextLink,omitempty"`
8184}
8185
8186// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
8187// ExpressRouteCrossConnection values.
8188type ExpressRouteCrossConnectionListResultIterator struct {
8189	i    int
8190	page ExpressRouteCrossConnectionListResultPage
8191}
8192
8193// NextWithContext advances to the next value.  If there was an error making
8194// the request the iterator does not advance and the error is returned.
8195func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8196	if tracing.IsEnabled() {
8197		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
8198		defer func() {
8199			sc := -1
8200			if iter.Response().Response.Response != nil {
8201				sc = iter.Response().Response.Response.StatusCode
8202			}
8203			tracing.EndSpan(ctx, sc, err)
8204		}()
8205	}
8206	iter.i++
8207	if iter.i < len(iter.page.Values()) {
8208		return nil
8209	}
8210	err = iter.page.NextWithContext(ctx)
8211	if err != nil {
8212		iter.i--
8213		return err
8214	}
8215	iter.i = 0
8216	return nil
8217}
8218
8219// Next advances to the next value.  If there was an error making
8220// the request the iterator does not advance and the error is returned.
8221// Deprecated: Use NextWithContext() instead.
8222func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
8223	return iter.NextWithContext(context.Background())
8224}
8225
8226// NotDone returns true if the enumeration should be started or is not yet complete.
8227func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
8228	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8229}
8230
8231// Response returns the raw server response from the last page request.
8232func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
8233	return iter.page.Response()
8234}
8235
8236// Value returns the current value or a zero-initialized value if the
8237// iterator has advanced beyond the end of the collection.
8238func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
8239	if !iter.page.NotDone() {
8240		return ExpressRouteCrossConnection{}
8241	}
8242	return iter.page.Values()[iter.i]
8243}
8244
8245// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
8246func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
8247	return ExpressRouteCrossConnectionListResultIterator{page: page}
8248}
8249
8250// IsEmpty returns true if the ListResult contains no values.
8251func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
8252	return ercclr.Value == nil || len(*ercclr.Value) == 0
8253}
8254
8255// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
8256// It returns nil if no more results exist.
8257func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8258	if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 {
8259		return nil, nil
8260	}
8261	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8262		autorest.AsJSON(),
8263		autorest.AsGet(),
8264		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8265}
8266
8267// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
8268type ExpressRouteCrossConnectionListResultPage struct {
8269	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
8270	ercclr ExpressRouteCrossConnectionListResult
8271}
8272
8273// NextWithContext advances to the next page of values.  If there was an error making
8274// the request the page does not advance and the error is returned.
8275func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8276	if tracing.IsEnabled() {
8277		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
8278		defer func() {
8279			sc := -1
8280			if page.Response().Response.Response != nil {
8281				sc = page.Response().Response.Response.StatusCode
8282			}
8283			tracing.EndSpan(ctx, sc, err)
8284		}()
8285	}
8286	next, err := page.fn(ctx, page.ercclr)
8287	if err != nil {
8288		return err
8289	}
8290	page.ercclr = next
8291	return nil
8292}
8293
8294// Next advances to the next page of values.  If there was an error making
8295// the request the page does not advance and the error is returned.
8296// Deprecated: Use NextWithContext() instead.
8297func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
8298	return page.NextWithContext(context.Background())
8299}
8300
8301// NotDone returns true if the page enumeration should be started or is not yet complete.
8302func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
8303	return !page.ercclr.IsEmpty()
8304}
8305
8306// Response returns the raw server response from the last page request.
8307func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
8308	return page.ercclr
8309}
8310
8311// Values returns the slice of values for the current page or nil if there are no values.
8312func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
8313	if page.ercclr.IsEmpty() {
8314		return nil
8315	}
8316	return *page.ercclr.Value
8317}
8318
8319// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
8320func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
8321	return ExpressRouteCrossConnectionListResultPage{fn: getNextPage}
8322}
8323
8324// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
8325type ExpressRouteCrossConnectionPeering struct {
8326	autorest.Response                             `json:"-"`
8327	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
8328	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8329	Name *string `json:"name,omitempty"`
8330	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8331	Etag *string `json:"etag,omitempty"`
8332	// ID - Resource ID.
8333	ID *string `json:"id,omitempty"`
8334}
8335
8336// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
8337func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
8338	objectMap := make(map[string]interface{})
8339	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
8340		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
8341	}
8342	if erccp.Name != nil {
8343		objectMap["name"] = erccp.Name
8344	}
8345	if erccp.ID != nil {
8346		objectMap["id"] = erccp.ID
8347	}
8348	return json.Marshal(objectMap)
8349}
8350
8351// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
8352func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
8353	var m map[string]*json.RawMessage
8354	err := json.Unmarshal(body, &m)
8355	if err != nil {
8356		return err
8357	}
8358	for k, v := range m {
8359		switch k {
8360		case "properties":
8361			if v != nil {
8362				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
8363				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
8364				if err != nil {
8365					return err
8366				}
8367				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
8368			}
8369		case "name":
8370			if v != nil {
8371				var name string
8372				err = json.Unmarshal(*v, &name)
8373				if err != nil {
8374					return err
8375				}
8376				erccp.Name = &name
8377			}
8378		case "etag":
8379			if v != nil {
8380				var etag string
8381				err = json.Unmarshal(*v, &etag)
8382				if err != nil {
8383					return err
8384				}
8385				erccp.Etag = &etag
8386			}
8387		case "id":
8388			if v != nil {
8389				var ID string
8390				err = json.Unmarshal(*v, &ID)
8391				if err != nil {
8392					return err
8393				}
8394				erccp.ID = &ID
8395			}
8396		}
8397	}
8398
8399	return nil
8400}
8401
8402// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
8403// that belong to an ExpressRouteCrossConnection.
8404type ExpressRouteCrossConnectionPeeringList struct {
8405	autorest.Response `json:"-"`
8406	// Value - The peerings in an express route cross connection.
8407	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
8408	// NextLink - READ-ONLY; The URL to get the next set of results.
8409	NextLink *string `json:"nextLink,omitempty"`
8410}
8411
8412// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
8413// ExpressRouteCrossConnectionPeering values.
8414type ExpressRouteCrossConnectionPeeringListIterator struct {
8415	i    int
8416	page ExpressRouteCrossConnectionPeeringListPage
8417}
8418
8419// NextWithContext advances to the next value.  If there was an error making
8420// the request the iterator does not advance and the error is returned.
8421func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
8422	if tracing.IsEnabled() {
8423		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
8424		defer func() {
8425			sc := -1
8426			if iter.Response().Response.Response != nil {
8427				sc = iter.Response().Response.Response.StatusCode
8428			}
8429			tracing.EndSpan(ctx, sc, err)
8430		}()
8431	}
8432	iter.i++
8433	if iter.i < len(iter.page.Values()) {
8434		return nil
8435	}
8436	err = iter.page.NextWithContext(ctx)
8437	if err != nil {
8438		iter.i--
8439		return err
8440	}
8441	iter.i = 0
8442	return nil
8443}
8444
8445// Next advances to the next value.  If there was an error making
8446// the request the iterator does not advance and the error is returned.
8447// Deprecated: Use NextWithContext() instead.
8448func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
8449	return iter.NextWithContext(context.Background())
8450}
8451
8452// NotDone returns true if the enumeration should be started or is not yet complete.
8453func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
8454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8455}
8456
8457// Response returns the raw server response from the last page request.
8458func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
8459	return iter.page.Response()
8460}
8461
8462// Value returns the current value or a zero-initialized value if the
8463// iterator has advanced beyond the end of the collection.
8464func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
8465	if !iter.page.NotDone() {
8466		return ExpressRouteCrossConnectionPeering{}
8467	}
8468	return iter.page.Values()[iter.i]
8469}
8470
8471// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
8472func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
8473	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
8474}
8475
8476// IsEmpty returns true if the ListResult contains no values.
8477func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
8478	return erccpl.Value == nil || len(*erccpl.Value) == 0
8479}
8480
8481// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
8482// It returns nil if no more results exist.
8483func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
8484	if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 {
8485		return nil, nil
8486	}
8487	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8488		autorest.AsJSON(),
8489		autorest.AsGet(),
8490		autorest.WithBaseURL(to.String(erccpl.NextLink)))
8491}
8492
8493// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
8494type ExpressRouteCrossConnectionPeeringListPage struct {
8495	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
8496	erccpl ExpressRouteCrossConnectionPeeringList
8497}
8498
8499// NextWithContext advances to the next page of values.  If there was an error making
8500// the request the page does not advance and the error is returned.
8501func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
8502	if tracing.IsEnabled() {
8503		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
8504		defer func() {
8505			sc := -1
8506			if page.Response().Response.Response != nil {
8507				sc = page.Response().Response.Response.StatusCode
8508			}
8509			tracing.EndSpan(ctx, sc, err)
8510		}()
8511	}
8512	next, err := page.fn(ctx, page.erccpl)
8513	if err != nil {
8514		return err
8515	}
8516	page.erccpl = next
8517	return nil
8518}
8519
8520// Next advances to the next page of values.  If there was an error making
8521// the request the page does not advance and the error is returned.
8522// Deprecated: Use NextWithContext() instead.
8523func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
8524	return page.NextWithContext(context.Background())
8525}
8526
8527// NotDone returns true if the page enumeration should be started or is not yet complete.
8528func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
8529	return !page.erccpl.IsEmpty()
8530}
8531
8532// Response returns the raw server response from the last page request.
8533func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
8534	return page.erccpl
8535}
8536
8537// Values returns the slice of values for the current page or nil if there are no values.
8538func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
8539	if page.erccpl.IsEmpty() {
8540		return nil
8541	}
8542	return *page.erccpl.Value
8543}
8544
8545// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
8546func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
8547	return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage}
8548}
8549
8550// ExpressRouteCrossConnectionPeeringProperties ...
8551type ExpressRouteCrossConnectionPeeringProperties struct {
8552	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8553	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8554	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8555	State ExpressRoutePeeringState `json:"state,omitempty"`
8556	// AzureASN - READ-ONLY; The Azure ASN.
8557	AzureASN *int32 `json:"azureASN,omitempty"`
8558	// PeerASN - The peer ASN.
8559	PeerASN *int64 `json:"peerASN,omitempty"`
8560	// PrimaryPeerAddressPrefix - The primary address prefix.
8561	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8562	// SecondaryPeerAddressPrefix - The secondary address prefix.
8563	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8564	// PrimaryAzurePort - READ-ONLY; The primary port.
8565	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8566	// SecondaryAzurePort - READ-ONLY; The secondary port.
8567	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8568	// SharedKey - The shared key.
8569	SharedKey *string `json:"sharedKey,omitempty"`
8570	// VlanID - The VLAN ID.
8571	VlanID *int32 `json:"vlanId,omitempty"`
8572	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8573	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,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	// GatewayManagerEtag - The GatewayManager Etag.
8577	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8578	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8579	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8580	// Ipv6PeeringConfig - The IPv6 peering configuration.
8581	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8582}
8583
8584// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8585// results of a long-running operation.
8586type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
8587	azure.Future
8588}
8589
8590// Result returns the result of the asynchronous operation.
8591// If the operation has not completed it will return an error.
8592func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
8593	var done bool
8594	done, err = future.DoneWithContext(context.Background(), client)
8595	if err != nil {
8596		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8597		return
8598	}
8599	if !done {
8600		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
8601		return
8602	}
8603	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8604	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
8605		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
8606		if err != nil {
8607			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
8608		}
8609	}
8610	return
8611}
8612
8613// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
8614// of a long-running operation.
8615type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
8616	azure.Future
8617}
8618
8619// Result returns the result of the asynchronous operation.
8620// If the operation has not completed it will return an error.
8621func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
8622	var done bool
8623	done, err = future.DoneWithContext(context.Background(), client)
8624	if err != nil {
8625		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8626		return
8627	}
8628	if !done {
8629		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
8630		return
8631	}
8632	ar.Response = future.Response()
8633	return
8634}
8635
8636// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
8637type ExpressRouteCrossConnectionProperties struct {
8638	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
8639	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8640	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
8641	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8642	// STag - READ-ONLY; The identifier of the circuit traffic.
8643	STag *int32 `json:"sTag,omitempty"`
8644	// PeeringLocation - The peering location of the ExpressRoute circuit.
8645	PeeringLocation *string `json:"peeringLocation,omitempty"`
8646	// BandwidthInMbps - The circuit bandwidth In Mbps.
8647	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8648	// ExpressRouteCircuit - The ExpressRouteCircuit
8649	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
8650	// 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'
8651	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8652	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
8653	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8654	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8655	ProvisioningState *string `json:"provisioningState,omitempty"`
8656	// Peerings - The list of peerings.
8657	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
8658}
8659
8660// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8661type ExpressRouteCrossConnectionRoutesTableSummary struct {
8662	// Neighbor - IP address of Neighbor router
8663	Neighbor *string `json:"neighbor,omitempty"`
8664	// Asn - Autonomous system number.
8665	Asn *int32 `json:"asn,omitempty"`
8666	// 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.
8667	UpDown *string `json:"upDown,omitempty"`
8668	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8669	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
8670}
8671
8672// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8673// results of a long-running operation.
8674type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
8675	azure.Future
8676}
8677
8678// Result returns the result of the asynchronous operation.
8679// If the operation has not completed it will return an error.
8680func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8681	var done bool
8682	done, err = future.DoneWithContext(context.Background(), client)
8683	if err != nil {
8684		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8685		return
8686	}
8687	if !done {
8688		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
8689		return
8690	}
8691	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8692	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8693		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8694		if err != nil {
8695			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8696		}
8697	}
8698	return
8699}
8700
8701// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
8702// of a long-running operation.
8703type ExpressRouteCrossConnectionsListArpTableFuture struct {
8704	azure.Future
8705}
8706
8707// Result returns the result of the asynchronous operation.
8708// If the operation has not completed it will return an error.
8709func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
8710	var done bool
8711	done, err = future.DoneWithContext(context.Background(), client)
8712	if err != nil {
8713		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
8714		return
8715	}
8716	if !done {
8717		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
8718		return
8719	}
8720	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8721	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
8722		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
8723		if err != nil {
8724			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
8725		}
8726	}
8727	return
8728}
8729
8730// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
8731// results of a long-running operation.
8732type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
8733	azure.Future
8734}
8735
8736// Result returns the result of the asynchronous operation.
8737// If the operation has not completed it will return an error.
8738func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
8739	var done bool
8740	done, err = future.DoneWithContext(context.Background(), client)
8741	if err != nil {
8742		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
8743		return
8744	}
8745	if !done {
8746		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
8747		return
8748	}
8749	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8750	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
8751		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
8752		if err != nil {
8753			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
8754		}
8755	}
8756	return
8757}
8758
8759// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
8760// the results of a long-running operation.
8761type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
8762	azure.Future
8763}
8764
8765// Result returns the result of the asynchronous operation.
8766// If the operation has not completed it will return an error.
8767func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
8768	var done bool
8769	done, err = future.DoneWithContext(context.Background(), client)
8770	if err != nil {
8771		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
8772		return
8773	}
8774	if !done {
8775		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
8776		return
8777	}
8778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8779	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
8780		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
8781		if err != nil {
8782			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
8783		}
8784	}
8785	return
8786}
8787
8788// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
8789// the Express Route Cross Connections.
8790type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
8791	autorest.Response `json:"-"`
8792	// Value - A list of the routes table.
8793	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
8794	// NextLink - READ-ONLY; The URL to get the next set of results.
8795	NextLink *string `json:"nextLink,omitempty"`
8796}
8797
8798// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
8799// a long-running operation.
8800type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
8801	azure.Future
8802}
8803
8804// Result returns the result of the asynchronous operation.
8805// If the operation has not completed it will return an error.
8806func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8807	var done bool
8808	done, err = future.DoneWithContext(context.Background(), client)
8809	if err != nil {
8810		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8811		return
8812	}
8813	if !done {
8814		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
8815		return
8816	}
8817	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8818	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8819		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
8820		if err != nil {
8821			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
8822		}
8823	}
8824	return
8825}
8826
8827// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
8828type ExpressRouteServiceProvider struct {
8829	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
8830	// ID - Resource ID.
8831	ID *string `json:"id,omitempty"`
8832	// Name - READ-ONLY; Resource name.
8833	Name *string `json:"name,omitempty"`
8834	// Type - READ-ONLY; Resource type.
8835	Type *string `json:"type,omitempty"`
8836	// Location - Resource location.
8837	Location *string `json:"location,omitempty"`
8838	// Tags - Resource tags.
8839	Tags map[string]*string `json:"tags"`
8840}
8841
8842// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
8843func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
8844	objectMap := make(map[string]interface{})
8845	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
8846		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
8847	}
8848	if ersp.ID != nil {
8849		objectMap["id"] = ersp.ID
8850	}
8851	if ersp.Location != nil {
8852		objectMap["location"] = ersp.Location
8853	}
8854	if ersp.Tags != nil {
8855		objectMap["tags"] = ersp.Tags
8856	}
8857	return json.Marshal(objectMap)
8858}
8859
8860// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
8861func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
8862	var m map[string]*json.RawMessage
8863	err := json.Unmarshal(body, &m)
8864	if err != nil {
8865		return err
8866	}
8867	for k, v := range m {
8868		switch k {
8869		case "properties":
8870			if v != nil {
8871				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
8872				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
8873				if err != nil {
8874					return err
8875				}
8876				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
8877			}
8878		case "id":
8879			if v != nil {
8880				var ID string
8881				err = json.Unmarshal(*v, &ID)
8882				if err != nil {
8883					return err
8884				}
8885				ersp.ID = &ID
8886			}
8887		case "name":
8888			if v != nil {
8889				var name string
8890				err = json.Unmarshal(*v, &name)
8891				if err != nil {
8892					return err
8893				}
8894				ersp.Name = &name
8895			}
8896		case "type":
8897			if v != nil {
8898				var typeVar string
8899				err = json.Unmarshal(*v, &typeVar)
8900				if err != nil {
8901					return err
8902				}
8903				ersp.Type = &typeVar
8904			}
8905		case "location":
8906			if v != nil {
8907				var location string
8908				err = json.Unmarshal(*v, &location)
8909				if err != nil {
8910					return err
8911				}
8912				ersp.Location = &location
8913			}
8914		case "tags":
8915			if v != nil {
8916				var tags map[string]*string
8917				err = json.Unmarshal(*v, &tags)
8918				if err != nil {
8919					return err
8920				}
8921				ersp.Tags = tags
8922			}
8923		}
8924	}
8925
8926	return nil
8927}
8928
8929// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
8930// resources.
8931type ExpressRouteServiceProviderBandwidthsOffered struct {
8932	// OfferName - The OfferName.
8933	OfferName *string `json:"offerName,omitempty"`
8934	// ValueInMbps - The ValueInMbps.
8935	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
8936}
8937
8938// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
8939type ExpressRouteServiceProviderListResult struct {
8940	autorest.Response `json:"-"`
8941	// Value - A list of ExpressRouteResourceProvider resources.
8942	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
8943	// NextLink - The URL to get the next set of results.
8944	NextLink *string `json:"nextLink,omitempty"`
8945}
8946
8947// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
8948// ExpressRouteServiceProvider values.
8949type ExpressRouteServiceProviderListResultIterator struct {
8950	i    int
8951	page ExpressRouteServiceProviderListResultPage
8952}
8953
8954// NextWithContext advances to the next value.  If there was an error making
8955// the request the iterator does not advance and the error is returned.
8956func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
8957	if tracing.IsEnabled() {
8958		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
8959		defer func() {
8960			sc := -1
8961			if iter.Response().Response.Response != nil {
8962				sc = iter.Response().Response.Response.StatusCode
8963			}
8964			tracing.EndSpan(ctx, sc, err)
8965		}()
8966	}
8967	iter.i++
8968	if iter.i < len(iter.page.Values()) {
8969		return nil
8970	}
8971	err = iter.page.NextWithContext(ctx)
8972	if err != nil {
8973		iter.i--
8974		return err
8975	}
8976	iter.i = 0
8977	return nil
8978}
8979
8980// Next advances to the next value.  If there was an error making
8981// the request the iterator does not advance and the error is returned.
8982// Deprecated: Use NextWithContext() instead.
8983func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
8984	return iter.NextWithContext(context.Background())
8985}
8986
8987// NotDone returns true if the enumeration should be started or is not yet complete.
8988func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
8989	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8990}
8991
8992// Response returns the raw server response from the last page request.
8993func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
8994	return iter.page.Response()
8995}
8996
8997// Value returns the current value or a zero-initialized value if the
8998// iterator has advanced beyond the end of the collection.
8999func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
9000	if !iter.page.NotDone() {
9001		return ExpressRouteServiceProvider{}
9002	}
9003	return iter.page.Values()[iter.i]
9004}
9005
9006// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
9007func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
9008	return ExpressRouteServiceProviderListResultIterator{page: page}
9009}
9010
9011// IsEmpty returns true if the ListResult contains no values.
9012func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
9013	return ersplr.Value == nil || len(*ersplr.Value) == 0
9014}
9015
9016// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
9017// It returns nil if no more results exist.
9018func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
9019	if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 {
9020		return nil, nil
9021	}
9022	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9023		autorest.AsJSON(),
9024		autorest.AsGet(),
9025		autorest.WithBaseURL(to.String(ersplr.NextLink)))
9026}
9027
9028// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
9029type ExpressRouteServiceProviderListResultPage struct {
9030	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
9031	ersplr ExpressRouteServiceProviderListResult
9032}
9033
9034// NextWithContext advances to the next page of values.  If there was an error making
9035// the request the page does not advance and the error is returned.
9036func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
9037	if tracing.IsEnabled() {
9038		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
9039		defer func() {
9040			sc := -1
9041			if page.Response().Response.Response != nil {
9042				sc = page.Response().Response.Response.StatusCode
9043			}
9044			tracing.EndSpan(ctx, sc, err)
9045		}()
9046	}
9047	next, err := page.fn(ctx, page.ersplr)
9048	if err != nil {
9049		return err
9050	}
9051	page.ersplr = next
9052	return nil
9053}
9054
9055// Next advances to the next page of values.  If there was an error making
9056// the request the page does not advance and the error is returned.
9057// Deprecated: Use NextWithContext() instead.
9058func (page *ExpressRouteServiceProviderListResultPage) Next() error {
9059	return page.NextWithContext(context.Background())
9060}
9061
9062// NotDone returns true if the page enumeration should be started or is not yet complete.
9063func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
9064	return !page.ersplr.IsEmpty()
9065}
9066
9067// Response returns the raw server response from the last page request.
9068func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
9069	return page.ersplr
9070}
9071
9072// Values returns the slice of values for the current page or nil if there are no values.
9073func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
9074	if page.ersplr.IsEmpty() {
9075		return nil
9076	}
9077	return *page.ersplr.Value
9078}
9079
9080// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
9081func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
9082	return ExpressRouteServiceProviderListResultPage{fn: getNextPage}
9083}
9084
9085// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
9086type ExpressRouteServiceProviderPropertiesFormat struct {
9087	// PeeringLocations - Get a list of peering locations.
9088	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
9089	// BandwidthsOffered - Gets bandwidths offered.
9090	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
9091	// ProvisioningState - Gets the provisioning state of the resource.
9092	ProvisioningState *string `json:"provisioningState,omitempty"`
9093}
9094
9095// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
9096type FlowLogInformation struct {
9097	autorest.Response `json:"-"`
9098	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
9099	TargetResourceID           *string `json:"targetResourceId,omitempty"`
9100	*FlowLogProperties         `json:"properties,omitempty"`
9101	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
9102}
9103
9104// MarshalJSON is the custom marshaler for FlowLogInformation.
9105func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
9106	objectMap := make(map[string]interface{})
9107	if fli.TargetResourceID != nil {
9108		objectMap["targetResourceId"] = fli.TargetResourceID
9109	}
9110	if fli.FlowLogProperties != nil {
9111		objectMap["properties"] = fli.FlowLogProperties
9112	}
9113	if fli.FlowAnalyticsConfiguration != nil {
9114		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
9115	}
9116	return json.Marshal(objectMap)
9117}
9118
9119// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
9120func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
9121	var m map[string]*json.RawMessage
9122	err := json.Unmarshal(body, &m)
9123	if err != nil {
9124		return err
9125	}
9126	for k, v := range m {
9127		switch k {
9128		case "targetResourceId":
9129			if v != nil {
9130				var targetResourceID string
9131				err = json.Unmarshal(*v, &targetResourceID)
9132				if err != nil {
9133					return err
9134				}
9135				fli.TargetResourceID = &targetResourceID
9136			}
9137		case "properties":
9138			if v != nil {
9139				var flowLogProperties FlowLogProperties
9140				err = json.Unmarshal(*v, &flowLogProperties)
9141				if err != nil {
9142					return err
9143				}
9144				fli.FlowLogProperties = &flowLogProperties
9145			}
9146		case "flowAnalyticsConfiguration":
9147			if v != nil {
9148				var flowAnalyticsConfiguration TrafficAnalyticsProperties
9149				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
9150				if err != nil {
9151					return err
9152				}
9153				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
9154			}
9155		}
9156	}
9157
9158	return nil
9159}
9160
9161// FlowLogProperties parameters that define the configuration of flow log.
9162type FlowLogProperties struct {
9163	// StorageID - ID of the storage account which is used to store the flow log.
9164	StorageID *string `json:"storageId,omitempty"`
9165	// Enabled - Flag to enable/disable flow logging.
9166	Enabled         *bool                      `json:"enabled,omitempty"`
9167	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
9168}
9169
9170// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
9171// (optional) status.
9172type FlowLogStatusParameters struct {
9173	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
9174	TargetResourceID *string `json:"targetResourceId,omitempty"`
9175}
9176
9177// FrontendIPConfiguration frontend IP address of the load balancer.
9178type FrontendIPConfiguration struct {
9179	autorest.Response `json:"-"`
9180	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
9181	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
9182	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9183	Name *string `json:"name,omitempty"`
9184	// Etag - A unique read-only string that changes whenever the resource is updated.
9185	Etag *string `json:"etag,omitempty"`
9186	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
9187	Zones *[]string `json:"zones,omitempty"`
9188	// ID - Resource ID.
9189	ID *string `json:"id,omitempty"`
9190}
9191
9192// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
9193func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
9194	objectMap := make(map[string]interface{})
9195	if fic.FrontendIPConfigurationPropertiesFormat != nil {
9196		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
9197	}
9198	if fic.Name != nil {
9199		objectMap["name"] = fic.Name
9200	}
9201	if fic.Etag != nil {
9202		objectMap["etag"] = fic.Etag
9203	}
9204	if fic.Zones != nil {
9205		objectMap["zones"] = fic.Zones
9206	}
9207	if fic.ID != nil {
9208		objectMap["id"] = fic.ID
9209	}
9210	return json.Marshal(objectMap)
9211}
9212
9213// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
9214func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
9215	var m map[string]*json.RawMessage
9216	err := json.Unmarshal(body, &m)
9217	if err != nil {
9218		return err
9219	}
9220	for k, v := range m {
9221		switch k {
9222		case "properties":
9223			if v != nil {
9224				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
9225				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
9226				if err != nil {
9227					return err
9228				}
9229				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
9230			}
9231		case "name":
9232			if v != nil {
9233				var name string
9234				err = json.Unmarshal(*v, &name)
9235				if err != nil {
9236					return err
9237				}
9238				fic.Name = &name
9239			}
9240		case "etag":
9241			if v != nil {
9242				var etag string
9243				err = json.Unmarshal(*v, &etag)
9244				if err != nil {
9245					return err
9246				}
9247				fic.Etag = &etag
9248			}
9249		case "zones":
9250			if v != nil {
9251				var zones []string
9252				err = json.Unmarshal(*v, &zones)
9253				if err != nil {
9254					return err
9255				}
9256				fic.Zones = &zones
9257			}
9258		case "id":
9259			if v != nil {
9260				var ID string
9261				err = json.Unmarshal(*v, &ID)
9262				if err != nil {
9263					return err
9264				}
9265				fic.ID = &ID
9266			}
9267		}
9268	}
9269
9270	return nil
9271}
9272
9273// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
9274type FrontendIPConfigurationPropertiesFormat struct {
9275	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
9276	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
9277	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
9278	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
9279	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
9280	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
9281	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
9282	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
9283	// PrivateIPAddress - The private IP address of the IP configuration.
9284	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9285	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9286	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
9287	// Subnet - The reference of the subnet resource.
9288	Subnet *Subnet `json:"subnet,omitempty"`
9289	// PublicIPAddress - The reference of the Public IP resource.
9290	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
9291	// PublicIPPrefix - The reference of the Public IP Prefix resource.
9292	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
9293	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9294	ProvisioningState *string `json:"provisioningState,omitempty"`
9295}
9296
9297// GatewayRoute gateway routing details
9298type GatewayRoute struct {
9299	// LocalAddress - READ-ONLY; The gateway's local address
9300	LocalAddress *string `json:"localAddress,omitempty"`
9301	// NetworkProperty - READ-ONLY; The route's network prefix
9302	NetworkProperty *string `json:"network,omitempty"`
9303	// NextHop - READ-ONLY; The route's next hop
9304	NextHop *string `json:"nextHop,omitempty"`
9305	// SourcePeer - READ-ONLY; The peer this route was learned from
9306	SourcePeer *string `json:"sourcePeer,omitempty"`
9307	// Origin - READ-ONLY; The source this route was learned from
9308	Origin *string `json:"origin,omitempty"`
9309	// AsPath - READ-ONLY; The route's AS path sequence
9310	AsPath *string `json:"asPath,omitempty"`
9311	// Weight - READ-ONLY; The route's weight
9312	Weight *int32 `json:"weight,omitempty"`
9313}
9314
9315// GatewayRouteListResult list of virtual network gateway routes
9316type GatewayRouteListResult struct {
9317	autorest.Response `json:"-"`
9318	// Value - List of gateway routes
9319	Value *[]GatewayRoute `json:"value,omitempty"`
9320}
9321
9322// GetVpnSitesConfigurationRequest list of Vpn-Sites
9323type GetVpnSitesConfigurationRequest struct {
9324	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
9325	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
9326	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
9327	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
9328}
9329
9330// HTTPConfiguration HTTP configuration of the connectivity check.
9331type HTTPConfiguration struct {
9332	// Method - HTTP method. Possible values include: 'Get'
9333	Method HTTPMethod `json:"method,omitempty"`
9334	// Headers - List of HTTP headers.
9335	Headers *[]HTTPHeader `json:"headers,omitempty"`
9336	// ValidStatusCodes - Valid status codes.
9337	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
9338}
9339
9340// HTTPHeader describes the HTTP header.
9341type HTTPHeader struct {
9342	// Name - The name in HTTP header.
9343	Name *string `json:"name,omitempty"`
9344	// Value - The value in HTTP header.
9345	Value *string `json:"value,omitempty"`
9346}
9347
9348// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
9349type HubVirtualNetworkConnection struct {
9350	autorest.Response                      `json:"-"`
9351	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
9352	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9353	Etag *string `json:"etag,omitempty"`
9354	// ID - Resource ID.
9355	ID *string `json:"id,omitempty"`
9356	// Name - READ-ONLY; Resource name.
9357	Name *string `json:"name,omitempty"`
9358	// Type - READ-ONLY; Resource type.
9359	Type *string `json:"type,omitempty"`
9360	// Location - Resource location.
9361	Location *string `json:"location,omitempty"`
9362	// Tags - Resource tags.
9363	Tags map[string]*string `json:"tags"`
9364}
9365
9366// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
9367func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
9368	objectMap := make(map[string]interface{})
9369	if hvnc.HubVirtualNetworkConnectionProperties != nil {
9370		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
9371	}
9372	if hvnc.ID != nil {
9373		objectMap["id"] = hvnc.ID
9374	}
9375	if hvnc.Location != nil {
9376		objectMap["location"] = hvnc.Location
9377	}
9378	if hvnc.Tags != nil {
9379		objectMap["tags"] = hvnc.Tags
9380	}
9381	return json.Marshal(objectMap)
9382}
9383
9384// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
9385func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
9386	var m map[string]*json.RawMessage
9387	err := json.Unmarshal(body, &m)
9388	if err != nil {
9389		return err
9390	}
9391	for k, v := range m {
9392		switch k {
9393		case "properties":
9394			if v != nil {
9395				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
9396				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
9397				if err != nil {
9398					return err
9399				}
9400				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
9401			}
9402		case "etag":
9403			if v != nil {
9404				var etag string
9405				err = json.Unmarshal(*v, &etag)
9406				if err != nil {
9407					return err
9408				}
9409				hvnc.Etag = &etag
9410			}
9411		case "id":
9412			if v != nil {
9413				var ID string
9414				err = json.Unmarshal(*v, &ID)
9415				if err != nil {
9416					return err
9417				}
9418				hvnc.ID = &ID
9419			}
9420		case "name":
9421			if v != nil {
9422				var name string
9423				err = json.Unmarshal(*v, &name)
9424				if err != nil {
9425					return err
9426				}
9427				hvnc.Name = &name
9428			}
9429		case "type":
9430			if v != nil {
9431				var typeVar string
9432				err = json.Unmarshal(*v, &typeVar)
9433				if err != nil {
9434					return err
9435				}
9436				hvnc.Type = &typeVar
9437			}
9438		case "location":
9439			if v != nil {
9440				var location string
9441				err = json.Unmarshal(*v, &location)
9442				if err != nil {
9443					return err
9444				}
9445				hvnc.Location = &location
9446			}
9447		case "tags":
9448			if v != nil {
9449				var tags map[string]*string
9450				err = json.Unmarshal(*v, &tags)
9451				if err != nil {
9452					return err
9453				}
9454				hvnc.Tags = tags
9455			}
9456		}
9457	}
9458
9459	return nil
9460}
9461
9462// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
9463type HubVirtualNetworkConnectionProperties struct {
9464	// RemoteVirtualNetwork - Reference to the remote virtual network.
9465	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
9466	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
9467	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
9468	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
9469	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
9470	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9471	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9472}
9473
9474// InboundNatPool inbound NAT pool of the load balancer.
9475type InboundNatPool struct {
9476	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
9477	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
9478	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9479	Name *string `json:"name,omitempty"`
9480	// Etag - A unique read-only string that changes whenever the resource is updated.
9481	Etag *string `json:"etag,omitempty"`
9482	// ID - Resource ID.
9483	ID *string `json:"id,omitempty"`
9484}
9485
9486// MarshalJSON is the custom marshaler for InboundNatPool.
9487func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
9488	objectMap := make(map[string]interface{})
9489	if inp.InboundNatPoolPropertiesFormat != nil {
9490		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
9491	}
9492	if inp.Name != nil {
9493		objectMap["name"] = inp.Name
9494	}
9495	if inp.Etag != nil {
9496		objectMap["etag"] = inp.Etag
9497	}
9498	if inp.ID != nil {
9499		objectMap["id"] = inp.ID
9500	}
9501	return json.Marshal(objectMap)
9502}
9503
9504// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
9505func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
9506	var m map[string]*json.RawMessage
9507	err := json.Unmarshal(body, &m)
9508	if err != nil {
9509		return err
9510	}
9511	for k, v := range m {
9512		switch k {
9513		case "properties":
9514			if v != nil {
9515				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
9516				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
9517				if err != nil {
9518					return err
9519				}
9520				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
9521			}
9522		case "name":
9523			if v != nil {
9524				var name string
9525				err = json.Unmarshal(*v, &name)
9526				if err != nil {
9527					return err
9528				}
9529				inp.Name = &name
9530			}
9531		case "etag":
9532			if v != nil {
9533				var etag string
9534				err = json.Unmarshal(*v, &etag)
9535				if err != nil {
9536					return err
9537				}
9538				inp.Etag = &etag
9539			}
9540		case "id":
9541			if v != nil {
9542				var ID string
9543				err = json.Unmarshal(*v, &ID)
9544				if err != nil {
9545					return err
9546				}
9547				inp.ID = &ID
9548			}
9549		}
9550	}
9551
9552	return nil
9553}
9554
9555// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
9556type InboundNatPoolPropertiesFormat struct {
9557	// FrontendIPConfiguration - A reference to frontend IP addresses.
9558	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9559	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9560	Protocol TransportProtocol `json:"protocol,omitempty"`
9561	// 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.
9562	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
9563	// 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.
9564	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
9565	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
9566	BackendPort *int32 `json:"backendPort,omitempty"`
9567	// 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.
9568	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9569	// 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.
9570	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9571	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
9572	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
9573	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9574	ProvisioningState *string `json:"provisioningState,omitempty"`
9575}
9576
9577// InboundNatRule inbound NAT rule of the load balancer.
9578type InboundNatRule struct {
9579	autorest.Response `json:"-"`
9580	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
9581	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
9582	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9583	Name *string `json:"name,omitempty"`
9584	// Etag - A unique read-only string that changes whenever the resource is updated.
9585	Etag *string `json:"etag,omitempty"`
9586	// ID - Resource ID.
9587	ID *string `json:"id,omitempty"`
9588}
9589
9590// MarshalJSON is the custom marshaler for InboundNatRule.
9591func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
9592	objectMap := make(map[string]interface{})
9593	if inr.InboundNatRulePropertiesFormat != nil {
9594		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
9595	}
9596	if inr.Name != nil {
9597		objectMap["name"] = inr.Name
9598	}
9599	if inr.Etag != nil {
9600		objectMap["etag"] = inr.Etag
9601	}
9602	if inr.ID != nil {
9603		objectMap["id"] = inr.ID
9604	}
9605	return json.Marshal(objectMap)
9606}
9607
9608// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
9609func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
9610	var m map[string]*json.RawMessage
9611	err := json.Unmarshal(body, &m)
9612	if err != nil {
9613		return err
9614	}
9615	for k, v := range m {
9616		switch k {
9617		case "properties":
9618			if v != nil {
9619				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
9620				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
9621				if err != nil {
9622					return err
9623				}
9624				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
9625			}
9626		case "name":
9627			if v != nil {
9628				var name string
9629				err = json.Unmarshal(*v, &name)
9630				if err != nil {
9631					return err
9632				}
9633				inr.Name = &name
9634			}
9635		case "etag":
9636			if v != nil {
9637				var etag string
9638				err = json.Unmarshal(*v, &etag)
9639				if err != nil {
9640					return err
9641				}
9642				inr.Etag = &etag
9643			}
9644		case "id":
9645			if v != nil {
9646				var ID string
9647				err = json.Unmarshal(*v, &ID)
9648				if err != nil {
9649					return err
9650				}
9651				inr.ID = &ID
9652			}
9653		}
9654	}
9655
9656	return nil
9657}
9658
9659// InboundNatRuleListResult response for ListInboundNatRule API service call.
9660type InboundNatRuleListResult struct {
9661	autorest.Response `json:"-"`
9662	// Value - A list of inbound nat rules in a load balancer.
9663	Value *[]InboundNatRule `json:"value,omitempty"`
9664	// NextLink - READ-ONLY; The URL to get the next set of results.
9665	NextLink *string `json:"nextLink,omitempty"`
9666}
9667
9668// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
9669type InboundNatRuleListResultIterator struct {
9670	i    int
9671	page InboundNatRuleListResultPage
9672}
9673
9674// NextWithContext advances to the next value.  If there was an error making
9675// the request the iterator does not advance and the error is returned.
9676func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
9677	if tracing.IsEnabled() {
9678		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
9679		defer func() {
9680			sc := -1
9681			if iter.Response().Response.Response != nil {
9682				sc = iter.Response().Response.Response.StatusCode
9683			}
9684			tracing.EndSpan(ctx, sc, err)
9685		}()
9686	}
9687	iter.i++
9688	if iter.i < len(iter.page.Values()) {
9689		return nil
9690	}
9691	err = iter.page.NextWithContext(ctx)
9692	if err != nil {
9693		iter.i--
9694		return err
9695	}
9696	iter.i = 0
9697	return nil
9698}
9699
9700// Next advances to the next value.  If there was an error making
9701// the request the iterator does not advance and the error is returned.
9702// Deprecated: Use NextWithContext() instead.
9703func (iter *InboundNatRuleListResultIterator) Next() error {
9704	return iter.NextWithContext(context.Background())
9705}
9706
9707// NotDone returns true if the enumeration should be started or is not yet complete.
9708func (iter InboundNatRuleListResultIterator) NotDone() bool {
9709	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9710}
9711
9712// Response returns the raw server response from the last page request.
9713func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
9714	return iter.page.Response()
9715}
9716
9717// Value returns the current value or a zero-initialized value if the
9718// iterator has advanced beyond the end of the collection.
9719func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
9720	if !iter.page.NotDone() {
9721		return InboundNatRule{}
9722	}
9723	return iter.page.Values()[iter.i]
9724}
9725
9726// Creates a new instance of the InboundNatRuleListResultIterator type.
9727func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
9728	return InboundNatRuleListResultIterator{page: page}
9729}
9730
9731// IsEmpty returns true if the ListResult contains no values.
9732func (inrlr InboundNatRuleListResult) IsEmpty() bool {
9733	return inrlr.Value == nil || len(*inrlr.Value) == 0
9734}
9735
9736// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
9737// It returns nil if no more results exist.
9738func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
9739	if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 {
9740		return nil, nil
9741	}
9742	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9743		autorest.AsJSON(),
9744		autorest.AsGet(),
9745		autorest.WithBaseURL(to.String(inrlr.NextLink)))
9746}
9747
9748// InboundNatRuleListResultPage contains a page of InboundNatRule values.
9749type InboundNatRuleListResultPage struct {
9750	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
9751	inrlr InboundNatRuleListResult
9752}
9753
9754// NextWithContext advances to the next page of values.  If there was an error making
9755// the request the page does not advance and the error is returned.
9756func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
9757	if tracing.IsEnabled() {
9758		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
9759		defer func() {
9760			sc := -1
9761			if page.Response().Response.Response != nil {
9762				sc = page.Response().Response.Response.StatusCode
9763			}
9764			tracing.EndSpan(ctx, sc, err)
9765		}()
9766	}
9767	next, err := page.fn(ctx, page.inrlr)
9768	if err != nil {
9769		return err
9770	}
9771	page.inrlr = next
9772	return nil
9773}
9774
9775// Next advances to the next page of values.  If there was an error making
9776// the request the page does not advance and the error is returned.
9777// Deprecated: Use NextWithContext() instead.
9778func (page *InboundNatRuleListResultPage) Next() error {
9779	return page.NextWithContext(context.Background())
9780}
9781
9782// NotDone returns true if the page enumeration should be started or is not yet complete.
9783func (page InboundNatRuleListResultPage) NotDone() bool {
9784	return !page.inrlr.IsEmpty()
9785}
9786
9787// Response returns the raw server response from the last page request.
9788func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
9789	return page.inrlr
9790}
9791
9792// Values returns the slice of values for the current page or nil if there are no values.
9793func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
9794	if page.inrlr.IsEmpty() {
9795		return nil
9796	}
9797	return *page.inrlr.Value
9798}
9799
9800// Creates a new instance of the InboundNatRuleListResultPage type.
9801func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
9802	return InboundNatRuleListResultPage{fn: getNextPage}
9803}
9804
9805// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
9806type InboundNatRulePropertiesFormat struct {
9807	// FrontendIPConfiguration - A reference to frontend IP addresses.
9808	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9809	// 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.
9810	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
9811	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9812	Protocol TransportProtocol `json:"protocol,omitempty"`
9813	// 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.
9814	FrontendPort *int32 `json:"frontendPort,omitempty"`
9815	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
9816	BackendPort *int32 `json:"backendPort,omitempty"`
9817	// 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.
9818	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9819	// 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.
9820	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9821	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
9822	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
9823	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9824	ProvisioningState *string `json:"provisioningState,omitempty"`
9825}
9826
9827// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9828// long-running operation.
9829type InboundNatRulesCreateOrUpdateFuture struct {
9830	azure.Future
9831}
9832
9833// Result returns the result of the asynchronous operation.
9834// If the operation has not completed it will return an error.
9835func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
9836	var done bool
9837	done, err = future.DoneWithContext(context.Background(), client)
9838	if err != nil {
9839		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9840		return
9841	}
9842	if !done {
9843		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
9844		return
9845	}
9846	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9847	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
9848		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
9849		if err != nil {
9850			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
9851		}
9852	}
9853	return
9854}
9855
9856// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9857// operation.
9858type InboundNatRulesDeleteFuture struct {
9859	azure.Future
9860}
9861
9862// Result returns the result of the asynchronous operation.
9863// If the operation has not completed it will return an error.
9864func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) {
9865	var done bool
9866	done, err = future.DoneWithContext(context.Background(), client)
9867	if err != nil {
9868		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
9869		return
9870	}
9871	if !done {
9872		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
9873		return
9874	}
9875	ar.Response = future.Response()
9876	return
9877}
9878
9879// Interface a network interface in a resource group.
9880type Interface struct {
9881	autorest.Response `json:"-"`
9882	// InterfacePropertiesFormat - Properties of the network interface.
9883	*InterfacePropertiesFormat `json:"properties,omitempty"`
9884	// Etag - A unique read-only string that changes whenever the resource is updated.
9885	Etag *string `json:"etag,omitempty"`
9886	// ID - Resource ID.
9887	ID *string `json:"id,omitempty"`
9888	// Name - READ-ONLY; Resource name.
9889	Name *string `json:"name,omitempty"`
9890	// Type - READ-ONLY; Resource type.
9891	Type *string `json:"type,omitempty"`
9892	// Location - Resource location.
9893	Location *string `json:"location,omitempty"`
9894	// Tags - Resource tags.
9895	Tags map[string]*string `json:"tags"`
9896}
9897
9898// MarshalJSON is the custom marshaler for Interface.
9899func (i Interface) MarshalJSON() ([]byte, error) {
9900	objectMap := make(map[string]interface{})
9901	if i.InterfacePropertiesFormat != nil {
9902		objectMap["properties"] = i.InterfacePropertiesFormat
9903	}
9904	if i.Etag != nil {
9905		objectMap["etag"] = i.Etag
9906	}
9907	if i.ID != nil {
9908		objectMap["id"] = i.ID
9909	}
9910	if i.Location != nil {
9911		objectMap["location"] = i.Location
9912	}
9913	if i.Tags != nil {
9914		objectMap["tags"] = i.Tags
9915	}
9916	return json.Marshal(objectMap)
9917}
9918
9919// UnmarshalJSON is the custom unmarshaler for Interface struct.
9920func (i *Interface) UnmarshalJSON(body []byte) error {
9921	var m map[string]*json.RawMessage
9922	err := json.Unmarshal(body, &m)
9923	if err != nil {
9924		return err
9925	}
9926	for k, v := range m {
9927		switch k {
9928		case "properties":
9929			if v != nil {
9930				var interfacePropertiesFormat InterfacePropertiesFormat
9931				err = json.Unmarshal(*v, &interfacePropertiesFormat)
9932				if err != nil {
9933					return err
9934				}
9935				i.InterfacePropertiesFormat = &interfacePropertiesFormat
9936			}
9937		case "etag":
9938			if v != nil {
9939				var etag string
9940				err = json.Unmarshal(*v, &etag)
9941				if err != nil {
9942					return err
9943				}
9944				i.Etag = &etag
9945			}
9946		case "id":
9947			if v != nil {
9948				var ID string
9949				err = json.Unmarshal(*v, &ID)
9950				if err != nil {
9951					return err
9952				}
9953				i.ID = &ID
9954			}
9955		case "name":
9956			if v != nil {
9957				var name string
9958				err = json.Unmarshal(*v, &name)
9959				if err != nil {
9960					return err
9961				}
9962				i.Name = &name
9963			}
9964		case "type":
9965			if v != nil {
9966				var typeVar string
9967				err = json.Unmarshal(*v, &typeVar)
9968				if err != nil {
9969					return err
9970				}
9971				i.Type = &typeVar
9972			}
9973		case "location":
9974			if v != nil {
9975				var location string
9976				err = json.Unmarshal(*v, &location)
9977				if err != nil {
9978					return err
9979				}
9980				i.Location = &location
9981			}
9982		case "tags":
9983			if v != nil {
9984				var tags map[string]*string
9985				err = json.Unmarshal(*v, &tags)
9986				if err != nil {
9987					return err
9988				}
9989				i.Tags = tags
9990			}
9991		}
9992	}
9993
9994	return nil
9995}
9996
9997// InterfaceAssociation network interface and its custom security rules.
9998type InterfaceAssociation struct {
9999	// ID - READ-ONLY; Network interface ID.
10000	ID *string `json:"id,omitempty"`
10001	// SecurityRules - Collection of custom security rules.
10002	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
10003}
10004
10005// InterfaceDNSSettings DNS settings of a network interface.
10006type InterfaceDNSSettings struct {
10007	// 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.
10008	DNSServers *[]string `json:"dnsServers,omitempty"`
10009	// 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.
10010	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
10011	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
10012	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
10013	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
10014	InternalFqdn *string `json:"internalFqdn,omitempty"`
10015	// 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.
10016	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
10017}
10018
10019// InterfaceIPConfiguration iPConfiguration in a network interface.
10020type InterfaceIPConfiguration struct {
10021	autorest.Response `json:"-"`
10022	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
10023	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
10024	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10025	Name *string `json:"name,omitempty"`
10026	// Etag - A unique read-only string that changes whenever the resource is updated.
10027	Etag *string `json:"etag,omitempty"`
10028	// ID - Resource ID.
10029	ID *string `json:"id,omitempty"`
10030}
10031
10032// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
10033func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
10034	objectMap := make(map[string]interface{})
10035	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
10036		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
10037	}
10038	if iic.Name != nil {
10039		objectMap["name"] = iic.Name
10040	}
10041	if iic.Etag != nil {
10042		objectMap["etag"] = iic.Etag
10043	}
10044	if iic.ID != nil {
10045		objectMap["id"] = iic.ID
10046	}
10047	return json.Marshal(objectMap)
10048}
10049
10050// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
10051func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
10052	var m map[string]*json.RawMessage
10053	err := json.Unmarshal(body, &m)
10054	if err != nil {
10055		return err
10056	}
10057	for k, v := range m {
10058		switch k {
10059		case "properties":
10060			if v != nil {
10061				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
10062				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
10063				if err != nil {
10064					return err
10065				}
10066				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
10067			}
10068		case "name":
10069			if v != nil {
10070				var name string
10071				err = json.Unmarshal(*v, &name)
10072				if err != nil {
10073					return err
10074				}
10075				iic.Name = &name
10076			}
10077		case "etag":
10078			if v != nil {
10079				var etag string
10080				err = json.Unmarshal(*v, &etag)
10081				if err != nil {
10082					return err
10083				}
10084				iic.Etag = &etag
10085			}
10086		case "id":
10087			if v != nil {
10088				var ID string
10089				err = json.Unmarshal(*v, &ID)
10090				if err != nil {
10091					return err
10092				}
10093				iic.ID = &ID
10094			}
10095		}
10096	}
10097
10098	return nil
10099}
10100
10101// InterfaceIPConfigurationListResult response for list ip configurations API service call.
10102type InterfaceIPConfigurationListResult struct {
10103	autorest.Response `json:"-"`
10104	// Value - A list of ip configurations.
10105	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
10106	// NextLink - READ-ONLY; The URL to get the next set of results.
10107	NextLink *string `json:"nextLink,omitempty"`
10108}
10109
10110// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
10111// InterfaceIPConfiguration values.
10112type InterfaceIPConfigurationListResultIterator struct {
10113	i    int
10114	page InterfaceIPConfigurationListResultPage
10115}
10116
10117// NextWithContext advances to the next value.  If there was an error making
10118// the request the iterator does not advance and the error is returned.
10119func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10120	if tracing.IsEnabled() {
10121		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
10122		defer func() {
10123			sc := -1
10124			if iter.Response().Response.Response != nil {
10125				sc = iter.Response().Response.Response.StatusCode
10126			}
10127			tracing.EndSpan(ctx, sc, err)
10128		}()
10129	}
10130	iter.i++
10131	if iter.i < len(iter.page.Values()) {
10132		return nil
10133	}
10134	err = iter.page.NextWithContext(ctx)
10135	if err != nil {
10136		iter.i--
10137		return err
10138	}
10139	iter.i = 0
10140	return nil
10141}
10142
10143// Next advances to the next value.  If there was an error making
10144// the request the iterator does not advance and the error is returned.
10145// Deprecated: Use NextWithContext() instead.
10146func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
10147	return iter.NextWithContext(context.Background())
10148}
10149
10150// NotDone returns true if the enumeration should be started or is not yet complete.
10151func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
10152	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10153}
10154
10155// Response returns the raw server response from the last page request.
10156func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
10157	return iter.page.Response()
10158}
10159
10160// Value returns the current value or a zero-initialized value if the
10161// iterator has advanced beyond the end of the collection.
10162func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
10163	if !iter.page.NotDone() {
10164		return InterfaceIPConfiguration{}
10165	}
10166	return iter.page.Values()[iter.i]
10167}
10168
10169// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
10170func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
10171	return InterfaceIPConfigurationListResultIterator{page: page}
10172}
10173
10174// IsEmpty returns true if the ListResult contains no values.
10175func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
10176	return iiclr.Value == nil || len(*iiclr.Value) == 0
10177}
10178
10179// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
10180// It returns nil if no more results exist.
10181func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
10182	if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 {
10183		return nil, nil
10184	}
10185	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10186		autorest.AsJSON(),
10187		autorest.AsGet(),
10188		autorest.WithBaseURL(to.String(iiclr.NextLink)))
10189}
10190
10191// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
10192type InterfaceIPConfigurationListResultPage struct {
10193	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
10194	iiclr InterfaceIPConfigurationListResult
10195}
10196
10197// NextWithContext advances to the next page of values.  If there was an error making
10198// the request the page does not advance and the error is returned.
10199func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
10200	if tracing.IsEnabled() {
10201		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
10202		defer func() {
10203			sc := -1
10204			if page.Response().Response.Response != nil {
10205				sc = page.Response().Response.Response.StatusCode
10206			}
10207			tracing.EndSpan(ctx, sc, err)
10208		}()
10209	}
10210	next, err := page.fn(ctx, page.iiclr)
10211	if err != nil {
10212		return err
10213	}
10214	page.iiclr = next
10215	return nil
10216}
10217
10218// Next advances to the next page of values.  If there was an error making
10219// the request the page does not advance and the error is returned.
10220// Deprecated: Use NextWithContext() instead.
10221func (page *InterfaceIPConfigurationListResultPage) Next() error {
10222	return page.NextWithContext(context.Background())
10223}
10224
10225// NotDone returns true if the page enumeration should be started or is not yet complete.
10226func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
10227	return !page.iiclr.IsEmpty()
10228}
10229
10230// Response returns the raw server response from the last page request.
10231func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
10232	return page.iiclr
10233}
10234
10235// Values returns the slice of values for the current page or nil if there are no values.
10236func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
10237	if page.iiclr.IsEmpty() {
10238		return nil
10239	}
10240	return *page.iiclr.Value
10241}
10242
10243// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
10244func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
10245	return InterfaceIPConfigurationListResultPage{fn: getNextPage}
10246}
10247
10248// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
10249type InterfaceIPConfigurationPropertiesFormat struct {
10250	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
10251	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
10252	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
10253	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
10254	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
10255	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
10256	// PrivateIPAddress - Private IP address of the IP configuration.
10257	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10258	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10259	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10260	// 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'
10261	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
10262	// Subnet - Subnet bound to the IP configuration.
10263	Subnet *Subnet `json:"subnet,omitempty"`
10264	// Primary - Gets whether this is a primary customer address on the network interface.
10265	Primary *bool `json:"primary,omitempty"`
10266	// PublicIPAddress - Public IP address bound to the IP configuration.
10267	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10268	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
10269	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
10270	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10271	ProvisioningState *string `json:"provisioningState,omitempty"`
10272}
10273
10274// InterfaceListResult response for the ListNetworkInterface API service call.
10275type InterfaceListResult struct {
10276	autorest.Response `json:"-"`
10277	// Value - A list of network interfaces in a resource group.
10278	Value *[]Interface `json:"value,omitempty"`
10279	// NextLink - READ-ONLY; The URL to get the next set of results.
10280	NextLink *string `json:"nextLink,omitempty"`
10281}
10282
10283// InterfaceListResultIterator provides access to a complete listing of Interface values.
10284type InterfaceListResultIterator struct {
10285	i    int
10286	page InterfaceListResultPage
10287}
10288
10289// NextWithContext advances to the next value.  If there was an error making
10290// the request the iterator does not advance and the error is returned.
10291func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
10292	if tracing.IsEnabled() {
10293		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
10294		defer func() {
10295			sc := -1
10296			if iter.Response().Response.Response != nil {
10297				sc = iter.Response().Response.Response.StatusCode
10298			}
10299			tracing.EndSpan(ctx, sc, err)
10300		}()
10301	}
10302	iter.i++
10303	if iter.i < len(iter.page.Values()) {
10304		return nil
10305	}
10306	err = iter.page.NextWithContext(ctx)
10307	if err != nil {
10308		iter.i--
10309		return err
10310	}
10311	iter.i = 0
10312	return nil
10313}
10314
10315// Next advances to the next value.  If there was an error making
10316// the request the iterator does not advance and the error is returned.
10317// Deprecated: Use NextWithContext() instead.
10318func (iter *InterfaceListResultIterator) Next() error {
10319	return iter.NextWithContext(context.Background())
10320}
10321
10322// NotDone returns true if the enumeration should be started or is not yet complete.
10323func (iter InterfaceListResultIterator) NotDone() bool {
10324	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10325}
10326
10327// Response returns the raw server response from the last page request.
10328func (iter InterfaceListResultIterator) Response() InterfaceListResult {
10329	return iter.page.Response()
10330}
10331
10332// Value returns the current value or a zero-initialized value if the
10333// iterator has advanced beyond the end of the collection.
10334func (iter InterfaceListResultIterator) Value() Interface {
10335	if !iter.page.NotDone() {
10336		return Interface{}
10337	}
10338	return iter.page.Values()[iter.i]
10339}
10340
10341// Creates a new instance of the InterfaceListResultIterator type.
10342func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
10343	return InterfaceListResultIterator{page: page}
10344}
10345
10346// IsEmpty returns true if the ListResult contains no values.
10347func (ilr InterfaceListResult) IsEmpty() bool {
10348	return ilr.Value == nil || len(*ilr.Value) == 0
10349}
10350
10351// interfaceListResultPreparer prepares a request to retrieve the next set of results.
10352// It returns nil if no more results exist.
10353func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
10354	if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
10355		return nil, nil
10356	}
10357	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10358		autorest.AsJSON(),
10359		autorest.AsGet(),
10360		autorest.WithBaseURL(to.String(ilr.NextLink)))
10361}
10362
10363// InterfaceListResultPage contains a page of Interface values.
10364type InterfaceListResultPage struct {
10365	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
10366	ilr InterfaceListResult
10367}
10368
10369// NextWithContext advances to the next page of values.  If there was an error making
10370// the request the page does not advance and the error is returned.
10371func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
10372	if tracing.IsEnabled() {
10373		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
10374		defer func() {
10375			sc := -1
10376			if page.Response().Response.Response != nil {
10377				sc = page.Response().Response.Response.StatusCode
10378			}
10379			tracing.EndSpan(ctx, sc, err)
10380		}()
10381	}
10382	next, err := page.fn(ctx, page.ilr)
10383	if err != nil {
10384		return err
10385	}
10386	page.ilr = next
10387	return nil
10388}
10389
10390// Next advances to the next page of values.  If there was an error making
10391// the request the page does not advance and the error is returned.
10392// Deprecated: Use NextWithContext() instead.
10393func (page *InterfaceListResultPage) Next() error {
10394	return page.NextWithContext(context.Background())
10395}
10396
10397// NotDone returns true if the page enumeration should be started or is not yet complete.
10398func (page InterfaceListResultPage) NotDone() bool {
10399	return !page.ilr.IsEmpty()
10400}
10401
10402// Response returns the raw server response from the last page request.
10403func (page InterfaceListResultPage) Response() InterfaceListResult {
10404	return page.ilr
10405}
10406
10407// Values returns the slice of values for the current page or nil if there are no values.
10408func (page InterfaceListResultPage) Values() []Interface {
10409	if page.ilr.IsEmpty() {
10410		return nil
10411	}
10412	return *page.ilr.Value
10413}
10414
10415// Creates a new instance of the InterfaceListResultPage type.
10416func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
10417	return InterfaceListResultPage{fn: getNextPage}
10418}
10419
10420// InterfaceLoadBalancerListResult response for list ip configurations API service call.
10421type InterfaceLoadBalancerListResult struct {
10422	autorest.Response `json:"-"`
10423	// Value - A list of load balancers.
10424	Value *[]LoadBalancer `json:"value,omitempty"`
10425	// NextLink - READ-ONLY; The URL to get the next set of results.
10426	NextLink *string `json:"nextLink,omitempty"`
10427}
10428
10429// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
10430type InterfaceLoadBalancerListResultIterator struct {
10431	i    int
10432	page InterfaceLoadBalancerListResultPage
10433}
10434
10435// NextWithContext advances to the next value.  If there was an error making
10436// the request the iterator does not advance and the error is returned.
10437func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
10438	if tracing.IsEnabled() {
10439		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
10440		defer func() {
10441			sc := -1
10442			if iter.Response().Response.Response != nil {
10443				sc = iter.Response().Response.Response.StatusCode
10444			}
10445			tracing.EndSpan(ctx, sc, err)
10446		}()
10447	}
10448	iter.i++
10449	if iter.i < len(iter.page.Values()) {
10450		return nil
10451	}
10452	err = iter.page.NextWithContext(ctx)
10453	if err != nil {
10454		iter.i--
10455		return err
10456	}
10457	iter.i = 0
10458	return nil
10459}
10460
10461// Next advances to the next value.  If there was an error making
10462// the request the iterator does not advance and the error is returned.
10463// Deprecated: Use NextWithContext() instead.
10464func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
10465	return iter.NextWithContext(context.Background())
10466}
10467
10468// NotDone returns true if the enumeration should be started or is not yet complete.
10469func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
10470	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10471}
10472
10473// Response returns the raw server response from the last page request.
10474func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
10475	return iter.page.Response()
10476}
10477
10478// Value returns the current value or a zero-initialized value if the
10479// iterator has advanced beyond the end of the collection.
10480func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
10481	if !iter.page.NotDone() {
10482		return LoadBalancer{}
10483	}
10484	return iter.page.Values()[iter.i]
10485}
10486
10487// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
10488func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
10489	return InterfaceLoadBalancerListResultIterator{page: page}
10490}
10491
10492// IsEmpty returns true if the ListResult contains no values.
10493func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
10494	return ilblr.Value == nil || len(*ilblr.Value) == 0
10495}
10496
10497// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
10498// It returns nil if no more results exist.
10499func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
10500	if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 {
10501		return nil, nil
10502	}
10503	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10504		autorest.AsJSON(),
10505		autorest.AsGet(),
10506		autorest.WithBaseURL(to.String(ilblr.NextLink)))
10507}
10508
10509// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
10510type InterfaceLoadBalancerListResultPage struct {
10511	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
10512	ilblr InterfaceLoadBalancerListResult
10513}
10514
10515// NextWithContext advances to the next page of values.  If there was an error making
10516// the request the page does not advance and the error is returned.
10517func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
10518	if tracing.IsEnabled() {
10519		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
10520		defer func() {
10521			sc := -1
10522			if page.Response().Response.Response != nil {
10523				sc = page.Response().Response.Response.StatusCode
10524			}
10525			tracing.EndSpan(ctx, sc, err)
10526		}()
10527	}
10528	next, err := page.fn(ctx, page.ilblr)
10529	if err != nil {
10530		return err
10531	}
10532	page.ilblr = next
10533	return nil
10534}
10535
10536// Next advances to the next page of values.  If there was an error making
10537// the request the page does not advance and the error is returned.
10538// Deprecated: Use NextWithContext() instead.
10539func (page *InterfaceLoadBalancerListResultPage) Next() error {
10540	return page.NextWithContext(context.Background())
10541}
10542
10543// NotDone returns true if the page enumeration should be started or is not yet complete.
10544func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
10545	return !page.ilblr.IsEmpty()
10546}
10547
10548// Response returns the raw server response from the last page request.
10549func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
10550	return page.ilblr
10551}
10552
10553// Values returns the slice of values for the current page or nil if there are no values.
10554func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
10555	if page.ilblr.IsEmpty() {
10556		return nil
10557	}
10558	return *page.ilblr.Value
10559}
10560
10561// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
10562func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
10563	return InterfaceLoadBalancerListResultPage{fn: getNextPage}
10564}
10565
10566// InterfacePropertiesFormat networkInterface properties.
10567type InterfacePropertiesFormat struct {
10568	// VirtualMachine - The reference of a virtual machine.
10569	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
10570	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
10571	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
10572	// IPConfigurations - A list of IPConfigurations of the network interface.
10573	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
10574	// DNSSettings - The DNS settings in network interface.
10575	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
10576	// MacAddress - The MAC address of the network interface.
10577	MacAddress *string `json:"macAddress,omitempty"`
10578	// Primary - Gets whether this is a primary network interface on a virtual machine.
10579	Primary *bool `json:"primary,omitempty"`
10580	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
10581	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
10582	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
10583	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
10584	// ResourceGUID - The resource GUID property of the network interface resource.
10585	ResourceGUID *string `json:"resourceGuid,omitempty"`
10586	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10587	ProvisioningState *string `json:"provisioningState,omitempty"`
10588}
10589
10590// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10591// long-running operation.
10592type InterfacesCreateOrUpdateFuture struct {
10593	azure.Future
10594}
10595
10596// Result returns the result of the asynchronous operation.
10597// If the operation has not completed it will return an error.
10598func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
10599	var done bool
10600	done, err = future.DoneWithContext(context.Background(), client)
10601	if err != nil {
10602		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10603		return
10604	}
10605	if !done {
10606		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
10607		return
10608	}
10609	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10610	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10611		i, err = client.CreateOrUpdateResponder(i.Response.Response)
10612		if err != nil {
10613			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
10614		}
10615	}
10616	return
10617}
10618
10619// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10620// operation.
10621type InterfacesDeleteFuture struct {
10622	azure.Future
10623}
10624
10625// Result returns the result of the asynchronous operation.
10626// If the operation has not completed it will return an error.
10627func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
10628	var done bool
10629	done, err = future.DoneWithContext(context.Background(), client)
10630	if err != nil {
10631		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
10632		return
10633	}
10634	if !done {
10635		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
10636		return
10637	}
10638	ar.Response = future.Response()
10639	return
10640}
10641
10642// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
10643// long-running operation.
10644type InterfacesGetEffectiveRouteTableFuture struct {
10645	azure.Future
10646}
10647
10648// Result returns the result of the asynchronous operation.
10649// If the operation has not completed it will return an error.
10650func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
10651	var done bool
10652	done, err = future.DoneWithContext(context.Background(), client)
10653	if err != nil {
10654		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
10655		return
10656	}
10657	if !done {
10658		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
10659		return
10660	}
10661	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10662	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
10663		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
10664		if err != nil {
10665			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
10666		}
10667	}
10668	return
10669}
10670
10671// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
10672// results of a long-running operation.
10673type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
10674	azure.Future
10675}
10676
10677// Result returns the result of the asynchronous operation.
10678// If the operation has not completed it will return an error.
10679func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
10680	var done bool
10681	done, err = future.DoneWithContext(context.Background(), client)
10682	if err != nil {
10683		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
10684		return
10685	}
10686	if !done {
10687		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
10688		return
10689	}
10690	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10691	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
10692		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
10693		if err != nil {
10694			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
10695		}
10696	}
10697	return
10698}
10699
10700// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
10701// operation.
10702type InterfacesUpdateTagsFuture struct {
10703	azure.Future
10704}
10705
10706// Result returns the result of the asynchronous operation.
10707// If the operation has not completed it will return an error.
10708func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) {
10709	var done bool
10710	done, err = future.DoneWithContext(context.Background(), client)
10711	if err != nil {
10712		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10713		return
10714	}
10715	if !done {
10716		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
10717		return
10718	}
10719	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10720	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10721		i, err = client.UpdateTagsResponder(i.Response.Response)
10722		if err != nil {
10723			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
10724		}
10725	}
10726	return
10727}
10728
10729// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
10730type IPAddressAvailabilityResult struct {
10731	autorest.Response `json:"-"`
10732	// Available - Private IP address availability.
10733	Available *bool `json:"available,omitempty"`
10734	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
10735	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
10736}
10737
10738// IPConfiguration IP configuration
10739type IPConfiguration struct {
10740	// IPConfigurationPropertiesFormat - Properties of the IP configuration
10741	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
10742	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10743	Name *string `json:"name,omitempty"`
10744	// Etag - A unique read-only string that changes whenever the resource is updated.
10745	Etag *string `json:"etag,omitempty"`
10746	// ID - Resource ID.
10747	ID *string `json:"id,omitempty"`
10748}
10749
10750// MarshalJSON is the custom marshaler for IPConfiguration.
10751func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
10752	objectMap := make(map[string]interface{})
10753	if ic.IPConfigurationPropertiesFormat != nil {
10754		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
10755	}
10756	if ic.Name != nil {
10757		objectMap["name"] = ic.Name
10758	}
10759	if ic.Etag != nil {
10760		objectMap["etag"] = ic.Etag
10761	}
10762	if ic.ID != nil {
10763		objectMap["id"] = ic.ID
10764	}
10765	return json.Marshal(objectMap)
10766}
10767
10768// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
10769func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
10770	var m map[string]*json.RawMessage
10771	err := json.Unmarshal(body, &m)
10772	if err != nil {
10773		return err
10774	}
10775	for k, v := range m {
10776		switch k {
10777		case "properties":
10778			if v != nil {
10779				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
10780				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
10781				if err != nil {
10782					return err
10783				}
10784				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
10785			}
10786		case "name":
10787			if v != nil {
10788				var name string
10789				err = json.Unmarshal(*v, &name)
10790				if err != nil {
10791					return err
10792				}
10793				ic.Name = &name
10794			}
10795		case "etag":
10796			if v != nil {
10797				var etag string
10798				err = json.Unmarshal(*v, &etag)
10799				if err != nil {
10800					return err
10801				}
10802				ic.Etag = &etag
10803			}
10804		case "id":
10805			if v != nil {
10806				var ID string
10807				err = json.Unmarshal(*v, &ID)
10808				if err != nil {
10809					return err
10810				}
10811				ic.ID = &ID
10812			}
10813		}
10814	}
10815
10816	return nil
10817}
10818
10819// IPConfigurationPropertiesFormat properties of IP configuration.
10820type IPConfigurationPropertiesFormat struct {
10821	// PrivateIPAddress - The private IP address of the IP configuration.
10822	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10823	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10824	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10825	// Subnet - The reference of the subnet resource.
10826	Subnet *Subnet `json:"subnet,omitempty"`
10827	// PublicIPAddress - The reference of the public IP resource.
10828	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10829	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10830	ProvisioningState *string `json:"provisioningState,omitempty"`
10831}
10832
10833// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
10834type IpsecPolicy struct {
10835	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
10836	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
10837	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
10838	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
10839	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
10840	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
10841	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
10842	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
10843	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
10844	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
10845	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
10846	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
10847	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
10848	DhGroup DhGroup `json:"dhGroup,omitempty"`
10849	// 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'
10850	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
10851}
10852
10853// IPTag contains the IpTag associated with the object
10854type IPTag struct {
10855	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
10856	IPTagType *string `json:"ipTagType,omitempty"`
10857	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
10858	Tag *string `json:"tag,omitempty"`
10859}
10860
10861// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
10862type Ipv6ExpressRouteCircuitPeeringConfig struct {
10863	// PrimaryPeerAddressPrefix - The primary address prefix.
10864	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10865	// SecondaryPeerAddressPrefix - The secondary address prefix.
10866	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10867	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10868	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10869	// RouteFilter - The reference of the RouteFilter resource.
10870	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
10871	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
10872	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
10873}
10874
10875// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
10876// the next set of results.
10877type ListHubVirtualNetworkConnectionsResult struct {
10878	autorest.Response `json:"-"`
10879	// Value - List of HubVirtualNetworkConnections.
10880	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
10881	// NextLink - URL to get the next set of operation list results if there are any.
10882	NextLink *string `json:"nextLink,omitempty"`
10883}
10884
10885// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
10886// HubVirtualNetworkConnection values.
10887type ListHubVirtualNetworkConnectionsResultIterator struct {
10888	i    int
10889	page ListHubVirtualNetworkConnectionsResultPage
10890}
10891
10892// NextWithContext advances to the next value.  If there was an error making
10893// the request the iterator does not advance and the error is returned.
10894func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
10895	if tracing.IsEnabled() {
10896		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
10897		defer func() {
10898			sc := -1
10899			if iter.Response().Response.Response != nil {
10900				sc = iter.Response().Response.Response.StatusCode
10901			}
10902			tracing.EndSpan(ctx, sc, err)
10903		}()
10904	}
10905	iter.i++
10906	if iter.i < len(iter.page.Values()) {
10907		return nil
10908	}
10909	err = iter.page.NextWithContext(ctx)
10910	if err != nil {
10911		iter.i--
10912		return err
10913	}
10914	iter.i = 0
10915	return nil
10916}
10917
10918// Next advances to the next value.  If there was an error making
10919// the request the iterator does not advance and the error is returned.
10920// Deprecated: Use NextWithContext() instead.
10921func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
10922	return iter.NextWithContext(context.Background())
10923}
10924
10925// NotDone returns true if the enumeration should be started or is not yet complete.
10926func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
10927	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10928}
10929
10930// Response returns the raw server response from the last page request.
10931func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
10932	return iter.page.Response()
10933}
10934
10935// Value returns the current value or a zero-initialized value if the
10936// iterator has advanced beyond the end of the collection.
10937func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
10938	if !iter.page.NotDone() {
10939		return HubVirtualNetworkConnection{}
10940	}
10941	return iter.page.Values()[iter.i]
10942}
10943
10944// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
10945func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
10946	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
10947}
10948
10949// IsEmpty returns true if the ListResult contains no values.
10950func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
10951	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
10952}
10953
10954// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
10955// It returns nil if no more results exist.
10956func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
10957	if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 {
10958		return nil, nil
10959	}
10960	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10961		autorest.AsJSON(),
10962		autorest.AsGet(),
10963		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
10964}
10965
10966// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
10967type ListHubVirtualNetworkConnectionsResultPage struct {
10968	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
10969	lhvncr ListHubVirtualNetworkConnectionsResult
10970}
10971
10972// NextWithContext advances to the next page of values.  If there was an error making
10973// the request the page does not advance and the error is returned.
10974func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
10975	if tracing.IsEnabled() {
10976		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
10977		defer func() {
10978			sc := -1
10979			if page.Response().Response.Response != nil {
10980				sc = page.Response().Response.Response.StatusCode
10981			}
10982			tracing.EndSpan(ctx, sc, err)
10983		}()
10984	}
10985	next, err := page.fn(ctx, page.lhvncr)
10986	if err != nil {
10987		return err
10988	}
10989	page.lhvncr = next
10990	return nil
10991}
10992
10993// Next advances to the next page of values.  If there was an error making
10994// the request the page does not advance and the error is returned.
10995// Deprecated: Use NextWithContext() instead.
10996func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
10997	return page.NextWithContext(context.Background())
10998}
10999
11000// NotDone returns true if the page enumeration should be started or is not yet complete.
11001func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
11002	return !page.lhvncr.IsEmpty()
11003}
11004
11005// Response returns the raw server response from the last page request.
11006func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
11007	return page.lhvncr
11008}
11009
11010// Values returns the slice of values for the current page or nil if there are no values.
11011func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
11012	if page.lhvncr.IsEmpty() {
11013		return nil
11014	}
11015	return *page.lhvncr.Value
11016}
11017
11018// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
11019func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
11020	return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage}
11021}
11022
11023// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
11024// URL nextLink to get the next set of results.
11025type ListVirtualHubsResult struct {
11026	autorest.Response `json:"-"`
11027	// Value - List of VirtualHubs.
11028	Value *[]VirtualHub `json:"value,omitempty"`
11029	// NextLink - URL to get the next set of operation list results if there are any.
11030	NextLink *string `json:"nextLink,omitempty"`
11031}
11032
11033// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
11034type ListVirtualHubsResultIterator struct {
11035	i    int
11036	page ListVirtualHubsResultPage
11037}
11038
11039// NextWithContext advances to the next value.  If there was an error making
11040// the request the iterator does not advance and the error is returned.
11041func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
11042	if tracing.IsEnabled() {
11043		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
11044		defer func() {
11045			sc := -1
11046			if iter.Response().Response.Response != nil {
11047				sc = iter.Response().Response.Response.StatusCode
11048			}
11049			tracing.EndSpan(ctx, sc, err)
11050		}()
11051	}
11052	iter.i++
11053	if iter.i < len(iter.page.Values()) {
11054		return nil
11055	}
11056	err = iter.page.NextWithContext(ctx)
11057	if err != nil {
11058		iter.i--
11059		return err
11060	}
11061	iter.i = 0
11062	return nil
11063}
11064
11065// Next advances to the next value.  If there was an error making
11066// the request the iterator does not advance and the error is returned.
11067// Deprecated: Use NextWithContext() instead.
11068func (iter *ListVirtualHubsResultIterator) Next() error {
11069	return iter.NextWithContext(context.Background())
11070}
11071
11072// NotDone returns true if the enumeration should be started or is not yet complete.
11073func (iter ListVirtualHubsResultIterator) NotDone() bool {
11074	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11075}
11076
11077// Response returns the raw server response from the last page request.
11078func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
11079	return iter.page.Response()
11080}
11081
11082// Value returns the current value or a zero-initialized value if the
11083// iterator has advanced beyond the end of the collection.
11084func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
11085	if !iter.page.NotDone() {
11086		return VirtualHub{}
11087	}
11088	return iter.page.Values()[iter.i]
11089}
11090
11091// Creates a new instance of the ListVirtualHubsResultIterator type.
11092func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
11093	return ListVirtualHubsResultIterator{page: page}
11094}
11095
11096// IsEmpty returns true if the ListResult contains no values.
11097func (lvhr ListVirtualHubsResult) IsEmpty() bool {
11098	return lvhr.Value == nil || len(*lvhr.Value) == 0
11099}
11100
11101// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
11102// It returns nil if no more results exist.
11103func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
11104	if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 {
11105		return nil, nil
11106	}
11107	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11108		autorest.AsJSON(),
11109		autorest.AsGet(),
11110		autorest.WithBaseURL(to.String(lvhr.NextLink)))
11111}
11112
11113// ListVirtualHubsResultPage contains a page of VirtualHub values.
11114type ListVirtualHubsResultPage struct {
11115	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
11116	lvhr ListVirtualHubsResult
11117}
11118
11119// NextWithContext advances to the next page of values.  If there was an error making
11120// the request the page does not advance and the error is returned.
11121func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
11122	if tracing.IsEnabled() {
11123		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
11124		defer func() {
11125			sc := -1
11126			if page.Response().Response.Response != nil {
11127				sc = page.Response().Response.Response.StatusCode
11128			}
11129			tracing.EndSpan(ctx, sc, err)
11130		}()
11131	}
11132	next, err := page.fn(ctx, page.lvhr)
11133	if err != nil {
11134		return err
11135	}
11136	page.lvhr = next
11137	return nil
11138}
11139
11140// Next advances to the next page of values.  If there was an error making
11141// the request the page does not advance and the error is returned.
11142// Deprecated: Use NextWithContext() instead.
11143func (page *ListVirtualHubsResultPage) Next() error {
11144	return page.NextWithContext(context.Background())
11145}
11146
11147// NotDone returns true if the page enumeration should be started or is not yet complete.
11148func (page ListVirtualHubsResultPage) NotDone() bool {
11149	return !page.lvhr.IsEmpty()
11150}
11151
11152// Response returns the raw server response from the last page request.
11153func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
11154	return page.lvhr
11155}
11156
11157// Values returns the slice of values for the current page or nil if there are no values.
11158func (page ListVirtualHubsResultPage) Values() []VirtualHub {
11159	if page.lvhr.IsEmpty() {
11160		return nil
11161	}
11162	return *page.lvhr.Value
11163}
11164
11165// Creates a new instance of the ListVirtualHubsResultPage type.
11166func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
11167	return ListVirtualHubsResultPage{fn: getNextPage}
11168}
11169
11170// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
11171// URL nextLink to get the next set of results.
11172type ListVirtualWANsResult struct {
11173	autorest.Response `json:"-"`
11174	// Value - List of VirtualWANs.
11175	Value *[]VirtualWAN `json:"value,omitempty"`
11176	// NextLink - URL to get the next set of operation list results if there are any.
11177	NextLink *string `json:"nextLink,omitempty"`
11178}
11179
11180// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
11181type ListVirtualWANsResultIterator struct {
11182	i    int
11183	page ListVirtualWANsResultPage
11184}
11185
11186// NextWithContext advances to the next value.  If there was an error making
11187// the request the iterator does not advance and the error is returned.
11188func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
11189	if tracing.IsEnabled() {
11190		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
11191		defer func() {
11192			sc := -1
11193			if iter.Response().Response.Response != nil {
11194				sc = iter.Response().Response.Response.StatusCode
11195			}
11196			tracing.EndSpan(ctx, sc, err)
11197		}()
11198	}
11199	iter.i++
11200	if iter.i < len(iter.page.Values()) {
11201		return nil
11202	}
11203	err = iter.page.NextWithContext(ctx)
11204	if err != nil {
11205		iter.i--
11206		return err
11207	}
11208	iter.i = 0
11209	return nil
11210}
11211
11212// Next advances to the next value.  If there was an error making
11213// the request the iterator does not advance and the error is returned.
11214// Deprecated: Use NextWithContext() instead.
11215func (iter *ListVirtualWANsResultIterator) Next() error {
11216	return iter.NextWithContext(context.Background())
11217}
11218
11219// NotDone returns true if the enumeration should be started or is not yet complete.
11220func (iter ListVirtualWANsResultIterator) NotDone() bool {
11221	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11222}
11223
11224// Response returns the raw server response from the last page request.
11225func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
11226	return iter.page.Response()
11227}
11228
11229// Value returns the current value or a zero-initialized value if the
11230// iterator has advanced beyond the end of the collection.
11231func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
11232	if !iter.page.NotDone() {
11233		return VirtualWAN{}
11234	}
11235	return iter.page.Values()[iter.i]
11236}
11237
11238// Creates a new instance of the ListVirtualWANsResultIterator type.
11239func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
11240	return ListVirtualWANsResultIterator{page: page}
11241}
11242
11243// IsEmpty returns true if the ListResult contains no values.
11244func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
11245	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
11246}
11247
11248// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
11249// It returns nil if no more results exist.
11250func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
11251	if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 {
11252		return nil, nil
11253	}
11254	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11255		autorest.AsJSON(),
11256		autorest.AsGet(),
11257		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
11258}
11259
11260// ListVirtualWANsResultPage contains a page of VirtualWAN values.
11261type ListVirtualWANsResultPage struct {
11262	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
11263	lvwnr ListVirtualWANsResult
11264}
11265
11266// NextWithContext advances to the next page of values.  If there was an error making
11267// the request the page does not advance and the error is returned.
11268func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
11269	if tracing.IsEnabled() {
11270		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
11271		defer func() {
11272			sc := -1
11273			if page.Response().Response.Response != nil {
11274				sc = page.Response().Response.Response.StatusCode
11275			}
11276			tracing.EndSpan(ctx, sc, err)
11277		}()
11278	}
11279	next, err := page.fn(ctx, page.lvwnr)
11280	if err != nil {
11281		return err
11282	}
11283	page.lvwnr = next
11284	return nil
11285}
11286
11287// Next advances to the next page of values.  If there was an error making
11288// the request the page does not advance and the error is returned.
11289// Deprecated: Use NextWithContext() instead.
11290func (page *ListVirtualWANsResultPage) Next() error {
11291	return page.NextWithContext(context.Background())
11292}
11293
11294// NotDone returns true if the page enumeration should be started or is not yet complete.
11295func (page ListVirtualWANsResultPage) NotDone() bool {
11296	return !page.lvwnr.IsEmpty()
11297}
11298
11299// Response returns the raw server response from the last page request.
11300func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
11301	return page.lvwnr
11302}
11303
11304// Values returns the slice of values for the current page or nil if there are no values.
11305func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
11306	if page.lvwnr.IsEmpty() {
11307		return nil
11308	}
11309	return *page.lvwnr.Value
11310}
11311
11312// Creates a new instance of the ListVirtualWANsResultPage type.
11313func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
11314	return ListVirtualWANsResultPage{fn: getNextPage}
11315}
11316
11317// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
11318// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
11319type ListVpnConnectionsResult struct {
11320	autorest.Response `json:"-"`
11321	// Value - List of Vpn Connections.
11322	Value *[]VpnConnection `json:"value,omitempty"`
11323	// NextLink - URL to get the next set of operation list results if there are any.
11324	NextLink *string `json:"nextLink,omitempty"`
11325}
11326
11327// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
11328type ListVpnConnectionsResultIterator struct {
11329	i    int
11330	page ListVpnConnectionsResultPage
11331}
11332
11333// NextWithContext advances to the next value.  If there was an error making
11334// the request the iterator does not advance and the error is returned.
11335func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
11336	if tracing.IsEnabled() {
11337		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
11338		defer func() {
11339			sc := -1
11340			if iter.Response().Response.Response != nil {
11341				sc = iter.Response().Response.Response.StatusCode
11342			}
11343			tracing.EndSpan(ctx, sc, err)
11344		}()
11345	}
11346	iter.i++
11347	if iter.i < len(iter.page.Values()) {
11348		return nil
11349	}
11350	err = iter.page.NextWithContext(ctx)
11351	if err != nil {
11352		iter.i--
11353		return err
11354	}
11355	iter.i = 0
11356	return nil
11357}
11358
11359// Next advances to the next value.  If there was an error making
11360// the request the iterator does not advance and the error is returned.
11361// Deprecated: Use NextWithContext() instead.
11362func (iter *ListVpnConnectionsResultIterator) Next() error {
11363	return iter.NextWithContext(context.Background())
11364}
11365
11366// NotDone returns true if the enumeration should be started or is not yet complete.
11367func (iter ListVpnConnectionsResultIterator) NotDone() bool {
11368	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11369}
11370
11371// Response returns the raw server response from the last page request.
11372func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
11373	return iter.page.Response()
11374}
11375
11376// Value returns the current value or a zero-initialized value if the
11377// iterator has advanced beyond the end of the collection.
11378func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
11379	if !iter.page.NotDone() {
11380		return VpnConnection{}
11381	}
11382	return iter.page.Values()[iter.i]
11383}
11384
11385// Creates a new instance of the ListVpnConnectionsResultIterator type.
11386func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
11387	return ListVpnConnectionsResultIterator{page: page}
11388}
11389
11390// IsEmpty returns true if the ListResult contains no values.
11391func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
11392	return lvcr.Value == nil || len(*lvcr.Value) == 0
11393}
11394
11395// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
11396// It returns nil if no more results exist.
11397func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
11398	if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 {
11399		return nil, nil
11400	}
11401	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11402		autorest.AsJSON(),
11403		autorest.AsGet(),
11404		autorest.WithBaseURL(to.String(lvcr.NextLink)))
11405}
11406
11407// ListVpnConnectionsResultPage contains a page of VpnConnection values.
11408type ListVpnConnectionsResultPage struct {
11409	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
11410	lvcr ListVpnConnectionsResult
11411}
11412
11413// NextWithContext advances to the next page of values.  If there was an error making
11414// the request the page does not advance and the error is returned.
11415func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
11416	if tracing.IsEnabled() {
11417		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
11418		defer func() {
11419			sc := -1
11420			if page.Response().Response.Response != nil {
11421				sc = page.Response().Response.Response.StatusCode
11422			}
11423			tracing.EndSpan(ctx, sc, err)
11424		}()
11425	}
11426	next, err := page.fn(ctx, page.lvcr)
11427	if err != nil {
11428		return err
11429	}
11430	page.lvcr = next
11431	return nil
11432}
11433
11434// Next advances to the next page of values.  If there was an error making
11435// the request the page does not advance and the error is returned.
11436// Deprecated: Use NextWithContext() instead.
11437func (page *ListVpnConnectionsResultPage) Next() error {
11438	return page.NextWithContext(context.Background())
11439}
11440
11441// NotDone returns true if the page enumeration should be started or is not yet complete.
11442func (page ListVpnConnectionsResultPage) NotDone() bool {
11443	return !page.lvcr.IsEmpty()
11444}
11445
11446// Response returns the raw server response from the last page request.
11447func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
11448	return page.lvcr
11449}
11450
11451// Values returns the slice of values for the current page or nil if there are no values.
11452func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
11453	if page.lvcr.IsEmpty() {
11454		return nil
11455	}
11456	return *page.lvcr.Value
11457}
11458
11459// Creates a new instance of the ListVpnConnectionsResultPage type.
11460func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
11461	return ListVpnConnectionsResultPage{fn: getNextPage}
11462}
11463
11464// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
11465// URL nextLink to get the next set of results.
11466type ListVpnGatewaysResult struct {
11467	autorest.Response `json:"-"`
11468	// Value - List of VpnGateways.
11469	Value *[]VpnGateway `json:"value,omitempty"`
11470	// NextLink - URL to get the next set of operation list results if there are any.
11471	NextLink *string `json:"nextLink,omitempty"`
11472}
11473
11474// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
11475type ListVpnGatewaysResultIterator struct {
11476	i    int
11477	page ListVpnGatewaysResultPage
11478}
11479
11480// NextWithContext advances to the next value.  If there was an error making
11481// the request the iterator does not advance and the error is returned.
11482func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
11483	if tracing.IsEnabled() {
11484		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
11485		defer func() {
11486			sc := -1
11487			if iter.Response().Response.Response != nil {
11488				sc = iter.Response().Response.Response.StatusCode
11489			}
11490			tracing.EndSpan(ctx, sc, err)
11491		}()
11492	}
11493	iter.i++
11494	if iter.i < len(iter.page.Values()) {
11495		return nil
11496	}
11497	err = iter.page.NextWithContext(ctx)
11498	if err != nil {
11499		iter.i--
11500		return err
11501	}
11502	iter.i = 0
11503	return nil
11504}
11505
11506// Next advances to the next value.  If there was an error making
11507// the request the iterator does not advance and the error is returned.
11508// Deprecated: Use NextWithContext() instead.
11509func (iter *ListVpnGatewaysResultIterator) Next() error {
11510	return iter.NextWithContext(context.Background())
11511}
11512
11513// NotDone returns true if the enumeration should be started or is not yet complete.
11514func (iter ListVpnGatewaysResultIterator) NotDone() bool {
11515	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11516}
11517
11518// Response returns the raw server response from the last page request.
11519func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
11520	return iter.page.Response()
11521}
11522
11523// Value returns the current value or a zero-initialized value if the
11524// iterator has advanced beyond the end of the collection.
11525func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
11526	if !iter.page.NotDone() {
11527		return VpnGateway{}
11528	}
11529	return iter.page.Values()[iter.i]
11530}
11531
11532// Creates a new instance of the ListVpnGatewaysResultIterator type.
11533func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
11534	return ListVpnGatewaysResultIterator{page: page}
11535}
11536
11537// IsEmpty returns true if the ListResult contains no values.
11538func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
11539	return lvgr.Value == nil || len(*lvgr.Value) == 0
11540}
11541
11542// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
11543// It returns nil if no more results exist.
11544func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
11545	if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 {
11546		return nil, nil
11547	}
11548	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11549		autorest.AsJSON(),
11550		autorest.AsGet(),
11551		autorest.WithBaseURL(to.String(lvgr.NextLink)))
11552}
11553
11554// ListVpnGatewaysResultPage contains a page of VpnGateway values.
11555type ListVpnGatewaysResultPage struct {
11556	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
11557	lvgr ListVpnGatewaysResult
11558}
11559
11560// NextWithContext advances to the next page of values.  If there was an error making
11561// the request the page does not advance and the error is returned.
11562func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
11563	if tracing.IsEnabled() {
11564		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
11565		defer func() {
11566			sc := -1
11567			if page.Response().Response.Response != nil {
11568				sc = page.Response().Response.Response.StatusCode
11569			}
11570			tracing.EndSpan(ctx, sc, err)
11571		}()
11572	}
11573	next, err := page.fn(ctx, page.lvgr)
11574	if err != nil {
11575		return err
11576	}
11577	page.lvgr = next
11578	return nil
11579}
11580
11581// Next advances to the next page of values.  If there was an error making
11582// the request the page does not advance and the error is returned.
11583// Deprecated: Use NextWithContext() instead.
11584func (page *ListVpnGatewaysResultPage) Next() error {
11585	return page.NextWithContext(context.Background())
11586}
11587
11588// NotDone returns true if the page enumeration should be started or is not yet complete.
11589func (page ListVpnGatewaysResultPage) NotDone() bool {
11590	return !page.lvgr.IsEmpty()
11591}
11592
11593// Response returns the raw server response from the last page request.
11594func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
11595	return page.lvgr
11596}
11597
11598// Values returns the slice of values for the current page or nil if there are no values.
11599func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
11600	if page.lvgr.IsEmpty() {
11601		return nil
11602	}
11603	return *page.lvgr.Value
11604}
11605
11606// Creates a new instance of the ListVpnGatewaysResultPage type.
11607func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
11608	return ListVpnGatewaysResultPage{fn: getNextPage}
11609}
11610
11611// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
11612// nextLink to get the next set of results.
11613type ListVpnSitesResult struct {
11614	autorest.Response `json:"-"`
11615	// Value - List of VpnSites.
11616	Value *[]VpnSite `json:"value,omitempty"`
11617	// NextLink - URL to get the next set of operation list results if there are any.
11618	NextLink *string `json:"nextLink,omitempty"`
11619}
11620
11621// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
11622type ListVpnSitesResultIterator struct {
11623	i    int
11624	page ListVpnSitesResultPage
11625}
11626
11627// NextWithContext advances to the next value.  If there was an error making
11628// the request the iterator does not advance and the error is returned.
11629func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
11630	if tracing.IsEnabled() {
11631		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
11632		defer func() {
11633			sc := -1
11634			if iter.Response().Response.Response != nil {
11635				sc = iter.Response().Response.Response.StatusCode
11636			}
11637			tracing.EndSpan(ctx, sc, err)
11638		}()
11639	}
11640	iter.i++
11641	if iter.i < len(iter.page.Values()) {
11642		return nil
11643	}
11644	err = iter.page.NextWithContext(ctx)
11645	if err != nil {
11646		iter.i--
11647		return err
11648	}
11649	iter.i = 0
11650	return nil
11651}
11652
11653// Next advances to the next value.  If there was an error making
11654// the request the iterator does not advance and the error is returned.
11655// Deprecated: Use NextWithContext() instead.
11656func (iter *ListVpnSitesResultIterator) Next() error {
11657	return iter.NextWithContext(context.Background())
11658}
11659
11660// NotDone returns true if the enumeration should be started or is not yet complete.
11661func (iter ListVpnSitesResultIterator) NotDone() bool {
11662	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11663}
11664
11665// Response returns the raw server response from the last page request.
11666func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
11667	return iter.page.Response()
11668}
11669
11670// Value returns the current value or a zero-initialized value if the
11671// iterator has advanced beyond the end of the collection.
11672func (iter ListVpnSitesResultIterator) Value() VpnSite {
11673	if !iter.page.NotDone() {
11674		return VpnSite{}
11675	}
11676	return iter.page.Values()[iter.i]
11677}
11678
11679// Creates a new instance of the ListVpnSitesResultIterator type.
11680func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
11681	return ListVpnSitesResultIterator{page: page}
11682}
11683
11684// IsEmpty returns true if the ListResult contains no values.
11685func (lvsr ListVpnSitesResult) IsEmpty() bool {
11686	return lvsr.Value == nil || len(*lvsr.Value) == 0
11687}
11688
11689// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
11690// It returns nil if no more results exist.
11691func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
11692	if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 {
11693		return nil, nil
11694	}
11695	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11696		autorest.AsJSON(),
11697		autorest.AsGet(),
11698		autorest.WithBaseURL(to.String(lvsr.NextLink)))
11699}
11700
11701// ListVpnSitesResultPage contains a page of VpnSite values.
11702type ListVpnSitesResultPage struct {
11703	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
11704	lvsr ListVpnSitesResult
11705}
11706
11707// NextWithContext advances to the next page of values.  If there was an error making
11708// the request the page does not advance and the error is returned.
11709func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
11710	if tracing.IsEnabled() {
11711		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
11712		defer func() {
11713			sc := -1
11714			if page.Response().Response.Response != nil {
11715				sc = page.Response().Response.Response.StatusCode
11716			}
11717			tracing.EndSpan(ctx, sc, err)
11718		}()
11719	}
11720	next, err := page.fn(ctx, page.lvsr)
11721	if err != nil {
11722		return err
11723	}
11724	page.lvsr = next
11725	return nil
11726}
11727
11728// Next advances to the next page of values.  If there was an error making
11729// the request the page does not advance and the error is returned.
11730// Deprecated: Use NextWithContext() instead.
11731func (page *ListVpnSitesResultPage) Next() error {
11732	return page.NextWithContext(context.Background())
11733}
11734
11735// NotDone returns true if the page enumeration should be started or is not yet complete.
11736func (page ListVpnSitesResultPage) NotDone() bool {
11737	return !page.lvsr.IsEmpty()
11738}
11739
11740// Response returns the raw server response from the last page request.
11741func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
11742	return page.lvsr
11743}
11744
11745// Values returns the slice of values for the current page or nil if there are no values.
11746func (page ListVpnSitesResultPage) Values() []VpnSite {
11747	if page.lvsr.IsEmpty() {
11748		return nil
11749	}
11750	return *page.lvsr.Value
11751}
11752
11753// Creates a new instance of the ListVpnSitesResultPage type.
11754func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
11755	return ListVpnSitesResultPage{fn: getNextPage}
11756}
11757
11758// LoadBalancer loadBalancer resource
11759type LoadBalancer struct {
11760	autorest.Response `json:"-"`
11761	// Sku - The load balancer SKU.
11762	Sku *LoadBalancerSku `json:"sku,omitempty"`
11763	// LoadBalancerPropertiesFormat - Properties of load balancer.
11764	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
11765	// Etag - A unique read-only string that changes whenever the resource is updated.
11766	Etag *string `json:"etag,omitempty"`
11767	// ID - Resource ID.
11768	ID *string `json:"id,omitempty"`
11769	// Name - READ-ONLY; Resource name.
11770	Name *string `json:"name,omitempty"`
11771	// Type - READ-ONLY; Resource type.
11772	Type *string `json:"type,omitempty"`
11773	// Location - Resource location.
11774	Location *string `json:"location,omitempty"`
11775	// Tags - Resource tags.
11776	Tags map[string]*string `json:"tags"`
11777}
11778
11779// MarshalJSON is the custom marshaler for LoadBalancer.
11780func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
11781	objectMap := make(map[string]interface{})
11782	if lb.Sku != nil {
11783		objectMap["sku"] = lb.Sku
11784	}
11785	if lb.LoadBalancerPropertiesFormat != nil {
11786		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
11787	}
11788	if lb.Etag != nil {
11789		objectMap["etag"] = lb.Etag
11790	}
11791	if lb.ID != nil {
11792		objectMap["id"] = lb.ID
11793	}
11794	if lb.Location != nil {
11795		objectMap["location"] = lb.Location
11796	}
11797	if lb.Tags != nil {
11798		objectMap["tags"] = lb.Tags
11799	}
11800	return json.Marshal(objectMap)
11801}
11802
11803// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
11804func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
11805	var m map[string]*json.RawMessage
11806	err := json.Unmarshal(body, &m)
11807	if err != nil {
11808		return err
11809	}
11810	for k, v := range m {
11811		switch k {
11812		case "sku":
11813			if v != nil {
11814				var sku LoadBalancerSku
11815				err = json.Unmarshal(*v, &sku)
11816				if err != nil {
11817					return err
11818				}
11819				lb.Sku = &sku
11820			}
11821		case "properties":
11822			if v != nil {
11823				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
11824				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
11825				if err != nil {
11826					return err
11827				}
11828				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
11829			}
11830		case "etag":
11831			if v != nil {
11832				var etag string
11833				err = json.Unmarshal(*v, &etag)
11834				if err != nil {
11835					return err
11836				}
11837				lb.Etag = &etag
11838			}
11839		case "id":
11840			if v != nil {
11841				var ID string
11842				err = json.Unmarshal(*v, &ID)
11843				if err != nil {
11844					return err
11845				}
11846				lb.ID = &ID
11847			}
11848		case "name":
11849			if v != nil {
11850				var name string
11851				err = json.Unmarshal(*v, &name)
11852				if err != nil {
11853					return err
11854				}
11855				lb.Name = &name
11856			}
11857		case "type":
11858			if v != nil {
11859				var typeVar string
11860				err = json.Unmarshal(*v, &typeVar)
11861				if err != nil {
11862					return err
11863				}
11864				lb.Type = &typeVar
11865			}
11866		case "location":
11867			if v != nil {
11868				var location string
11869				err = json.Unmarshal(*v, &location)
11870				if err != nil {
11871					return err
11872				}
11873				lb.Location = &location
11874			}
11875		case "tags":
11876			if v != nil {
11877				var tags map[string]*string
11878				err = json.Unmarshal(*v, &tags)
11879				if err != nil {
11880					return err
11881				}
11882				lb.Tags = tags
11883			}
11884		}
11885	}
11886
11887	return nil
11888}
11889
11890// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
11891type LoadBalancerBackendAddressPoolListResult struct {
11892	autorest.Response `json:"-"`
11893	// Value - A list of backend address pools in a load balancer.
11894	Value *[]BackendAddressPool `json:"value,omitempty"`
11895	// NextLink - READ-ONLY; The URL to get the next set of results.
11896	NextLink *string `json:"nextLink,omitempty"`
11897}
11898
11899// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
11900// BackendAddressPool values.
11901type LoadBalancerBackendAddressPoolListResultIterator struct {
11902	i    int
11903	page LoadBalancerBackendAddressPoolListResultPage
11904}
11905
11906// NextWithContext advances to the next value.  If there was an error making
11907// the request the iterator does not advance and the error is returned.
11908func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
11909	if tracing.IsEnabled() {
11910		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
11911		defer func() {
11912			sc := -1
11913			if iter.Response().Response.Response != nil {
11914				sc = iter.Response().Response.Response.StatusCode
11915			}
11916			tracing.EndSpan(ctx, sc, err)
11917		}()
11918	}
11919	iter.i++
11920	if iter.i < len(iter.page.Values()) {
11921		return nil
11922	}
11923	err = iter.page.NextWithContext(ctx)
11924	if err != nil {
11925		iter.i--
11926		return err
11927	}
11928	iter.i = 0
11929	return nil
11930}
11931
11932// Next advances to the next value.  If there was an error making
11933// the request the iterator does not advance and the error is returned.
11934// Deprecated: Use NextWithContext() instead.
11935func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
11936	return iter.NextWithContext(context.Background())
11937}
11938
11939// NotDone returns true if the enumeration should be started or is not yet complete.
11940func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
11941	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11942}
11943
11944// Response returns the raw server response from the last page request.
11945func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
11946	return iter.page.Response()
11947}
11948
11949// Value returns the current value or a zero-initialized value if the
11950// iterator has advanced beyond the end of the collection.
11951func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
11952	if !iter.page.NotDone() {
11953		return BackendAddressPool{}
11954	}
11955	return iter.page.Values()[iter.i]
11956}
11957
11958// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
11959func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
11960	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
11961}
11962
11963// IsEmpty returns true if the ListResult contains no values.
11964func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
11965	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
11966}
11967
11968// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
11969// It returns nil if no more results exist.
11970func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
11971	if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 {
11972		return nil, nil
11973	}
11974	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11975		autorest.AsJSON(),
11976		autorest.AsGet(),
11977		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
11978}
11979
11980// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
11981type LoadBalancerBackendAddressPoolListResultPage struct {
11982	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
11983	lbbaplr LoadBalancerBackendAddressPoolListResult
11984}
11985
11986// NextWithContext advances to the next page of values.  If there was an error making
11987// the request the page does not advance and the error is returned.
11988func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
11989	if tracing.IsEnabled() {
11990		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
11991		defer func() {
11992			sc := -1
11993			if page.Response().Response.Response != nil {
11994				sc = page.Response().Response.Response.StatusCode
11995			}
11996			tracing.EndSpan(ctx, sc, err)
11997		}()
11998	}
11999	next, err := page.fn(ctx, page.lbbaplr)
12000	if err != nil {
12001		return err
12002	}
12003	page.lbbaplr = next
12004	return nil
12005}
12006
12007// Next advances to the next page of values.  If there was an error making
12008// the request the page does not advance and the error is returned.
12009// Deprecated: Use NextWithContext() instead.
12010func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
12011	return page.NextWithContext(context.Background())
12012}
12013
12014// NotDone returns true if the page enumeration should be started or is not yet complete.
12015func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
12016	return !page.lbbaplr.IsEmpty()
12017}
12018
12019// Response returns the raw server response from the last page request.
12020func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
12021	return page.lbbaplr
12022}
12023
12024// Values returns the slice of values for the current page or nil if there are no values.
12025func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
12026	if page.lbbaplr.IsEmpty() {
12027		return nil
12028	}
12029	return *page.lbbaplr.Value
12030}
12031
12032// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
12033func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
12034	return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage}
12035}
12036
12037// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
12038type LoadBalancerFrontendIPConfigurationListResult struct {
12039	autorest.Response `json:"-"`
12040	// Value - A list of frontend IP configurations in a load balancer.
12041	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
12042	// NextLink - READ-ONLY; The URL to get the next set of results.
12043	NextLink *string `json:"nextLink,omitempty"`
12044}
12045
12046// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
12047// FrontendIPConfiguration values.
12048type LoadBalancerFrontendIPConfigurationListResultIterator struct {
12049	i    int
12050	page LoadBalancerFrontendIPConfigurationListResultPage
12051}
12052
12053// NextWithContext advances to the next value.  If there was an error making
12054// the request the iterator does not advance and the error is returned.
12055func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12056	if tracing.IsEnabled() {
12057		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
12058		defer func() {
12059			sc := -1
12060			if iter.Response().Response.Response != nil {
12061				sc = iter.Response().Response.Response.StatusCode
12062			}
12063			tracing.EndSpan(ctx, sc, err)
12064		}()
12065	}
12066	iter.i++
12067	if iter.i < len(iter.page.Values()) {
12068		return nil
12069	}
12070	err = iter.page.NextWithContext(ctx)
12071	if err != nil {
12072		iter.i--
12073		return err
12074	}
12075	iter.i = 0
12076	return nil
12077}
12078
12079// Next advances to the next value.  If there was an error making
12080// the request the iterator does not advance and the error is returned.
12081// Deprecated: Use NextWithContext() instead.
12082func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
12083	return iter.NextWithContext(context.Background())
12084}
12085
12086// NotDone returns true if the enumeration should be started or is not yet complete.
12087func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
12088	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12089}
12090
12091// Response returns the raw server response from the last page request.
12092func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
12093	return iter.page.Response()
12094}
12095
12096// Value returns the current value or a zero-initialized value if the
12097// iterator has advanced beyond the end of the collection.
12098func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
12099	if !iter.page.NotDone() {
12100		return FrontendIPConfiguration{}
12101	}
12102	return iter.page.Values()[iter.i]
12103}
12104
12105// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
12106func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
12107	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
12108}
12109
12110// IsEmpty returns true if the ListResult contains no values.
12111func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
12112	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
12113}
12114
12115// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12116// It returns nil if no more results exist.
12117func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12118	if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 {
12119		return nil, nil
12120	}
12121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12122		autorest.AsJSON(),
12123		autorest.AsGet(),
12124		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
12125}
12126
12127// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
12128type LoadBalancerFrontendIPConfigurationListResultPage struct {
12129	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
12130	lbficlr LoadBalancerFrontendIPConfigurationListResult
12131}
12132
12133// NextWithContext advances to the next page of values.  If there was an error making
12134// the request the page does not advance and the error is returned.
12135func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12136	if tracing.IsEnabled() {
12137		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
12138		defer func() {
12139			sc := -1
12140			if page.Response().Response.Response != nil {
12141				sc = page.Response().Response.Response.StatusCode
12142			}
12143			tracing.EndSpan(ctx, sc, err)
12144		}()
12145	}
12146	next, err := page.fn(ctx, page.lbficlr)
12147	if err != nil {
12148		return err
12149	}
12150	page.lbficlr = next
12151	return nil
12152}
12153
12154// Next advances to the next page of values.  If there was an error making
12155// the request the page does not advance and the error is returned.
12156// Deprecated: Use NextWithContext() instead.
12157func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
12158	return page.NextWithContext(context.Background())
12159}
12160
12161// NotDone returns true if the page enumeration should be started or is not yet complete.
12162func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
12163	return !page.lbficlr.IsEmpty()
12164}
12165
12166// Response returns the raw server response from the last page request.
12167func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
12168	return page.lbficlr
12169}
12170
12171// Values returns the slice of values for the current page or nil if there are no values.
12172func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
12173	if page.lbficlr.IsEmpty() {
12174		return nil
12175	}
12176	return *page.lbficlr.Value
12177}
12178
12179// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
12180func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
12181	return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage}
12182}
12183
12184// LoadBalancerListResult response for ListLoadBalancers API service call.
12185type LoadBalancerListResult struct {
12186	autorest.Response `json:"-"`
12187	// Value - A list of load balancers in a resource group.
12188	Value *[]LoadBalancer `json:"value,omitempty"`
12189	// NextLink - READ-ONLY; The URL to get the next set of results.
12190	NextLink *string `json:"nextLink,omitempty"`
12191}
12192
12193// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
12194type LoadBalancerListResultIterator struct {
12195	i    int
12196	page LoadBalancerListResultPage
12197}
12198
12199// NextWithContext advances to the next value.  If there was an error making
12200// the request the iterator does not advance and the error is returned.
12201func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
12202	if tracing.IsEnabled() {
12203		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
12204		defer func() {
12205			sc := -1
12206			if iter.Response().Response.Response != nil {
12207				sc = iter.Response().Response.Response.StatusCode
12208			}
12209			tracing.EndSpan(ctx, sc, err)
12210		}()
12211	}
12212	iter.i++
12213	if iter.i < len(iter.page.Values()) {
12214		return nil
12215	}
12216	err = iter.page.NextWithContext(ctx)
12217	if err != nil {
12218		iter.i--
12219		return err
12220	}
12221	iter.i = 0
12222	return nil
12223}
12224
12225// Next advances to the next value.  If there was an error making
12226// the request the iterator does not advance and the error is returned.
12227// Deprecated: Use NextWithContext() instead.
12228func (iter *LoadBalancerListResultIterator) Next() error {
12229	return iter.NextWithContext(context.Background())
12230}
12231
12232// NotDone returns true if the enumeration should be started or is not yet complete.
12233func (iter LoadBalancerListResultIterator) NotDone() bool {
12234	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12235}
12236
12237// Response returns the raw server response from the last page request.
12238func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
12239	return iter.page.Response()
12240}
12241
12242// Value returns the current value or a zero-initialized value if the
12243// iterator has advanced beyond the end of the collection.
12244func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
12245	if !iter.page.NotDone() {
12246		return LoadBalancer{}
12247	}
12248	return iter.page.Values()[iter.i]
12249}
12250
12251// Creates a new instance of the LoadBalancerListResultIterator type.
12252func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
12253	return LoadBalancerListResultIterator{page: page}
12254}
12255
12256// IsEmpty returns true if the ListResult contains no values.
12257func (lblr LoadBalancerListResult) IsEmpty() bool {
12258	return lblr.Value == nil || len(*lblr.Value) == 0
12259}
12260
12261// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
12262// It returns nil if no more results exist.
12263func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
12264	if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
12265		return nil, nil
12266	}
12267	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12268		autorest.AsJSON(),
12269		autorest.AsGet(),
12270		autorest.WithBaseURL(to.String(lblr.NextLink)))
12271}
12272
12273// LoadBalancerListResultPage contains a page of LoadBalancer values.
12274type LoadBalancerListResultPage struct {
12275	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
12276	lblr LoadBalancerListResult
12277}
12278
12279// NextWithContext advances to the next page of values.  If there was an error making
12280// the request the page does not advance and the error is returned.
12281func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
12282	if tracing.IsEnabled() {
12283		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
12284		defer func() {
12285			sc := -1
12286			if page.Response().Response.Response != nil {
12287				sc = page.Response().Response.Response.StatusCode
12288			}
12289			tracing.EndSpan(ctx, sc, err)
12290		}()
12291	}
12292	next, err := page.fn(ctx, page.lblr)
12293	if err != nil {
12294		return err
12295	}
12296	page.lblr = next
12297	return nil
12298}
12299
12300// Next advances to the next page of values.  If there was an error making
12301// the request the page does not advance and the error is returned.
12302// Deprecated: Use NextWithContext() instead.
12303func (page *LoadBalancerListResultPage) Next() error {
12304	return page.NextWithContext(context.Background())
12305}
12306
12307// NotDone returns true if the page enumeration should be started or is not yet complete.
12308func (page LoadBalancerListResultPage) NotDone() bool {
12309	return !page.lblr.IsEmpty()
12310}
12311
12312// Response returns the raw server response from the last page request.
12313func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
12314	return page.lblr
12315}
12316
12317// Values returns the slice of values for the current page or nil if there are no values.
12318func (page LoadBalancerListResultPage) Values() []LoadBalancer {
12319	if page.lblr.IsEmpty() {
12320		return nil
12321	}
12322	return *page.lblr.Value
12323}
12324
12325// Creates a new instance of the LoadBalancerListResultPage type.
12326func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
12327	return LoadBalancerListResultPage{fn: getNextPage}
12328}
12329
12330// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
12331type LoadBalancerLoadBalancingRuleListResult struct {
12332	autorest.Response `json:"-"`
12333	// Value - A list of load balancing rules in a load balancer.
12334	Value *[]LoadBalancingRule `json:"value,omitempty"`
12335	// NextLink - READ-ONLY; The URL to get the next set of results.
12336	NextLink *string `json:"nextLink,omitempty"`
12337}
12338
12339// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
12340// LoadBalancingRule values.
12341type LoadBalancerLoadBalancingRuleListResultIterator struct {
12342	i    int
12343	page LoadBalancerLoadBalancingRuleListResultPage
12344}
12345
12346// NextWithContext advances to the next value.  If there was an error making
12347// the request the iterator does not advance and the error is returned.
12348func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12349	if tracing.IsEnabled() {
12350		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
12351		defer func() {
12352			sc := -1
12353			if iter.Response().Response.Response != nil {
12354				sc = iter.Response().Response.Response.StatusCode
12355			}
12356			tracing.EndSpan(ctx, sc, err)
12357		}()
12358	}
12359	iter.i++
12360	if iter.i < len(iter.page.Values()) {
12361		return nil
12362	}
12363	err = iter.page.NextWithContext(ctx)
12364	if err != nil {
12365		iter.i--
12366		return err
12367	}
12368	iter.i = 0
12369	return nil
12370}
12371
12372// Next advances to the next value.  If there was an error making
12373// the request the iterator does not advance and the error is returned.
12374// Deprecated: Use NextWithContext() instead.
12375func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
12376	return iter.NextWithContext(context.Background())
12377}
12378
12379// NotDone returns true if the enumeration should be started or is not yet complete.
12380func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
12381	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12382}
12383
12384// Response returns the raw server response from the last page request.
12385func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
12386	return iter.page.Response()
12387}
12388
12389// Value returns the current value or a zero-initialized value if the
12390// iterator has advanced beyond the end of the collection.
12391func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
12392	if !iter.page.NotDone() {
12393		return LoadBalancingRule{}
12394	}
12395	return iter.page.Values()[iter.i]
12396}
12397
12398// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
12399func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
12400	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
12401}
12402
12403// IsEmpty returns true if the ListResult contains no values.
12404func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
12405	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
12406}
12407
12408// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
12409// It returns nil if no more results exist.
12410func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12411	if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 {
12412		return nil, nil
12413	}
12414	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12415		autorest.AsJSON(),
12416		autorest.AsGet(),
12417		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
12418}
12419
12420// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
12421type LoadBalancerLoadBalancingRuleListResultPage struct {
12422	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
12423	lblbrlr LoadBalancerLoadBalancingRuleListResult
12424}
12425
12426// NextWithContext advances to the next page of values.  If there was an error making
12427// the request the page does not advance and the error is returned.
12428func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12429	if tracing.IsEnabled() {
12430		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
12431		defer func() {
12432			sc := -1
12433			if page.Response().Response.Response != nil {
12434				sc = page.Response().Response.Response.StatusCode
12435			}
12436			tracing.EndSpan(ctx, sc, err)
12437		}()
12438	}
12439	next, err := page.fn(ctx, page.lblbrlr)
12440	if err != nil {
12441		return err
12442	}
12443	page.lblbrlr = next
12444	return nil
12445}
12446
12447// Next advances to the next page of values.  If there was an error making
12448// the request the page does not advance and the error is returned.
12449// Deprecated: Use NextWithContext() instead.
12450func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
12451	return page.NextWithContext(context.Background())
12452}
12453
12454// NotDone returns true if the page enumeration should be started or is not yet complete.
12455func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
12456	return !page.lblbrlr.IsEmpty()
12457}
12458
12459// Response returns the raw server response from the last page request.
12460func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
12461	return page.lblbrlr
12462}
12463
12464// Values returns the slice of values for the current page or nil if there are no values.
12465func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
12466	if page.lblbrlr.IsEmpty() {
12467		return nil
12468	}
12469	return *page.lblbrlr.Value
12470}
12471
12472// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
12473func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
12474	return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage}
12475}
12476
12477// LoadBalancerProbeListResult response for ListProbe API service call.
12478type LoadBalancerProbeListResult struct {
12479	autorest.Response `json:"-"`
12480	// Value - A list of probes in a load balancer.
12481	Value *[]Probe `json:"value,omitempty"`
12482	// NextLink - READ-ONLY; The URL to get the next set of results.
12483	NextLink *string `json:"nextLink,omitempty"`
12484}
12485
12486// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
12487type LoadBalancerProbeListResultIterator struct {
12488	i    int
12489	page LoadBalancerProbeListResultPage
12490}
12491
12492// NextWithContext advances to the next value.  If there was an error making
12493// the request the iterator does not advance and the error is returned.
12494func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
12495	if tracing.IsEnabled() {
12496		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
12497		defer func() {
12498			sc := -1
12499			if iter.Response().Response.Response != nil {
12500				sc = iter.Response().Response.Response.StatusCode
12501			}
12502			tracing.EndSpan(ctx, sc, err)
12503		}()
12504	}
12505	iter.i++
12506	if iter.i < len(iter.page.Values()) {
12507		return nil
12508	}
12509	err = iter.page.NextWithContext(ctx)
12510	if err != nil {
12511		iter.i--
12512		return err
12513	}
12514	iter.i = 0
12515	return nil
12516}
12517
12518// Next advances to the next value.  If there was an error making
12519// the request the iterator does not advance and the error is returned.
12520// Deprecated: Use NextWithContext() instead.
12521func (iter *LoadBalancerProbeListResultIterator) Next() error {
12522	return iter.NextWithContext(context.Background())
12523}
12524
12525// NotDone returns true if the enumeration should be started or is not yet complete.
12526func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
12527	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12528}
12529
12530// Response returns the raw server response from the last page request.
12531func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
12532	return iter.page.Response()
12533}
12534
12535// Value returns the current value or a zero-initialized value if the
12536// iterator has advanced beyond the end of the collection.
12537func (iter LoadBalancerProbeListResultIterator) Value() Probe {
12538	if !iter.page.NotDone() {
12539		return Probe{}
12540	}
12541	return iter.page.Values()[iter.i]
12542}
12543
12544// Creates a new instance of the LoadBalancerProbeListResultIterator type.
12545func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
12546	return LoadBalancerProbeListResultIterator{page: page}
12547}
12548
12549// IsEmpty returns true if the ListResult contains no values.
12550func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
12551	return lbplr.Value == nil || len(*lbplr.Value) == 0
12552}
12553
12554// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
12555// It returns nil if no more results exist.
12556func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
12557	if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 {
12558		return nil, nil
12559	}
12560	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12561		autorest.AsJSON(),
12562		autorest.AsGet(),
12563		autorest.WithBaseURL(to.String(lbplr.NextLink)))
12564}
12565
12566// LoadBalancerProbeListResultPage contains a page of Probe values.
12567type LoadBalancerProbeListResultPage struct {
12568	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
12569	lbplr LoadBalancerProbeListResult
12570}
12571
12572// NextWithContext advances to the next page of values.  If there was an error making
12573// the request the page does not advance and the error is returned.
12574func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
12575	if tracing.IsEnabled() {
12576		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
12577		defer func() {
12578			sc := -1
12579			if page.Response().Response.Response != nil {
12580				sc = page.Response().Response.Response.StatusCode
12581			}
12582			tracing.EndSpan(ctx, sc, err)
12583		}()
12584	}
12585	next, err := page.fn(ctx, page.lbplr)
12586	if err != nil {
12587		return err
12588	}
12589	page.lbplr = next
12590	return nil
12591}
12592
12593// Next advances to the next page of values.  If there was an error making
12594// the request the page does not advance and the error is returned.
12595// Deprecated: Use NextWithContext() instead.
12596func (page *LoadBalancerProbeListResultPage) Next() error {
12597	return page.NextWithContext(context.Background())
12598}
12599
12600// NotDone returns true if the page enumeration should be started or is not yet complete.
12601func (page LoadBalancerProbeListResultPage) NotDone() bool {
12602	return !page.lbplr.IsEmpty()
12603}
12604
12605// Response returns the raw server response from the last page request.
12606func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
12607	return page.lbplr
12608}
12609
12610// Values returns the slice of values for the current page or nil if there are no values.
12611func (page LoadBalancerProbeListResultPage) Values() []Probe {
12612	if page.lbplr.IsEmpty() {
12613		return nil
12614	}
12615	return *page.lbplr.Value
12616}
12617
12618// Creates a new instance of the LoadBalancerProbeListResultPage type.
12619func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
12620	return LoadBalancerProbeListResultPage{fn: getNextPage}
12621}
12622
12623// LoadBalancerPropertiesFormat properties of the load balancer.
12624type LoadBalancerPropertiesFormat struct {
12625	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
12626	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
12627	// BackendAddressPools - Collection of backend address pools used by a load balancer
12628	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
12629	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
12630	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
12631	// Probes - Collection of probe objects used in the load balancer
12632	Probes *[]Probe `json:"probes,omitempty"`
12633	// 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.
12634	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
12635	// 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.
12636	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
12637	// OutboundRules - The outbound rules.
12638	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
12639	// ResourceGUID - The resource GUID property of the load balancer resource.
12640	ResourceGUID *string `json:"resourceGuid,omitempty"`
12641	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12642	ProvisioningState *string `json:"provisioningState,omitempty"`
12643}
12644
12645// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12646// long-running operation.
12647type LoadBalancersCreateOrUpdateFuture struct {
12648	azure.Future
12649}
12650
12651// Result returns the result of the asynchronous operation.
12652// If the operation has not completed it will return an error.
12653func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12654	var done bool
12655	done, err = future.DoneWithContext(context.Background(), client)
12656	if err != nil {
12657		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12658		return
12659	}
12660	if !done {
12661		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
12662		return
12663	}
12664	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12665	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12666		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
12667		if err != nil {
12668			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
12669		}
12670	}
12671	return
12672}
12673
12674// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12675// operation.
12676type LoadBalancersDeleteFuture struct {
12677	azure.Future
12678}
12679
12680// Result returns the result of the asynchronous operation.
12681// If the operation has not completed it will return an error.
12682func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
12683	var done bool
12684	done, err = future.DoneWithContext(context.Background(), client)
12685	if err != nil {
12686		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
12687		return
12688	}
12689	if !done {
12690		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
12691		return
12692	}
12693	ar.Response = future.Response()
12694	return
12695}
12696
12697// LoadBalancerSku SKU of a load balancer
12698type LoadBalancerSku struct {
12699	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
12700	Name LoadBalancerSkuName `json:"name,omitempty"`
12701}
12702
12703// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12704// operation.
12705type LoadBalancersUpdateTagsFuture struct {
12706	azure.Future
12707}
12708
12709// Result returns the result of the asynchronous operation.
12710// If the operation has not completed it will return an error.
12711func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12712	var done bool
12713	done, err = future.DoneWithContext(context.Background(), client)
12714	if err != nil {
12715		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12716		return
12717	}
12718	if !done {
12719		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
12720		return
12721	}
12722	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12723	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12724		lb, err = client.UpdateTagsResponder(lb.Response.Response)
12725		if err != nil {
12726			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
12727		}
12728	}
12729	return
12730}
12731
12732// LoadBalancingRule a load balancing rule for a load balancer.
12733type LoadBalancingRule struct {
12734	autorest.Response `json:"-"`
12735	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
12736	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
12737	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12738	Name *string `json:"name,omitempty"`
12739	// Etag - A unique read-only string that changes whenever the resource is updated.
12740	Etag *string `json:"etag,omitempty"`
12741	// ID - Resource ID.
12742	ID *string `json:"id,omitempty"`
12743}
12744
12745// MarshalJSON is the custom marshaler for LoadBalancingRule.
12746func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
12747	objectMap := make(map[string]interface{})
12748	if lbr.LoadBalancingRulePropertiesFormat != nil {
12749		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
12750	}
12751	if lbr.Name != nil {
12752		objectMap["name"] = lbr.Name
12753	}
12754	if lbr.Etag != nil {
12755		objectMap["etag"] = lbr.Etag
12756	}
12757	if lbr.ID != nil {
12758		objectMap["id"] = lbr.ID
12759	}
12760	return json.Marshal(objectMap)
12761}
12762
12763// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
12764func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
12765	var m map[string]*json.RawMessage
12766	err := json.Unmarshal(body, &m)
12767	if err != nil {
12768		return err
12769	}
12770	for k, v := range m {
12771		switch k {
12772		case "properties":
12773			if v != nil {
12774				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
12775				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
12776				if err != nil {
12777					return err
12778				}
12779				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
12780			}
12781		case "name":
12782			if v != nil {
12783				var name string
12784				err = json.Unmarshal(*v, &name)
12785				if err != nil {
12786					return err
12787				}
12788				lbr.Name = &name
12789			}
12790		case "etag":
12791			if v != nil {
12792				var etag string
12793				err = json.Unmarshal(*v, &etag)
12794				if err != nil {
12795					return err
12796				}
12797				lbr.Etag = &etag
12798			}
12799		case "id":
12800			if v != nil {
12801				var ID string
12802				err = json.Unmarshal(*v, &ID)
12803				if err != nil {
12804					return err
12805				}
12806				lbr.ID = &ID
12807			}
12808		}
12809	}
12810
12811	return nil
12812}
12813
12814// LoadBalancingRulePropertiesFormat properties of the load balancer.
12815type LoadBalancingRulePropertiesFormat struct {
12816	// FrontendIPConfiguration - A reference to frontend IP addresses.
12817	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12818	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
12819	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
12820	// Probe - The reference of the load balancer probe used by the load balancing rule.
12821	Probe *SubResource `json:"probe,omitempty"`
12822	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12823	Protocol TransportProtocol `json:"protocol,omitempty"`
12824	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
12825	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
12826	// 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"
12827	FrontendPort *int32 `json:"frontendPort,omitempty"`
12828	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
12829	BackendPort *int32 `json:"backendPort,omitempty"`
12830	// 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.
12831	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12832	// 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.
12833	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12834	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
12835	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12836	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
12837	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
12838	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12839	ProvisioningState *string `json:"provisioningState,omitempty"`
12840}
12841
12842// LocalNetworkGateway a common class for general resource information
12843type LocalNetworkGateway struct {
12844	autorest.Response `json:"-"`
12845	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
12846	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
12847	// Etag - A unique read-only string that changes whenever the resource is updated.
12848	Etag *string `json:"etag,omitempty"`
12849	// ID - Resource ID.
12850	ID *string `json:"id,omitempty"`
12851	// Name - READ-ONLY; Resource name.
12852	Name *string `json:"name,omitempty"`
12853	// Type - READ-ONLY; Resource type.
12854	Type *string `json:"type,omitempty"`
12855	// Location - Resource location.
12856	Location *string `json:"location,omitempty"`
12857	// Tags - Resource tags.
12858	Tags map[string]*string `json:"tags"`
12859}
12860
12861// MarshalJSON is the custom marshaler for LocalNetworkGateway.
12862func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
12863	objectMap := make(map[string]interface{})
12864	if lng.LocalNetworkGatewayPropertiesFormat != nil {
12865		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
12866	}
12867	if lng.Etag != nil {
12868		objectMap["etag"] = lng.Etag
12869	}
12870	if lng.ID != nil {
12871		objectMap["id"] = lng.ID
12872	}
12873	if lng.Location != nil {
12874		objectMap["location"] = lng.Location
12875	}
12876	if lng.Tags != nil {
12877		objectMap["tags"] = lng.Tags
12878	}
12879	return json.Marshal(objectMap)
12880}
12881
12882// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
12883func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
12884	var m map[string]*json.RawMessage
12885	err := json.Unmarshal(body, &m)
12886	if err != nil {
12887		return err
12888	}
12889	for k, v := range m {
12890		switch k {
12891		case "properties":
12892			if v != nil {
12893				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
12894				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
12895				if err != nil {
12896					return err
12897				}
12898				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
12899			}
12900		case "etag":
12901			if v != nil {
12902				var etag string
12903				err = json.Unmarshal(*v, &etag)
12904				if err != nil {
12905					return err
12906				}
12907				lng.Etag = &etag
12908			}
12909		case "id":
12910			if v != nil {
12911				var ID string
12912				err = json.Unmarshal(*v, &ID)
12913				if err != nil {
12914					return err
12915				}
12916				lng.ID = &ID
12917			}
12918		case "name":
12919			if v != nil {
12920				var name string
12921				err = json.Unmarshal(*v, &name)
12922				if err != nil {
12923					return err
12924				}
12925				lng.Name = &name
12926			}
12927		case "type":
12928			if v != nil {
12929				var typeVar string
12930				err = json.Unmarshal(*v, &typeVar)
12931				if err != nil {
12932					return err
12933				}
12934				lng.Type = &typeVar
12935			}
12936		case "location":
12937			if v != nil {
12938				var location string
12939				err = json.Unmarshal(*v, &location)
12940				if err != nil {
12941					return err
12942				}
12943				lng.Location = &location
12944			}
12945		case "tags":
12946			if v != nil {
12947				var tags map[string]*string
12948				err = json.Unmarshal(*v, &tags)
12949				if err != nil {
12950					return err
12951				}
12952				lng.Tags = tags
12953			}
12954		}
12955	}
12956
12957	return nil
12958}
12959
12960// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
12961type LocalNetworkGatewayListResult struct {
12962	autorest.Response `json:"-"`
12963	// Value - A list of local network gateways that exists in a resource group.
12964	Value *[]LocalNetworkGateway `json:"value,omitempty"`
12965	// NextLink - READ-ONLY; The URL to get the next set of results.
12966	NextLink *string `json:"nextLink,omitempty"`
12967}
12968
12969// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
12970// values.
12971type LocalNetworkGatewayListResultIterator struct {
12972	i    int
12973	page LocalNetworkGatewayListResultPage
12974}
12975
12976// NextWithContext advances to the next value.  If there was an error making
12977// the request the iterator does not advance and the error is returned.
12978func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
12979	if tracing.IsEnabled() {
12980		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
12981		defer func() {
12982			sc := -1
12983			if iter.Response().Response.Response != nil {
12984				sc = iter.Response().Response.Response.StatusCode
12985			}
12986			tracing.EndSpan(ctx, sc, err)
12987		}()
12988	}
12989	iter.i++
12990	if iter.i < len(iter.page.Values()) {
12991		return nil
12992	}
12993	err = iter.page.NextWithContext(ctx)
12994	if err != nil {
12995		iter.i--
12996		return err
12997	}
12998	iter.i = 0
12999	return nil
13000}
13001
13002// Next advances to the next value.  If there was an error making
13003// the request the iterator does not advance and the error is returned.
13004// Deprecated: Use NextWithContext() instead.
13005func (iter *LocalNetworkGatewayListResultIterator) Next() error {
13006	return iter.NextWithContext(context.Background())
13007}
13008
13009// NotDone returns true if the enumeration should be started or is not yet complete.
13010func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
13011	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13012}
13013
13014// Response returns the raw server response from the last page request.
13015func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
13016	return iter.page.Response()
13017}
13018
13019// Value returns the current value or a zero-initialized value if the
13020// iterator has advanced beyond the end of the collection.
13021func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
13022	if !iter.page.NotDone() {
13023		return LocalNetworkGateway{}
13024	}
13025	return iter.page.Values()[iter.i]
13026}
13027
13028// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
13029func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
13030	return LocalNetworkGatewayListResultIterator{page: page}
13031}
13032
13033// IsEmpty returns true if the ListResult contains no values.
13034func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
13035	return lnglr.Value == nil || len(*lnglr.Value) == 0
13036}
13037
13038// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
13039// It returns nil if no more results exist.
13040func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
13041	if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 {
13042		return nil, nil
13043	}
13044	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13045		autorest.AsJSON(),
13046		autorest.AsGet(),
13047		autorest.WithBaseURL(to.String(lnglr.NextLink)))
13048}
13049
13050// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
13051type LocalNetworkGatewayListResultPage struct {
13052	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
13053	lnglr LocalNetworkGatewayListResult
13054}
13055
13056// NextWithContext advances to the next page of values.  If there was an error making
13057// the request the page does not advance and the error is returned.
13058func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
13059	if tracing.IsEnabled() {
13060		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
13061		defer func() {
13062			sc := -1
13063			if page.Response().Response.Response != nil {
13064				sc = page.Response().Response.Response.StatusCode
13065			}
13066			tracing.EndSpan(ctx, sc, err)
13067		}()
13068	}
13069	next, err := page.fn(ctx, page.lnglr)
13070	if err != nil {
13071		return err
13072	}
13073	page.lnglr = next
13074	return nil
13075}
13076
13077// Next advances to the next page of values.  If there was an error making
13078// the request the page does not advance and the error is returned.
13079// Deprecated: Use NextWithContext() instead.
13080func (page *LocalNetworkGatewayListResultPage) Next() error {
13081	return page.NextWithContext(context.Background())
13082}
13083
13084// NotDone returns true if the page enumeration should be started or is not yet complete.
13085func (page LocalNetworkGatewayListResultPage) NotDone() bool {
13086	return !page.lnglr.IsEmpty()
13087}
13088
13089// Response returns the raw server response from the last page request.
13090func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
13091	return page.lnglr
13092}
13093
13094// Values returns the slice of values for the current page or nil if there are no values.
13095func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
13096	if page.lnglr.IsEmpty() {
13097		return nil
13098	}
13099	return *page.lnglr.Value
13100}
13101
13102// Creates a new instance of the LocalNetworkGatewayListResultPage type.
13103func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
13104	return LocalNetworkGatewayListResultPage{fn: getNextPage}
13105}
13106
13107// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
13108type LocalNetworkGatewayPropertiesFormat struct {
13109	// LocalNetworkAddressSpace - Local network site address space.
13110	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
13111	// GatewayIPAddress - IP address of local network gateway.
13112	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
13113	// BgpSettings - Local network gateway's BGP speaker settings.
13114	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
13115	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
13116	ResourceGUID *string `json:"resourceGuid,omitempty"`
13117	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13118	ProvisioningState *string `json:"provisioningState,omitempty"`
13119}
13120
13121// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13122// long-running operation.
13123type LocalNetworkGatewaysCreateOrUpdateFuture struct {
13124	azure.Future
13125}
13126
13127// Result returns the result of the asynchronous operation.
13128// If the operation has not completed it will return an error.
13129func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13130	var done bool
13131	done, err = future.DoneWithContext(context.Background(), client)
13132	if err != nil {
13133		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13134		return
13135	}
13136	if !done {
13137		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
13138		return
13139	}
13140	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13141	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13142		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
13143		if err != nil {
13144			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
13145		}
13146	}
13147	return
13148}
13149
13150// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
13151// long-running operation.
13152type LocalNetworkGatewaysDeleteFuture struct {
13153	azure.Future
13154}
13155
13156// Result returns the result of the asynchronous operation.
13157// If the operation has not completed it will return an error.
13158func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
13159	var done bool
13160	done, err = future.DoneWithContext(context.Background(), client)
13161	if err != nil {
13162		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
13163		return
13164	}
13165	if !done {
13166		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
13167		return
13168	}
13169	ar.Response = future.Response()
13170	return
13171}
13172
13173// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13174// long-running operation.
13175type LocalNetworkGatewaysUpdateTagsFuture struct {
13176	azure.Future
13177}
13178
13179// Result returns the result of the asynchronous operation.
13180// If the operation has not completed it will return an error.
13181func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13182	var done bool
13183	done, err = future.DoneWithContext(context.Background(), client)
13184	if err != nil {
13185		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13186		return
13187	}
13188	if !done {
13189		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
13190		return
13191	}
13192	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13193	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13194		lng, err = client.UpdateTagsResponder(lng.Response.Response)
13195		if err != nil {
13196			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
13197		}
13198	}
13199	return
13200}
13201
13202// LogSpecification description of logging specification.
13203type LogSpecification struct {
13204	// Name - The name of the specification.
13205	Name *string `json:"name,omitempty"`
13206	// DisplayName - The display name of the specification.
13207	DisplayName *string `json:"displayName,omitempty"`
13208	// BlobDuration - Duration of the blob.
13209	BlobDuration *string `json:"blobDuration,omitempty"`
13210}
13211
13212// MatchedRule matched rule.
13213type MatchedRule struct {
13214	// RuleName - Name of the matched network security rule.
13215	RuleName *string `json:"ruleName,omitempty"`
13216	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
13217	Action *string `json:"action,omitempty"`
13218}
13219
13220// MetricSpecification description of metrics specification.
13221type MetricSpecification struct {
13222	// Name - The name of the metric.
13223	Name *string `json:"name,omitempty"`
13224	// DisplayName - The display name of the metric.
13225	DisplayName *string `json:"displayName,omitempty"`
13226	// DisplayDescription - The description of the metric.
13227	DisplayDescription *string `json:"displayDescription,omitempty"`
13228	// Unit - Units the metric to be displayed in.
13229	Unit *string `json:"unit,omitempty"`
13230	// AggregationType - The aggregation type.
13231	AggregationType *string `json:"aggregationType,omitempty"`
13232	// Availabilities - List of availability.
13233	Availabilities *[]Availability `json:"availabilities,omitempty"`
13234	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
13235	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
13236	// FillGapWithZero - Whether gaps would be filled with zeros.
13237	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
13238	// MetricFilterPattern - Pattern for the filter of the metric.
13239	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
13240	// Dimensions - List of dimensions.
13241	Dimensions *[]Dimension `json:"dimensions,omitempty"`
13242	// IsInternal - Whether the metric is internal.
13243	IsInternal *bool `json:"isInternal,omitempty"`
13244	// SourceMdmAccount - The source MDM account.
13245	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
13246	// SourceMdmNamespace - The source MDM namespace.
13247	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
13248	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
13249	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
13250}
13251
13252// NextHopParameters parameters that define the source and destination endpoint.
13253type NextHopParameters struct {
13254	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
13255	TargetResourceID *string `json:"targetResourceId,omitempty"`
13256	// SourceIPAddress - The source IP address.
13257	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
13258	// DestinationIPAddress - The destination IP address.
13259	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
13260	// 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).
13261	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
13262}
13263
13264// NextHopResult the information about next hop from the specified VM.
13265type NextHopResult struct {
13266	autorest.Response `json:"-"`
13267	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
13268	NextHopType NextHopType `json:"nextHopType,omitempty"`
13269	// NextHopIPAddress - Next hop IP Address
13270	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
13271	// 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'.
13272	RouteTableID *string `json:"routeTableId,omitempty"`
13273}
13274
13275// Operation network REST API operation definition.
13276type Operation struct {
13277	// Name - Operation name: {provider}/{resource}/{operation}
13278	Name *string `json:"name,omitempty"`
13279	// Display - Display metadata associated with the operation.
13280	Display *OperationDisplay `json:"display,omitempty"`
13281	// Origin - Origin of the operation.
13282	Origin *string `json:"origin,omitempty"`
13283	// OperationPropertiesFormat - Operation properties format.
13284	*OperationPropertiesFormat `json:"properties,omitempty"`
13285}
13286
13287// MarshalJSON is the custom marshaler for Operation.
13288func (o Operation) MarshalJSON() ([]byte, error) {
13289	objectMap := make(map[string]interface{})
13290	if o.Name != nil {
13291		objectMap["name"] = o.Name
13292	}
13293	if o.Display != nil {
13294		objectMap["display"] = o.Display
13295	}
13296	if o.Origin != nil {
13297		objectMap["origin"] = o.Origin
13298	}
13299	if o.OperationPropertiesFormat != nil {
13300		objectMap["properties"] = o.OperationPropertiesFormat
13301	}
13302	return json.Marshal(objectMap)
13303}
13304
13305// UnmarshalJSON is the custom unmarshaler for Operation struct.
13306func (o *Operation) UnmarshalJSON(body []byte) error {
13307	var m map[string]*json.RawMessage
13308	err := json.Unmarshal(body, &m)
13309	if err != nil {
13310		return err
13311	}
13312	for k, v := range m {
13313		switch k {
13314		case "name":
13315			if v != nil {
13316				var name string
13317				err = json.Unmarshal(*v, &name)
13318				if err != nil {
13319					return err
13320				}
13321				o.Name = &name
13322			}
13323		case "display":
13324			if v != nil {
13325				var display OperationDisplay
13326				err = json.Unmarshal(*v, &display)
13327				if err != nil {
13328					return err
13329				}
13330				o.Display = &display
13331			}
13332		case "origin":
13333			if v != nil {
13334				var origin string
13335				err = json.Unmarshal(*v, &origin)
13336				if err != nil {
13337					return err
13338				}
13339				o.Origin = &origin
13340			}
13341		case "properties":
13342			if v != nil {
13343				var operationPropertiesFormat OperationPropertiesFormat
13344				err = json.Unmarshal(*v, &operationPropertiesFormat)
13345				if err != nil {
13346					return err
13347				}
13348				o.OperationPropertiesFormat = &operationPropertiesFormat
13349			}
13350		}
13351	}
13352
13353	return nil
13354}
13355
13356// OperationDisplay display metadata associated with the operation.
13357type OperationDisplay struct {
13358	// Provider - Service provider: Microsoft Network.
13359	Provider *string `json:"provider,omitempty"`
13360	// Resource - Resource on which the operation is performed.
13361	Resource *string `json:"resource,omitempty"`
13362	// Operation - Type of the operation: get, read, delete, etc.
13363	Operation *string `json:"operation,omitempty"`
13364	// Description - Description of the operation.
13365	Description *string `json:"description,omitempty"`
13366}
13367
13368// OperationListResult result of the request to list Network operations. It contains a list of operations
13369// and a URL link to get the next set of results.
13370type OperationListResult struct {
13371	autorest.Response `json:"-"`
13372	// Value - List of Network operations supported by the Network resource provider.
13373	Value *[]Operation `json:"value,omitempty"`
13374	// NextLink - URL to get the next set of operation list results if there are any.
13375	NextLink *string `json:"nextLink,omitempty"`
13376}
13377
13378// OperationListResultIterator provides access to a complete listing of Operation values.
13379type OperationListResultIterator struct {
13380	i    int
13381	page OperationListResultPage
13382}
13383
13384// NextWithContext advances to the next value.  If there was an error making
13385// the request the iterator does not advance and the error is returned.
13386func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13387	if tracing.IsEnabled() {
13388		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
13389		defer func() {
13390			sc := -1
13391			if iter.Response().Response.Response != nil {
13392				sc = iter.Response().Response.Response.StatusCode
13393			}
13394			tracing.EndSpan(ctx, sc, err)
13395		}()
13396	}
13397	iter.i++
13398	if iter.i < len(iter.page.Values()) {
13399		return nil
13400	}
13401	err = iter.page.NextWithContext(ctx)
13402	if err != nil {
13403		iter.i--
13404		return err
13405	}
13406	iter.i = 0
13407	return nil
13408}
13409
13410// Next advances to the next value.  If there was an error making
13411// the request the iterator does not advance and the error is returned.
13412// Deprecated: Use NextWithContext() instead.
13413func (iter *OperationListResultIterator) Next() error {
13414	return iter.NextWithContext(context.Background())
13415}
13416
13417// NotDone returns true if the enumeration should be started or is not yet complete.
13418func (iter OperationListResultIterator) NotDone() bool {
13419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13420}
13421
13422// Response returns the raw server response from the last page request.
13423func (iter OperationListResultIterator) Response() OperationListResult {
13424	return iter.page.Response()
13425}
13426
13427// Value returns the current value or a zero-initialized value if the
13428// iterator has advanced beyond the end of the collection.
13429func (iter OperationListResultIterator) Value() Operation {
13430	if !iter.page.NotDone() {
13431		return Operation{}
13432	}
13433	return iter.page.Values()[iter.i]
13434}
13435
13436// Creates a new instance of the OperationListResultIterator type.
13437func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
13438	return OperationListResultIterator{page: page}
13439}
13440
13441// IsEmpty returns true if the ListResult contains no values.
13442func (olr OperationListResult) IsEmpty() bool {
13443	return olr.Value == nil || len(*olr.Value) == 0
13444}
13445
13446// operationListResultPreparer prepares a request to retrieve the next set of results.
13447// It returns nil if no more results exist.
13448func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
13449	if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
13450		return nil, nil
13451	}
13452	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13453		autorest.AsJSON(),
13454		autorest.AsGet(),
13455		autorest.WithBaseURL(to.String(olr.NextLink)))
13456}
13457
13458// OperationListResultPage contains a page of Operation values.
13459type OperationListResultPage struct {
13460	fn  func(context.Context, OperationListResult) (OperationListResult, error)
13461	olr OperationListResult
13462}
13463
13464// NextWithContext advances to the next page of values.  If there was an error making
13465// the request the page does not advance and the error is returned.
13466func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
13467	if tracing.IsEnabled() {
13468		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
13469		defer func() {
13470			sc := -1
13471			if page.Response().Response.Response != nil {
13472				sc = page.Response().Response.Response.StatusCode
13473			}
13474			tracing.EndSpan(ctx, sc, err)
13475		}()
13476	}
13477	next, err := page.fn(ctx, page.olr)
13478	if err != nil {
13479		return err
13480	}
13481	page.olr = next
13482	return nil
13483}
13484
13485// Next advances to the next page of values.  If there was an error making
13486// the request the page does not advance and the error is returned.
13487// Deprecated: Use NextWithContext() instead.
13488func (page *OperationListResultPage) Next() error {
13489	return page.NextWithContext(context.Background())
13490}
13491
13492// NotDone returns true if the page enumeration should be started or is not yet complete.
13493func (page OperationListResultPage) NotDone() bool {
13494	return !page.olr.IsEmpty()
13495}
13496
13497// Response returns the raw server response from the last page request.
13498func (page OperationListResultPage) Response() OperationListResult {
13499	return page.olr
13500}
13501
13502// Values returns the slice of values for the current page or nil if there are no values.
13503func (page OperationListResultPage) Values() []Operation {
13504	if page.olr.IsEmpty() {
13505		return nil
13506	}
13507	return *page.olr.Value
13508}
13509
13510// Creates a new instance of the OperationListResultPage type.
13511func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
13512	return OperationListResultPage{fn: getNextPage}
13513}
13514
13515// OperationPropertiesFormat description of operation properties format.
13516type OperationPropertiesFormat struct {
13517	// ServiceSpecification - Specification of the service.
13518	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
13519}
13520
13521// OperationPropertiesFormatServiceSpecification specification of the service.
13522type OperationPropertiesFormatServiceSpecification struct {
13523	// MetricSpecifications - Operation service specification.
13524	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
13525	// LogSpecifications - Operation log specification.
13526	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
13527}
13528
13529// OutboundRule outbound rule of the load balancer.
13530type OutboundRule struct {
13531	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
13532	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
13533	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13534	Name *string `json:"name,omitempty"`
13535	// Etag - A unique read-only string that changes whenever the resource is updated.
13536	Etag *string `json:"etag,omitempty"`
13537	// ID - Resource ID.
13538	ID *string `json:"id,omitempty"`
13539}
13540
13541// MarshalJSON is the custom marshaler for OutboundRule.
13542func (or OutboundRule) MarshalJSON() ([]byte, error) {
13543	objectMap := make(map[string]interface{})
13544	if or.OutboundRulePropertiesFormat != nil {
13545		objectMap["properties"] = or.OutboundRulePropertiesFormat
13546	}
13547	if or.Name != nil {
13548		objectMap["name"] = or.Name
13549	}
13550	if or.Etag != nil {
13551		objectMap["etag"] = or.Etag
13552	}
13553	if or.ID != nil {
13554		objectMap["id"] = or.ID
13555	}
13556	return json.Marshal(objectMap)
13557}
13558
13559// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
13560func (or *OutboundRule) UnmarshalJSON(body []byte) error {
13561	var m map[string]*json.RawMessage
13562	err := json.Unmarshal(body, &m)
13563	if err != nil {
13564		return err
13565	}
13566	for k, v := range m {
13567		switch k {
13568		case "properties":
13569			if v != nil {
13570				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
13571				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
13572				if err != nil {
13573					return err
13574				}
13575				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
13576			}
13577		case "name":
13578			if v != nil {
13579				var name string
13580				err = json.Unmarshal(*v, &name)
13581				if err != nil {
13582					return err
13583				}
13584				or.Name = &name
13585			}
13586		case "etag":
13587			if v != nil {
13588				var etag string
13589				err = json.Unmarshal(*v, &etag)
13590				if err != nil {
13591					return err
13592				}
13593				or.Etag = &etag
13594			}
13595		case "id":
13596			if v != nil {
13597				var ID string
13598				err = json.Unmarshal(*v, &ID)
13599				if err != nil {
13600					return err
13601				}
13602				or.ID = &ID
13603			}
13604		}
13605	}
13606
13607	return nil
13608}
13609
13610// OutboundRulePropertiesFormat outbound rule of the load balancer.
13611type OutboundRulePropertiesFormat struct {
13612	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
13613	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
13614	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
13615	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
13616	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
13617	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
13618	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13619	ProvisioningState *string `json:"provisioningState,omitempty"`
13620	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
13621	Protocol Protocol1 `json:"protocol,omitempty"`
13622	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
13623	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
13624	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
13625	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
13626}
13627
13628// PacketCapture parameters that define the create packet capture operation.
13629type PacketCapture struct {
13630	*PacketCaptureParameters `json:"properties,omitempty"`
13631}
13632
13633// MarshalJSON is the custom marshaler for PacketCapture.
13634func (pc PacketCapture) MarshalJSON() ([]byte, error) {
13635	objectMap := make(map[string]interface{})
13636	if pc.PacketCaptureParameters != nil {
13637		objectMap["properties"] = pc.PacketCaptureParameters
13638	}
13639	return json.Marshal(objectMap)
13640}
13641
13642// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
13643func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
13644	var m map[string]*json.RawMessage
13645	err := json.Unmarshal(body, &m)
13646	if err != nil {
13647		return err
13648	}
13649	for k, v := range m {
13650		switch k {
13651		case "properties":
13652			if v != nil {
13653				var packetCaptureParameters PacketCaptureParameters
13654				err = json.Unmarshal(*v, &packetCaptureParameters)
13655				if err != nil {
13656					return err
13657				}
13658				pc.PacketCaptureParameters = &packetCaptureParameters
13659			}
13660		}
13661	}
13662
13663	return nil
13664}
13665
13666// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
13667type PacketCaptureFilter struct {
13668	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
13669	Protocol PcProtocol `json:"protocol,omitempty"`
13670	// 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.
13671	LocalIPAddress *string `json:"localIPAddress,omitempty"`
13672	// 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.
13673	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
13674	// 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.
13675	LocalPort *string `json:"localPort,omitempty"`
13676	// 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.
13677	RemotePort *string `json:"remotePort,omitempty"`
13678}
13679
13680// PacketCaptureListResult list of packet capture sessions.
13681type PacketCaptureListResult struct {
13682	autorest.Response `json:"-"`
13683	// Value - Information about packet capture sessions.
13684	Value *[]PacketCaptureResult `json:"value,omitempty"`
13685}
13686
13687// PacketCaptureParameters parameters that define the create packet capture operation.
13688type PacketCaptureParameters struct {
13689	// Target - The ID of the targeted resource, only VM is currently supported.
13690	Target *string `json:"target,omitempty"`
13691	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13692	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13693	// TotalBytesPerSession - Maximum size of the capture output.
13694	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13695	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13696	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13697	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13698	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13699}
13700
13701// PacketCaptureQueryStatusResult status of packet capture session.
13702type PacketCaptureQueryStatusResult struct {
13703	autorest.Response `json:"-"`
13704	// Name - The name of the packet capture resource.
13705	Name *string `json:"name,omitempty"`
13706	// ID - The ID of the packet capture resource.
13707	ID *string `json:"id,omitempty"`
13708	// CaptureStartTime - The start time of the packet capture session.
13709	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
13710	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
13711	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
13712	// StopReason - The reason the current packet capture session was stopped.
13713	StopReason *string `json:"stopReason,omitempty"`
13714	// PacketCaptureError - List of errors of packet capture session.
13715	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
13716}
13717
13718// PacketCaptureResult information about packet capture session.
13719type PacketCaptureResult struct {
13720	autorest.Response `json:"-"`
13721	// Name - READ-ONLY; Name of the packet capture session.
13722	Name *string `json:"name,omitempty"`
13723	// ID - READ-ONLY; ID of the packet capture operation.
13724	ID                             *string `json:"id,omitempty"`
13725	Etag                           *string `json:"etag,omitempty"`
13726	*PacketCaptureResultProperties `json:"properties,omitempty"`
13727}
13728
13729// MarshalJSON is the custom marshaler for PacketCaptureResult.
13730func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
13731	objectMap := make(map[string]interface{})
13732	if pcr.Etag != nil {
13733		objectMap["etag"] = pcr.Etag
13734	}
13735	if pcr.PacketCaptureResultProperties != nil {
13736		objectMap["properties"] = pcr.PacketCaptureResultProperties
13737	}
13738	return json.Marshal(objectMap)
13739}
13740
13741// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
13742func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
13743	var m map[string]*json.RawMessage
13744	err := json.Unmarshal(body, &m)
13745	if err != nil {
13746		return err
13747	}
13748	for k, v := range m {
13749		switch k {
13750		case "name":
13751			if v != nil {
13752				var name string
13753				err = json.Unmarshal(*v, &name)
13754				if err != nil {
13755					return err
13756				}
13757				pcr.Name = &name
13758			}
13759		case "id":
13760			if v != nil {
13761				var ID string
13762				err = json.Unmarshal(*v, &ID)
13763				if err != nil {
13764					return err
13765				}
13766				pcr.ID = &ID
13767			}
13768		case "etag":
13769			if v != nil {
13770				var etag string
13771				err = json.Unmarshal(*v, &etag)
13772				if err != nil {
13773					return err
13774				}
13775				pcr.Etag = &etag
13776			}
13777		case "properties":
13778			if v != nil {
13779				var packetCaptureResultProperties PacketCaptureResultProperties
13780				err = json.Unmarshal(*v, &packetCaptureResultProperties)
13781				if err != nil {
13782					return err
13783				}
13784				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
13785			}
13786		}
13787	}
13788
13789	return nil
13790}
13791
13792// PacketCaptureResultProperties describes the properties of a packet capture session.
13793type PacketCaptureResultProperties struct {
13794	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13795	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13796	// Target - The ID of the targeted resource, only VM is currently supported.
13797	Target *string `json:"target,omitempty"`
13798	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13799	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13800	// TotalBytesPerSession - Maximum size of the capture output.
13801	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13802	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13803	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13804	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13805	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13806}
13807
13808// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
13809// operation.
13810type PacketCapturesCreateFuture struct {
13811	azure.Future
13812}
13813
13814// Result returns the result of the asynchronous operation.
13815// If the operation has not completed it will return an error.
13816func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
13817	var done bool
13818	done, err = future.DoneWithContext(context.Background(), client)
13819	if err != nil {
13820		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
13821		return
13822	}
13823	if !done {
13824		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
13825		return
13826	}
13827	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13828	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
13829		pcr, err = client.CreateResponder(pcr.Response.Response)
13830		if err != nil {
13831			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
13832		}
13833	}
13834	return
13835}
13836
13837// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13838// operation.
13839type PacketCapturesDeleteFuture struct {
13840	azure.Future
13841}
13842
13843// Result returns the result of the asynchronous operation.
13844// If the operation has not completed it will return an error.
13845func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
13846	var done bool
13847	done, err = future.DoneWithContext(context.Background(), client)
13848	if err != nil {
13849		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
13850		return
13851	}
13852	if !done {
13853		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
13854		return
13855	}
13856	ar.Response = future.Response()
13857	return
13858}
13859
13860// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
13861// operation.
13862type PacketCapturesGetStatusFuture struct {
13863	azure.Future
13864}
13865
13866// Result returns the result of the asynchronous operation.
13867// If the operation has not completed it will return an error.
13868func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
13869	var done bool
13870	done, err = future.DoneWithContext(context.Background(), client)
13871	if err != nil {
13872		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
13873		return
13874	}
13875	if !done {
13876		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
13877		return
13878	}
13879	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13880	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
13881		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
13882		if err != nil {
13883			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
13884		}
13885	}
13886	return
13887}
13888
13889// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
13890// operation.
13891type PacketCapturesStopFuture struct {
13892	azure.Future
13893}
13894
13895// Result returns the result of the asynchronous operation.
13896// If the operation has not completed it will return an error.
13897func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) {
13898	var done bool
13899	done, err = future.DoneWithContext(context.Background(), client)
13900	if err != nil {
13901		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
13902		return
13903	}
13904	if !done {
13905		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
13906		return
13907	}
13908	ar.Response = future.Response()
13909	return
13910}
13911
13912// PacketCaptureStorageLocation describes the storage location for a packet capture session.
13913type PacketCaptureStorageLocation struct {
13914	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
13915	StorageID *string `json:"storageId,omitempty"`
13916	// 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.
13917	StoragePath *string `json:"storagePath,omitempty"`
13918	// 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.
13919	FilePath *string `json:"filePath,omitempty"`
13920}
13921
13922// PatchRouteFilter route Filter Resource.
13923type PatchRouteFilter struct {
13924	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
13925	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
13926	Name *string `json:"name,omitempty"`
13927	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13928	Etag *string `json:"etag,omitempty"`
13929	// Type - READ-ONLY; Resource type.
13930	Type *string `json:"type,omitempty"`
13931	// Tags - Resource tags.
13932	Tags map[string]*string `json:"tags"`
13933	// ID - Resource ID.
13934	ID *string `json:"id,omitempty"`
13935}
13936
13937// MarshalJSON is the custom marshaler for PatchRouteFilter.
13938func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
13939	objectMap := make(map[string]interface{})
13940	if prf.RouteFilterPropertiesFormat != nil {
13941		objectMap["properties"] = prf.RouteFilterPropertiesFormat
13942	}
13943	if prf.Tags != nil {
13944		objectMap["tags"] = prf.Tags
13945	}
13946	if prf.ID != nil {
13947		objectMap["id"] = prf.ID
13948	}
13949	return json.Marshal(objectMap)
13950}
13951
13952// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
13953func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
13954	var m map[string]*json.RawMessage
13955	err := json.Unmarshal(body, &m)
13956	if err != nil {
13957		return err
13958	}
13959	for k, v := range m {
13960		switch k {
13961		case "properties":
13962			if v != nil {
13963				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
13964				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
13965				if err != nil {
13966					return err
13967				}
13968				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
13969			}
13970		case "name":
13971			if v != nil {
13972				var name string
13973				err = json.Unmarshal(*v, &name)
13974				if err != nil {
13975					return err
13976				}
13977				prf.Name = &name
13978			}
13979		case "etag":
13980			if v != nil {
13981				var etag string
13982				err = json.Unmarshal(*v, &etag)
13983				if err != nil {
13984					return err
13985				}
13986				prf.Etag = &etag
13987			}
13988		case "type":
13989			if v != nil {
13990				var typeVar string
13991				err = json.Unmarshal(*v, &typeVar)
13992				if err != nil {
13993					return err
13994				}
13995				prf.Type = &typeVar
13996			}
13997		case "tags":
13998			if v != nil {
13999				var tags map[string]*string
14000				err = json.Unmarshal(*v, &tags)
14001				if err != nil {
14002					return err
14003				}
14004				prf.Tags = tags
14005			}
14006		case "id":
14007			if v != nil {
14008				var ID string
14009				err = json.Unmarshal(*v, &ID)
14010				if err != nil {
14011					return err
14012				}
14013				prf.ID = &ID
14014			}
14015		}
14016	}
14017
14018	return nil
14019}
14020
14021// PatchRouteFilterRule route Filter Rule Resource
14022type PatchRouteFilterRule struct {
14023	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
14024	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
14025	Name *string `json:"name,omitempty"`
14026	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14027	Etag *string `json:"etag,omitempty"`
14028	// ID - Resource ID.
14029	ID *string `json:"id,omitempty"`
14030}
14031
14032// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
14033func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
14034	objectMap := make(map[string]interface{})
14035	if prfr.RouteFilterRulePropertiesFormat != nil {
14036		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
14037	}
14038	if prfr.ID != nil {
14039		objectMap["id"] = prfr.ID
14040	}
14041	return json.Marshal(objectMap)
14042}
14043
14044// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
14045func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
14046	var m map[string]*json.RawMessage
14047	err := json.Unmarshal(body, &m)
14048	if err != nil {
14049		return err
14050	}
14051	for k, v := range m {
14052		switch k {
14053		case "properties":
14054			if v != nil {
14055				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
14056				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
14057				if err != nil {
14058					return err
14059				}
14060				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
14061			}
14062		case "name":
14063			if v != nil {
14064				var name string
14065				err = json.Unmarshal(*v, &name)
14066				if err != nil {
14067					return err
14068				}
14069				prfr.Name = &name
14070			}
14071		case "etag":
14072			if v != nil {
14073				var etag string
14074				err = json.Unmarshal(*v, &etag)
14075				if err != nil {
14076					return err
14077				}
14078				prfr.Etag = &etag
14079			}
14080		case "id":
14081			if v != nil {
14082				var ID string
14083				err = json.Unmarshal(*v, &ID)
14084				if err != nil {
14085					return err
14086				}
14087				prfr.ID = &ID
14088			}
14089		}
14090	}
14091
14092	return nil
14093}
14094
14095// Policies policies for vpn gateway.
14096type Policies struct {
14097	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
14098	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
14099	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
14100	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
14101}
14102
14103// Probe a load balancer probe.
14104type Probe struct {
14105	autorest.Response `json:"-"`
14106	// ProbePropertiesFormat - Properties of load balancer probe.
14107	*ProbePropertiesFormat `json:"properties,omitempty"`
14108	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
14109	Name *string `json:"name,omitempty"`
14110	// Etag - A unique read-only string that changes whenever the resource is updated.
14111	Etag *string `json:"etag,omitempty"`
14112	// ID - Resource ID.
14113	ID *string `json:"id,omitempty"`
14114}
14115
14116// MarshalJSON is the custom marshaler for Probe.
14117func (p Probe) MarshalJSON() ([]byte, error) {
14118	objectMap := make(map[string]interface{})
14119	if p.ProbePropertiesFormat != nil {
14120		objectMap["properties"] = p.ProbePropertiesFormat
14121	}
14122	if p.Name != nil {
14123		objectMap["name"] = p.Name
14124	}
14125	if p.Etag != nil {
14126		objectMap["etag"] = p.Etag
14127	}
14128	if p.ID != nil {
14129		objectMap["id"] = p.ID
14130	}
14131	return json.Marshal(objectMap)
14132}
14133
14134// UnmarshalJSON is the custom unmarshaler for Probe struct.
14135func (p *Probe) UnmarshalJSON(body []byte) error {
14136	var m map[string]*json.RawMessage
14137	err := json.Unmarshal(body, &m)
14138	if err != nil {
14139		return err
14140	}
14141	for k, v := range m {
14142		switch k {
14143		case "properties":
14144			if v != nil {
14145				var probePropertiesFormat ProbePropertiesFormat
14146				err = json.Unmarshal(*v, &probePropertiesFormat)
14147				if err != nil {
14148					return err
14149				}
14150				p.ProbePropertiesFormat = &probePropertiesFormat
14151			}
14152		case "name":
14153			if v != nil {
14154				var name string
14155				err = json.Unmarshal(*v, &name)
14156				if err != nil {
14157					return err
14158				}
14159				p.Name = &name
14160			}
14161		case "etag":
14162			if v != nil {
14163				var etag string
14164				err = json.Unmarshal(*v, &etag)
14165				if err != nil {
14166					return err
14167				}
14168				p.Etag = &etag
14169			}
14170		case "id":
14171			if v != nil {
14172				var ID string
14173				err = json.Unmarshal(*v, &ID)
14174				if err != nil {
14175					return err
14176				}
14177				p.ID = &ID
14178			}
14179		}
14180	}
14181
14182	return nil
14183}
14184
14185// ProbePropertiesFormat load balancer probe resource.
14186type ProbePropertiesFormat struct {
14187	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
14188	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14189	// 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'
14190	Protocol ProbeProtocol `json:"protocol,omitempty"`
14191	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
14192	Port *int32 `json:"port,omitempty"`
14193	// 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.
14194	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
14195	// 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.
14196	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
14197	// 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.
14198	RequestPath *string `json:"requestPath,omitempty"`
14199	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14200	ProvisioningState *string `json:"provisioningState,omitempty"`
14201}
14202
14203// ProtocolConfiguration configuration of the protocol.
14204type ProtocolConfiguration struct {
14205	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
14206}
14207
14208// PublicIPAddress public IP address resource.
14209type PublicIPAddress struct {
14210	autorest.Response `json:"-"`
14211	// Sku - The public IP address SKU.
14212	Sku *PublicIPAddressSku `json:"sku,omitempty"`
14213	// PublicIPAddressPropertiesFormat - Public IP address properties.
14214	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
14215	// Etag - A unique read-only string that changes whenever the resource is updated.
14216	Etag *string `json:"etag,omitempty"`
14217	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14218	Zones *[]string `json:"zones,omitempty"`
14219	// ID - Resource ID.
14220	ID *string `json:"id,omitempty"`
14221	// Name - READ-ONLY; Resource name.
14222	Name *string `json:"name,omitempty"`
14223	// Type - READ-ONLY; Resource type.
14224	Type *string `json:"type,omitempty"`
14225	// Location - Resource location.
14226	Location *string `json:"location,omitempty"`
14227	// Tags - Resource tags.
14228	Tags map[string]*string `json:"tags"`
14229}
14230
14231// MarshalJSON is the custom marshaler for PublicIPAddress.
14232func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
14233	objectMap := make(map[string]interface{})
14234	if pia.Sku != nil {
14235		objectMap["sku"] = pia.Sku
14236	}
14237	if pia.PublicIPAddressPropertiesFormat != nil {
14238		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
14239	}
14240	if pia.Etag != nil {
14241		objectMap["etag"] = pia.Etag
14242	}
14243	if pia.Zones != nil {
14244		objectMap["zones"] = pia.Zones
14245	}
14246	if pia.ID != nil {
14247		objectMap["id"] = pia.ID
14248	}
14249	if pia.Location != nil {
14250		objectMap["location"] = pia.Location
14251	}
14252	if pia.Tags != nil {
14253		objectMap["tags"] = pia.Tags
14254	}
14255	return json.Marshal(objectMap)
14256}
14257
14258// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
14259func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
14260	var m map[string]*json.RawMessage
14261	err := json.Unmarshal(body, &m)
14262	if err != nil {
14263		return err
14264	}
14265	for k, v := range m {
14266		switch k {
14267		case "sku":
14268			if v != nil {
14269				var sku PublicIPAddressSku
14270				err = json.Unmarshal(*v, &sku)
14271				if err != nil {
14272					return err
14273				}
14274				pia.Sku = &sku
14275			}
14276		case "properties":
14277			if v != nil {
14278				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
14279				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
14280				if err != nil {
14281					return err
14282				}
14283				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
14284			}
14285		case "etag":
14286			if v != nil {
14287				var etag string
14288				err = json.Unmarshal(*v, &etag)
14289				if err != nil {
14290					return err
14291				}
14292				pia.Etag = &etag
14293			}
14294		case "zones":
14295			if v != nil {
14296				var zones []string
14297				err = json.Unmarshal(*v, &zones)
14298				if err != nil {
14299					return err
14300				}
14301				pia.Zones = &zones
14302			}
14303		case "id":
14304			if v != nil {
14305				var ID string
14306				err = json.Unmarshal(*v, &ID)
14307				if err != nil {
14308					return err
14309				}
14310				pia.ID = &ID
14311			}
14312		case "name":
14313			if v != nil {
14314				var name string
14315				err = json.Unmarshal(*v, &name)
14316				if err != nil {
14317					return err
14318				}
14319				pia.Name = &name
14320			}
14321		case "type":
14322			if v != nil {
14323				var typeVar string
14324				err = json.Unmarshal(*v, &typeVar)
14325				if err != nil {
14326					return err
14327				}
14328				pia.Type = &typeVar
14329			}
14330		case "location":
14331			if v != nil {
14332				var location string
14333				err = json.Unmarshal(*v, &location)
14334				if err != nil {
14335					return err
14336				}
14337				pia.Location = &location
14338			}
14339		case "tags":
14340			if v != nil {
14341				var tags map[string]*string
14342				err = json.Unmarshal(*v, &tags)
14343				if err != nil {
14344					return err
14345				}
14346				pia.Tags = tags
14347			}
14348		}
14349	}
14350
14351	return nil
14352}
14353
14354// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
14355type PublicIPAddressDNSSettings struct {
14356	// 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.
14357	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14358	// 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.
14359	Fqdn *string `json:"fqdn,omitempty"`
14360	// 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.
14361	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
14362}
14363
14364// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14365// long-running operation.
14366type PublicIPAddressesCreateOrUpdateFuture struct {
14367	azure.Future
14368}
14369
14370// Result returns the result of the asynchronous operation.
14371// If the operation has not completed it will return an error.
14372func (future *PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14373	var done bool
14374	done, err = future.DoneWithContext(context.Background(), client)
14375	if err != nil {
14376		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14377		return
14378	}
14379	if !done {
14380		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
14381		return
14382	}
14383	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14384	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14385		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
14386		if err != nil {
14387			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
14388		}
14389	}
14390	return
14391}
14392
14393// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14394// operation.
14395type PublicIPAddressesDeleteFuture struct {
14396	azure.Future
14397}
14398
14399// Result returns the result of the asynchronous operation.
14400// If the operation has not completed it will return an error.
14401func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
14402	var done bool
14403	done, err = future.DoneWithContext(context.Background(), client)
14404	if err != nil {
14405		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
14406		return
14407	}
14408	if !done {
14409		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
14410		return
14411	}
14412	ar.Response = future.Response()
14413	return
14414}
14415
14416// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14417// long-running operation.
14418type PublicIPAddressesUpdateTagsFuture struct {
14419	azure.Future
14420}
14421
14422// Result returns the result of the asynchronous operation.
14423// If the operation has not completed it will return an error.
14424func (future *PublicIPAddressesUpdateTagsFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14425	var done bool
14426	done, err = future.DoneWithContext(context.Background(), client)
14427	if err != nil {
14428		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14429		return
14430	}
14431	if !done {
14432		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
14433		return
14434	}
14435	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14436	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14437		pia, err = client.UpdateTagsResponder(pia.Response.Response)
14438		if err != nil {
14439			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
14440		}
14441	}
14442	return
14443}
14444
14445// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
14446type PublicIPAddressListResult struct {
14447	autorest.Response `json:"-"`
14448	// Value - A list of public IP addresses that exists in a resource group.
14449	Value *[]PublicIPAddress `json:"value,omitempty"`
14450	// NextLink - The URL to get the next set of results.
14451	NextLink *string `json:"nextLink,omitempty"`
14452}
14453
14454// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
14455type PublicIPAddressListResultIterator struct {
14456	i    int
14457	page PublicIPAddressListResultPage
14458}
14459
14460// NextWithContext advances to the next value.  If there was an error making
14461// the request the iterator does not advance and the error is returned.
14462func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
14463	if tracing.IsEnabled() {
14464		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
14465		defer func() {
14466			sc := -1
14467			if iter.Response().Response.Response != nil {
14468				sc = iter.Response().Response.Response.StatusCode
14469			}
14470			tracing.EndSpan(ctx, sc, err)
14471		}()
14472	}
14473	iter.i++
14474	if iter.i < len(iter.page.Values()) {
14475		return nil
14476	}
14477	err = iter.page.NextWithContext(ctx)
14478	if err != nil {
14479		iter.i--
14480		return err
14481	}
14482	iter.i = 0
14483	return nil
14484}
14485
14486// Next advances to the next value.  If there was an error making
14487// the request the iterator does not advance and the error is returned.
14488// Deprecated: Use NextWithContext() instead.
14489func (iter *PublicIPAddressListResultIterator) Next() error {
14490	return iter.NextWithContext(context.Background())
14491}
14492
14493// NotDone returns true if the enumeration should be started or is not yet complete.
14494func (iter PublicIPAddressListResultIterator) NotDone() bool {
14495	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14496}
14497
14498// Response returns the raw server response from the last page request.
14499func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
14500	return iter.page.Response()
14501}
14502
14503// Value returns the current value or a zero-initialized value if the
14504// iterator has advanced beyond the end of the collection.
14505func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
14506	if !iter.page.NotDone() {
14507		return PublicIPAddress{}
14508	}
14509	return iter.page.Values()[iter.i]
14510}
14511
14512// Creates a new instance of the PublicIPAddressListResultIterator type.
14513func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
14514	return PublicIPAddressListResultIterator{page: page}
14515}
14516
14517// IsEmpty returns true if the ListResult contains no values.
14518func (pialr PublicIPAddressListResult) IsEmpty() bool {
14519	return pialr.Value == nil || len(*pialr.Value) == 0
14520}
14521
14522// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
14523// It returns nil if no more results exist.
14524func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
14525	if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 {
14526		return nil, nil
14527	}
14528	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14529		autorest.AsJSON(),
14530		autorest.AsGet(),
14531		autorest.WithBaseURL(to.String(pialr.NextLink)))
14532}
14533
14534// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
14535type PublicIPAddressListResultPage struct {
14536	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
14537	pialr PublicIPAddressListResult
14538}
14539
14540// NextWithContext advances to the next page of values.  If there was an error making
14541// the request the page does not advance and the error is returned.
14542func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
14543	if tracing.IsEnabled() {
14544		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
14545		defer func() {
14546			sc := -1
14547			if page.Response().Response.Response != nil {
14548				sc = page.Response().Response.Response.StatusCode
14549			}
14550			tracing.EndSpan(ctx, sc, err)
14551		}()
14552	}
14553	next, err := page.fn(ctx, page.pialr)
14554	if err != nil {
14555		return err
14556	}
14557	page.pialr = next
14558	return nil
14559}
14560
14561// Next advances to the next page of values.  If there was an error making
14562// the request the page does not advance and the error is returned.
14563// Deprecated: Use NextWithContext() instead.
14564func (page *PublicIPAddressListResultPage) Next() error {
14565	return page.NextWithContext(context.Background())
14566}
14567
14568// NotDone returns true if the page enumeration should be started or is not yet complete.
14569func (page PublicIPAddressListResultPage) NotDone() bool {
14570	return !page.pialr.IsEmpty()
14571}
14572
14573// Response returns the raw server response from the last page request.
14574func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
14575	return page.pialr
14576}
14577
14578// Values returns the slice of values for the current page or nil if there are no values.
14579func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
14580	if page.pialr.IsEmpty() {
14581		return nil
14582	}
14583	return *page.pialr.Value
14584}
14585
14586// Creates a new instance of the PublicIPAddressListResultPage type.
14587func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
14588	return PublicIPAddressListResultPage{fn: getNextPage}
14589}
14590
14591// PublicIPAddressPropertiesFormat public IP address properties.
14592type PublicIPAddressPropertiesFormat struct {
14593	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14594	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
14595	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14596	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14597	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
14598	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
14599	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
14600	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
14601	// IPTags - The list of tags associated with the public IP address.
14602	IPTags *[]IPTag `json:"ipTags,omitempty"`
14603	// IPAddress - The IP address associated with the public IP address resource.
14604	IPAddress *string `json:"ipAddress,omitempty"`
14605	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
14606	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
14607	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14608	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14609	// ResourceGUID - The resource GUID property of the public IP resource.
14610	ResourceGUID *string `json:"resourceGuid,omitempty"`
14611	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14612	ProvisioningState *string `json:"provisioningState,omitempty"`
14613}
14614
14615// PublicIPAddressSku SKU of a public IP address
14616type PublicIPAddressSku struct {
14617	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
14618	Name PublicIPAddressSkuName `json:"name,omitempty"`
14619}
14620
14621// PublicIPPrefix public IP prefix resource.
14622type PublicIPPrefix struct {
14623	autorest.Response `json:"-"`
14624	// Sku - The public IP prefix SKU.
14625	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
14626	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
14627	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
14628	// Etag - A unique read-only string that changes whenever the resource is updated.
14629	Etag *string `json:"etag,omitempty"`
14630	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14631	Zones *[]string `json:"zones,omitempty"`
14632	// ID - Resource ID.
14633	ID *string `json:"id,omitempty"`
14634	// Name - READ-ONLY; Resource name.
14635	Name *string `json:"name,omitempty"`
14636	// Type - READ-ONLY; Resource type.
14637	Type *string `json:"type,omitempty"`
14638	// Location - Resource location.
14639	Location *string `json:"location,omitempty"`
14640	// Tags - Resource tags.
14641	Tags map[string]*string `json:"tags"`
14642}
14643
14644// MarshalJSON is the custom marshaler for PublicIPPrefix.
14645func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
14646	objectMap := make(map[string]interface{})
14647	if pip.Sku != nil {
14648		objectMap["sku"] = pip.Sku
14649	}
14650	if pip.PublicIPPrefixPropertiesFormat != nil {
14651		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
14652	}
14653	if pip.Etag != nil {
14654		objectMap["etag"] = pip.Etag
14655	}
14656	if pip.Zones != nil {
14657		objectMap["zones"] = pip.Zones
14658	}
14659	if pip.ID != nil {
14660		objectMap["id"] = pip.ID
14661	}
14662	if pip.Location != nil {
14663		objectMap["location"] = pip.Location
14664	}
14665	if pip.Tags != nil {
14666		objectMap["tags"] = pip.Tags
14667	}
14668	return json.Marshal(objectMap)
14669}
14670
14671// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
14672func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
14673	var m map[string]*json.RawMessage
14674	err := json.Unmarshal(body, &m)
14675	if err != nil {
14676		return err
14677	}
14678	for k, v := range m {
14679		switch k {
14680		case "sku":
14681			if v != nil {
14682				var sku PublicIPPrefixSku
14683				err = json.Unmarshal(*v, &sku)
14684				if err != nil {
14685					return err
14686				}
14687				pip.Sku = &sku
14688			}
14689		case "properties":
14690			if v != nil {
14691				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
14692				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
14693				if err != nil {
14694					return err
14695				}
14696				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
14697			}
14698		case "etag":
14699			if v != nil {
14700				var etag string
14701				err = json.Unmarshal(*v, &etag)
14702				if err != nil {
14703					return err
14704				}
14705				pip.Etag = &etag
14706			}
14707		case "zones":
14708			if v != nil {
14709				var zones []string
14710				err = json.Unmarshal(*v, &zones)
14711				if err != nil {
14712					return err
14713				}
14714				pip.Zones = &zones
14715			}
14716		case "id":
14717			if v != nil {
14718				var ID string
14719				err = json.Unmarshal(*v, &ID)
14720				if err != nil {
14721					return err
14722				}
14723				pip.ID = &ID
14724			}
14725		case "name":
14726			if v != nil {
14727				var name string
14728				err = json.Unmarshal(*v, &name)
14729				if err != nil {
14730					return err
14731				}
14732				pip.Name = &name
14733			}
14734		case "type":
14735			if v != nil {
14736				var typeVar string
14737				err = json.Unmarshal(*v, &typeVar)
14738				if err != nil {
14739					return err
14740				}
14741				pip.Type = &typeVar
14742			}
14743		case "location":
14744			if v != nil {
14745				var location string
14746				err = json.Unmarshal(*v, &location)
14747				if err != nil {
14748					return err
14749				}
14750				pip.Location = &location
14751			}
14752		case "tags":
14753			if v != nil {
14754				var tags map[string]*string
14755				err = json.Unmarshal(*v, &tags)
14756				if err != nil {
14757					return err
14758				}
14759				pip.Tags = tags
14760			}
14761		}
14762	}
14763
14764	return nil
14765}
14766
14767// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14768// long-running operation.
14769type PublicIPPrefixesCreateOrUpdateFuture struct {
14770	azure.Future
14771}
14772
14773// Result returns the result of the asynchronous operation.
14774// If the operation has not completed it will return an error.
14775func (future *PublicIPPrefixesCreateOrUpdateFuture) Result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
14776	var done bool
14777	done, err = future.DoneWithContext(context.Background(), client)
14778	if err != nil {
14779		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14780		return
14781	}
14782	if !done {
14783		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
14784		return
14785	}
14786	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14787	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
14788		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
14789		if err != nil {
14790			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
14791		}
14792	}
14793	return
14794}
14795
14796// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14797// operation.
14798type PublicIPPrefixesDeleteFuture struct {
14799	azure.Future
14800}
14801
14802// Result returns the result of the asynchronous operation.
14803// If the operation has not completed it will return an error.
14804func (future *PublicIPPrefixesDeleteFuture) Result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
14805	var done bool
14806	done, err = future.DoneWithContext(context.Background(), client)
14807	if err != nil {
14808		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
14809		return
14810	}
14811	if !done {
14812		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
14813		return
14814	}
14815	ar.Response = future.Response()
14816	return
14817}
14818
14819// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14820// long-running operation.
14821type PublicIPPrefixesUpdateTagsFuture struct {
14822	azure.Future
14823}
14824
14825// Result returns the result of the asynchronous operation.
14826// If the operation has not completed it will return an error.
14827func (future *PublicIPPrefixesUpdateTagsFuture) Result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
14828	var done bool
14829	done, err = future.DoneWithContext(context.Background(), client)
14830	if err != nil {
14831		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14832		return
14833	}
14834	if !done {
14835		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
14836		return
14837	}
14838	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14839	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
14840		pip, err = client.UpdateTagsResponder(pip.Response.Response)
14841		if err != nil {
14842			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
14843		}
14844	}
14845	return
14846}
14847
14848// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
14849type PublicIPPrefixListResult struct {
14850	autorest.Response `json:"-"`
14851	// Value - A list of public IP prefixes that exists in a resource group.
14852	Value *[]PublicIPPrefix `json:"value,omitempty"`
14853	// NextLink - The URL to get the next set of results.
14854	NextLink *string `json:"nextLink,omitempty"`
14855}
14856
14857// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
14858type PublicIPPrefixListResultIterator struct {
14859	i    int
14860	page PublicIPPrefixListResultPage
14861}
14862
14863// NextWithContext advances to the next value.  If there was an error making
14864// the request the iterator does not advance and the error is returned.
14865func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
14866	if tracing.IsEnabled() {
14867		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
14868		defer func() {
14869			sc := -1
14870			if iter.Response().Response.Response != nil {
14871				sc = iter.Response().Response.Response.StatusCode
14872			}
14873			tracing.EndSpan(ctx, sc, err)
14874		}()
14875	}
14876	iter.i++
14877	if iter.i < len(iter.page.Values()) {
14878		return nil
14879	}
14880	err = iter.page.NextWithContext(ctx)
14881	if err != nil {
14882		iter.i--
14883		return err
14884	}
14885	iter.i = 0
14886	return nil
14887}
14888
14889// Next advances to the next value.  If there was an error making
14890// the request the iterator does not advance and the error is returned.
14891// Deprecated: Use NextWithContext() instead.
14892func (iter *PublicIPPrefixListResultIterator) Next() error {
14893	return iter.NextWithContext(context.Background())
14894}
14895
14896// NotDone returns true if the enumeration should be started or is not yet complete.
14897func (iter PublicIPPrefixListResultIterator) NotDone() bool {
14898	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14899}
14900
14901// Response returns the raw server response from the last page request.
14902func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
14903	return iter.page.Response()
14904}
14905
14906// Value returns the current value or a zero-initialized value if the
14907// iterator has advanced beyond the end of the collection.
14908func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
14909	if !iter.page.NotDone() {
14910		return PublicIPPrefix{}
14911	}
14912	return iter.page.Values()[iter.i]
14913}
14914
14915// Creates a new instance of the PublicIPPrefixListResultIterator type.
14916func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
14917	return PublicIPPrefixListResultIterator{page: page}
14918}
14919
14920// IsEmpty returns true if the ListResult contains no values.
14921func (piplr PublicIPPrefixListResult) IsEmpty() bool {
14922	return piplr.Value == nil || len(*piplr.Value) == 0
14923}
14924
14925// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
14926// It returns nil if no more results exist.
14927func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
14928	if piplr.NextLink == nil || len(to.String(piplr.NextLink)) < 1 {
14929		return nil, nil
14930	}
14931	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14932		autorest.AsJSON(),
14933		autorest.AsGet(),
14934		autorest.WithBaseURL(to.String(piplr.NextLink)))
14935}
14936
14937// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
14938type PublicIPPrefixListResultPage struct {
14939	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
14940	piplr PublicIPPrefixListResult
14941}
14942
14943// NextWithContext advances to the next page of values.  If there was an error making
14944// the request the page does not advance and the error is returned.
14945func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
14946	if tracing.IsEnabled() {
14947		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
14948		defer func() {
14949			sc := -1
14950			if page.Response().Response.Response != nil {
14951				sc = page.Response().Response.Response.StatusCode
14952			}
14953			tracing.EndSpan(ctx, sc, err)
14954		}()
14955	}
14956	next, err := page.fn(ctx, page.piplr)
14957	if err != nil {
14958		return err
14959	}
14960	page.piplr = next
14961	return nil
14962}
14963
14964// Next advances to the next page of values.  If there was an error making
14965// the request the page does not advance and the error is returned.
14966// Deprecated: Use NextWithContext() instead.
14967func (page *PublicIPPrefixListResultPage) Next() error {
14968	return page.NextWithContext(context.Background())
14969}
14970
14971// NotDone returns true if the page enumeration should be started or is not yet complete.
14972func (page PublicIPPrefixListResultPage) NotDone() bool {
14973	return !page.piplr.IsEmpty()
14974}
14975
14976// Response returns the raw server response from the last page request.
14977func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
14978	return page.piplr
14979}
14980
14981// Values returns the slice of values for the current page or nil if there are no values.
14982func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
14983	if page.piplr.IsEmpty() {
14984		return nil
14985	}
14986	return *page.piplr.Value
14987}
14988
14989// Creates a new instance of the PublicIPPrefixListResultPage type.
14990func NewPublicIPPrefixListResultPage(getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
14991	return PublicIPPrefixListResultPage{fn: getNextPage}
14992}
14993
14994// PublicIPPrefixPropertiesFormat public IP prefix properties.
14995type PublicIPPrefixPropertiesFormat struct {
14996	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14997	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14998	// IPTags - The list of tags associated with the public IP prefix.
14999	IPTags *[]IPTag `json:"ipTags,omitempty"`
15000	// PrefixLength - The Length of the Public IP Prefix.
15001	PrefixLength *int32 `json:"prefixLength,omitempty"`
15002	// IPPrefix - The allocated Prefix
15003	IPPrefix *string `json:"ipPrefix,omitempty"`
15004	// PublicIPAddresses - The list of all referenced PublicIPAddresses
15005	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
15006	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
15007	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
15008	// ResourceGUID - The resource GUID property of the public IP prefix resource.
15009	ResourceGUID *string `json:"resourceGuid,omitempty"`
15010	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15011	ProvisioningState *string `json:"provisioningState,omitempty"`
15012}
15013
15014// PublicIPPrefixSku SKU of a public IP prefix
15015type PublicIPPrefixSku struct {
15016	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
15017	Name PublicIPPrefixSkuName `json:"name,omitempty"`
15018}
15019
15020// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
15021type QueryTroubleshootingParameters struct {
15022	// TargetResourceID - The target resource ID to query the troubleshooting result.
15023	TargetResourceID *string `json:"targetResourceId,omitempty"`
15024}
15025
15026// ReferencedPublicIPAddress ...
15027type ReferencedPublicIPAddress struct {
15028	// ID - The PublicIPAddress Reference
15029	ID *string `json:"id,omitempty"`
15030}
15031
15032// Resource common resource representation.
15033type Resource struct {
15034	// ID - Resource ID.
15035	ID *string `json:"id,omitempty"`
15036	// Name - READ-ONLY; Resource name.
15037	Name *string `json:"name,omitempty"`
15038	// Type - READ-ONLY; Resource type.
15039	Type *string `json:"type,omitempty"`
15040	// Location - Resource location.
15041	Location *string `json:"location,omitempty"`
15042	// Tags - Resource tags.
15043	Tags map[string]*string `json:"tags"`
15044}
15045
15046// MarshalJSON is the custom marshaler for Resource.
15047func (r Resource) MarshalJSON() ([]byte, error) {
15048	objectMap := make(map[string]interface{})
15049	if r.ID != nil {
15050		objectMap["id"] = r.ID
15051	}
15052	if r.Location != nil {
15053		objectMap["location"] = r.Location
15054	}
15055	if r.Tags != nil {
15056		objectMap["tags"] = r.Tags
15057	}
15058	return json.Marshal(objectMap)
15059}
15060
15061// ResourceNavigationLink resourceNavigationLink resource.
15062type ResourceNavigationLink struct {
15063	// ResourceNavigationLinkFormat - Resource navigation link properties format.
15064	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
15065	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
15066	Name *string `json:"name,omitempty"`
15067	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15068	Etag *string `json:"etag,omitempty"`
15069	// ID - Resource ID.
15070	ID *string `json:"id,omitempty"`
15071}
15072
15073// MarshalJSON is the custom marshaler for ResourceNavigationLink.
15074func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
15075	objectMap := make(map[string]interface{})
15076	if rnl.ResourceNavigationLinkFormat != nil {
15077		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
15078	}
15079	if rnl.Name != nil {
15080		objectMap["name"] = rnl.Name
15081	}
15082	if rnl.ID != nil {
15083		objectMap["id"] = rnl.ID
15084	}
15085	return json.Marshal(objectMap)
15086}
15087
15088// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
15089func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
15090	var m map[string]*json.RawMessage
15091	err := json.Unmarshal(body, &m)
15092	if err != nil {
15093		return err
15094	}
15095	for k, v := range m {
15096		switch k {
15097		case "properties":
15098			if v != nil {
15099				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
15100				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
15101				if err != nil {
15102					return err
15103				}
15104				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
15105			}
15106		case "name":
15107			if v != nil {
15108				var name string
15109				err = json.Unmarshal(*v, &name)
15110				if err != nil {
15111					return err
15112				}
15113				rnl.Name = &name
15114			}
15115		case "etag":
15116			if v != nil {
15117				var etag string
15118				err = json.Unmarshal(*v, &etag)
15119				if err != nil {
15120					return err
15121				}
15122				rnl.Etag = &etag
15123			}
15124		case "id":
15125			if v != nil {
15126				var ID string
15127				err = json.Unmarshal(*v, &ID)
15128				if err != nil {
15129					return err
15130				}
15131				rnl.ID = &ID
15132			}
15133		}
15134	}
15135
15136	return nil
15137}
15138
15139// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
15140type ResourceNavigationLinkFormat struct {
15141	// LinkedResourceType - Resource type of the linked resource.
15142	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
15143	// Link - Link to the external resource
15144	Link *string `json:"link,omitempty"`
15145	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
15146	ProvisioningState *string `json:"provisioningState,omitempty"`
15147}
15148
15149// RetentionPolicyParameters parameters that define the retention policy for flow log.
15150type RetentionPolicyParameters struct {
15151	// Days - Number of days to retain flow log records.
15152	Days *int32 `json:"days,omitempty"`
15153	// Enabled - Flag to enable/disable retention.
15154	Enabled *bool `json:"enabled,omitempty"`
15155}
15156
15157// Route route resource
15158type Route struct {
15159	autorest.Response `json:"-"`
15160	// RoutePropertiesFormat - Properties of the route.
15161	*RoutePropertiesFormat `json:"properties,omitempty"`
15162	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15163	Name *string `json:"name,omitempty"`
15164	// Etag - A unique read-only string that changes whenever the resource is updated.
15165	Etag *string `json:"etag,omitempty"`
15166	// ID - Resource ID.
15167	ID *string `json:"id,omitempty"`
15168}
15169
15170// MarshalJSON is the custom marshaler for Route.
15171func (r Route) MarshalJSON() ([]byte, error) {
15172	objectMap := make(map[string]interface{})
15173	if r.RoutePropertiesFormat != nil {
15174		objectMap["properties"] = r.RoutePropertiesFormat
15175	}
15176	if r.Name != nil {
15177		objectMap["name"] = r.Name
15178	}
15179	if r.Etag != nil {
15180		objectMap["etag"] = r.Etag
15181	}
15182	if r.ID != nil {
15183		objectMap["id"] = r.ID
15184	}
15185	return json.Marshal(objectMap)
15186}
15187
15188// UnmarshalJSON is the custom unmarshaler for Route struct.
15189func (r *Route) UnmarshalJSON(body []byte) error {
15190	var m map[string]*json.RawMessage
15191	err := json.Unmarshal(body, &m)
15192	if err != nil {
15193		return err
15194	}
15195	for k, v := range m {
15196		switch k {
15197		case "properties":
15198			if v != nil {
15199				var routePropertiesFormat RoutePropertiesFormat
15200				err = json.Unmarshal(*v, &routePropertiesFormat)
15201				if err != nil {
15202					return err
15203				}
15204				r.RoutePropertiesFormat = &routePropertiesFormat
15205			}
15206		case "name":
15207			if v != nil {
15208				var name string
15209				err = json.Unmarshal(*v, &name)
15210				if err != nil {
15211					return err
15212				}
15213				r.Name = &name
15214			}
15215		case "etag":
15216			if v != nil {
15217				var etag string
15218				err = json.Unmarshal(*v, &etag)
15219				if err != nil {
15220					return err
15221				}
15222				r.Etag = &etag
15223			}
15224		case "id":
15225			if v != nil {
15226				var ID string
15227				err = json.Unmarshal(*v, &ID)
15228				if err != nil {
15229					return err
15230				}
15231				r.ID = &ID
15232			}
15233		}
15234	}
15235
15236	return nil
15237}
15238
15239// RouteFilter route Filter Resource.
15240type RouteFilter struct {
15241	autorest.Response            `json:"-"`
15242	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
15243	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
15244	Etag *string `json:"etag,omitempty"`
15245	// ID - Resource ID.
15246	ID *string `json:"id,omitempty"`
15247	// Name - READ-ONLY; Resource name.
15248	Name *string `json:"name,omitempty"`
15249	// Type - READ-ONLY; Resource type.
15250	Type *string `json:"type,omitempty"`
15251	// Location - Resource location.
15252	Location *string `json:"location,omitempty"`
15253	// Tags - Resource tags.
15254	Tags map[string]*string `json:"tags"`
15255}
15256
15257// MarshalJSON is the custom marshaler for RouteFilter.
15258func (rf RouteFilter) MarshalJSON() ([]byte, error) {
15259	objectMap := make(map[string]interface{})
15260	if rf.RouteFilterPropertiesFormat != nil {
15261		objectMap["properties"] = rf.RouteFilterPropertiesFormat
15262	}
15263	if rf.ID != nil {
15264		objectMap["id"] = rf.ID
15265	}
15266	if rf.Location != nil {
15267		objectMap["location"] = rf.Location
15268	}
15269	if rf.Tags != nil {
15270		objectMap["tags"] = rf.Tags
15271	}
15272	return json.Marshal(objectMap)
15273}
15274
15275// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
15276func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
15277	var m map[string]*json.RawMessage
15278	err := json.Unmarshal(body, &m)
15279	if err != nil {
15280		return err
15281	}
15282	for k, v := range m {
15283		switch k {
15284		case "properties":
15285			if v != nil {
15286				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
15287				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
15288				if err != nil {
15289					return err
15290				}
15291				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
15292			}
15293		case "etag":
15294			if v != nil {
15295				var etag string
15296				err = json.Unmarshal(*v, &etag)
15297				if err != nil {
15298					return err
15299				}
15300				rf.Etag = &etag
15301			}
15302		case "id":
15303			if v != nil {
15304				var ID string
15305				err = json.Unmarshal(*v, &ID)
15306				if err != nil {
15307					return err
15308				}
15309				rf.ID = &ID
15310			}
15311		case "name":
15312			if v != nil {
15313				var name string
15314				err = json.Unmarshal(*v, &name)
15315				if err != nil {
15316					return err
15317				}
15318				rf.Name = &name
15319			}
15320		case "type":
15321			if v != nil {
15322				var typeVar string
15323				err = json.Unmarshal(*v, &typeVar)
15324				if err != nil {
15325					return err
15326				}
15327				rf.Type = &typeVar
15328			}
15329		case "location":
15330			if v != nil {
15331				var location string
15332				err = json.Unmarshal(*v, &location)
15333				if err != nil {
15334					return err
15335				}
15336				rf.Location = &location
15337			}
15338		case "tags":
15339			if v != nil {
15340				var tags map[string]*string
15341				err = json.Unmarshal(*v, &tags)
15342				if err != nil {
15343					return err
15344				}
15345				rf.Tags = tags
15346			}
15347		}
15348	}
15349
15350	return nil
15351}
15352
15353// RouteFilterListResult response for the ListRouteFilters API service call.
15354type RouteFilterListResult struct {
15355	autorest.Response `json:"-"`
15356	// Value - Gets a list of route filters in a resource group.
15357	Value *[]RouteFilter `json:"value,omitempty"`
15358	// NextLink - The URL to get the next set of results.
15359	NextLink *string `json:"nextLink,omitempty"`
15360}
15361
15362// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
15363type RouteFilterListResultIterator struct {
15364	i    int
15365	page RouteFilterListResultPage
15366}
15367
15368// NextWithContext advances to the next value.  If there was an error making
15369// the request the iterator does not advance and the error is returned.
15370func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
15371	if tracing.IsEnabled() {
15372		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
15373		defer func() {
15374			sc := -1
15375			if iter.Response().Response.Response != nil {
15376				sc = iter.Response().Response.Response.StatusCode
15377			}
15378			tracing.EndSpan(ctx, sc, err)
15379		}()
15380	}
15381	iter.i++
15382	if iter.i < len(iter.page.Values()) {
15383		return nil
15384	}
15385	err = iter.page.NextWithContext(ctx)
15386	if err != nil {
15387		iter.i--
15388		return err
15389	}
15390	iter.i = 0
15391	return nil
15392}
15393
15394// Next advances to the next value.  If there was an error making
15395// the request the iterator does not advance and the error is returned.
15396// Deprecated: Use NextWithContext() instead.
15397func (iter *RouteFilterListResultIterator) Next() error {
15398	return iter.NextWithContext(context.Background())
15399}
15400
15401// NotDone returns true if the enumeration should be started or is not yet complete.
15402func (iter RouteFilterListResultIterator) NotDone() bool {
15403	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15404}
15405
15406// Response returns the raw server response from the last page request.
15407func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
15408	return iter.page.Response()
15409}
15410
15411// Value returns the current value or a zero-initialized value if the
15412// iterator has advanced beyond the end of the collection.
15413func (iter RouteFilterListResultIterator) Value() RouteFilter {
15414	if !iter.page.NotDone() {
15415		return RouteFilter{}
15416	}
15417	return iter.page.Values()[iter.i]
15418}
15419
15420// Creates a new instance of the RouteFilterListResultIterator type.
15421func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
15422	return RouteFilterListResultIterator{page: page}
15423}
15424
15425// IsEmpty returns true if the ListResult contains no values.
15426func (rflr RouteFilterListResult) IsEmpty() bool {
15427	return rflr.Value == nil || len(*rflr.Value) == 0
15428}
15429
15430// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
15431// It returns nil if no more results exist.
15432func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
15433	if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 {
15434		return nil, nil
15435	}
15436	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15437		autorest.AsJSON(),
15438		autorest.AsGet(),
15439		autorest.WithBaseURL(to.String(rflr.NextLink)))
15440}
15441
15442// RouteFilterListResultPage contains a page of RouteFilter values.
15443type RouteFilterListResultPage struct {
15444	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
15445	rflr RouteFilterListResult
15446}
15447
15448// NextWithContext advances to the next page of values.  If there was an error making
15449// the request the page does not advance and the error is returned.
15450func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
15451	if tracing.IsEnabled() {
15452		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
15453		defer func() {
15454			sc := -1
15455			if page.Response().Response.Response != nil {
15456				sc = page.Response().Response.Response.StatusCode
15457			}
15458			tracing.EndSpan(ctx, sc, err)
15459		}()
15460	}
15461	next, err := page.fn(ctx, page.rflr)
15462	if err != nil {
15463		return err
15464	}
15465	page.rflr = next
15466	return nil
15467}
15468
15469// Next advances to the next page of values.  If there was an error making
15470// the request the page does not advance and the error is returned.
15471// Deprecated: Use NextWithContext() instead.
15472func (page *RouteFilterListResultPage) Next() error {
15473	return page.NextWithContext(context.Background())
15474}
15475
15476// NotDone returns true if the page enumeration should be started or is not yet complete.
15477func (page RouteFilterListResultPage) NotDone() bool {
15478	return !page.rflr.IsEmpty()
15479}
15480
15481// Response returns the raw server response from the last page request.
15482func (page RouteFilterListResultPage) Response() RouteFilterListResult {
15483	return page.rflr
15484}
15485
15486// Values returns the slice of values for the current page or nil if there are no values.
15487func (page RouteFilterListResultPage) Values() []RouteFilter {
15488	if page.rflr.IsEmpty() {
15489		return nil
15490	}
15491	return *page.rflr.Value
15492}
15493
15494// Creates a new instance of the RouteFilterListResultPage type.
15495func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
15496	return RouteFilterListResultPage{fn: getNextPage}
15497}
15498
15499// RouteFilterPropertiesFormat route Filter Resource
15500type RouteFilterPropertiesFormat struct {
15501	// Rules - Collection of RouteFilterRules contained within a route filter.
15502	Rules *[]RouteFilterRule `json:"rules,omitempty"`
15503	// Peerings - A collection of references to express route circuit peerings.
15504	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
15505	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
15506	ProvisioningState *string `json:"provisioningState,omitempty"`
15507}
15508
15509// RouteFilterRule route Filter Rule Resource
15510type RouteFilterRule struct {
15511	autorest.Response                `json:"-"`
15512	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
15513	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15514	Name *string `json:"name,omitempty"`
15515	// Location - Resource location.
15516	Location *string `json:"location,omitempty"`
15517	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15518	Etag *string `json:"etag,omitempty"`
15519	// ID - Resource ID.
15520	ID *string `json:"id,omitempty"`
15521}
15522
15523// MarshalJSON is the custom marshaler for RouteFilterRule.
15524func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
15525	objectMap := make(map[string]interface{})
15526	if rfr.RouteFilterRulePropertiesFormat != nil {
15527		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
15528	}
15529	if rfr.Name != nil {
15530		objectMap["name"] = rfr.Name
15531	}
15532	if rfr.Location != nil {
15533		objectMap["location"] = rfr.Location
15534	}
15535	if rfr.ID != nil {
15536		objectMap["id"] = rfr.ID
15537	}
15538	return json.Marshal(objectMap)
15539}
15540
15541// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
15542func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
15543	var m map[string]*json.RawMessage
15544	err := json.Unmarshal(body, &m)
15545	if err != nil {
15546		return err
15547	}
15548	for k, v := range m {
15549		switch k {
15550		case "properties":
15551			if v != nil {
15552				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
15553				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
15554				if err != nil {
15555					return err
15556				}
15557				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
15558			}
15559		case "name":
15560			if v != nil {
15561				var name string
15562				err = json.Unmarshal(*v, &name)
15563				if err != nil {
15564					return err
15565				}
15566				rfr.Name = &name
15567			}
15568		case "location":
15569			if v != nil {
15570				var location string
15571				err = json.Unmarshal(*v, &location)
15572				if err != nil {
15573					return err
15574				}
15575				rfr.Location = &location
15576			}
15577		case "etag":
15578			if v != nil {
15579				var etag string
15580				err = json.Unmarshal(*v, &etag)
15581				if err != nil {
15582					return err
15583				}
15584				rfr.Etag = &etag
15585			}
15586		case "id":
15587			if v != nil {
15588				var ID string
15589				err = json.Unmarshal(*v, &ID)
15590				if err != nil {
15591					return err
15592				}
15593				rfr.ID = &ID
15594			}
15595		}
15596	}
15597
15598	return nil
15599}
15600
15601// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
15602type RouteFilterRuleListResult struct {
15603	autorest.Response `json:"-"`
15604	// Value - Gets a list of RouteFilterRules in a resource group.
15605	Value *[]RouteFilterRule `json:"value,omitempty"`
15606	// NextLink - The URL to get the next set of results.
15607	NextLink *string `json:"nextLink,omitempty"`
15608}
15609
15610// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
15611type RouteFilterRuleListResultIterator struct {
15612	i    int
15613	page RouteFilterRuleListResultPage
15614}
15615
15616// NextWithContext advances to the next value.  If there was an error making
15617// the request the iterator does not advance and the error is returned.
15618func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15619	if tracing.IsEnabled() {
15620		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
15621		defer func() {
15622			sc := -1
15623			if iter.Response().Response.Response != nil {
15624				sc = iter.Response().Response.Response.StatusCode
15625			}
15626			tracing.EndSpan(ctx, sc, err)
15627		}()
15628	}
15629	iter.i++
15630	if iter.i < len(iter.page.Values()) {
15631		return nil
15632	}
15633	err = iter.page.NextWithContext(ctx)
15634	if err != nil {
15635		iter.i--
15636		return err
15637	}
15638	iter.i = 0
15639	return nil
15640}
15641
15642// Next advances to the next value.  If there was an error making
15643// the request the iterator does not advance and the error is returned.
15644// Deprecated: Use NextWithContext() instead.
15645func (iter *RouteFilterRuleListResultIterator) Next() error {
15646	return iter.NextWithContext(context.Background())
15647}
15648
15649// NotDone returns true if the enumeration should be started or is not yet complete.
15650func (iter RouteFilterRuleListResultIterator) NotDone() bool {
15651	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15652}
15653
15654// Response returns the raw server response from the last page request.
15655func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
15656	return iter.page.Response()
15657}
15658
15659// Value returns the current value or a zero-initialized value if the
15660// iterator has advanced beyond the end of the collection.
15661func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
15662	if !iter.page.NotDone() {
15663		return RouteFilterRule{}
15664	}
15665	return iter.page.Values()[iter.i]
15666}
15667
15668// Creates a new instance of the RouteFilterRuleListResultIterator type.
15669func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
15670	return RouteFilterRuleListResultIterator{page: page}
15671}
15672
15673// IsEmpty returns true if the ListResult contains no values.
15674func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
15675	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
15676}
15677
15678// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
15679// It returns nil if no more results exist.
15680func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15681	if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 {
15682		return nil, nil
15683	}
15684	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15685		autorest.AsJSON(),
15686		autorest.AsGet(),
15687		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
15688}
15689
15690// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
15691type RouteFilterRuleListResultPage struct {
15692	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
15693	rfrlr RouteFilterRuleListResult
15694}
15695
15696// NextWithContext advances to the next page of values.  If there was an error making
15697// the request the page does not advance and the error is returned.
15698func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15699	if tracing.IsEnabled() {
15700		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
15701		defer func() {
15702			sc := -1
15703			if page.Response().Response.Response != nil {
15704				sc = page.Response().Response.Response.StatusCode
15705			}
15706			tracing.EndSpan(ctx, sc, err)
15707		}()
15708	}
15709	next, err := page.fn(ctx, page.rfrlr)
15710	if err != nil {
15711		return err
15712	}
15713	page.rfrlr = next
15714	return nil
15715}
15716
15717// Next advances to the next page of values.  If there was an error making
15718// the request the page does not advance and the error is returned.
15719// Deprecated: Use NextWithContext() instead.
15720func (page *RouteFilterRuleListResultPage) Next() error {
15721	return page.NextWithContext(context.Background())
15722}
15723
15724// NotDone returns true if the page enumeration should be started or is not yet complete.
15725func (page RouteFilterRuleListResultPage) NotDone() bool {
15726	return !page.rfrlr.IsEmpty()
15727}
15728
15729// Response returns the raw server response from the last page request.
15730func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
15731	return page.rfrlr
15732}
15733
15734// Values returns the slice of values for the current page or nil if there are no values.
15735func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
15736	if page.rfrlr.IsEmpty() {
15737		return nil
15738	}
15739	return *page.rfrlr.Value
15740}
15741
15742// Creates a new instance of the RouteFilterRuleListResultPage type.
15743func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
15744	return RouteFilterRuleListResultPage{fn: getNextPage}
15745}
15746
15747// RouteFilterRulePropertiesFormat route Filter Rule Resource
15748type RouteFilterRulePropertiesFormat struct {
15749	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
15750	Access Access `json:"access,omitempty"`
15751	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
15752	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
15753	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
15754	Communities *[]string `json:"communities,omitempty"`
15755	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
15756	ProvisioningState *string `json:"provisioningState,omitempty"`
15757}
15758
15759// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15760// long-running operation.
15761type RouteFilterRulesCreateOrUpdateFuture struct {
15762	azure.Future
15763}
15764
15765// Result returns the result of the asynchronous operation.
15766// If the operation has not completed it will return an error.
15767func (future *RouteFilterRulesCreateOrUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15768	var done bool
15769	done, err = future.DoneWithContext(context.Background(), client)
15770	if err != nil {
15771		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15772		return
15773	}
15774	if !done {
15775		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
15776		return
15777	}
15778	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15779	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15780		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
15781		if err != nil {
15782			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15783		}
15784	}
15785	return
15786}
15787
15788// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15789// operation.
15790type RouteFilterRulesDeleteFuture struct {
15791	azure.Future
15792}
15793
15794// Result returns the result of the asynchronous operation.
15795// If the operation has not completed it will return an error.
15796func (future *RouteFilterRulesDeleteFuture) Result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
15797	var done bool
15798	done, err = future.DoneWithContext(context.Background(), client)
15799	if err != nil {
15800		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15801		return
15802	}
15803	if !done {
15804		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
15805		return
15806	}
15807	ar.Response = future.Response()
15808	return
15809}
15810
15811// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15812// operation.
15813type RouteFilterRulesUpdateFuture struct {
15814	azure.Future
15815}
15816
15817// Result returns the result of the asynchronous operation.
15818// If the operation has not completed it will return an error.
15819func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15820	var done bool
15821	done, err = future.DoneWithContext(context.Background(), client)
15822	if err != nil {
15823		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
15824		return
15825	}
15826	if !done {
15827		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
15828		return
15829	}
15830	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15831	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15832		rfr, err = client.UpdateResponder(rfr.Response.Response)
15833		if err != nil {
15834			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15835		}
15836	}
15837	return
15838}
15839
15840// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15841// long-running operation.
15842type RouteFiltersCreateOrUpdateFuture struct {
15843	azure.Future
15844}
15845
15846// Result returns the result of the asynchronous operation.
15847// If the operation has not completed it will return an error.
15848func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
15849	var done bool
15850	done, err = future.DoneWithContext(context.Background(), client)
15851	if err != nil {
15852		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15853		return
15854	}
15855	if !done {
15856		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
15857		return
15858	}
15859	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15860	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15861		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
15862		if err != nil {
15863			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15864		}
15865	}
15866	return
15867}
15868
15869// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15870// operation.
15871type RouteFiltersDeleteFuture struct {
15872	azure.Future
15873}
15874
15875// Result returns the result of the asynchronous operation.
15876// If the operation has not completed it will return an error.
15877func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar autorest.Response, err error) {
15878	var done bool
15879	done, err = future.DoneWithContext(context.Background(), client)
15880	if err != nil {
15881		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
15882		return
15883	}
15884	if !done {
15885		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
15886		return
15887	}
15888	ar.Response = future.Response()
15889	return
15890}
15891
15892// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15893// operation.
15894type RouteFiltersUpdateFuture struct {
15895	azure.Future
15896}
15897
15898// Result returns the result of the asynchronous operation.
15899// If the operation has not completed it will return an error.
15900func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf RouteFilter, err error) {
15901	var done bool
15902	done, err = future.DoneWithContext(context.Background(), client)
15903	if err != nil {
15904		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
15905		return
15906	}
15907	if !done {
15908		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
15909		return
15910	}
15911	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15912	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15913		rf, err = client.UpdateResponder(rf.Response.Response)
15914		if err != nil {
15915			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15916		}
15917	}
15918	return
15919}
15920
15921// RouteListResult response for the ListRoute API service call
15922type RouteListResult struct {
15923	autorest.Response `json:"-"`
15924	// Value - Gets a list of routes in a resource group.
15925	Value *[]Route `json:"value,omitempty"`
15926	// NextLink - The URL to get the next set of results.
15927	NextLink *string `json:"nextLink,omitempty"`
15928}
15929
15930// RouteListResultIterator provides access to a complete listing of Route values.
15931type RouteListResultIterator struct {
15932	i    int
15933	page RouteListResultPage
15934}
15935
15936// NextWithContext advances to the next value.  If there was an error making
15937// the request the iterator does not advance and the error is returned.
15938func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
15939	if tracing.IsEnabled() {
15940		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
15941		defer func() {
15942			sc := -1
15943			if iter.Response().Response.Response != nil {
15944				sc = iter.Response().Response.Response.StatusCode
15945			}
15946			tracing.EndSpan(ctx, sc, err)
15947		}()
15948	}
15949	iter.i++
15950	if iter.i < len(iter.page.Values()) {
15951		return nil
15952	}
15953	err = iter.page.NextWithContext(ctx)
15954	if err != nil {
15955		iter.i--
15956		return err
15957	}
15958	iter.i = 0
15959	return nil
15960}
15961
15962// Next advances to the next value.  If there was an error making
15963// the request the iterator does not advance and the error is returned.
15964// Deprecated: Use NextWithContext() instead.
15965func (iter *RouteListResultIterator) Next() error {
15966	return iter.NextWithContext(context.Background())
15967}
15968
15969// NotDone returns true if the enumeration should be started or is not yet complete.
15970func (iter RouteListResultIterator) NotDone() bool {
15971	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15972}
15973
15974// Response returns the raw server response from the last page request.
15975func (iter RouteListResultIterator) Response() RouteListResult {
15976	return iter.page.Response()
15977}
15978
15979// Value returns the current value or a zero-initialized value if the
15980// iterator has advanced beyond the end of the collection.
15981func (iter RouteListResultIterator) Value() Route {
15982	if !iter.page.NotDone() {
15983		return Route{}
15984	}
15985	return iter.page.Values()[iter.i]
15986}
15987
15988// Creates a new instance of the RouteListResultIterator type.
15989func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
15990	return RouteListResultIterator{page: page}
15991}
15992
15993// IsEmpty returns true if the ListResult contains no values.
15994func (rlr RouteListResult) IsEmpty() bool {
15995	return rlr.Value == nil || len(*rlr.Value) == 0
15996}
15997
15998// routeListResultPreparer prepares a request to retrieve the next set of results.
15999// It returns nil if no more results exist.
16000func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
16001	if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
16002		return nil, nil
16003	}
16004	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16005		autorest.AsJSON(),
16006		autorest.AsGet(),
16007		autorest.WithBaseURL(to.String(rlr.NextLink)))
16008}
16009
16010// RouteListResultPage contains a page of Route values.
16011type RouteListResultPage struct {
16012	fn  func(context.Context, RouteListResult) (RouteListResult, error)
16013	rlr RouteListResult
16014}
16015
16016// NextWithContext advances to the next page of values.  If there was an error making
16017// the request the page does not advance and the error is returned.
16018func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
16019	if tracing.IsEnabled() {
16020		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
16021		defer func() {
16022			sc := -1
16023			if page.Response().Response.Response != nil {
16024				sc = page.Response().Response.Response.StatusCode
16025			}
16026			tracing.EndSpan(ctx, sc, err)
16027		}()
16028	}
16029	next, err := page.fn(ctx, page.rlr)
16030	if err != nil {
16031		return err
16032	}
16033	page.rlr = next
16034	return nil
16035}
16036
16037// Next advances to the next page of values.  If there was an error making
16038// the request the page does not advance and the error is returned.
16039// Deprecated: Use NextWithContext() instead.
16040func (page *RouteListResultPage) Next() error {
16041	return page.NextWithContext(context.Background())
16042}
16043
16044// NotDone returns true if the page enumeration should be started or is not yet complete.
16045func (page RouteListResultPage) NotDone() bool {
16046	return !page.rlr.IsEmpty()
16047}
16048
16049// Response returns the raw server response from the last page request.
16050func (page RouteListResultPage) Response() RouteListResult {
16051	return page.rlr
16052}
16053
16054// Values returns the slice of values for the current page or nil if there are no values.
16055func (page RouteListResultPage) Values() []Route {
16056	if page.rlr.IsEmpty() {
16057		return nil
16058	}
16059	return *page.rlr.Value
16060}
16061
16062// Creates a new instance of the RouteListResultPage type.
16063func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
16064	return RouteListResultPage{fn: getNextPage}
16065}
16066
16067// RoutePropertiesFormat route resource
16068type RoutePropertiesFormat struct {
16069	// AddressPrefix - The destination CIDR to which the route applies.
16070	AddressPrefix *string `json:"addressPrefix,omitempty"`
16071	// 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'
16072	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
16073	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
16074	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
16075	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16076	ProvisioningState *string `json:"provisioningState,omitempty"`
16077}
16078
16079// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
16080// operation.
16081type RoutesCreateOrUpdateFuture struct {
16082	azure.Future
16083}
16084
16085// Result returns the result of the asynchronous operation.
16086// If the operation has not completed it will return an error.
16087func (future *RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
16088	var done bool
16089	done, err = future.DoneWithContext(context.Background(), client)
16090	if err != nil {
16091		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16092		return
16093	}
16094	if !done {
16095		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
16096		return
16097	}
16098	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16099	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
16100		r, err = client.CreateOrUpdateResponder(r.Response.Response)
16101		if err != nil {
16102			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
16103		}
16104	}
16105	return
16106}
16107
16108// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
16109type RoutesDeleteFuture struct {
16110	azure.Future
16111}
16112
16113// Result returns the result of the asynchronous operation.
16114// If the operation has not completed it will return an error.
16115func (future *RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
16116	var done bool
16117	done, err = future.DoneWithContext(context.Background(), client)
16118	if err != nil {
16119		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
16120		return
16121	}
16122	if !done {
16123		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
16124		return
16125	}
16126	ar.Response = future.Response()
16127	return
16128}
16129
16130// RouteTable route table resource.
16131type RouteTable struct {
16132	autorest.Response `json:"-"`
16133	// RouteTablePropertiesFormat - Properties of the route table.
16134	*RouteTablePropertiesFormat `json:"properties,omitempty"`
16135	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16136	Etag *string `json:"etag,omitempty"`
16137	// ID - Resource ID.
16138	ID *string `json:"id,omitempty"`
16139	// Name - READ-ONLY; Resource name.
16140	Name *string `json:"name,omitempty"`
16141	// Type - READ-ONLY; Resource type.
16142	Type *string `json:"type,omitempty"`
16143	// Location - Resource location.
16144	Location *string `json:"location,omitempty"`
16145	// Tags - Resource tags.
16146	Tags map[string]*string `json:"tags"`
16147}
16148
16149// MarshalJSON is the custom marshaler for RouteTable.
16150func (rt RouteTable) MarshalJSON() ([]byte, error) {
16151	objectMap := make(map[string]interface{})
16152	if rt.RouteTablePropertiesFormat != nil {
16153		objectMap["properties"] = rt.RouteTablePropertiesFormat
16154	}
16155	if rt.Etag != nil {
16156		objectMap["etag"] = rt.Etag
16157	}
16158	if rt.ID != nil {
16159		objectMap["id"] = rt.ID
16160	}
16161	if rt.Location != nil {
16162		objectMap["location"] = rt.Location
16163	}
16164	if rt.Tags != nil {
16165		objectMap["tags"] = rt.Tags
16166	}
16167	return json.Marshal(objectMap)
16168}
16169
16170// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
16171func (rt *RouteTable) UnmarshalJSON(body []byte) error {
16172	var m map[string]*json.RawMessage
16173	err := json.Unmarshal(body, &m)
16174	if err != nil {
16175		return err
16176	}
16177	for k, v := range m {
16178		switch k {
16179		case "properties":
16180			if v != nil {
16181				var routeTablePropertiesFormat RouteTablePropertiesFormat
16182				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
16183				if err != nil {
16184					return err
16185				}
16186				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
16187			}
16188		case "etag":
16189			if v != nil {
16190				var etag string
16191				err = json.Unmarshal(*v, &etag)
16192				if err != nil {
16193					return err
16194				}
16195				rt.Etag = &etag
16196			}
16197		case "id":
16198			if v != nil {
16199				var ID string
16200				err = json.Unmarshal(*v, &ID)
16201				if err != nil {
16202					return err
16203				}
16204				rt.ID = &ID
16205			}
16206		case "name":
16207			if v != nil {
16208				var name string
16209				err = json.Unmarshal(*v, &name)
16210				if err != nil {
16211					return err
16212				}
16213				rt.Name = &name
16214			}
16215		case "type":
16216			if v != nil {
16217				var typeVar string
16218				err = json.Unmarshal(*v, &typeVar)
16219				if err != nil {
16220					return err
16221				}
16222				rt.Type = &typeVar
16223			}
16224		case "location":
16225			if v != nil {
16226				var location string
16227				err = json.Unmarshal(*v, &location)
16228				if err != nil {
16229					return err
16230				}
16231				rt.Location = &location
16232			}
16233		case "tags":
16234			if v != nil {
16235				var tags map[string]*string
16236				err = json.Unmarshal(*v, &tags)
16237				if err != nil {
16238					return err
16239				}
16240				rt.Tags = tags
16241			}
16242		}
16243	}
16244
16245	return nil
16246}
16247
16248// RouteTableListResult response for the ListRouteTable API service call.
16249type RouteTableListResult struct {
16250	autorest.Response `json:"-"`
16251	// Value - Gets a list of route tables in a resource group.
16252	Value *[]RouteTable `json:"value,omitempty"`
16253	// NextLink - The URL to get the next set of results.
16254	NextLink *string `json:"nextLink,omitempty"`
16255}
16256
16257// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
16258type RouteTableListResultIterator struct {
16259	i    int
16260	page RouteTableListResultPage
16261}
16262
16263// NextWithContext advances to the next value.  If there was an error making
16264// the request the iterator does not advance and the error is returned.
16265func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
16266	if tracing.IsEnabled() {
16267		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
16268		defer func() {
16269			sc := -1
16270			if iter.Response().Response.Response != nil {
16271				sc = iter.Response().Response.Response.StatusCode
16272			}
16273			tracing.EndSpan(ctx, sc, err)
16274		}()
16275	}
16276	iter.i++
16277	if iter.i < len(iter.page.Values()) {
16278		return nil
16279	}
16280	err = iter.page.NextWithContext(ctx)
16281	if err != nil {
16282		iter.i--
16283		return err
16284	}
16285	iter.i = 0
16286	return nil
16287}
16288
16289// Next advances to the next value.  If there was an error making
16290// the request the iterator does not advance and the error is returned.
16291// Deprecated: Use NextWithContext() instead.
16292func (iter *RouteTableListResultIterator) Next() error {
16293	return iter.NextWithContext(context.Background())
16294}
16295
16296// NotDone returns true if the enumeration should be started or is not yet complete.
16297func (iter RouteTableListResultIterator) NotDone() bool {
16298	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16299}
16300
16301// Response returns the raw server response from the last page request.
16302func (iter RouteTableListResultIterator) Response() RouteTableListResult {
16303	return iter.page.Response()
16304}
16305
16306// Value returns the current value or a zero-initialized value if the
16307// iterator has advanced beyond the end of the collection.
16308func (iter RouteTableListResultIterator) Value() RouteTable {
16309	if !iter.page.NotDone() {
16310		return RouteTable{}
16311	}
16312	return iter.page.Values()[iter.i]
16313}
16314
16315// Creates a new instance of the RouteTableListResultIterator type.
16316func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
16317	return RouteTableListResultIterator{page: page}
16318}
16319
16320// IsEmpty returns true if the ListResult contains no values.
16321func (rtlr RouteTableListResult) IsEmpty() bool {
16322	return rtlr.Value == nil || len(*rtlr.Value) == 0
16323}
16324
16325// routeTableListResultPreparer prepares a request to retrieve the next set of results.
16326// It returns nil if no more results exist.
16327func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
16328	if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 {
16329		return nil, nil
16330	}
16331	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16332		autorest.AsJSON(),
16333		autorest.AsGet(),
16334		autorest.WithBaseURL(to.String(rtlr.NextLink)))
16335}
16336
16337// RouteTableListResultPage contains a page of RouteTable values.
16338type RouteTableListResultPage struct {
16339	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
16340	rtlr RouteTableListResult
16341}
16342
16343// NextWithContext advances to the next page of values.  If there was an error making
16344// the request the page does not advance and the error is returned.
16345func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
16346	if tracing.IsEnabled() {
16347		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
16348		defer func() {
16349			sc := -1
16350			if page.Response().Response.Response != nil {
16351				sc = page.Response().Response.Response.StatusCode
16352			}
16353			tracing.EndSpan(ctx, sc, err)
16354		}()
16355	}
16356	next, err := page.fn(ctx, page.rtlr)
16357	if err != nil {
16358		return err
16359	}
16360	page.rtlr = next
16361	return nil
16362}
16363
16364// Next advances to the next page of values.  If there was an error making
16365// the request the page does not advance and the error is returned.
16366// Deprecated: Use NextWithContext() instead.
16367func (page *RouteTableListResultPage) Next() error {
16368	return page.NextWithContext(context.Background())
16369}
16370
16371// NotDone returns true if the page enumeration should be started or is not yet complete.
16372func (page RouteTableListResultPage) NotDone() bool {
16373	return !page.rtlr.IsEmpty()
16374}
16375
16376// Response returns the raw server response from the last page request.
16377func (page RouteTableListResultPage) Response() RouteTableListResult {
16378	return page.rtlr
16379}
16380
16381// Values returns the slice of values for the current page or nil if there are no values.
16382func (page RouteTableListResultPage) Values() []RouteTable {
16383	if page.rtlr.IsEmpty() {
16384		return nil
16385	}
16386	return *page.rtlr.Value
16387}
16388
16389// Creates a new instance of the RouteTableListResultPage type.
16390func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
16391	return RouteTableListResultPage{fn: getNextPage}
16392}
16393
16394// RouteTablePropertiesFormat route Table resource
16395type RouteTablePropertiesFormat struct {
16396	// Routes - Collection of routes contained within a route table.
16397	Routes *[]Route `json:"routes,omitempty"`
16398	// Subnets - READ-ONLY; A collection of references to subnets.
16399	Subnets *[]Subnet `json:"subnets,omitempty"`
16400	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
16401	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
16402	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16403	ProvisioningState *string `json:"provisioningState,omitempty"`
16404}
16405
16406// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16407// long-running operation.
16408type RouteTablesCreateOrUpdateFuture struct {
16409	azure.Future
16410}
16411
16412// Result returns the result of the asynchronous operation.
16413// If the operation has not completed it will return an error.
16414func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
16415	var done bool
16416	done, err = future.DoneWithContext(context.Background(), client)
16417	if err != nil {
16418		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16419		return
16420	}
16421	if !done {
16422		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
16423		return
16424	}
16425	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16426	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
16427		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
16428		if err != nil {
16429			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
16430		}
16431	}
16432	return
16433}
16434
16435// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16436// operation.
16437type RouteTablesDeleteFuture struct {
16438	azure.Future
16439}
16440
16441// Result returns the result of the asynchronous operation.
16442// If the operation has not completed it will return an error.
16443func (future *RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
16444	var done bool
16445	done, err = future.DoneWithContext(context.Background(), client)
16446	if err != nil {
16447		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
16448		return
16449	}
16450	if !done {
16451		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
16452		return
16453	}
16454	ar.Response = future.Response()
16455	return
16456}
16457
16458// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16459// operation.
16460type RouteTablesUpdateTagsFuture struct {
16461	azure.Future
16462}
16463
16464// Result returns the result of the asynchronous operation.
16465// If the operation has not completed it will return an error.
16466func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
16467	var done bool
16468	done, err = future.DoneWithContext(context.Background(), client)
16469	if err != nil {
16470		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16471		return
16472	}
16473	if !done {
16474		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
16475		return
16476	}
16477	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16478	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
16479		rt, err = client.UpdateTagsResponder(rt.Response.Response)
16480		if err != nil {
16481			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
16482		}
16483	}
16484	return
16485}
16486
16487// SecurityGroup networkSecurityGroup resource.
16488type SecurityGroup struct {
16489	autorest.Response `json:"-"`
16490	// SecurityGroupPropertiesFormat - Properties of the network security group
16491	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
16492	// Etag - A unique read-only string that changes whenever the resource is updated.
16493	Etag *string `json:"etag,omitempty"`
16494	// ID - Resource ID.
16495	ID *string `json:"id,omitempty"`
16496	// Name - READ-ONLY; Resource name.
16497	Name *string `json:"name,omitempty"`
16498	// Type - READ-ONLY; Resource type.
16499	Type *string `json:"type,omitempty"`
16500	// Location - Resource location.
16501	Location *string `json:"location,omitempty"`
16502	// Tags - Resource tags.
16503	Tags map[string]*string `json:"tags"`
16504}
16505
16506// MarshalJSON is the custom marshaler for SecurityGroup.
16507func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
16508	objectMap := make(map[string]interface{})
16509	if sg.SecurityGroupPropertiesFormat != nil {
16510		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
16511	}
16512	if sg.Etag != nil {
16513		objectMap["etag"] = sg.Etag
16514	}
16515	if sg.ID != nil {
16516		objectMap["id"] = sg.ID
16517	}
16518	if sg.Location != nil {
16519		objectMap["location"] = sg.Location
16520	}
16521	if sg.Tags != nil {
16522		objectMap["tags"] = sg.Tags
16523	}
16524	return json.Marshal(objectMap)
16525}
16526
16527// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
16528func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
16529	var m map[string]*json.RawMessage
16530	err := json.Unmarshal(body, &m)
16531	if err != nil {
16532		return err
16533	}
16534	for k, v := range m {
16535		switch k {
16536		case "properties":
16537			if v != nil {
16538				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
16539				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
16540				if err != nil {
16541					return err
16542				}
16543				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
16544			}
16545		case "etag":
16546			if v != nil {
16547				var etag string
16548				err = json.Unmarshal(*v, &etag)
16549				if err != nil {
16550					return err
16551				}
16552				sg.Etag = &etag
16553			}
16554		case "id":
16555			if v != nil {
16556				var ID string
16557				err = json.Unmarshal(*v, &ID)
16558				if err != nil {
16559					return err
16560				}
16561				sg.ID = &ID
16562			}
16563		case "name":
16564			if v != nil {
16565				var name string
16566				err = json.Unmarshal(*v, &name)
16567				if err != nil {
16568					return err
16569				}
16570				sg.Name = &name
16571			}
16572		case "type":
16573			if v != nil {
16574				var typeVar string
16575				err = json.Unmarshal(*v, &typeVar)
16576				if err != nil {
16577					return err
16578				}
16579				sg.Type = &typeVar
16580			}
16581		case "location":
16582			if v != nil {
16583				var location string
16584				err = json.Unmarshal(*v, &location)
16585				if err != nil {
16586					return err
16587				}
16588				sg.Location = &location
16589			}
16590		case "tags":
16591			if v != nil {
16592				var tags map[string]*string
16593				err = json.Unmarshal(*v, &tags)
16594				if err != nil {
16595					return err
16596				}
16597				sg.Tags = tags
16598			}
16599		}
16600	}
16601
16602	return nil
16603}
16604
16605// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
16606type SecurityGroupListResult struct {
16607	autorest.Response `json:"-"`
16608	// Value - A list of NetworkSecurityGroup resources.
16609	Value *[]SecurityGroup `json:"value,omitempty"`
16610	// NextLink - The URL to get the next set of results.
16611	NextLink *string `json:"nextLink,omitempty"`
16612}
16613
16614// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
16615type SecurityGroupListResultIterator struct {
16616	i    int
16617	page SecurityGroupListResultPage
16618}
16619
16620// NextWithContext advances to the next value.  If there was an error making
16621// the request the iterator does not advance and the error is returned.
16622func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
16623	if tracing.IsEnabled() {
16624		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
16625		defer func() {
16626			sc := -1
16627			if iter.Response().Response.Response != nil {
16628				sc = iter.Response().Response.Response.StatusCode
16629			}
16630			tracing.EndSpan(ctx, sc, err)
16631		}()
16632	}
16633	iter.i++
16634	if iter.i < len(iter.page.Values()) {
16635		return nil
16636	}
16637	err = iter.page.NextWithContext(ctx)
16638	if err != nil {
16639		iter.i--
16640		return err
16641	}
16642	iter.i = 0
16643	return nil
16644}
16645
16646// Next advances to the next value.  If there was an error making
16647// the request the iterator does not advance and the error is returned.
16648// Deprecated: Use NextWithContext() instead.
16649func (iter *SecurityGroupListResultIterator) Next() error {
16650	return iter.NextWithContext(context.Background())
16651}
16652
16653// NotDone returns true if the enumeration should be started or is not yet complete.
16654func (iter SecurityGroupListResultIterator) NotDone() bool {
16655	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16656}
16657
16658// Response returns the raw server response from the last page request.
16659func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
16660	return iter.page.Response()
16661}
16662
16663// Value returns the current value or a zero-initialized value if the
16664// iterator has advanced beyond the end of the collection.
16665func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
16666	if !iter.page.NotDone() {
16667		return SecurityGroup{}
16668	}
16669	return iter.page.Values()[iter.i]
16670}
16671
16672// Creates a new instance of the SecurityGroupListResultIterator type.
16673func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
16674	return SecurityGroupListResultIterator{page: page}
16675}
16676
16677// IsEmpty returns true if the ListResult contains no values.
16678func (sglr SecurityGroupListResult) IsEmpty() bool {
16679	return sglr.Value == nil || len(*sglr.Value) == 0
16680}
16681
16682// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
16683// It returns nil if no more results exist.
16684func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
16685	if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
16686		return nil, nil
16687	}
16688	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16689		autorest.AsJSON(),
16690		autorest.AsGet(),
16691		autorest.WithBaseURL(to.String(sglr.NextLink)))
16692}
16693
16694// SecurityGroupListResultPage contains a page of SecurityGroup values.
16695type SecurityGroupListResultPage struct {
16696	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
16697	sglr SecurityGroupListResult
16698}
16699
16700// NextWithContext advances to the next page of values.  If there was an error making
16701// the request the page does not advance and the error is returned.
16702func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
16703	if tracing.IsEnabled() {
16704		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
16705		defer func() {
16706			sc := -1
16707			if page.Response().Response.Response != nil {
16708				sc = page.Response().Response.Response.StatusCode
16709			}
16710			tracing.EndSpan(ctx, sc, err)
16711		}()
16712	}
16713	next, err := page.fn(ctx, page.sglr)
16714	if err != nil {
16715		return err
16716	}
16717	page.sglr = next
16718	return nil
16719}
16720
16721// Next advances to the next page of values.  If there was an error making
16722// the request the page does not advance and the error is returned.
16723// Deprecated: Use NextWithContext() instead.
16724func (page *SecurityGroupListResultPage) Next() error {
16725	return page.NextWithContext(context.Background())
16726}
16727
16728// NotDone returns true if the page enumeration should be started or is not yet complete.
16729func (page SecurityGroupListResultPage) NotDone() bool {
16730	return !page.sglr.IsEmpty()
16731}
16732
16733// Response returns the raw server response from the last page request.
16734func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
16735	return page.sglr
16736}
16737
16738// Values returns the slice of values for the current page or nil if there are no values.
16739func (page SecurityGroupListResultPage) Values() []SecurityGroup {
16740	if page.sglr.IsEmpty() {
16741		return nil
16742	}
16743	return *page.sglr.Value
16744}
16745
16746// Creates a new instance of the SecurityGroupListResultPage type.
16747func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
16748	return SecurityGroupListResultPage{fn: getNextPage}
16749}
16750
16751// SecurityGroupNetworkInterface network interface and all its associated security rules.
16752type SecurityGroupNetworkInterface struct {
16753	// ID - ID of the network interface.
16754	ID                       *string                   `json:"id,omitempty"`
16755	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
16756}
16757
16758// SecurityGroupPropertiesFormat network Security Group resource.
16759type SecurityGroupPropertiesFormat struct {
16760	// SecurityRules - A collection of security rules of the network security group.
16761	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
16762	// DefaultSecurityRules - The default security rules of network security group.
16763	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
16764	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
16765	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
16766	// Subnets - READ-ONLY; A collection of references to subnets.
16767	Subnets *[]Subnet `json:"subnets,omitempty"`
16768	// ResourceGUID - The resource GUID property of the network security group resource.
16769	ResourceGUID *string `json:"resourceGuid,omitempty"`
16770	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16771	ProvisioningState *string `json:"provisioningState,omitempty"`
16772}
16773
16774// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
16775type SecurityGroupResult struct {
16776	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
16777	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
16778	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
16779	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
16780}
16781
16782// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16783// long-running operation.
16784type SecurityGroupsCreateOrUpdateFuture struct {
16785	azure.Future
16786}
16787
16788// Result returns the result of the asynchronous operation.
16789// If the operation has not completed it will return an error.
16790func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16791	var done bool
16792	done, err = future.DoneWithContext(context.Background(), client)
16793	if err != nil {
16794		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16795		return
16796	}
16797	if !done {
16798		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
16799		return
16800	}
16801	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16802	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16803		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
16804		if err != nil {
16805			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
16806		}
16807	}
16808	return
16809}
16810
16811// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16812// operation.
16813type SecurityGroupsDeleteFuture struct {
16814	azure.Future
16815}
16816
16817// Result returns the result of the asynchronous operation.
16818// If the operation has not completed it will return an error.
16819func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
16820	var done bool
16821	done, err = future.DoneWithContext(context.Background(), client)
16822	if err != nil {
16823		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
16824		return
16825	}
16826	if !done {
16827		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
16828		return
16829	}
16830	ar.Response = future.Response()
16831	return
16832}
16833
16834// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16835// long-running operation.
16836type SecurityGroupsUpdateTagsFuture struct {
16837	azure.Future
16838}
16839
16840// Result returns the result of the asynchronous operation.
16841// If the operation has not completed it will return an error.
16842func (future *SecurityGroupsUpdateTagsFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16843	var done bool
16844	done, err = future.DoneWithContext(context.Background(), client)
16845	if err != nil {
16846		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16847		return
16848	}
16849	if !done {
16850		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
16851		return
16852	}
16853	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16854	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16855		sg, err = client.UpdateTagsResponder(sg.Response.Response)
16856		if err != nil {
16857			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
16858		}
16859	}
16860	return
16861}
16862
16863// SecurityGroupViewParameters parameters that define the VM to check security groups for.
16864type SecurityGroupViewParameters struct {
16865	// TargetResourceID - ID of the target VM.
16866	TargetResourceID *string `json:"targetResourceId,omitempty"`
16867}
16868
16869// SecurityGroupViewResult the information about security rules applied to the specified VM.
16870type SecurityGroupViewResult struct {
16871	autorest.Response `json:"-"`
16872	// NetworkInterfaces - List of network interfaces on the specified VM.
16873	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
16874}
16875
16876// SecurityRule network security rule.
16877type SecurityRule struct {
16878	autorest.Response `json:"-"`
16879	// SecurityRulePropertiesFormat - Properties of the security rule
16880	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
16881	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16882	Name *string `json:"name,omitempty"`
16883	// Etag - A unique read-only string that changes whenever the resource is updated.
16884	Etag *string `json:"etag,omitempty"`
16885	// ID - Resource ID.
16886	ID *string `json:"id,omitempty"`
16887}
16888
16889// MarshalJSON is the custom marshaler for SecurityRule.
16890func (sr SecurityRule) MarshalJSON() ([]byte, error) {
16891	objectMap := make(map[string]interface{})
16892	if sr.SecurityRulePropertiesFormat != nil {
16893		objectMap["properties"] = sr.SecurityRulePropertiesFormat
16894	}
16895	if sr.Name != nil {
16896		objectMap["name"] = sr.Name
16897	}
16898	if sr.Etag != nil {
16899		objectMap["etag"] = sr.Etag
16900	}
16901	if sr.ID != nil {
16902		objectMap["id"] = sr.ID
16903	}
16904	return json.Marshal(objectMap)
16905}
16906
16907// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
16908func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
16909	var m map[string]*json.RawMessage
16910	err := json.Unmarshal(body, &m)
16911	if err != nil {
16912		return err
16913	}
16914	for k, v := range m {
16915		switch k {
16916		case "properties":
16917			if v != nil {
16918				var securityRulePropertiesFormat SecurityRulePropertiesFormat
16919				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
16920				if err != nil {
16921					return err
16922				}
16923				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
16924			}
16925		case "name":
16926			if v != nil {
16927				var name string
16928				err = json.Unmarshal(*v, &name)
16929				if err != nil {
16930					return err
16931				}
16932				sr.Name = &name
16933			}
16934		case "etag":
16935			if v != nil {
16936				var etag string
16937				err = json.Unmarshal(*v, &etag)
16938				if err != nil {
16939					return err
16940				}
16941				sr.Etag = &etag
16942			}
16943		case "id":
16944			if v != nil {
16945				var ID string
16946				err = json.Unmarshal(*v, &ID)
16947				if err != nil {
16948					return err
16949				}
16950				sr.ID = &ID
16951			}
16952		}
16953	}
16954
16955	return nil
16956}
16957
16958// SecurityRuleAssociations all security rules associated with the network interface.
16959type SecurityRuleAssociations struct {
16960	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
16961	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
16962	// DefaultSecurityRules - Collection of default security rules of the network security group.
16963	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
16964	// EffectiveSecurityRules - Collection of effective security rules.
16965	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
16966}
16967
16968// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
16969// belongs to a network security group.
16970type SecurityRuleListResult struct {
16971	autorest.Response `json:"-"`
16972	// Value - The security rules in a network security group.
16973	Value *[]SecurityRule `json:"value,omitempty"`
16974	// NextLink - The URL to get the next set of results.
16975	NextLink *string `json:"nextLink,omitempty"`
16976}
16977
16978// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
16979type SecurityRuleListResultIterator struct {
16980	i    int
16981	page SecurityRuleListResultPage
16982}
16983
16984// NextWithContext advances to the next value.  If there was an error making
16985// the request the iterator does not advance and the error is returned.
16986func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16987	if tracing.IsEnabled() {
16988		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
16989		defer func() {
16990			sc := -1
16991			if iter.Response().Response.Response != nil {
16992				sc = iter.Response().Response.Response.StatusCode
16993			}
16994			tracing.EndSpan(ctx, sc, err)
16995		}()
16996	}
16997	iter.i++
16998	if iter.i < len(iter.page.Values()) {
16999		return nil
17000	}
17001	err = iter.page.NextWithContext(ctx)
17002	if err != nil {
17003		iter.i--
17004		return err
17005	}
17006	iter.i = 0
17007	return nil
17008}
17009
17010// Next advances to the next value.  If there was an error making
17011// the request the iterator does not advance and the error is returned.
17012// Deprecated: Use NextWithContext() instead.
17013func (iter *SecurityRuleListResultIterator) Next() error {
17014	return iter.NextWithContext(context.Background())
17015}
17016
17017// NotDone returns true if the enumeration should be started or is not yet complete.
17018func (iter SecurityRuleListResultIterator) NotDone() bool {
17019	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17020}
17021
17022// Response returns the raw server response from the last page request.
17023func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
17024	return iter.page.Response()
17025}
17026
17027// Value returns the current value or a zero-initialized value if the
17028// iterator has advanced beyond the end of the collection.
17029func (iter SecurityRuleListResultIterator) Value() SecurityRule {
17030	if !iter.page.NotDone() {
17031		return SecurityRule{}
17032	}
17033	return iter.page.Values()[iter.i]
17034}
17035
17036// Creates a new instance of the SecurityRuleListResultIterator type.
17037func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
17038	return SecurityRuleListResultIterator{page: page}
17039}
17040
17041// IsEmpty returns true if the ListResult contains no values.
17042func (srlr SecurityRuleListResult) IsEmpty() bool {
17043	return srlr.Value == nil || len(*srlr.Value) == 0
17044}
17045
17046// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
17047// It returns nil if no more results exist.
17048func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17049	if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 {
17050		return nil, nil
17051	}
17052	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17053		autorest.AsJSON(),
17054		autorest.AsGet(),
17055		autorest.WithBaseURL(to.String(srlr.NextLink)))
17056}
17057
17058// SecurityRuleListResultPage contains a page of SecurityRule values.
17059type SecurityRuleListResultPage struct {
17060	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
17061	srlr SecurityRuleListResult
17062}
17063
17064// NextWithContext advances to the next page of values.  If there was an error making
17065// the request the page does not advance and the error is returned.
17066func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17067	if tracing.IsEnabled() {
17068		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
17069		defer func() {
17070			sc := -1
17071			if page.Response().Response.Response != nil {
17072				sc = page.Response().Response.Response.StatusCode
17073			}
17074			tracing.EndSpan(ctx, sc, err)
17075		}()
17076	}
17077	next, err := page.fn(ctx, page.srlr)
17078	if err != nil {
17079		return err
17080	}
17081	page.srlr = next
17082	return nil
17083}
17084
17085// Next advances to the next page of values.  If there was an error making
17086// the request the page does not advance and the error is returned.
17087// Deprecated: Use NextWithContext() instead.
17088func (page *SecurityRuleListResultPage) Next() error {
17089	return page.NextWithContext(context.Background())
17090}
17091
17092// NotDone returns true if the page enumeration should be started or is not yet complete.
17093func (page SecurityRuleListResultPage) NotDone() bool {
17094	return !page.srlr.IsEmpty()
17095}
17096
17097// Response returns the raw server response from the last page request.
17098func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
17099	return page.srlr
17100}
17101
17102// Values returns the slice of values for the current page or nil if there are no values.
17103func (page SecurityRuleListResultPage) Values() []SecurityRule {
17104	if page.srlr.IsEmpty() {
17105		return nil
17106	}
17107	return *page.srlr.Value
17108}
17109
17110// Creates a new instance of the SecurityRuleListResultPage type.
17111func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
17112	return SecurityRuleListResultPage{fn: getNextPage}
17113}
17114
17115// SecurityRulePropertiesFormat security rule resource.
17116type SecurityRulePropertiesFormat struct {
17117	// Description - A description for this rule. Restricted to 140 chars.
17118	Description *string `json:"description,omitempty"`
17119	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
17120	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
17121	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
17122	SourcePortRange *string `json:"sourcePortRange,omitempty"`
17123	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
17124	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
17125	// 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.
17126	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
17127	// SourceAddressPrefixes - The CIDR or source IP ranges.
17128	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
17129	// SourceApplicationSecurityGroups - The application security group specified as source.
17130	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
17131	// 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.
17132	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
17133	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
17134	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
17135	// DestinationApplicationSecurityGroups - The application security group specified as destination.
17136	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
17137	// SourcePortRanges - The source port ranges.
17138	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
17139	// DestinationPortRanges - The destination port ranges.
17140	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
17141	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
17142	Access SecurityRuleAccess `json:"access,omitempty"`
17143	// 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.
17144	Priority *int32 `json:"priority,omitempty"`
17145	// 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'
17146	Direction SecurityRuleDirection `json:"direction,omitempty"`
17147	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17148	ProvisioningState *string `json:"provisioningState,omitempty"`
17149}
17150
17151// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17152// long-running operation.
17153type SecurityRulesCreateOrUpdateFuture struct {
17154	azure.Future
17155}
17156
17157// Result returns the result of the asynchronous operation.
17158// If the operation has not completed it will return an error.
17159func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
17160	var done bool
17161	done, err = future.DoneWithContext(context.Background(), client)
17162	if err != nil {
17163		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17164		return
17165	}
17166	if !done {
17167		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
17168		return
17169	}
17170	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17171	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
17172		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
17173		if err != nil {
17174			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
17175		}
17176	}
17177	return
17178}
17179
17180// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17181// operation.
17182type SecurityRulesDeleteFuture struct {
17183	azure.Future
17184}
17185
17186// Result returns the result of the asynchronous operation.
17187// If the operation has not completed it will return an error.
17188func (future *SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
17189	var done bool
17190	done, err = future.DoneWithContext(context.Background(), client)
17191	if err != nil {
17192		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
17193		return
17194	}
17195	if !done {
17196		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
17197		return
17198	}
17199	ar.Response = future.Response()
17200	return
17201}
17202
17203// SecurityRulesEvaluationResult network security rules evaluation result.
17204type SecurityRulesEvaluationResult struct {
17205	// Name - Name of the network security rule.
17206	Name *string `json:"name,omitempty"`
17207	// ProtocolMatched - Value indicating whether protocol is matched.
17208	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
17209	// SourceMatched - Value indicating whether source is matched.
17210	SourceMatched *bool `json:"sourceMatched,omitempty"`
17211	// SourcePortMatched - Value indicating whether source port is matched.
17212	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
17213	// DestinationMatched - Value indicating whether destination is matched.
17214	DestinationMatched *bool `json:"destinationMatched,omitempty"`
17215	// DestinationPortMatched - Value indicating whether destination port is matched.
17216	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
17217}
17218
17219// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
17220// a long-running operation.
17221type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
17222	azure.Future
17223}
17224
17225// Result returns the result of the asynchronous operation.
17226// If the operation has not completed it will return an error.
17227func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) Result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
17228	var done bool
17229	done, err = future.DoneWithContext(context.Background(), client)
17230	if err != nil {
17231		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17232		return
17233	}
17234	if !done {
17235		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
17236		return
17237	}
17238	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17239	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
17240		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
17241		if err != nil {
17242			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
17243		}
17244	}
17245	return
17246}
17247
17248// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
17249// long-running operation.
17250type ServiceEndpointPoliciesDeleteFuture struct {
17251	azure.Future
17252}
17253
17254// Result returns the result of the asynchronous operation.
17255// If the operation has not completed it will return an error.
17256func (future *ServiceEndpointPoliciesDeleteFuture) Result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
17257	var done bool
17258	done, err = future.DoneWithContext(context.Background(), client)
17259	if err != nil {
17260		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
17261		return
17262	}
17263	if !done {
17264		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
17265		return
17266	}
17267	ar.Response = future.Response()
17268	return
17269}
17270
17271// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
17272// long-running operation.
17273type ServiceEndpointPoliciesUpdateFuture struct {
17274	azure.Future
17275}
17276
17277// Result returns the result of the asynchronous operation.
17278// If the operation has not completed it will return an error.
17279func (future *ServiceEndpointPoliciesUpdateFuture) Result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
17280	var done bool
17281	done, err = future.DoneWithContext(context.Background(), client)
17282	if err != nil {
17283		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
17284		return
17285	}
17286	if !done {
17287		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
17288		return
17289	}
17290	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17291	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
17292		sep, err = client.UpdateResponder(sep.Response.Response)
17293		if err != nil {
17294			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
17295		}
17296	}
17297	return
17298}
17299
17300// ServiceEndpointPolicy service End point policy resource.
17301type ServiceEndpointPolicy struct {
17302	autorest.Response `json:"-"`
17303	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
17304	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
17305	// Etag - A unique read-only string that changes whenever the resource is updated.
17306	Etag *string `json:"etag,omitempty"`
17307	// ID - Resource ID.
17308	ID *string `json:"id,omitempty"`
17309	// Name - READ-ONLY; Resource name.
17310	Name *string `json:"name,omitempty"`
17311	// Type - READ-ONLY; Resource type.
17312	Type *string `json:"type,omitempty"`
17313	// Location - Resource location.
17314	Location *string `json:"location,omitempty"`
17315	// Tags - Resource tags.
17316	Tags map[string]*string `json:"tags"`
17317}
17318
17319// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
17320func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
17321	objectMap := make(map[string]interface{})
17322	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
17323		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
17324	}
17325	if sep.Etag != nil {
17326		objectMap["etag"] = sep.Etag
17327	}
17328	if sep.ID != nil {
17329		objectMap["id"] = sep.ID
17330	}
17331	if sep.Location != nil {
17332		objectMap["location"] = sep.Location
17333	}
17334	if sep.Tags != nil {
17335		objectMap["tags"] = sep.Tags
17336	}
17337	return json.Marshal(objectMap)
17338}
17339
17340// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
17341func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
17342	var m map[string]*json.RawMessage
17343	err := json.Unmarshal(body, &m)
17344	if err != nil {
17345		return err
17346	}
17347	for k, v := range m {
17348		switch k {
17349		case "properties":
17350			if v != nil {
17351				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
17352				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
17353				if err != nil {
17354					return err
17355				}
17356				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
17357			}
17358		case "etag":
17359			if v != nil {
17360				var etag string
17361				err = json.Unmarshal(*v, &etag)
17362				if err != nil {
17363					return err
17364				}
17365				sep.Etag = &etag
17366			}
17367		case "id":
17368			if v != nil {
17369				var ID string
17370				err = json.Unmarshal(*v, &ID)
17371				if err != nil {
17372					return err
17373				}
17374				sep.ID = &ID
17375			}
17376		case "name":
17377			if v != nil {
17378				var name string
17379				err = json.Unmarshal(*v, &name)
17380				if err != nil {
17381					return err
17382				}
17383				sep.Name = &name
17384			}
17385		case "type":
17386			if v != nil {
17387				var typeVar string
17388				err = json.Unmarshal(*v, &typeVar)
17389				if err != nil {
17390					return err
17391				}
17392				sep.Type = &typeVar
17393			}
17394		case "location":
17395			if v != nil {
17396				var location string
17397				err = json.Unmarshal(*v, &location)
17398				if err != nil {
17399					return err
17400				}
17401				sep.Location = &location
17402			}
17403		case "tags":
17404			if v != nil {
17405				var tags map[string]*string
17406				err = json.Unmarshal(*v, &tags)
17407				if err != nil {
17408					return err
17409				}
17410				sep.Tags = tags
17411			}
17412		}
17413	}
17414
17415	return nil
17416}
17417
17418// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
17419type ServiceEndpointPolicyDefinition struct {
17420	autorest.Response `json:"-"`
17421	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
17422	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
17423	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17424	Name *string `json:"name,omitempty"`
17425	// Etag - A unique read-only string that changes whenever the resource is updated.
17426	Etag *string `json:"etag,omitempty"`
17427	// ID - Resource ID.
17428	ID *string `json:"id,omitempty"`
17429}
17430
17431// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
17432func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
17433	objectMap := make(map[string]interface{})
17434	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
17435		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
17436	}
17437	if sepd.Name != nil {
17438		objectMap["name"] = sepd.Name
17439	}
17440	if sepd.Etag != nil {
17441		objectMap["etag"] = sepd.Etag
17442	}
17443	if sepd.ID != nil {
17444		objectMap["id"] = sepd.ID
17445	}
17446	return json.Marshal(objectMap)
17447}
17448
17449// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
17450func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
17451	var m map[string]*json.RawMessage
17452	err := json.Unmarshal(body, &m)
17453	if err != nil {
17454		return err
17455	}
17456	for k, v := range m {
17457		switch k {
17458		case "properties":
17459			if v != nil {
17460				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
17461				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
17462				if err != nil {
17463					return err
17464				}
17465				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
17466			}
17467		case "name":
17468			if v != nil {
17469				var name string
17470				err = json.Unmarshal(*v, &name)
17471				if err != nil {
17472					return err
17473				}
17474				sepd.Name = &name
17475			}
17476		case "etag":
17477			if v != nil {
17478				var etag string
17479				err = json.Unmarshal(*v, &etag)
17480				if err != nil {
17481					return err
17482				}
17483				sepd.Etag = &etag
17484			}
17485		case "id":
17486			if v != nil {
17487				var ID string
17488				err = json.Unmarshal(*v, &ID)
17489				if err != nil {
17490					return err
17491				}
17492				sepd.ID = &ID
17493			}
17494		}
17495	}
17496
17497	return nil
17498}
17499
17500// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
17501// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
17502type ServiceEndpointPolicyDefinitionListResult struct {
17503	autorest.Response `json:"-"`
17504	// Value - The service endpoint policy definition in a service endpoint policy.
17505	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
17506	// NextLink - The URL to get the next set of results.
17507	NextLink *string `json:"nextLink,omitempty"`
17508}
17509
17510// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
17511// ServiceEndpointPolicyDefinition values.
17512type ServiceEndpointPolicyDefinitionListResultIterator struct {
17513	i    int
17514	page ServiceEndpointPolicyDefinitionListResultPage
17515}
17516
17517// NextWithContext advances to the next value.  If there was an error making
17518// the request the iterator does not advance and the error is returned.
17519func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
17520	if tracing.IsEnabled() {
17521		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
17522		defer func() {
17523			sc := -1
17524			if iter.Response().Response.Response != nil {
17525				sc = iter.Response().Response.Response.StatusCode
17526			}
17527			tracing.EndSpan(ctx, sc, err)
17528		}()
17529	}
17530	iter.i++
17531	if iter.i < len(iter.page.Values()) {
17532		return nil
17533	}
17534	err = iter.page.NextWithContext(ctx)
17535	if err != nil {
17536		iter.i--
17537		return err
17538	}
17539	iter.i = 0
17540	return nil
17541}
17542
17543// Next advances to the next value.  If there was an error making
17544// the request the iterator does not advance and the error is returned.
17545// Deprecated: Use NextWithContext() instead.
17546func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
17547	return iter.NextWithContext(context.Background())
17548}
17549
17550// NotDone returns true if the enumeration should be started or is not yet complete.
17551func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
17552	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17553}
17554
17555// Response returns the raw server response from the last page request.
17556func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
17557	return iter.page.Response()
17558}
17559
17560// Value returns the current value or a zero-initialized value if the
17561// iterator has advanced beyond the end of the collection.
17562func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
17563	if !iter.page.NotDone() {
17564		return ServiceEndpointPolicyDefinition{}
17565	}
17566	return iter.page.Values()[iter.i]
17567}
17568
17569// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
17570func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
17571	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
17572}
17573
17574// IsEmpty returns true if the ListResult contains no values.
17575func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
17576	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
17577}
17578
17579// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
17580// It returns nil if no more results exist.
17581func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
17582	if sepdlr.NextLink == nil || len(to.String(sepdlr.NextLink)) < 1 {
17583		return nil, nil
17584	}
17585	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17586		autorest.AsJSON(),
17587		autorest.AsGet(),
17588		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
17589}
17590
17591// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
17592type ServiceEndpointPolicyDefinitionListResultPage struct {
17593	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
17594	sepdlr ServiceEndpointPolicyDefinitionListResult
17595}
17596
17597// NextWithContext advances to the next page of values.  If there was an error making
17598// the request the page does not advance and the error is returned.
17599func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
17600	if tracing.IsEnabled() {
17601		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
17602		defer func() {
17603			sc := -1
17604			if page.Response().Response.Response != nil {
17605				sc = page.Response().Response.Response.StatusCode
17606			}
17607			tracing.EndSpan(ctx, sc, err)
17608		}()
17609	}
17610	next, err := page.fn(ctx, page.sepdlr)
17611	if err != nil {
17612		return err
17613	}
17614	page.sepdlr = next
17615	return nil
17616}
17617
17618// Next advances to the next page of values.  If there was an error making
17619// the request the page does not advance and the error is returned.
17620// Deprecated: Use NextWithContext() instead.
17621func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
17622	return page.NextWithContext(context.Background())
17623}
17624
17625// NotDone returns true if the page enumeration should be started or is not yet complete.
17626func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
17627	return !page.sepdlr.IsEmpty()
17628}
17629
17630// Response returns the raw server response from the last page request.
17631func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
17632	return page.sepdlr
17633}
17634
17635// Values returns the slice of values for the current page or nil if there are no values.
17636func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
17637	if page.sepdlr.IsEmpty() {
17638		return nil
17639	}
17640	return *page.sepdlr.Value
17641}
17642
17643// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
17644func NewServiceEndpointPolicyDefinitionListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
17645	return ServiceEndpointPolicyDefinitionListResultPage{fn: getNextPage}
17646}
17647
17648// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
17649type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
17650	// Description - A description for this rule. Restricted to 140 chars.
17651	Description *string `json:"description,omitempty"`
17652	// Service - service endpoint name.
17653	Service *string `json:"service,omitempty"`
17654	// ServiceResources - A list of service resources.
17655	ServiceResources *[]string `json:"serviceResources,omitempty"`
17656	// ProvisioningState - The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17657	ProvisioningState *string `json:"provisioningState,omitempty"`
17658}
17659
17660// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
17661// results of a long-running operation.
17662type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
17663	azure.Future
17664}
17665
17666// Result returns the result of the asynchronous operation.
17667// If the operation has not completed it will return an error.
17668func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) Result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
17669	var done bool
17670	done, err = future.DoneWithContext(context.Background(), client)
17671	if err != nil {
17672		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17673		return
17674	}
17675	if !done {
17676		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
17677		return
17678	}
17679	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17680	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
17681		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
17682		if err != nil {
17683			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
17684		}
17685	}
17686	return
17687}
17688
17689// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
17690// a long-running operation.
17691type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
17692	azure.Future
17693}
17694
17695// Result returns the result of the asynchronous operation.
17696// If the operation has not completed it will return an error.
17697func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) Result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
17698	var done bool
17699	done, err = future.DoneWithContext(context.Background(), client)
17700	if err != nil {
17701		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
17702		return
17703	}
17704	if !done {
17705		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
17706		return
17707	}
17708	ar.Response = future.Response()
17709	return
17710}
17711
17712// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
17713type ServiceEndpointPolicyListResult struct {
17714	autorest.Response `json:"-"`
17715	// Value - A list of ServiceEndpointPolicy resources.
17716	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
17717	// NextLink - READ-ONLY; The URL to get the next set of results.
17718	NextLink *string `json:"nextLink,omitempty"`
17719}
17720
17721// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
17722// values.
17723type ServiceEndpointPolicyListResultIterator struct {
17724	i    int
17725	page ServiceEndpointPolicyListResultPage
17726}
17727
17728// NextWithContext advances to the next value.  If there was an error making
17729// the request the iterator does not advance and the error is returned.
17730func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
17731	if tracing.IsEnabled() {
17732		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
17733		defer func() {
17734			sc := -1
17735			if iter.Response().Response.Response != nil {
17736				sc = iter.Response().Response.Response.StatusCode
17737			}
17738			tracing.EndSpan(ctx, sc, err)
17739		}()
17740	}
17741	iter.i++
17742	if iter.i < len(iter.page.Values()) {
17743		return nil
17744	}
17745	err = iter.page.NextWithContext(ctx)
17746	if err != nil {
17747		iter.i--
17748		return err
17749	}
17750	iter.i = 0
17751	return nil
17752}
17753
17754// Next advances to the next value.  If there was an error making
17755// the request the iterator does not advance and the error is returned.
17756// Deprecated: Use NextWithContext() instead.
17757func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
17758	return iter.NextWithContext(context.Background())
17759}
17760
17761// NotDone returns true if the enumeration should be started or is not yet complete.
17762func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
17763	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17764}
17765
17766// Response returns the raw server response from the last page request.
17767func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
17768	return iter.page.Response()
17769}
17770
17771// Value returns the current value or a zero-initialized value if the
17772// iterator has advanced beyond the end of the collection.
17773func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
17774	if !iter.page.NotDone() {
17775		return ServiceEndpointPolicy{}
17776	}
17777	return iter.page.Values()[iter.i]
17778}
17779
17780// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
17781func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
17782	return ServiceEndpointPolicyListResultIterator{page: page}
17783}
17784
17785// IsEmpty returns true if the ListResult contains no values.
17786func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
17787	return seplr.Value == nil || len(*seplr.Value) == 0
17788}
17789
17790// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
17791// It returns nil if no more results exist.
17792func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
17793	if seplr.NextLink == nil || len(to.String(seplr.NextLink)) < 1 {
17794		return nil, nil
17795	}
17796	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17797		autorest.AsJSON(),
17798		autorest.AsGet(),
17799		autorest.WithBaseURL(to.String(seplr.NextLink)))
17800}
17801
17802// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
17803type ServiceEndpointPolicyListResultPage struct {
17804	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
17805	seplr ServiceEndpointPolicyListResult
17806}
17807
17808// NextWithContext advances to the next page of values.  If there was an error making
17809// the request the page does not advance and the error is returned.
17810func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
17811	if tracing.IsEnabled() {
17812		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
17813		defer func() {
17814			sc := -1
17815			if page.Response().Response.Response != nil {
17816				sc = page.Response().Response.Response.StatusCode
17817			}
17818			tracing.EndSpan(ctx, sc, err)
17819		}()
17820	}
17821	next, err := page.fn(ctx, page.seplr)
17822	if err != nil {
17823		return err
17824	}
17825	page.seplr = next
17826	return nil
17827}
17828
17829// Next advances to the next page of values.  If there was an error making
17830// the request the page does not advance and the error is returned.
17831// Deprecated: Use NextWithContext() instead.
17832func (page *ServiceEndpointPolicyListResultPage) Next() error {
17833	return page.NextWithContext(context.Background())
17834}
17835
17836// NotDone returns true if the page enumeration should be started or is not yet complete.
17837func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
17838	return !page.seplr.IsEmpty()
17839}
17840
17841// Response returns the raw server response from the last page request.
17842func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
17843	return page.seplr
17844}
17845
17846// Values returns the slice of values for the current page or nil if there are no values.
17847func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
17848	if page.seplr.IsEmpty() {
17849		return nil
17850	}
17851	return *page.seplr.Value
17852}
17853
17854// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
17855func NewServiceEndpointPolicyListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
17856	return ServiceEndpointPolicyListResultPage{fn: getNextPage}
17857}
17858
17859// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
17860type ServiceEndpointPolicyPropertiesFormat struct {
17861	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
17862	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
17863	// ResourceGUID - The resource GUID property of the service endpoint policy resource.
17864	ResourceGUID *string `json:"resourceGuid,omitempty"`
17865	// ProvisioningState - The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17866	ProvisioningState *string `json:"provisioningState,omitempty"`
17867}
17868
17869// ServiceEndpointPropertiesFormat the service endpoint properties.
17870type ServiceEndpointPropertiesFormat struct {
17871	// Service - The type of the endpoint service.
17872	Service *string `json:"service,omitempty"`
17873	// Locations - A list of locations.
17874	Locations *[]string `json:"locations,omitempty"`
17875	// ProvisioningState - The provisioning state of the resource.
17876	ProvisioningState *string `json:"provisioningState,omitempty"`
17877}
17878
17879// String ...
17880type String struct {
17881	autorest.Response `json:"-"`
17882	Value             *string `json:"value,omitempty"`
17883}
17884
17885// Subnet subnet in a virtual network resource.
17886type Subnet struct {
17887	autorest.Response `json:"-"`
17888	// SubnetPropertiesFormat - Properties of the subnet.
17889	*SubnetPropertiesFormat `json:"properties,omitempty"`
17890	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17891	Name *string `json:"name,omitempty"`
17892	// Etag - A unique read-only string that changes whenever the resource is updated.
17893	Etag *string `json:"etag,omitempty"`
17894	// ID - Resource ID.
17895	ID *string `json:"id,omitempty"`
17896}
17897
17898// MarshalJSON is the custom marshaler for Subnet.
17899func (s Subnet) MarshalJSON() ([]byte, error) {
17900	objectMap := make(map[string]interface{})
17901	if s.SubnetPropertiesFormat != nil {
17902		objectMap["properties"] = s.SubnetPropertiesFormat
17903	}
17904	if s.Name != nil {
17905		objectMap["name"] = s.Name
17906	}
17907	if s.Etag != nil {
17908		objectMap["etag"] = s.Etag
17909	}
17910	if s.ID != nil {
17911		objectMap["id"] = s.ID
17912	}
17913	return json.Marshal(objectMap)
17914}
17915
17916// UnmarshalJSON is the custom unmarshaler for Subnet struct.
17917func (s *Subnet) UnmarshalJSON(body []byte) error {
17918	var m map[string]*json.RawMessage
17919	err := json.Unmarshal(body, &m)
17920	if err != nil {
17921		return err
17922	}
17923	for k, v := range m {
17924		switch k {
17925		case "properties":
17926			if v != nil {
17927				var subnetPropertiesFormat SubnetPropertiesFormat
17928				err = json.Unmarshal(*v, &subnetPropertiesFormat)
17929				if err != nil {
17930					return err
17931				}
17932				s.SubnetPropertiesFormat = &subnetPropertiesFormat
17933			}
17934		case "name":
17935			if v != nil {
17936				var name string
17937				err = json.Unmarshal(*v, &name)
17938				if err != nil {
17939					return err
17940				}
17941				s.Name = &name
17942			}
17943		case "etag":
17944			if v != nil {
17945				var etag string
17946				err = json.Unmarshal(*v, &etag)
17947				if err != nil {
17948					return err
17949				}
17950				s.Etag = &etag
17951			}
17952		case "id":
17953			if v != nil {
17954				var ID string
17955				err = json.Unmarshal(*v, &ID)
17956				if err != nil {
17957					return err
17958				}
17959				s.ID = &ID
17960			}
17961		}
17962	}
17963
17964	return nil
17965}
17966
17967// SubnetAssociation network interface and its custom security rules.
17968type SubnetAssociation struct {
17969	// ID - READ-ONLY; Subnet ID.
17970	ID *string `json:"id,omitempty"`
17971	// SecurityRules - Collection of custom security rules.
17972	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
17973}
17974
17975// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
17976// network
17977type SubnetListResult struct {
17978	autorest.Response `json:"-"`
17979	// Value - The subnets in a virtual network.
17980	Value *[]Subnet `json:"value,omitempty"`
17981	// NextLink - The URL to get the next set of results.
17982	NextLink *string `json:"nextLink,omitempty"`
17983}
17984
17985// SubnetListResultIterator provides access to a complete listing of Subnet values.
17986type SubnetListResultIterator struct {
17987	i    int
17988	page SubnetListResultPage
17989}
17990
17991// NextWithContext advances to the next value.  If there was an error making
17992// the request the iterator does not advance and the error is returned.
17993func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
17994	if tracing.IsEnabled() {
17995		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
17996		defer func() {
17997			sc := -1
17998			if iter.Response().Response.Response != nil {
17999				sc = iter.Response().Response.Response.StatusCode
18000			}
18001			tracing.EndSpan(ctx, sc, err)
18002		}()
18003	}
18004	iter.i++
18005	if iter.i < len(iter.page.Values()) {
18006		return nil
18007	}
18008	err = iter.page.NextWithContext(ctx)
18009	if err != nil {
18010		iter.i--
18011		return err
18012	}
18013	iter.i = 0
18014	return nil
18015}
18016
18017// Next advances to the next value.  If there was an error making
18018// the request the iterator does not advance and the error is returned.
18019// Deprecated: Use NextWithContext() instead.
18020func (iter *SubnetListResultIterator) Next() error {
18021	return iter.NextWithContext(context.Background())
18022}
18023
18024// NotDone returns true if the enumeration should be started or is not yet complete.
18025func (iter SubnetListResultIterator) NotDone() bool {
18026	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18027}
18028
18029// Response returns the raw server response from the last page request.
18030func (iter SubnetListResultIterator) Response() SubnetListResult {
18031	return iter.page.Response()
18032}
18033
18034// Value returns the current value or a zero-initialized value if the
18035// iterator has advanced beyond the end of the collection.
18036func (iter SubnetListResultIterator) Value() Subnet {
18037	if !iter.page.NotDone() {
18038		return Subnet{}
18039	}
18040	return iter.page.Values()[iter.i]
18041}
18042
18043// Creates a new instance of the SubnetListResultIterator type.
18044func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
18045	return SubnetListResultIterator{page: page}
18046}
18047
18048// IsEmpty returns true if the ListResult contains no values.
18049func (slr SubnetListResult) IsEmpty() bool {
18050	return slr.Value == nil || len(*slr.Value) == 0
18051}
18052
18053// subnetListResultPreparer prepares a request to retrieve the next set of results.
18054// It returns nil if no more results exist.
18055func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
18056	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
18057		return nil, nil
18058	}
18059	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18060		autorest.AsJSON(),
18061		autorest.AsGet(),
18062		autorest.WithBaseURL(to.String(slr.NextLink)))
18063}
18064
18065// SubnetListResultPage contains a page of Subnet values.
18066type SubnetListResultPage struct {
18067	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
18068	slr SubnetListResult
18069}
18070
18071// NextWithContext advances to the next page of values.  If there was an error making
18072// the request the page does not advance and the error is returned.
18073func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
18074	if tracing.IsEnabled() {
18075		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
18076		defer func() {
18077			sc := -1
18078			if page.Response().Response.Response != nil {
18079				sc = page.Response().Response.Response.StatusCode
18080			}
18081			tracing.EndSpan(ctx, sc, err)
18082		}()
18083	}
18084	next, err := page.fn(ctx, page.slr)
18085	if err != nil {
18086		return err
18087	}
18088	page.slr = next
18089	return nil
18090}
18091
18092// Next advances to the next page of values.  If there was an error making
18093// the request the page does not advance and the error is returned.
18094// Deprecated: Use NextWithContext() instead.
18095func (page *SubnetListResultPage) Next() error {
18096	return page.NextWithContext(context.Background())
18097}
18098
18099// NotDone returns true if the page enumeration should be started or is not yet complete.
18100func (page SubnetListResultPage) NotDone() bool {
18101	return !page.slr.IsEmpty()
18102}
18103
18104// Response returns the raw server response from the last page request.
18105func (page SubnetListResultPage) Response() SubnetListResult {
18106	return page.slr
18107}
18108
18109// Values returns the slice of values for the current page or nil if there are no values.
18110func (page SubnetListResultPage) Values() []Subnet {
18111	if page.slr.IsEmpty() {
18112		return nil
18113	}
18114	return *page.slr.Value
18115}
18116
18117// Creates a new instance of the SubnetListResultPage type.
18118func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
18119	return SubnetListResultPage{fn: getNextPage}
18120}
18121
18122// SubnetPropertiesFormat properties of the subnet.
18123type SubnetPropertiesFormat struct {
18124	// AddressPrefix - The address prefix for the subnet.
18125	AddressPrefix *string `json:"addressPrefix,omitempty"`
18126	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
18127	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
18128	// RouteTable - The reference of the RouteTable resource.
18129	RouteTable *RouteTable `json:"routeTable,omitempty"`
18130	// ServiceEndpoints - An array of service endpoints.
18131	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
18132	// ServiceEndpointPolicies - An array of service endpoint policies.
18133	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
18134	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
18135	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
18136	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
18137	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
18138	// ProvisioningState - The provisioning state of the resource.
18139	ProvisioningState *string `json:"provisioningState,omitempty"`
18140}
18141
18142// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
18143// operation.
18144type SubnetsCreateOrUpdateFuture struct {
18145	azure.Future
18146}
18147
18148// Result returns the result of the asynchronous operation.
18149// If the operation has not completed it will return an error.
18150func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
18151	var done bool
18152	done, err = future.DoneWithContext(context.Background(), client)
18153	if err != nil {
18154		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18155		return
18156	}
18157	if !done {
18158		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
18159		return
18160	}
18161	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18162	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
18163		s, err = client.CreateOrUpdateResponder(s.Response.Response)
18164		if err != nil {
18165			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
18166		}
18167	}
18168	return
18169}
18170
18171// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18172// operation.
18173type SubnetsDeleteFuture struct {
18174	azure.Future
18175}
18176
18177// Result returns the result of the asynchronous operation.
18178// If the operation has not completed it will return an error.
18179func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
18180	var done bool
18181	done, err = future.DoneWithContext(context.Background(), client)
18182	if err != nil {
18183		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
18184		return
18185	}
18186	if !done {
18187		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
18188		return
18189	}
18190	ar.Response = future.Response()
18191	return
18192}
18193
18194// SubResource reference to another subresource.
18195type SubResource struct {
18196	// ID - Resource ID.
18197	ID *string `json:"id,omitempty"`
18198}
18199
18200// TagsObject tags object for patch operations.
18201type TagsObject struct {
18202	// Tags - Resource tags.
18203	Tags map[string]*string `json:"tags"`
18204}
18205
18206// MarshalJSON is the custom marshaler for TagsObject.
18207func (toVar TagsObject) MarshalJSON() ([]byte, error) {
18208	objectMap := make(map[string]interface{})
18209	if toVar.Tags != nil {
18210		objectMap["tags"] = toVar.Tags
18211	}
18212	return json.Marshal(objectMap)
18213}
18214
18215// Topology topology of the specified resource group.
18216type Topology struct {
18217	autorest.Response `json:"-"`
18218	// ID - READ-ONLY; GUID representing the operation id.
18219	ID *string `json:"id,omitempty"`
18220	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
18221	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
18222	// LastModified - READ-ONLY; The datetime when the topology was last modified.
18223	LastModified *date.Time          `json:"lastModified,omitempty"`
18224	Resources    *[]TopologyResource `json:"resources,omitempty"`
18225}
18226
18227// TopologyAssociation resources that have an association with the parent resource.
18228type TopologyAssociation struct {
18229	// Name - The name of the resource that is associated with the parent resource.
18230	Name *string `json:"name,omitempty"`
18231	// ResourceID - The ID of the resource that is associated with the parent resource.
18232	ResourceID *string `json:"resourceId,omitempty"`
18233	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
18234	AssociationType AssociationType `json:"associationType,omitempty"`
18235}
18236
18237// TopologyParameters parameters that define the representation of topology.
18238type TopologyParameters struct {
18239	// TargetResourceGroupName - The name of the target resource group to perform topology on.
18240	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
18241	// TargetVirtualNetwork - The reference of the Virtual Network resource.
18242	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
18243	// TargetSubnet - The reference of the Subnet resource.
18244	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
18245}
18246
18247// TopologyResource the network resource topology information for the given resource group.
18248type TopologyResource struct {
18249	// Name - Name of the resource.
18250	Name *string `json:"name,omitempty"`
18251	// ID - ID of the resource.
18252	ID *string `json:"id,omitempty"`
18253	// Location - Resource location.
18254	Location *string `json:"location,omitempty"`
18255	// Associations - Holds the associations the resource has with other resources in the resource group.
18256	Associations *[]TopologyAssociation `json:"associations,omitempty"`
18257}
18258
18259// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
18260type TrafficAnalyticsConfigurationProperties struct {
18261	// Enabled - Flag to enable/disable traffic analytics.
18262	Enabled *bool `json:"enabled,omitempty"`
18263	// WorkspaceID - The resource guid of the attached workspace
18264	WorkspaceID *string `json:"workspaceId,omitempty"`
18265	// WorkspaceRegion - The location of the attached workspace
18266	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
18267	// WorkspaceResourceID - Resource Id of the attached workspace
18268	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
18269}
18270
18271// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
18272type TrafficAnalyticsProperties struct {
18273	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
18274}
18275
18276// TrafficQuery parameters to compare with network configuration.
18277type TrafficQuery struct {
18278	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
18279	Direction Direction `json:"direction,omitempty"`
18280	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
18281	Protocol *string `json:"protocol,omitempty"`
18282	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
18283	Source *string `json:"source,omitempty"`
18284	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
18285	Destination *string `json:"destination,omitempty"`
18286	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
18287	DestinationPort *string `json:"destinationPort,omitempty"`
18288}
18289
18290// TroubleshootingDetails information gained from troubleshooting of specified resource.
18291type TroubleshootingDetails struct {
18292	// ID - The id of the get troubleshoot operation.
18293	ID *string `json:"id,omitempty"`
18294	// ReasonType - Reason type of failure.
18295	ReasonType *string `json:"reasonType,omitempty"`
18296	// Summary - A summary of troubleshooting.
18297	Summary *string `json:"summary,omitempty"`
18298	// Detail - Details on troubleshooting results.
18299	Detail *string `json:"detail,omitempty"`
18300	// RecommendedActions - List of recommended actions.
18301	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
18302}
18303
18304// TroubleshootingParameters parameters that define the resource to troubleshoot.
18305type TroubleshootingParameters struct {
18306	// TargetResourceID - The target resource to troubleshoot.
18307	TargetResourceID           *string `json:"targetResourceId,omitempty"`
18308	*TroubleshootingProperties `json:"properties,omitempty"`
18309}
18310
18311// MarshalJSON is the custom marshaler for TroubleshootingParameters.
18312func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
18313	objectMap := make(map[string]interface{})
18314	if tp.TargetResourceID != nil {
18315		objectMap["targetResourceId"] = tp.TargetResourceID
18316	}
18317	if tp.TroubleshootingProperties != nil {
18318		objectMap["properties"] = tp.TroubleshootingProperties
18319	}
18320	return json.Marshal(objectMap)
18321}
18322
18323// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
18324func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
18325	var m map[string]*json.RawMessage
18326	err := json.Unmarshal(body, &m)
18327	if err != nil {
18328		return err
18329	}
18330	for k, v := range m {
18331		switch k {
18332		case "targetResourceId":
18333			if v != nil {
18334				var targetResourceID string
18335				err = json.Unmarshal(*v, &targetResourceID)
18336				if err != nil {
18337					return err
18338				}
18339				tp.TargetResourceID = &targetResourceID
18340			}
18341		case "properties":
18342			if v != nil {
18343				var troubleshootingProperties TroubleshootingProperties
18344				err = json.Unmarshal(*v, &troubleshootingProperties)
18345				if err != nil {
18346					return err
18347				}
18348				tp.TroubleshootingProperties = &troubleshootingProperties
18349			}
18350		}
18351	}
18352
18353	return nil
18354}
18355
18356// TroubleshootingProperties storage location provided for troubleshoot.
18357type TroubleshootingProperties struct {
18358	// StorageID - The ID for the storage account to save the troubleshoot result.
18359	StorageID *string `json:"storageId,omitempty"`
18360	// StoragePath - The path to the blob to save the troubleshoot result in.
18361	StoragePath *string `json:"storagePath,omitempty"`
18362}
18363
18364// TroubleshootingRecommendedActions recommended actions based on discovered issues.
18365type TroubleshootingRecommendedActions struct {
18366	// ActionID - ID of the recommended action.
18367	ActionID *string `json:"actionId,omitempty"`
18368	// ActionText - Description of recommended actions.
18369	ActionText *string `json:"actionText,omitempty"`
18370	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
18371	ActionURI *string `json:"actionUri,omitempty"`
18372	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
18373	ActionURIText *string `json:"actionUriText,omitempty"`
18374}
18375
18376// TroubleshootingResult troubleshooting information gained from specified resource.
18377type TroubleshootingResult struct {
18378	autorest.Response `json:"-"`
18379	// StartTime - The start time of the troubleshooting.
18380	StartTime *date.Time `json:"startTime,omitempty"`
18381	// EndTime - The end time of the troubleshooting.
18382	EndTime *date.Time `json:"endTime,omitempty"`
18383	// Code - The result code of the troubleshooting.
18384	Code *string `json:"code,omitempty"`
18385	// Results - Information from troubleshooting.
18386	Results *[]TroubleshootingDetails `json:"results,omitempty"`
18387}
18388
18389// TunnelConnectionHealth virtualNetworkGatewayConnection properties
18390type TunnelConnectionHealth struct {
18391	// Tunnel - READ-ONLY; Tunnel name.
18392	Tunnel *string `json:"tunnel,omitempty"`
18393	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
18394	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
18395	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
18396	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
18397	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
18398	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
18399	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
18400	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
18401}
18402
18403// Usage describes network resource usage.
18404type Usage struct {
18405	// ID - READ-ONLY; Resource identifier.
18406	ID *string `json:"id,omitempty"`
18407	// Unit - An enum describing the unit of measurement.
18408	Unit *string `json:"unit,omitempty"`
18409	// CurrentValue - The current value of the usage.
18410	CurrentValue *int64 `json:"currentValue,omitempty"`
18411	// Limit - The limit of usage.
18412	Limit *int64 `json:"limit,omitempty"`
18413	// Name - The name of the type of usage.
18414	Name *UsageName `json:"name,omitempty"`
18415}
18416
18417// UsageName the usage names.
18418type UsageName struct {
18419	// Value - A string describing the resource name.
18420	Value *string `json:"value,omitempty"`
18421	// LocalizedValue - A localized string describing the resource name.
18422	LocalizedValue *string `json:"localizedValue,omitempty"`
18423}
18424
18425// UsagesListResult the list usages operation response.
18426type UsagesListResult struct {
18427	autorest.Response `json:"-"`
18428	// Value - The list network resource usages.
18429	Value *[]Usage `json:"value,omitempty"`
18430	// NextLink - URL to get the next set of results.
18431	NextLink *string `json:"nextLink,omitempty"`
18432}
18433
18434// UsagesListResultIterator provides access to a complete listing of Usage values.
18435type UsagesListResultIterator struct {
18436	i    int
18437	page UsagesListResultPage
18438}
18439
18440// NextWithContext advances to the next value.  If there was an error making
18441// the request the iterator does not advance and the error is returned.
18442func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
18443	if tracing.IsEnabled() {
18444		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
18445		defer func() {
18446			sc := -1
18447			if iter.Response().Response.Response != nil {
18448				sc = iter.Response().Response.Response.StatusCode
18449			}
18450			tracing.EndSpan(ctx, sc, err)
18451		}()
18452	}
18453	iter.i++
18454	if iter.i < len(iter.page.Values()) {
18455		return nil
18456	}
18457	err = iter.page.NextWithContext(ctx)
18458	if err != nil {
18459		iter.i--
18460		return err
18461	}
18462	iter.i = 0
18463	return nil
18464}
18465
18466// Next advances to the next value.  If there was an error making
18467// the request the iterator does not advance and the error is returned.
18468// Deprecated: Use NextWithContext() instead.
18469func (iter *UsagesListResultIterator) Next() error {
18470	return iter.NextWithContext(context.Background())
18471}
18472
18473// NotDone returns true if the enumeration should be started or is not yet complete.
18474func (iter UsagesListResultIterator) NotDone() bool {
18475	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18476}
18477
18478// Response returns the raw server response from the last page request.
18479func (iter UsagesListResultIterator) Response() UsagesListResult {
18480	return iter.page.Response()
18481}
18482
18483// Value returns the current value or a zero-initialized value if the
18484// iterator has advanced beyond the end of the collection.
18485func (iter UsagesListResultIterator) Value() Usage {
18486	if !iter.page.NotDone() {
18487		return Usage{}
18488	}
18489	return iter.page.Values()[iter.i]
18490}
18491
18492// Creates a new instance of the UsagesListResultIterator type.
18493func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
18494	return UsagesListResultIterator{page: page}
18495}
18496
18497// IsEmpty returns true if the ListResult contains no values.
18498func (ulr UsagesListResult) IsEmpty() bool {
18499	return ulr.Value == nil || len(*ulr.Value) == 0
18500}
18501
18502// usagesListResultPreparer prepares a request to retrieve the next set of results.
18503// It returns nil if no more results exist.
18504func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
18505	if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 {
18506		return nil, nil
18507	}
18508	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18509		autorest.AsJSON(),
18510		autorest.AsGet(),
18511		autorest.WithBaseURL(to.String(ulr.NextLink)))
18512}
18513
18514// UsagesListResultPage contains a page of Usage values.
18515type UsagesListResultPage struct {
18516	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
18517	ulr UsagesListResult
18518}
18519
18520// NextWithContext advances to the next page of values.  If there was an error making
18521// the request the page does not advance and the error is returned.
18522func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
18523	if tracing.IsEnabled() {
18524		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
18525		defer func() {
18526			sc := -1
18527			if page.Response().Response.Response != nil {
18528				sc = page.Response().Response.Response.StatusCode
18529			}
18530			tracing.EndSpan(ctx, sc, err)
18531		}()
18532	}
18533	next, err := page.fn(ctx, page.ulr)
18534	if err != nil {
18535		return err
18536	}
18537	page.ulr = next
18538	return nil
18539}
18540
18541// Next advances to the next page of values.  If there was an error making
18542// the request the page does not advance and the error is returned.
18543// Deprecated: Use NextWithContext() instead.
18544func (page *UsagesListResultPage) Next() error {
18545	return page.NextWithContext(context.Background())
18546}
18547
18548// NotDone returns true if the page enumeration should be started or is not yet complete.
18549func (page UsagesListResultPage) NotDone() bool {
18550	return !page.ulr.IsEmpty()
18551}
18552
18553// Response returns the raw server response from the last page request.
18554func (page UsagesListResultPage) Response() UsagesListResult {
18555	return page.ulr
18556}
18557
18558// Values returns the slice of values for the current page or nil if there are no values.
18559func (page UsagesListResultPage) Values() []Usage {
18560	if page.ulr.IsEmpty() {
18561		return nil
18562	}
18563	return *page.ulr.Value
18564}
18565
18566// Creates a new instance of the UsagesListResultPage type.
18567func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
18568	return UsagesListResultPage{fn: getNextPage}
18569}
18570
18571// VerificationIPFlowParameters parameters that define the IP flow to be verified.
18572type VerificationIPFlowParameters struct {
18573	// TargetResourceID - The ID of the target resource to perform next-hop on.
18574	TargetResourceID *string `json:"targetResourceId,omitempty"`
18575	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
18576	Direction Direction `json:"direction,omitempty"`
18577	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
18578	Protocol IPFlowProtocol `json:"protocol,omitempty"`
18579	// 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.
18580	LocalPort *string `json:"localPort,omitempty"`
18581	// 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.
18582	RemotePort *string `json:"remotePort,omitempty"`
18583	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
18584	LocalIPAddress *string `json:"localIPAddress,omitempty"`
18585	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
18586	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
18587	// 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).
18588	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18589}
18590
18591// VerificationIPFlowResult results of IP flow verification on the target resource.
18592type VerificationIPFlowResult struct {
18593	autorest.Response `json:"-"`
18594	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
18595	Access Access `json:"access,omitempty"`
18596	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
18597	RuleName *string `json:"ruleName,omitempty"`
18598}
18599
18600// VirtualHub virtualHub Resource.
18601type VirtualHub struct {
18602	autorest.Response     `json:"-"`
18603	*VirtualHubProperties `json:"properties,omitempty"`
18604	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18605	Etag *string `json:"etag,omitempty"`
18606	// ID - Resource ID.
18607	ID *string `json:"id,omitempty"`
18608	// Name - READ-ONLY; Resource name.
18609	Name *string `json:"name,omitempty"`
18610	// Type - READ-ONLY; Resource type.
18611	Type *string `json:"type,omitempty"`
18612	// Location - Resource location.
18613	Location *string `json:"location,omitempty"`
18614	// Tags - Resource tags.
18615	Tags map[string]*string `json:"tags"`
18616}
18617
18618// MarshalJSON is the custom marshaler for VirtualHub.
18619func (vh VirtualHub) MarshalJSON() ([]byte, error) {
18620	objectMap := make(map[string]interface{})
18621	if vh.VirtualHubProperties != nil {
18622		objectMap["properties"] = vh.VirtualHubProperties
18623	}
18624	if vh.ID != nil {
18625		objectMap["id"] = vh.ID
18626	}
18627	if vh.Location != nil {
18628		objectMap["location"] = vh.Location
18629	}
18630	if vh.Tags != nil {
18631		objectMap["tags"] = vh.Tags
18632	}
18633	return json.Marshal(objectMap)
18634}
18635
18636// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
18637func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
18638	var m map[string]*json.RawMessage
18639	err := json.Unmarshal(body, &m)
18640	if err != nil {
18641		return err
18642	}
18643	for k, v := range m {
18644		switch k {
18645		case "properties":
18646			if v != nil {
18647				var virtualHubProperties VirtualHubProperties
18648				err = json.Unmarshal(*v, &virtualHubProperties)
18649				if err != nil {
18650					return err
18651				}
18652				vh.VirtualHubProperties = &virtualHubProperties
18653			}
18654		case "etag":
18655			if v != nil {
18656				var etag string
18657				err = json.Unmarshal(*v, &etag)
18658				if err != nil {
18659					return err
18660				}
18661				vh.Etag = &etag
18662			}
18663		case "id":
18664			if v != nil {
18665				var ID string
18666				err = json.Unmarshal(*v, &ID)
18667				if err != nil {
18668					return err
18669				}
18670				vh.ID = &ID
18671			}
18672		case "name":
18673			if v != nil {
18674				var name string
18675				err = json.Unmarshal(*v, &name)
18676				if err != nil {
18677					return err
18678				}
18679				vh.Name = &name
18680			}
18681		case "type":
18682			if v != nil {
18683				var typeVar string
18684				err = json.Unmarshal(*v, &typeVar)
18685				if err != nil {
18686					return err
18687				}
18688				vh.Type = &typeVar
18689			}
18690		case "location":
18691			if v != nil {
18692				var location string
18693				err = json.Unmarshal(*v, &location)
18694				if err != nil {
18695					return err
18696				}
18697				vh.Location = &location
18698			}
18699		case "tags":
18700			if v != nil {
18701				var tags map[string]*string
18702				err = json.Unmarshal(*v, &tags)
18703				if err != nil {
18704					return err
18705				}
18706				vh.Tags = tags
18707			}
18708		}
18709	}
18710
18711	return nil
18712}
18713
18714// VirtualHubProperties parameters for VirtualHub
18715type VirtualHubProperties struct {
18716	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
18717	VirtualWan *SubResource `json:"virtualWan,omitempty"`
18718	// HubVirtualNetworkConnections - list of all vnet connections with this VirtualHub.
18719	HubVirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"hubVirtualNetworkConnections,omitempty"`
18720	// AddressPrefix - Address-prefix for this VirtualHub.
18721	AddressPrefix *string `json:"addressPrefix,omitempty"`
18722	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18723	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18724}
18725
18726// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18727// long-running operation.
18728type VirtualHubsCreateOrUpdateFuture struct {
18729	azure.Future
18730}
18731
18732// Result returns the result of the asynchronous operation.
18733// If the operation has not completed it will return an error.
18734func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
18735	var done bool
18736	done, err = future.DoneWithContext(context.Background(), client)
18737	if err != nil {
18738		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18739		return
18740	}
18741	if !done {
18742		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
18743		return
18744	}
18745	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18746	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
18747		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
18748		if err != nil {
18749			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
18750		}
18751	}
18752	return
18753}
18754
18755// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18756// operation.
18757type VirtualHubsDeleteFuture struct {
18758	azure.Future
18759}
18760
18761// Result returns the result of the asynchronous operation.
18762// If the operation has not completed it will return an error.
18763func (future *VirtualHubsDeleteFuture) Result(client VirtualHubsClient) (ar autorest.Response, err error) {
18764	var done bool
18765	done, err = future.DoneWithContext(context.Background(), client)
18766	if err != nil {
18767		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
18768		return
18769	}
18770	if !done {
18771		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
18772		return
18773	}
18774	ar.Response = future.Response()
18775	return
18776}
18777
18778// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
18779// operation.
18780type VirtualHubsUpdateTagsFuture struct {
18781	azure.Future
18782}
18783
18784// Result returns the result of the asynchronous operation.
18785// If the operation has not completed it will return an error.
18786func (future *VirtualHubsUpdateTagsFuture) Result(client VirtualHubsClient) (vh VirtualHub, err error) {
18787	var done bool
18788	done, err = future.DoneWithContext(context.Background(), client)
18789	if err != nil {
18790		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18791		return
18792	}
18793	if !done {
18794		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
18795		return
18796	}
18797	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18798	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
18799		vh, err = client.UpdateTagsResponder(vh.Response.Response)
18800		if err != nil {
18801			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
18802		}
18803	}
18804	return
18805}
18806
18807// VirtualNetwork virtual Network resource.
18808type VirtualNetwork struct {
18809	autorest.Response `json:"-"`
18810	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
18811	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
18812	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18813	Etag *string `json:"etag,omitempty"`
18814	// ID - Resource ID.
18815	ID *string `json:"id,omitempty"`
18816	// Name - READ-ONLY; Resource name.
18817	Name *string `json:"name,omitempty"`
18818	// Type - READ-ONLY; Resource type.
18819	Type *string `json:"type,omitempty"`
18820	// Location - Resource location.
18821	Location *string `json:"location,omitempty"`
18822	// Tags - Resource tags.
18823	Tags map[string]*string `json:"tags"`
18824}
18825
18826// MarshalJSON is the custom marshaler for VirtualNetwork.
18827func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
18828	objectMap := make(map[string]interface{})
18829	if vn.VirtualNetworkPropertiesFormat != nil {
18830		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
18831	}
18832	if vn.Etag != nil {
18833		objectMap["etag"] = vn.Etag
18834	}
18835	if vn.ID != nil {
18836		objectMap["id"] = vn.ID
18837	}
18838	if vn.Location != nil {
18839		objectMap["location"] = vn.Location
18840	}
18841	if vn.Tags != nil {
18842		objectMap["tags"] = vn.Tags
18843	}
18844	return json.Marshal(objectMap)
18845}
18846
18847// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
18848func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
18849	var m map[string]*json.RawMessage
18850	err := json.Unmarshal(body, &m)
18851	if err != nil {
18852		return err
18853	}
18854	for k, v := range m {
18855		switch k {
18856		case "properties":
18857			if v != nil {
18858				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
18859				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
18860				if err != nil {
18861					return err
18862				}
18863				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
18864			}
18865		case "etag":
18866			if v != nil {
18867				var etag string
18868				err = json.Unmarshal(*v, &etag)
18869				if err != nil {
18870					return err
18871				}
18872				vn.Etag = &etag
18873			}
18874		case "id":
18875			if v != nil {
18876				var ID string
18877				err = json.Unmarshal(*v, &ID)
18878				if err != nil {
18879					return err
18880				}
18881				vn.ID = &ID
18882			}
18883		case "name":
18884			if v != nil {
18885				var name string
18886				err = json.Unmarshal(*v, &name)
18887				if err != nil {
18888					return err
18889				}
18890				vn.Name = &name
18891			}
18892		case "type":
18893			if v != nil {
18894				var typeVar string
18895				err = json.Unmarshal(*v, &typeVar)
18896				if err != nil {
18897					return err
18898				}
18899				vn.Type = &typeVar
18900			}
18901		case "location":
18902			if v != nil {
18903				var location string
18904				err = json.Unmarshal(*v, &location)
18905				if err != nil {
18906					return err
18907				}
18908				vn.Location = &location
18909			}
18910		case "tags":
18911			if v != nil {
18912				var tags map[string]*string
18913				err = json.Unmarshal(*v, &tags)
18914				if err != nil {
18915					return err
18916				}
18917				vn.Tags = tags
18918			}
18919		}
18920	}
18921
18922	return nil
18923}
18924
18925// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
18926// resource.
18927type VirtualNetworkConnectionGatewayReference struct {
18928	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
18929	ID *string `json:"id,omitempty"`
18930}
18931
18932// VirtualNetworkGateway a common class for general resource information
18933type VirtualNetworkGateway struct {
18934	autorest.Response `json:"-"`
18935	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
18936	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
18937	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18938	Etag *string `json:"etag,omitempty"`
18939	// ID - Resource ID.
18940	ID *string `json:"id,omitempty"`
18941	// Name - READ-ONLY; Resource name.
18942	Name *string `json:"name,omitempty"`
18943	// Type - READ-ONLY; Resource type.
18944	Type *string `json:"type,omitempty"`
18945	// Location - Resource location.
18946	Location *string `json:"location,omitempty"`
18947	// Tags - Resource tags.
18948	Tags map[string]*string `json:"tags"`
18949}
18950
18951// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
18952func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
18953	objectMap := make(map[string]interface{})
18954	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
18955		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
18956	}
18957	if vng.Etag != nil {
18958		objectMap["etag"] = vng.Etag
18959	}
18960	if vng.ID != nil {
18961		objectMap["id"] = vng.ID
18962	}
18963	if vng.Location != nil {
18964		objectMap["location"] = vng.Location
18965	}
18966	if vng.Tags != nil {
18967		objectMap["tags"] = vng.Tags
18968	}
18969	return json.Marshal(objectMap)
18970}
18971
18972// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
18973func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
18974	var m map[string]*json.RawMessage
18975	err := json.Unmarshal(body, &m)
18976	if err != nil {
18977		return err
18978	}
18979	for k, v := range m {
18980		switch k {
18981		case "properties":
18982			if v != nil {
18983				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
18984				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
18985				if err != nil {
18986					return err
18987				}
18988				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
18989			}
18990		case "etag":
18991			if v != nil {
18992				var etag string
18993				err = json.Unmarshal(*v, &etag)
18994				if err != nil {
18995					return err
18996				}
18997				vng.Etag = &etag
18998			}
18999		case "id":
19000			if v != nil {
19001				var ID string
19002				err = json.Unmarshal(*v, &ID)
19003				if err != nil {
19004					return err
19005				}
19006				vng.ID = &ID
19007			}
19008		case "name":
19009			if v != nil {
19010				var name string
19011				err = json.Unmarshal(*v, &name)
19012				if err != nil {
19013					return err
19014				}
19015				vng.Name = &name
19016			}
19017		case "type":
19018			if v != nil {
19019				var typeVar string
19020				err = json.Unmarshal(*v, &typeVar)
19021				if err != nil {
19022					return err
19023				}
19024				vng.Type = &typeVar
19025			}
19026		case "location":
19027			if v != nil {
19028				var location string
19029				err = json.Unmarshal(*v, &location)
19030				if err != nil {
19031					return err
19032				}
19033				vng.Location = &location
19034			}
19035		case "tags":
19036			if v != nil {
19037				var tags map[string]*string
19038				err = json.Unmarshal(*v, &tags)
19039				if err != nil {
19040					return err
19041				}
19042				vng.Tags = tags
19043			}
19044		}
19045	}
19046
19047	return nil
19048}
19049
19050// VirtualNetworkGatewayConnection a common class for general resource information
19051type VirtualNetworkGatewayConnection struct {
19052	autorest.Response `json:"-"`
19053	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
19054	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
19055	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
19056	Etag *string `json:"etag,omitempty"`
19057	// ID - Resource ID.
19058	ID *string `json:"id,omitempty"`
19059	// Name - READ-ONLY; Resource name.
19060	Name *string `json:"name,omitempty"`
19061	// Type - READ-ONLY; Resource type.
19062	Type *string `json:"type,omitempty"`
19063	// Location - Resource location.
19064	Location *string `json:"location,omitempty"`
19065	// Tags - Resource tags.
19066	Tags map[string]*string `json:"tags"`
19067}
19068
19069// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
19070func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
19071	objectMap := make(map[string]interface{})
19072	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
19073		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
19074	}
19075	if vngc.Etag != nil {
19076		objectMap["etag"] = vngc.Etag
19077	}
19078	if vngc.ID != nil {
19079		objectMap["id"] = vngc.ID
19080	}
19081	if vngc.Location != nil {
19082		objectMap["location"] = vngc.Location
19083	}
19084	if vngc.Tags != nil {
19085		objectMap["tags"] = vngc.Tags
19086	}
19087	return json.Marshal(objectMap)
19088}
19089
19090// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
19091func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
19092	var m map[string]*json.RawMessage
19093	err := json.Unmarshal(body, &m)
19094	if err != nil {
19095		return err
19096	}
19097	for k, v := range m {
19098		switch k {
19099		case "properties":
19100			if v != nil {
19101				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
19102				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
19103				if err != nil {
19104					return err
19105				}
19106				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
19107			}
19108		case "etag":
19109			if v != nil {
19110				var etag string
19111				err = json.Unmarshal(*v, &etag)
19112				if err != nil {
19113					return err
19114				}
19115				vngc.Etag = &etag
19116			}
19117		case "id":
19118			if v != nil {
19119				var ID string
19120				err = json.Unmarshal(*v, &ID)
19121				if err != nil {
19122					return err
19123				}
19124				vngc.ID = &ID
19125			}
19126		case "name":
19127			if v != nil {
19128				var name string
19129				err = json.Unmarshal(*v, &name)
19130				if err != nil {
19131					return err
19132				}
19133				vngc.Name = &name
19134			}
19135		case "type":
19136			if v != nil {
19137				var typeVar string
19138				err = json.Unmarshal(*v, &typeVar)
19139				if err != nil {
19140					return err
19141				}
19142				vngc.Type = &typeVar
19143			}
19144		case "location":
19145			if v != nil {
19146				var location string
19147				err = json.Unmarshal(*v, &location)
19148				if err != nil {
19149					return err
19150				}
19151				vngc.Location = &location
19152			}
19153		case "tags":
19154			if v != nil {
19155				var tags map[string]*string
19156				err = json.Unmarshal(*v, &tags)
19157				if err != nil {
19158					return err
19159				}
19160				vngc.Tags = tags
19161			}
19162		}
19163	}
19164
19165	return nil
19166}
19167
19168// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
19169type VirtualNetworkGatewayConnectionListEntity struct {
19170	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
19171	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
19172	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
19173	Etag *string `json:"etag,omitempty"`
19174	// ID - Resource ID.
19175	ID *string `json:"id,omitempty"`
19176	// Name - READ-ONLY; Resource name.
19177	Name *string `json:"name,omitempty"`
19178	// Type - READ-ONLY; Resource type.
19179	Type *string `json:"type,omitempty"`
19180	// Location - Resource location.
19181	Location *string `json:"location,omitempty"`
19182	// Tags - Resource tags.
19183	Tags map[string]*string `json:"tags"`
19184}
19185
19186// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
19187func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
19188	objectMap := make(map[string]interface{})
19189	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
19190		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
19191	}
19192	if vngcle.Etag != nil {
19193		objectMap["etag"] = vngcle.Etag
19194	}
19195	if vngcle.ID != nil {
19196		objectMap["id"] = vngcle.ID
19197	}
19198	if vngcle.Location != nil {
19199		objectMap["location"] = vngcle.Location
19200	}
19201	if vngcle.Tags != nil {
19202		objectMap["tags"] = vngcle.Tags
19203	}
19204	return json.Marshal(objectMap)
19205}
19206
19207// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
19208func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
19209	var m map[string]*json.RawMessage
19210	err := json.Unmarshal(body, &m)
19211	if err != nil {
19212		return err
19213	}
19214	for k, v := range m {
19215		switch k {
19216		case "properties":
19217			if v != nil {
19218				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
19219				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
19220				if err != nil {
19221					return err
19222				}
19223				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
19224			}
19225		case "etag":
19226			if v != nil {
19227				var etag string
19228				err = json.Unmarshal(*v, &etag)
19229				if err != nil {
19230					return err
19231				}
19232				vngcle.Etag = &etag
19233			}
19234		case "id":
19235			if v != nil {
19236				var ID string
19237				err = json.Unmarshal(*v, &ID)
19238				if err != nil {
19239					return err
19240				}
19241				vngcle.ID = &ID
19242			}
19243		case "name":
19244			if v != nil {
19245				var name string
19246				err = json.Unmarshal(*v, &name)
19247				if err != nil {
19248					return err
19249				}
19250				vngcle.Name = &name
19251			}
19252		case "type":
19253			if v != nil {
19254				var typeVar string
19255				err = json.Unmarshal(*v, &typeVar)
19256				if err != nil {
19257					return err
19258				}
19259				vngcle.Type = &typeVar
19260			}
19261		case "location":
19262			if v != nil {
19263				var location string
19264				err = json.Unmarshal(*v, &location)
19265				if err != nil {
19266					return err
19267				}
19268				vngcle.Location = &location
19269			}
19270		case "tags":
19271			if v != nil {
19272				var tags map[string]*string
19273				err = json.Unmarshal(*v, &tags)
19274				if err != nil {
19275					return err
19276				}
19277				vngcle.Tags = tags
19278			}
19279		}
19280	}
19281
19282	return nil
19283}
19284
19285// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
19286type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
19287	// AuthorizationKey - The authorizationKey.
19288	AuthorizationKey *string `json:"authorizationKey,omitempty"`
19289	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
19290	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
19291	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
19292	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
19293	// LocalNetworkGateway2 - The reference to local network gateway resource.
19294	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
19295	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
19296	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
19297	// RoutingWeight - The routing weight.
19298	RoutingWeight *int32 `json:"routingWeight,omitempty"`
19299	// SharedKey - The IPSec shared key.
19300	SharedKey *string `json:"sharedKey,omitempty"`
19301	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
19302	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
19303	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
19304	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
19305	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
19306	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
19307	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
19308	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
19309	// Peer - The reference to peerings resource.
19310	Peer *SubResource `json:"peer,omitempty"`
19311	// EnableBgp - EnableBgp flag
19312	EnableBgp *bool `json:"enableBgp,omitempty"`
19313	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
19314	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
19315	// IpsecPolicies - The IPSec Policies to be considered by this connection.
19316	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
19317	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
19318	ResourceGUID *string `json:"resourceGuid,omitempty"`
19319	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19320	ProvisioningState *string `json:"provisioningState,omitempty"`
19321	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
19322	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
19323}
19324
19325// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
19326// service call
19327type VirtualNetworkGatewayConnectionListResult struct {
19328	autorest.Response `json:"-"`
19329	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
19330	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
19331	// NextLink - READ-ONLY; The URL to get the next set of results.
19332	NextLink *string `json:"nextLink,omitempty"`
19333}
19334
19335// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
19336// VirtualNetworkGatewayConnection values.
19337type VirtualNetworkGatewayConnectionListResultIterator struct {
19338	i    int
19339	page VirtualNetworkGatewayConnectionListResultPage
19340}
19341
19342// NextWithContext advances to the next value.  If there was an error making
19343// the request the iterator does not advance and the error is returned.
19344func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
19345	if tracing.IsEnabled() {
19346		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
19347		defer func() {
19348			sc := -1
19349			if iter.Response().Response.Response != nil {
19350				sc = iter.Response().Response.Response.StatusCode
19351			}
19352			tracing.EndSpan(ctx, sc, err)
19353		}()
19354	}
19355	iter.i++
19356	if iter.i < len(iter.page.Values()) {
19357		return nil
19358	}
19359	err = iter.page.NextWithContext(ctx)
19360	if err != nil {
19361		iter.i--
19362		return err
19363	}
19364	iter.i = 0
19365	return nil
19366}
19367
19368// Next advances to the next value.  If there was an error making
19369// the request the iterator does not advance and the error is returned.
19370// Deprecated: Use NextWithContext() instead.
19371func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
19372	return iter.NextWithContext(context.Background())
19373}
19374
19375// NotDone returns true if the enumeration should be started or is not yet complete.
19376func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
19377	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19378}
19379
19380// Response returns the raw server response from the last page request.
19381func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
19382	return iter.page.Response()
19383}
19384
19385// Value returns the current value or a zero-initialized value if the
19386// iterator has advanced beyond the end of the collection.
19387func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
19388	if !iter.page.NotDone() {
19389		return VirtualNetworkGatewayConnection{}
19390	}
19391	return iter.page.Values()[iter.i]
19392}
19393
19394// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
19395func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
19396	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
19397}
19398
19399// IsEmpty returns true if the ListResult contains no values.
19400func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
19401	return vngclr.Value == nil || len(*vngclr.Value) == 0
19402}
19403
19404// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
19405// It returns nil if no more results exist.
19406func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
19407	if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 {
19408		return nil, nil
19409	}
19410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19411		autorest.AsJSON(),
19412		autorest.AsGet(),
19413		autorest.WithBaseURL(to.String(vngclr.NextLink)))
19414}
19415
19416// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
19417type VirtualNetworkGatewayConnectionListResultPage struct {
19418	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
19419	vngclr VirtualNetworkGatewayConnectionListResult
19420}
19421
19422// NextWithContext advances to the next page of values.  If there was an error making
19423// the request the page does not advance and the error is returned.
19424func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
19425	if tracing.IsEnabled() {
19426		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
19427		defer func() {
19428			sc := -1
19429			if page.Response().Response.Response != nil {
19430				sc = page.Response().Response.Response.StatusCode
19431			}
19432			tracing.EndSpan(ctx, sc, err)
19433		}()
19434	}
19435	next, err := page.fn(ctx, page.vngclr)
19436	if err != nil {
19437		return err
19438	}
19439	page.vngclr = next
19440	return nil
19441}
19442
19443// Next advances to the next page of values.  If there was an error making
19444// the request the page does not advance and the error is returned.
19445// Deprecated: Use NextWithContext() instead.
19446func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
19447	return page.NextWithContext(context.Background())
19448}
19449
19450// NotDone returns true if the page enumeration should be started or is not yet complete.
19451func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
19452	return !page.vngclr.IsEmpty()
19453}
19454
19455// Response returns the raw server response from the last page request.
19456func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
19457	return page.vngclr
19458}
19459
19460// Values returns the slice of values for the current page or nil if there are no values.
19461func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
19462	if page.vngclr.IsEmpty() {
19463		return nil
19464	}
19465	return *page.vngclr.Value
19466}
19467
19468// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
19469func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
19470	return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage}
19471}
19472
19473// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
19474type VirtualNetworkGatewayConnectionPropertiesFormat struct {
19475	// AuthorizationKey - The authorizationKey.
19476	AuthorizationKey *string `json:"authorizationKey,omitempty"`
19477	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
19478	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
19479	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
19480	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
19481	// LocalNetworkGateway2 - The reference to local network gateway resource.
19482	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
19483	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
19484	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
19485	// RoutingWeight - The routing weight.
19486	RoutingWeight *int32 `json:"routingWeight,omitempty"`
19487	// SharedKey - The IPSec shared key.
19488	SharedKey *string `json:"sharedKey,omitempty"`
19489	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
19490	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
19491	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
19492	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
19493	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
19494	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
19495	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
19496	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
19497	// Peer - The reference to peerings resource.
19498	Peer *SubResource `json:"peer,omitempty"`
19499	// EnableBgp - EnableBgp flag
19500	EnableBgp *bool `json:"enableBgp,omitempty"`
19501	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
19502	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
19503	// IpsecPolicies - The IPSec Policies to be considered by this connection.
19504	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
19505	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
19506	ResourceGUID *string `json:"resourceGuid,omitempty"`
19507	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19508	ProvisioningState *string `json:"provisioningState,omitempty"`
19509	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
19510	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
19511}
19512
19513// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
19514// results of a long-running operation.
19515type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
19516	azure.Future
19517}
19518
19519// Result returns the result of the asynchronous operation.
19520// If the operation has not completed it will return an error.
19521func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
19522	var done bool
19523	done, err = future.DoneWithContext(context.Background(), client)
19524	if err != nil {
19525		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19526		return
19527	}
19528	if !done {
19529		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
19530		return
19531	}
19532	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19533	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
19534		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
19535		if err != nil {
19536			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
19537		}
19538	}
19539	return
19540}
19541
19542// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
19543// a long-running operation.
19544type VirtualNetworkGatewayConnectionsDeleteFuture struct {
19545	azure.Future
19546}
19547
19548// Result returns the result of the asynchronous operation.
19549// If the operation has not completed it will return an error.
19550func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
19551	var done bool
19552	done, err = future.DoneWithContext(context.Background(), client)
19553	if err != nil {
19554		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
19555		return
19556	}
19557	if !done {
19558		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
19559		return
19560	}
19561	ar.Response = future.Response()
19562	return
19563}
19564
19565// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
19566// results of a long-running operation.
19567type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
19568	azure.Future
19569}
19570
19571// Result returns the result of the asynchronous operation.
19572// If the operation has not completed it will return an error.
19573func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
19574	var done bool
19575	done, err = future.DoneWithContext(context.Background(), client)
19576	if err != nil {
19577		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
19578		return
19579	}
19580	if !done {
19581		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
19582		return
19583	}
19584	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19585	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
19586		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
19587		if err != nil {
19588			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
19589		}
19590	}
19591	return
19592}
19593
19594// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
19595// results of a long-running operation.
19596type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
19597	azure.Future
19598}
19599
19600// Result returns the result of the asynchronous operation.
19601// If the operation has not completed it will return an error.
19602func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
19603	var done bool
19604	done, err = future.DoneWithContext(context.Background(), client)
19605	if err != nil {
19606		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
19607		return
19608	}
19609	if !done {
19610		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
19611		return
19612	}
19613	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19614	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
19615		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
19616		if err != nil {
19617			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
19618		}
19619	}
19620	return
19621}
19622
19623// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
19624// results of a long-running operation.
19625type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
19626	azure.Future
19627}
19628
19629// Result returns the result of the asynchronous operation.
19630// If the operation has not completed it will return an error.
19631func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
19632	var done bool
19633	done, err = future.DoneWithContext(context.Background(), client)
19634	if err != nil {
19635		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19636		return
19637	}
19638	if !done {
19639		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
19640		return
19641	}
19642	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19643	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
19644		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
19645		if err != nil {
19646			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
19647		}
19648	}
19649	return
19650}
19651
19652// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
19653type VirtualNetworkGatewayIPConfiguration struct {
19654	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
19655	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
19656	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19657	Name *string `json:"name,omitempty"`
19658	// Etag - A unique read-only string that changes whenever the resource is updated.
19659	Etag *string `json:"etag,omitempty"`
19660	// ID - Resource ID.
19661	ID *string `json:"id,omitempty"`
19662}
19663
19664// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
19665func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
19666	objectMap := make(map[string]interface{})
19667	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
19668		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
19669	}
19670	if vngic.Name != nil {
19671		objectMap["name"] = vngic.Name
19672	}
19673	if vngic.Etag != nil {
19674		objectMap["etag"] = vngic.Etag
19675	}
19676	if vngic.ID != nil {
19677		objectMap["id"] = vngic.ID
19678	}
19679	return json.Marshal(objectMap)
19680}
19681
19682// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
19683func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
19684	var m map[string]*json.RawMessage
19685	err := json.Unmarshal(body, &m)
19686	if err != nil {
19687		return err
19688	}
19689	for k, v := range m {
19690		switch k {
19691		case "properties":
19692			if v != nil {
19693				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
19694				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
19695				if err != nil {
19696					return err
19697				}
19698				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
19699			}
19700		case "name":
19701			if v != nil {
19702				var name string
19703				err = json.Unmarshal(*v, &name)
19704				if err != nil {
19705					return err
19706				}
19707				vngic.Name = &name
19708			}
19709		case "etag":
19710			if v != nil {
19711				var etag string
19712				err = json.Unmarshal(*v, &etag)
19713				if err != nil {
19714					return err
19715				}
19716				vngic.Etag = &etag
19717			}
19718		case "id":
19719			if v != nil {
19720				var ID string
19721				err = json.Unmarshal(*v, &ID)
19722				if err != nil {
19723					return err
19724				}
19725				vngic.ID = &ID
19726			}
19727		}
19728	}
19729
19730	return nil
19731}
19732
19733// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
19734type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
19735	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
19736	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19737	// Subnet - The reference of the subnet resource.
19738	Subnet *SubResource `json:"subnet,omitempty"`
19739	// PublicIPAddress - The reference of the public IP resource.
19740	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
19741	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19742	ProvisioningState *string `json:"provisioningState,omitempty"`
19743}
19744
19745// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
19746// service call
19747type VirtualNetworkGatewayListConnectionsResult struct {
19748	autorest.Response `json:"-"`
19749	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
19750	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
19751	// NextLink - READ-ONLY; The URL to get the next set of results.
19752	NextLink *string `json:"nextLink,omitempty"`
19753}
19754
19755// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
19756// VirtualNetworkGatewayConnectionListEntity values.
19757type VirtualNetworkGatewayListConnectionsResultIterator struct {
19758	i    int
19759	page VirtualNetworkGatewayListConnectionsResultPage
19760}
19761
19762// NextWithContext advances to the next value.  If there was an error making
19763// the request the iterator does not advance and the error is returned.
19764func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
19765	if tracing.IsEnabled() {
19766		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
19767		defer func() {
19768			sc := -1
19769			if iter.Response().Response.Response != nil {
19770				sc = iter.Response().Response.Response.StatusCode
19771			}
19772			tracing.EndSpan(ctx, sc, err)
19773		}()
19774	}
19775	iter.i++
19776	if iter.i < len(iter.page.Values()) {
19777		return nil
19778	}
19779	err = iter.page.NextWithContext(ctx)
19780	if err != nil {
19781		iter.i--
19782		return err
19783	}
19784	iter.i = 0
19785	return nil
19786}
19787
19788// Next advances to the next value.  If there was an error making
19789// the request the iterator does not advance and the error is returned.
19790// Deprecated: Use NextWithContext() instead.
19791func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
19792	return iter.NextWithContext(context.Background())
19793}
19794
19795// NotDone returns true if the enumeration should be started or is not yet complete.
19796func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
19797	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19798}
19799
19800// Response returns the raw server response from the last page request.
19801func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
19802	return iter.page.Response()
19803}
19804
19805// Value returns the current value or a zero-initialized value if the
19806// iterator has advanced beyond the end of the collection.
19807func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
19808	if !iter.page.NotDone() {
19809		return VirtualNetworkGatewayConnectionListEntity{}
19810	}
19811	return iter.page.Values()[iter.i]
19812}
19813
19814// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
19815func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
19816	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
19817}
19818
19819// IsEmpty returns true if the ListResult contains no values.
19820func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
19821	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
19822}
19823
19824// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
19825// It returns nil if no more results exist.
19826func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
19827	if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 {
19828		return nil, nil
19829	}
19830	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19831		autorest.AsJSON(),
19832		autorest.AsGet(),
19833		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
19834}
19835
19836// VirtualNetworkGatewayListConnectionsResultPage contains a page of
19837// VirtualNetworkGatewayConnectionListEntity values.
19838type VirtualNetworkGatewayListConnectionsResultPage struct {
19839	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
19840	vnglcr VirtualNetworkGatewayListConnectionsResult
19841}
19842
19843// NextWithContext advances to the next page of values.  If there was an error making
19844// the request the page does not advance and the error is returned.
19845func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
19846	if tracing.IsEnabled() {
19847		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
19848		defer func() {
19849			sc := -1
19850			if page.Response().Response.Response != nil {
19851				sc = page.Response().Response.Response.StatusCode
19852			}
19853			tracing.EndSpan(ctx, sc, err)
19854		}()
19855	}
19856	next, err := page.fn(ctx, page.vnglcr)
19857	if err != nil {
19858		return err
19859	}
19860	page.vnglcr = next
19861	return nil
19862}
19863
19864// Next advances to the next page of values.  If there was an error making
19865// the request the page does not advance and the error is returned.
19866// Deprecated: Use NextWithContext() instead.
19867func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
19868	return page.NextWithContext(context.Background())
19869}
19870
19871// NotDone returns true if the page enumeration should be started or is not yet complete.
19872func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
19873	return !page.vnglcr.IsEmpty()
19874}
19875
19876// Response returns the raw server response from the last page request.
19877func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
19878	return page.vnglcr
19879}
19880
19881// Values returns the slice of values for the current page or nil if there are no values.
19882func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
19883	if page.vnglcr.IsEmpty() {
19884		return nil
19885	}
19886	return *page.vnglcr.Value
19887}
19888
19889// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
19890func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
19891	return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage}
19892}
19893
19894// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
19895type VirtualNetworkGatewayListResult struct {
19896	autorest.Response `json:"-"`
19897	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
19898	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
19899	// NextLink - READ-ONLY; The URL to get the next set of results.
19900	NextLink *string `json:"nextLink,omitempty"`
19901}
19902
19903// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
19904// values.
19905type VirtualNetworkGatewayListResultIterator struct {
19906	i    int
19907	page VirtualNetworkGatewayListResultPage
19908}
19909
19910// NextWithContext advances to the next value.  If there was an error making
19911// the request the iterator does not advance and the error is returned.
19912func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
19913	if tracing.IsEnabled() {
19914		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
19915		defer func() {
19916			sc := -1
19917			if iter.Response().Response.Response != nil {
19918				sc = iter.Response().Response.Response.StatusCode
19919			}
19920			tracing.EndSpan(ctx, sc, err)
19921		}()
19922	}
19923	iter.i++
19924	if iter.i < len(iter.page.Values()) {
19925		return nil
19926	}
19927	err = iter.page.NextWithContext(ctx)
19928	if err != nil {
19929		iter.i--
19930		return err
19931	}
19932	iter.i = 0
19933	return nil
19934}
19935
19936// Next advances to the next value.  If there was an error making
19937// the request the iterator does not advance and the error is returned.
19938// Deprecated: Use NextWithContext() instead.
19939func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
19940	return iter.NextWithContext(context.Background())
19941}
19942
19943// NotDone returns true if the enumeration should be started or is not yet complete.
19944func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
19945	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19946}
19947
19948// Response returns the raw server response from the last page request.
19949func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
19950	return iter.page.Response()
19951}
19952
19953// Value returns the current value or a zero-initialized value if the
19954// iterator has advanced beyond the end of the collection.
19955func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
19956	if !iter.page.NotDone() {
19957		return VirtualNetworkGateway{}
19958	}
19959	return iter.page.Values()[iter.i]
19960}
19961
19962// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
19963func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
19964	return VirtualNetworkGatewayListResultIterator{page: page}
19965}
19966
19967// IsEmpty returns true if the ListResult contains no values.
19968func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
19969	return vnglr.Value == nil || len(*vnglr.Value) == 0
19970}
19971
19972// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
19973// It returns nil if no more results exist.
19974func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
19975	if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 {
19976		return nil, nil
19977	}
19978	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19979		autorest.AsJSON(),
19980		autorest.AsGet(),
19981		autorest.WithBaseURL(to.String(vnglr.NextLink)))
19982}
19983
19984// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
19985type VirtualNetworkGatewayListResultPage struct {
19986	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
19987	vnglr VirtualNetworkGatewayListResult
19988}
19989
19990// NextWithContext advances to the next page of values.  If there was an error making
19991// the request the page does not advance and the error is returned.
19992func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
19993	if tracing.IsEnabled() {
19994		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
19995		defer func() {
19996			sc := -1
19997			if page.Response().Response.Response != nil {
19998				sc = page.Response().Response.Response.StatusCode
19999			}
20000			tracing.EndSpan(ctx, sc, err)
20001		}()
20002	}
20003	next, err := page.fn(ctx, page.vnglr)
20004	if err != nil {
20005		return err
20006	}
20007	page.vnglr = next
20008	return nil
20009}
20010
20011// Next advances to the next page of values.  If there was an error making
20012// the request the page does not advance and the error is returned.
20013// Deprecated: Use NextWithContext() instead.
20014func (page *VirtualNetworkGatewayListResultPage) Next() error {
20015	return page.NextWithContext(context.Background())
20016}
20017
20018// NotDone returns true if the page enumeration should be started or is not yet complete.
20019func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
20020	return !page.vnglr.IsEmpty()
20021}
20022
20023// Response returns the raw server response from the last page request.
20024func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
20025	return page.vnglr
20026}
20027
20028// Values returns the slice of values for the current page or nil if there are no values.
20029func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
20030	if page.vnglr.IsEmpty() {
20031		return nil
20032	}
20033	return *page.vnglr.Value
20034}
20035
20036// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
20037func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
20038	return VirtualNetworkGatewayListResultPage{fn: getNextPage}
20039}
20040
20041// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
20042type VirtualNetworkGatewayPropertiesFormat struct {
20043	// IPConfigurations - IP configurations for virtual network gateway.
20044	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
20045	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
20046	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
20047	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
20048	VpnType VpnType `json:"vpnType,omitempty"`
20049	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
20050	EnableBgp *bool `json:"enableBgp,omitempty"`
20051	// ActiveActive - ActiveActive flag
20052	ActiveActive *bool `json:"activeActive,omitempty"`
20053	// 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.
20054	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
20055	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
20056	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
20057	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
20058	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
20059	// BgpSettings - Virtual network gateway's BGP speaker settings.
20060	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
20061	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
20062	ResourceGUID *string `json:"resourceGuid,omitempty"`
20063	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20064	ProvisioningState *string `json:"provisioningState,omitempty"`
20065}
20066
20067// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20068// long-running operation.
20069type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
20070	azure.Future
20071}
20072
20073// Result returns the result of the asynchronous operation.
20074// If the operation has not completed it will return an error.
20075func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20076	var done bool
20077	done, err = future.DoneWithContext(context.Background(), client)
20078	if err != nil {
20079		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20080		return
20081	}
20082	if !done {
20083		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
20084		return
20085	}
20086	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20087	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20088		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
20089		if err != nil {
20090			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
20091		}
20092	}
20093	return
20094}
20095
20096// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
20097// long-running operation.
20098type VirtualNetworkGatewaysDeleteFuture struct {
20099	azure.Future
20100}
20101
20102// Result returns the result of the asynchronous operation.
20103// If the operation has not completed it will return an error.
20104func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
20105	var done bool
20106	done, err = future.DoneWithContext(context.Background(), client)
20107	if err != nil {
20108		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20109		return
20110	}
20111	if !done {
20112		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
20113		return
20114	}
20115	ar.Response = future.Response()
20116	return
20117}
20118
20119// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
20120// results of a long-running operation.
20121type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
20122	azure.Future
20123}
20124
20125// Result returns the result of the asynchronous operation.
20126// If the operation has not completed it will return an error.
20127func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
20128	var done bool
20129	done, err = future.DoneWithContext(context.Background(), client)
20130	if err != nil {
20131		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
20132		return
20133	}
20134	if !done {
20135		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
20136		return
20137	}
20138	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20139	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20140		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
20141		if err != nil {
20142			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
20143		}
20144	}
20145	return
20146}
20147
20148// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
20149// of a long-running operation.
20150type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
20151	azure.Future
20152}
20153
20154// Result returns the result of the asynchronous operation.
20155// If the operation has not completed it will return an error.
20156func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
20157	var done bool
20158	done, err = future.DoneWithContext(context.Background(), client)
20159	if err != nil {
20160		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
20161		return
20162	}
20163	if !done {
20164		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
20165		return
20166	}
20167	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20168	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20169		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
20170		if err != nil {
20171			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
20172		}
20173	}
20174	return
20175}
20176
20177// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
20178// of a long-running operation.
20179type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
20180	azure.Future
20181}
20182
20183// Result returns the result of the asynchronous operation.
20184// If the operation has not completed it will return an error.
20185func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
20186	var done bool
20187	done, err = future.DoneWithContext(context.Background(), client)
20188	if err != nil {
20189		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
20190		return
20191	}
20192	if !done {
20193		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
20194		return
20195	}
20196	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20197	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
20198		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
20199		if err != nil {
20200			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
20201		}
20202	}
20203	return
20204}
20205
20206// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
20207// a long-running operation.
20208type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
20209	azure.Future
20210}
20211
20212// Result returns the result of the asynchronous operation.
20213// If the operation has not completed it will return an error.
20214func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
20215	var done bool
20216	done, err = future.DoneWithContext(context.Background(), client)
20217	if err != nil {
20218		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
20219		return
20220	}
20221	if !done {
20222		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
20223		return
20224	}
20225	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20226	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
20227		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
20228		if err != nil {
20229			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
20230		}
20231	}
20232	return
20233}
20234
20235// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
20236// a long-running operation.
20237type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
20238	azure.Future
20239}
20240
20241// Result returns the result of the asynchronous operation.
20242// If the operation has not completed it will return an error.
20243func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
20244	var done bool
20245	done, err = future.DoneWithContext(context.Background(), client)
20246	if err != nil {
20247		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
20248		return
20249	}
20250	if !done {
20251		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
20252		return
20253	}
20254	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20255	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
20256		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
20257		if err != nil {
20258			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
20259		}
20260	}
20261	return
20262}
20263
20264// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
20265// results of a long-running operation.
20266type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
20267	azure.Future
20268}
20269
20270// Result returns the result of the asynchronous operation.
20271// If the operation has not completed it will return an error.
20272func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
20273	var done bool
20274	done, err = future.DoneWithContext(context.Background(), client)
20275	if err != nil {
20276		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
20277		return
20278	}
20279	if !done {
20280		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
20281		return
20282	}
20283	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20284	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
20285		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
20286		if err != nil {
20287			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
20288		}
20289	}
20290	return
20291}
20292
20293// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
20294// results of a long-running operation.
20295type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
20296	azure.Future
20297}
20298
20299// Result returns the result of the asynchronous operation.
20300// If the operation has not completed it will return an error.
20301func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client VirtualNetworkGatewaysClient) (s String, err error) {
20302	var done bool
20303	done, err = future.DoneWithContext(context.Background(), client)
20304	if err != nil {
20305		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
20306		return
20307	}
20308	if !done {
20309		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
20310		return
20311	}
20312	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20313	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20314		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
20315		if err != nil {
20316			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
20317		}
20318	}
20319	return
20320}
20321
20322// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
20323type VirtualNetworkGatewaySku struct {
20324	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
20325	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
20326	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
20327	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
20328	// Capacity - The capacity.
20329	Capacity *int32 `json:"capacity,omitempty"`
20330}
20331
20332// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
20333// long-running operation.
20334type VirtualNetworkGatewaysResetFuture struct {
20335	azure.Future
20336}
20337
20338// Result returns the result of the asynchronous operation.
20339// If the operation has not completed it will return an error.
20340func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20341	var done bool
20342	done, err = future.DoneWithContext(context.Background(), client)
20343	if err != nil {
20344		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
20345		return
20346	}
20347	if !done {
20348		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
20349		return
20350	}
20351	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20352	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20353		vng, err = client.ResetResponder(vng.Response.Response)
20354		if err != nil {
20355			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
20356		}
20357	}
20358	return
20359}
20360
20361// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
20362// results of a long-running operation.
20363type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
20364	azure.Future
20365}
20366
20367// Result returns the result of the asynchronous operation.
20368// If the operation has not completed it will return an error.
20369func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) Result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
20370	var done bool
20371	done, err = future.DoneWithContext(context.Background(), client)
20372	if err != nil {
20373		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
20374		return
20375	}
20376	if !done {
20377		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
20378		return
20379	}
20380	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20381	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
20382		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
20383		if err != nil {
20384			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
20385		}
20386	}
20387	return
20388}
20389
20390// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20391// long-running operation.
20392type VirtualNetworkGatewaysUpdateTagsFuture struct {
20393	azure.Future
20394}
20395
20396// Result returns the result of the asynchronous operation.
20397// If the operation has not completed it will return an error.
20398func (future *VirtualNetworkGatewaysUpdateTagsFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20399	var done bool
20400	done, err = future.DoneWithContext(context.Background(), client)
20401	if err != nil {
20402		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20403		return
20404	}
20405	if !done {
20406		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
20407		return
20408	}
20409	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20410	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20411		vng, err = client.UpdateTagsResponder(vng.Response.Response)
20412		if err != nil {
20413			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
20414		}
20415	}
20416	return
20417}
20418
20419// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
20420type VirtualNetworkListResult struct {
20421	autorest.Response `json:"-"`
20422	// Value - Gets a list of VirtualNetwork resources in a resource group.
20423	Value *[]VirtualNetwork `json:"value,omitempty"`
20424	// NextLink - The URL to get the next set of results.
20425	NextLink *string `json:"nextLink,omitempty"`
20426}
20427
20428// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
20429type VirtualNetworkListResultIterator struct {
20430	i    int
20431	page VirtualNetworkListResultPage
20432}
20433
20434// NextWithContext advances to the next value.  If there was an error making
20435// the request the iterator does not advance and the error is returned.
20436func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
20437	if tracing.IsEnabled() {
20438		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
20439		defer func() {
20440			sc := -1
20441			if iter.Response().Response.Response != nil {
20442				sc = iter.Response().Response.Response.StatusCode
20443			}
20444			tracing.EndSpan(ctx, sc, err)
20445		}()
20446	}
20447	iter.i++
20448	if iter.i < len(iter.page.Values()) {
20449		return nil
20450	}
20451	err = iter.page.NextWithContext(ctx)
20452	if err != nil {
20453		iter.i--
20454		return err
20455	}
20456	iter.i = 0
20457	return nil
20458}
20459
20460// Next advances to the next value.  If there was an error making
20461// the request the iterator does not advance and the error is returned.
20462// Deprecated: Use NextWithContext() instead.
20463func (iter *VirtualNetworkListResultIterator) Next() error {
20464	return iter.NextWithContext(context.Background())
20465}
20466
20467// NotDone returns true if the enumeration should be started or is not yet complete.
20468func (iter VirtualNetworkListResultIterator) NotDone() bool {
20469	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20470}
20471
20472// Response returns the raw server response from the last page request.
20473func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
20474	return iter.page.Response()
20475}
20476
20477// Value returns the current value or a zero-initialized value if the
20478// iterator has advanced beyond the end of the collection.
20479func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
20480	if !iter.page.NotDone() {
20481		return VirtualNetwork{}
20482	}
20483	return iter.page.Values()[iter.i]
20484}
20485
20486// Creates a new instance of the VirtualNetworkListResultIterator type.
20487func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
20488	return VirtualNetworkListResultIterator{page: page}
20489}
20490
20491// IsEmpty returns true if the ListResult contains no values.
20492func (vnlr VirtualNetworkListResult) IsEmpty() bool {
20493	return vnlr.Value == nil || len(*vnlr.Value) == 0
20494}
20495
20496// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
20497// It returns nil if no more results exist.
20498func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
20499	if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 {
20500		return nil, nil
20501	}
20502	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20503		autorest.AsJSON(),
20504		autorest.AsGet(),
20505		autorest.WithBaseURL(to.String(vnlr.NextLink)))
20506}
20507
20508// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
20509type VirtualNetworkListResultPage struct {
20510	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
20511	vnlr VirtualNetworkListResult
20512}
20513
20514// NextWithContext advances to the next page of values.  If there was an error making
20515// the request the page does not advance and the error is returned.
20516func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
20517	if tracing.IsEnabled() {
20518		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
20519		defer func() {
20520			sc := -1
20521			if page.Response().Response.Response != nil {
20522				sc = page.Response().Response.Response.StatusCode
20523			}
20524			tracing.EndSpan(ctx, sc, err)
20525		}()
20526	}
20527	next, err := page.fn(ctx, page.vnlr)
20528	if err != nil {
20529		return err
20530	}
20531	page.vnlr = next
20532	return nil
20533}
20534
20535// Next advances to the next page of values.  If there was an error making
20536// the request the page does not advance and the error is returned.
20537// Deprecated: Use NextWithContext() instead.
20538func (page *VirtualNetworkListResultPage) Next() error {
20539	return page.NextWithContext(context.Background())
20540}
20541
20542// NotDone returns true if the page enumeration should be started or is not yet complete.
20543func (page VirtualNetworkListResultPage) NotDone() bool {
20544	return !page.vnlr.IsEmpty()
20545}
20546
20547// Response returns the raw server response from the last page request.
20548func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
20549	return page.vnlr
20550}
20551
20552// Values returns the slice of values for the current page or nil if there are no values.
20553func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
20554	if page.vnlr.IsEmpty() {
20555		return nil
20556	}
20557	return *page.vnlr.Value
20558}
20559
20560// Creates a new instance of the VirtualNetworkListResultPage type.
20561func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
20562	return VirtualNetworkListResultPage{fn: getNextPage}
20563}
20564
20565// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
20566type VirtualNetworkListUsageResult struct {
20567	autorest.Response `json:"-"`
20568	// Value - READ-ONLY; VirtualNetwork usage stats.
20569	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
20570	// NextLink - The URL to get the next set of results.
20571	NextLink *string `json:"nextLink,omitempty"`
20572}
20573
20574// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
20575// values.
20576type VirtualNetworkListUsageResultIterator struct {
20577	i    int
20578	page VirtualNetworkListUsageResultPage
20579}
20580
20581// NextWithContext advances to the next value.  If there was an error making
20582// the request the iterator does not advance and the error is returned.
20583func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
20584	if tracing.IsEnabled() {
20585		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
20586		defer func() {
20587			sc := -1
20588			if iter.Response().Response.Response != nil {
20589				sc = iter.Response().Response.Response.StatusCode
20590			}
20591			tracing.EndSpan(ctx, sc, err)
20592		}()
20593	}
20594	iter.i++
20595	if iter.i < len(iter.page.Values()) {
20596		return nil
20597	}
20598	err = iter.page.NextWithContext(ctx)
20599	if err != nil {
20600		iter.i--
20601		return err
20602	}
20603	iter.i = 0
20604	return nil
20605}
20606
20607// Next advances to the next value.  If there was an error making
20608// the request the iterator does not advance and the error is returned.
20609// Deprecated: Use NextWithContext() instead.
20610func (iter *VirtualNetworkListUsageResultIterator) Next() error {
20611	return iter.NextWithContext(context.Background())
20612}
20613
20614// NotDone returns true if the enumeration should be started or is not yet complete.
20615func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
20616	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20617}
20618
20619// Response returns the raw server response from the last page request.
20620func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
20621	return iter.page.Response()
20622}
20623
20624// Value returns the current value or a zero-initialized value if the
20625// iterator has advanced beyond the end of the collection.
20626func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
20627	if !iter.page.NotDone() {
20628		return VirtualNetworkUsage{}
20629	}
20630	return iter.page.Values()[iter.i]
20631}
20632
20633// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
20634func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
20635	return VirtualNetworkListUsageResultIterator{page: page}
20636}
20637
20638// IsEmpty returns true if the ListResult contains no values.
20639func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
20640	return vnlur.Value == nil || len(*vnlur.Value) == 0
20641}
20642
20643// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
20644// It returns nil if no more results exist.
20645func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
20646	if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 {
20647		return nil, nil
20648	}
20649	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20650		autorest.AsJSON(),
20651		autorest.AsGet(),
20652		autorest.WithBaseURL(to.String(vnlur.NextLink)))
20653}
20654
20655// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
20656type VirtualNetworkListUsageResultPage struct {
20657	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
20658	vnlur VirtualNetworkListUsageResult
20659}
20660
20661// NextWithContext advances to the next page of values.  If there was an error making
20662// the request the page does not advance and the error is returned.
20663func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
20664	if tracing.IsEnabled() {
20665		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
20666		defer func() {
20667			sc := -1
20668			if page.Response().Response.Response != nil {
20669				sc = page.Response().Response.Response.StatusCode
20670			}
20671			tracing.EndSpan(ctx, sc, err)
20672		}()
20673	}
20674	next, err := page.fn(ctx, page.vnlur)
20675	if err != nil {
20676		return err
20677	}
20678	page.vnlur = next
20679	return nil
20680}
20681
20682// Next advances to the next page of values.  If there was an error making
20683// the request the page does not advance and the error is returned.
20684// Deprecated: Use NextWithContext() instead.
20685func (page *VirtualNetworkListUsageResultPage) Next() error {
20686	return page.NextWithContext(context.Background())
20687}
20688
20689// NotDone returns true if the page enumeration should be started or is not yet complete.
20690func (page VirtualNetworkListUsageResultPage) NotDone() bool {
20691	return !page.vnlur.IsEmpty()
20692}
20693
20694// Response returns the raw server response from the last page request.
20695func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
20696	return page.vnlur
20697}
20698
20699// Values returns the slice of values for the current page or nil if there are no values.
20700func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
20701	if page.vnlur.IsEmpty() {
20702		return nil
20703	}
20704	return *page.vnlur.Value
20705}
20706
20707// Creates a new instance of the VirtualNetworkListUsageResultPage type.
20708func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
20709	return VirtualNetworkListUsageResultPage{fn: getNextPage}
20710}
20711
20712// VirtualNetworkPeering peerings in a virtual network resource.
20713type VirtualNetworkPeering struct {
20714	autorest.Response `json:"-"`
20715	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
20716	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
20717	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20718	Name *string `json:"name,omitempty"`
20719	// Etag - A unique read-only string that changes whenever the resource is updated.
20720	Etag *string `json:"etag,omitempty"`
20721	// ID - Resource ID.
20722	ID *string `json:"id,omitempty"`
20723}
20724
20725// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
20726func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
20727	objectMap := make(map[string]interface{})
20728	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
20729		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
20730	}
20731	if vnp.Name != nil {
20732		objectMap["name"] = vnp.Name
20733	}
20734	if vnp.Etag != nil {
20735		objectMap["etag"] = vnp.Etag
20736	}
20737	if vnp.ID != nil {
20738		objectMap["id"] = vnp.ID
20739	}
20740	return json.Marshal(objectMap)
20741}
20742
20743// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
20744func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
20745	var m map[string]*json.RawMessage
20746	err := json.Unmarshal(body, &m)
20747	if err != nil {
20748		return err
20749	}
20750	for k, v := range m {
20751		switch k {
20752		case "properties":
20753			if v != nil {
20754				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
20755				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
20756				if err != nil {
20757					return err
20758				}
20759				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
20760			}
20761		case "name":
20762			if v != nil {
20763				var name string
20764				err = json.Unmarshal(*v, &name)
20765				if err != nil {
20766					return err
20767				}
20768				vnp.Name = &name
20769			}
20770		case "etag":
20771			if v != nil {
20772				var etag string
20773				err = json.Unmarshal(*v, &etag)
20774				if err != nil {
20775					return err
20776				}
20777				vnp.Etag = &etag
20778			}
20779		case "id":
20780			if v != nil {
20781				var ID string
20782				err = json.Unmarshal(*v, &ID)
20783				if err != nil {
20784					return err
20785				}
20786				vnp.ID = &ID
20787			}
20788		}
20789	}
20790
20791	return nil
20792}
20793
20794// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
20795// belong to a virtual network.
20796type VirtualNetworkPeeringListResult struct {
20797	autorest.Response `json:"-"`
20798	// Value - The peerings in a virtual network.
20799	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
20800	// NextLink - The URL to get the next set of results.
20801	NextLink *string `json:"nextLink,omitempty"`
20802}
20803
20804// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
20805// values.
20806type VirtualNetworkPeeringListResultIterator struct {
20807	i    int
20808	page VirtualNetworkPeeringListResultPage
20809}
20810
20811// NextWithContext advances to the next value.  If there was an error making
20812// the request the iterator does not advance and the error is returned.
20813func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
20814	if tracing.IsEnabled() {
20815		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
20816		defer func() {
20817			sc := -1
20818			if iter.Response().Response.Response != nil {
20819				sc = iter.Response().Response.Response.StatusCode
20820			}
20821			tracing.EndSpan(ctx, sc, err)
20822		}()
20823	}
20824	iter.i++
20825	if iter.i < len(iter.page.Values()) {
20826		return nil
20827	}
20828	err = iter.page.NextWithContext(ctx)
20829	if err != nil {
20830		iter.i--
20831		return err
20832	}
20833	iter.i = 0
20834	return nil
20835}
20836
20837// Next advances to the next value.  If there was an error making
20838// the request the iterator does not advance and the error is returned.
20839// Deprecated: Use NextWithContext() instead.
20840func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
20841	return iter.NextWithContext(context.Background())
20842}
20843
20844// NotDone returns true if the enumeration should be started or is not yet complete.
20845func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
20846	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20847}
20848
20849// Response returns the raw server response from the last page request.
20850func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
20851	return iter.page.Response()
20852}
20853
20854// Value returns the current value or a zero-initialized value if the
20855// iterator has advanced beyond the end of the collection.
20856func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
20857	if !iter.page.NotDone() {
20858		return VirtualNetworkPeering{}
20859	}
20860	return iter.page.Values()[iter.i]
20861}
20862
20863// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
20864func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
20865	return VirtualNetworkPeeringListResultIterator{page: page}
20866}
20867
20868// IsEmpty returns true if the ListResult contains no values.
20869func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
20870	return vnplr.Value == nil || len(*vnplr.Value) == 0
20871}
20872
20873// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
20874// It returns nil if no more results exist.
20875func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
20876	if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 {
20877		return nil, nil
20878	}
20879	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20880		autorest.AsJSON(),
20881		autorest.AsGet(),
20882		autorest.WithBaseURL(to.String(vnplr.NextLink)))
20883}
20884
20885// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
20886type VirtualNetworkPeeringListResultPage struct {
20887	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
20888	vnplr VirtualNetworkPeeringListResult
20889}
20890
20891// NextWithContext advances to the next page of values.  If there was an error making
20892// the request the page does not advance and the error is returned.
20893func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
20894	if tracing.IsEnabled() {
20895		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
20896		defer func() {
20897			sc := -1
20898			if page.Response().Response.Response != nil {
20899				sc = page.Response().Response.Response.StatusCode
20900			}
20901			tracing.EndSpan(ctx, sc, err)
20902		}()
20903	}
20904	next, err := page.fn(ctx, page.vnplr)
20905	if err != nil {
20906		return err
20907	}
20908	page.vnplr = next
20909	return nil
20910}
20911
20912// Next advances to the next page of values.  If there was an error making
20913// the request the page does not advance and the error is returned.
20914// Deprecated: Use NextWithContext() instead.
20915func (page *VirtualNetworkPeeringListResultPage) Next() error {
20916	return page.NextWithContext(context.Background())
20917}
20918
20919// NotDone returns true if the page enumeration should be started or is not yet complete.
20920func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
20921	return !page.vnplr.IsEmpty()
20922}
20923
20924// Response returns the raw server response from the last page request.
20925func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
20926	return page.vnplr
20927}
20928
20929// Values returns the slice of values for the current page or nil if there are no values.
20930func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
20931	if page.vnplr.IsEmpty() {
20932		return nil
20933	}
20934	return *page.vnplr.Value
20935}
20936
20937// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
20938func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
20939	return VirtualNetworkPeeringListResultPage{fn: getNextPage}
20940}
20941
20942// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
20943type VirtualNetworkPeeringPropertiesFormat struct {
20944	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
20945	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
20946	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
20947	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
20948	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
20949	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
20950	// 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.
20951	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
20952	// 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).
20953	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
20954	// RemoteAddressSpace - The reference of the remote virtual network address space.
20955	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
20956	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
20957	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
20958	// ProvisioningState - The provisioning state of the resource.
20959	ProvisioningState *string `json:"provisioningState,omitempty"`
20960}
20961
20962// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20963// long-running operation.
20964type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
20965	azure.Future
20966}
20967
20968// Result returns the result of the asynchronous operation.
20969// If the operation has not completed it will return an error.
20970func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
20971	var done bool
20972	done, err = future.DoneWithContext(context.Background(), client)
20973	if err != nil {
20974		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20975		return
20976	}
20977	if !done {
20978		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
20979		return
20980	}
20981	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20982	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
20983		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
20984		if err != nil {
20985			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
20986		}
20987	}
20988	return
20989}
20990
20991// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
20992// long-running operation.
20993type VirtualNetworkPeeringsDeleteFuture struct {
20994	azure.Future
20995}
20996
20997// Result returns the result of the asynchronous operation.
20998// If the operation has not completed it will return an error.
20999func (future *VirtualNetworkPeeringsDeleteFuture) Result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
21000	var done bool
21001	done, err = future.DoneWithContext(context.Background(), client)
21002	if err != nil {
21003		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
21004		return
21005	}
21006	if !done {
21007		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
21008		return
21009	}
21010	ar.Response = future.Response()
21011	return
21012}
21013
21014// VirtualNetworkPropertiesFormat properties of the virtual network.
21015type VirtualNetworkPropertiesFormat struct {
21016	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
21017	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
21018	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
21019	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
21020	// Subnets - A list of subnets in a Virtual Network.
21021	Subnets *[]Subnet `json:"subnets,omitempty"`
21022	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
21023	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
21024	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
21025	ResourceGUID *string `json:"resourceGuid,omitempty"`
21026	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21027	ProvisioningState *string `json:"provisioningState,omitempty"`
21028	// 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.
21029	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
21030	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
21031	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
21032	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
21033	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
21034}
21035
21036// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21037// long-running operation.
21038type VirtualNetworksCreateOrUpdateFuture struct {
21039	azure.Future
21040}
21041
21042// Result returns the result of the asynchronous operation.
21043// If the operation has not completed it will return an error.
21044func (future *VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
21045	var done bool
21046	done, err = future.DoneWithContext(context.Background(), client)
21047	if err != nil {
21048		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21049		return
21050	}
21051	if !done {
21052		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
21053		return
21054	}
21055	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21056	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
21057		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
21058		if err != nil {
21059			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
21060		}
21061	}
21062	return
21063}
21064
21065// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21066// operation.
21067type VirtualNetworksDeleteFuture struct {
21068	azure.Future
21069}
21070
21071// Result returns the result of the asynchronous operation.
21072// If the operation has not completed it will return an error.
21073func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
21074	var done bool
21075	done, err = future.DoneWithContext(context.Background(), client)
21076	if err != nil {
21077		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
21078		return
21079	}
21080	if !done {
21081		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
21082		return
21083	}
21084	ar.Response = future.Response()
21085	return
21086}
21087
21088// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21089// long-running operation.
21090type VirtualNetworksUpdateTagsFuture struct {
21091	azure.Future
21092}
21093
21094// Result returns the result of the asynchronous operation.
21095// If the operation has not completed it will return an error.
21096func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
21097	var done bool
21098	done, err = future.DoneWithContext(context.Background(), client)
21099	if err != nil {
21100		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21101		return
21102	}
21103	if !done {
21104		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
21105		return
21106	}
21107	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21108	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
21109		vn, err = client.UpdateTagsResponder(vn.Response.Response)
21110		if err != nil {
21111			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
21112		}
21113	}
21114	return
21115}
21116
21117// VirtualNetworkUsage usage details for subnet.
21118type VirtualNetworkUsage struct {
21119	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
21120	CurrentValue *float64 `json:"currentValue,omitempty"`
21121	// ID - READ-ONLY; Subnet identifier.
21122	ID *string `json:"id,omitempty"`
21123	// Limit - READ-ONLY; Indicates the size of the subnet.
21124	Limit *float64 `json:"limit,omitempty"`
21125	// Name - READ-ONLY; The name containing common and localized value for usage.
21126	Name *VirtualNetworkUsageName `json:"name,omitempty"`
21127	// Unit - READ-ONLY; Usage units. Returns 'Count'
21128	Unit *string `json:"unit,omitempty"`
21129}
21130
21131// VirtualNetworkUsageName usage strings container.
21132type VirtualNetworkUsageName struct {
21133	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
21134	LocalizedValue *string `json:"localizedValue,omitempty"`
21135	// Value - READ-ONLY; Subnet size and usage string.
21136	Value *string `json:"value,omitempty"`
21137}
21138
21139// VirtualWAN virtualWAN Resource.
21140type VirtualWAN struct {
21141	autorest.Response     `json:"-"`
21142	*VirtualWanProperties `json:"properties,omitempty"`
21143	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21144	Etag *string `json:"etag,omitempty"`
21145	// ID - Resource ID.
21146	ID *string `json:"id,omitempty"`
21147	// Name - READ-ONLY; Resource name.
21148	Name *string `json:"name,omitempty"`
21149	// Type - READ-ONLY; Resource type.
21150	Type *string `json:"type,omitempty"`
21151	// Location - Resource location.
21152	Location *string `json:"location,omitempty"`
21153	// Tags - Resource tags.
21154	Tags map[string]*string `json:"tags"`
21155}
21156
21157// MarshalJSON is the custom marshaler for VirtualWAN.
21158func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
21159	objectMap := make(map[string]interface{})
21160	if vw.VirtualWanProperties != nil {
21161		objectMap["properties"] = vw.VirtualWanProperties
21162	}
21163	if vw.ID != nil {
21164		objectMap["id"] = vw.ID
21165	}
21166	if vw.Location != nil {
21167		objectMap["location"] = vw.Location
21168	}
21169	if vw.Tags != nil {
21170		objectMap["tags"] = vw.Tags
21171	}
21172	return json.Marshal(objectMap)
21173}
21174
21175// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
21176func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
21177	var m map[string]*json.RawMessage
21178	err := json.Unmarshal(body, &m)
21179	if err != nil {
21180		return err
21181	}
21182	for k, v := range m {
21183		switch k {
21184		case "properties":
21185			if v != nil {
21186				var virtualWanProperties VirtualWanProperties
21187				err = json.Unmarshal(*v, &virtualWanProperties)
21188				if err != nil {
21189					return err
21190				}
21191				vw.VirtualWanProperties = &virtualWanProperties
21192			}
21193		case "etag":
21194			if v != nil {
21195				var etag string
21196				err = json.Unmarshal(*v, &etag)
21197				if err != nil {
21198					return err
21199				}
21200				vw.Etag = &etag
21201			}
21202		case "id":
21203			if v != nil {
21204				var ID string
21205				err = json.Unmarshal(*v, &ID)
21206				if err != nil {
21207					return err
21208				}
21209				vw.ID = &ID
21210			}
21211		case "name":
21212			if v != nil {
21213				var name string
21214				err = json.Unmarshal(*v, &name)
21215				if err != nil {
21216					return err
21217				}
21218				vw.Name = &name
21219			}
21220		case "type":
21221			if v != nil {
21222				var typeVar string
21223				err = json.Unmarshal(*v, &typeVar)
21224				if err != nil {
21225					return err
21226				}
21227				vw.Type = &typeVar
21228			}
21229		case "location":
21230			if v != nil {
21231				var location string
21232				err = json.Unmarshal(*v, &location)
21233				if err != nil {
21234					return err
21235				}
21236				vw.Location = &location
21237			}
21238		case "tags":
21239			if v != nil {
21240				var tags map[string]*string
21241				err = json.Unmarshal(*v, &tags)
21242				if err != nil {
21243					return err
21244				}
21245				vw.Tags = tags
21246			}
21247		}
21248	}
21249
21250	return nil
21251}
21252
21253// VirtualWanProperties parameters for VirtualWAN
21254type VirtualWanProperties struct {
21255	// DisableVpnEncryption - Vpn encryption to be disabled or not.
21256	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
21257	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
21258	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
21259	// VpnSites - READ-ONLY
21260	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
21261	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21262	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21263}
21264
21265// VirtualWANsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21266// long-running operation.
21267type VirtualWANsCreateOrUpdateFuture struct {
21268	azure.Future
21269}
21270
21271// Result returns the result of the asynchronous operation.
21272// If the operation has not completed it will return an error.
21273func (future *VirtualWANsCreateOrUpdateFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) {
21274	var done bool
21275	done, err = future.DoneWithContext(context.Background(), client)
21276	if err != nil {
21277		err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21278		return
21279	}
21280	if !done {
21281		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsCreateOrUpdateFuture")
21282		return
21283	}
21284	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21285	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
21286		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
21287		if err != nil {
21288			err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
21289		}
21290	}
21291	return
21292}
21293
21294// VirtualWANsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21295// operation.
21296type VirtualWANsDeleteFuture struct {
21297	azure.Future
21298}
21299
21300// Result returns the result of the asynchronous operation.
21301// If the operation has not completed it will return an error.
21302func (future *VirtualWANsDeleteFuture) Result(client VirtualWANsClient) (ar autorest.Response, err error) {
21303	var done bool
21304	done, err = future.DoneWithContext(context.Background(), client)
21305	if err != nil {
21306		err = autorest.NewErrorWithError(err, "network.VirtualWANsDeleteFuture", "Result", future.Response(), "Polling failure")
21307		return
21308	}
21309	if !done {
21310		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsDeleteFuture")
21311		return
21312	}
21313	ar.Response = future.Response()
21314	return
21315}
21316
21317// VirtualWANsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
21318// operation.
21319type VirtualWANsUpdateTagsFuture struct {
21320	azure.Future
21321}
21322
21323// Result returns the result of the asynchronous operation.
21324// If the operation has not completed it will return an error.
21325func (future *VirtualWANsUpdateTagsFuture) Result(client VirtualWANsClient) (vw VirtualWAN, err error) {
21326	var done bool
21327	done, err = future.DoneWithContext(context.Background(), client)
21328	if err != nil {
21329		err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21330		return
21331	}
21332	if !done {
21333		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsUpdateTagsFuture")
21334		return
21335	}
21336	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21337	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
21338		vw, err = client.UpdateTagsResponder(vw.Response.Response)
21339		if err != nil {
21340			err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
21341		}
21342	}
21343	return
21344}
21345
21346// VpnClientConfiguration vpnClientConfiguration for P2S client.
21347type VpnClientConfiguration struct {
21348	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
21349	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
21350	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
21351	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
21352	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
21353	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
21354	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
21355	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
21356	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
21357	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
21358	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
21359	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
21360	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
21361	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
21362}
21363
21364// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
21365type VpnClientIPsecParameters struct {
21366	autorest.Response `json:"-"`
21367	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
21368	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
21369	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
21370	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
21371	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
21372	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
21373	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
21374	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
21375	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
21376	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
21377	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
21378	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
21379	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
21380	DhGroup DhGroup `json:"dhGroup,omitempty"`
21381	// 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'
21382	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
21383}
21384
21385// VpnClientParameters vpn Client Parameters for package generation
21386type VpnClientParameters struct {
21387	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
21388	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
21389	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
21390	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
21391	// 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.
21392	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
21393	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
21394	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
21395}
21396
21397// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
21398type VpnClientRevokedCertificate struct {
21399	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
21400	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
21401	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21402	Name *string `json:"name,omitempty"`
21403	// Etag - A unique read-only string that changes whenever the resource is updated.
21404	Etag *string `json:"etag,omitempty"`
21405	// ID - Resource ID.
21406	ID *string `json:"id,omitempty"`
21407}
21408
21409// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
21410func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
21411	objectMap := make(map[string]interface{})
21412	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
21413		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
21414	}
21415	if vcrc.Name != nil {
21416		objectMap["name"] = vcrc.Name
21417	}
21418	if vcrc.Etag != nil {
21419		objectMap["etag"] = vcrc.Etag
21420	}
21421	if vcrc.ID != nil {
21422		objectMap["id"] = vcrc.ID
21423	}
21424	return json.Marshal(objectMap)
21425}
21426
21427// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
21428func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
21429	var m map[string]*json.RawMessage
21430	err := json.Unmarshal(body, &m)
21431	if err != nil {
21432		return err
21433	}
21434	for k, v := range m {
21435		switch k {
21436		case "properties":
21437			if v != nil {
21438				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
21439				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
21440				if err != nil {
21441					return err
21442				}
21443				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
21444			}
21445		case "name":
21446			if v != nil {
21447				var name string
21448				err = json.Unmarshal(*v, &name)
21449				if err != nil {
21450					return err
21451				}
21452				vcrc.Name = &name
21453			}
21454		case "etag":
21455			if v != nil {
21456				var etag string
21457				err = json.Unmarshal(*v, &etag)
21458				if err != nil {
21459					return err
21460				}
21461				vcrc.Etag = &etag
21462			}
21463		case "id":
21464			if v != nil {
21465				var ID string
21466				err = json.Unmarshal(*v, &ID)
21467				if err != nil {
21468					return err
21469				}
21470				vcrc.ID = &ID
21471			}
21472		}
21473	}
21474
21475	return nil
21476}
21477
21478// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
21479// network gateway.
21480type VpnClientRevokedCertificatePropertiesFormat struct {
21481	// Thumbprint - The revoked VPN client certificate thumbprint.
21482	Thumbprint *string `json:"thumbprint,omitempty"`
21483	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21484	ProvisioningState *string `json:"provisioningState,omitempty"`
21485}
21486
21487// VpnClientRootCertificate VPN client root certificate of virtual network gateway
21488type VpnClientRootCertificate struct {
21489	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
21490	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
21491	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21492	Name *string `json:"name,omitempty"`
21493	// Etag - A unique read-only string that changes whenever the resource is updated.
21494	Etag *string `json:"etag,omitempty"`
21495	// ID - Resource ID.
21496	ID *string `json:"id,omitempty"`
21497}
21498
21499// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
21500func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
21501	objectMap := make(map[string]interface{})
21502	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
21503		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
21504	}
21505	if vcrc.Name != nil {
21506		objectMap["name"] = vcrc.Name
21507	}
21508	if vcrc.Etag != nil {
21509		objectMap["etag"] = vcrc.Etag
21510	}
21511	if vcrc.ID != nil {
21512		objectMap["id"] = vcrc.ID
21513	}
21514	return json.Marshal(objectMap)
21515}
21516
21517// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
21518func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
21519	var m map[string]*json.RawMessage
21520	err := json.Unmarshal(body, &m)
21521	if err != nil {
21522		return err
21523	}
21524	for k, v := range m {
21525		switch k {
21526		case "properties":
21527			if v != nil {
21528				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
21529				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
21530				if err != nil {
21531					return err
21532				}
21533				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
21534			}
21535		case "name":
21536			if v != nil {
21537				var name string
21538				err = json.Unmarshal(*v, &name)
21539				if err != nil {
21540					return err
21541				}
21542				vcrc.Name = &name
21543			}
21544		case "etag":
21545			if v != nil {
21546				var etag string
21547				err = json.Unmarshal(*v, &etag)
21548				if err != nil {
21549					return err
21550				}
21551				vcrc.Etag = &etag
21552			}
21553		case "id":
21554			if v != nil {
21555				var ID string
21556				err = json.Unmarshal(*v, &ID)
21557				if err != nil {
21558					return err
21559				}
21560				vcrc.ID = &ID
21561			}
21562		}
21563	}
21564
21565	return nil
21566}
21567
21568// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
21569type VpnClientRootCertificatePropertiesFormat struct {
21570	// PublicCertData - The certificate public data.
21571	PublicCertData *string `json:"publicCertData,omitempty"`
21572	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21573	ProvisioningState *string `json:"provisioningState,omitempty"`
21574}
21575
21576// VpnConnection vpnConnection Resource.
21577type VpnConnection struct {
21578	autorest.Response        `json:"-"`
21579	*VpnConnectionProperties `json:"properties,omitempty"`
21580	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21581	Name *string `json:"name,omitempty"`
21582	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21583	Etag *string `json:"etag,omitempty"`
21584	// ID - Resource ID.
21585	ID *string `json:"id,omitempty"`
21586}
21587
21588// MarshalJSON is the custom marshaler for VpnConnection.
21589func (vc VpnConnection) MarshalJSON() ([]byte, error) {
21590	objectMap := make(map[string]interface{})
21591	if vc.VpnConnectionProperties != nil {
21592		objectMap["properties"] = vc.VpnConnectionProperties
21593	}
21594	if vc.Name != nil {
21595		objectMap["name"] = vc.Name
21596	}
21597	if vc.ID != nil {
21598		objectMap["id"] = vc.ID
21599	}
21600	return json.Marshal(objectMap)
21601}
21602
21603// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
21604func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
21605	var m map[string]*json.RawMessage
21606	err := json.Unmarshal(body, &m)
21607	if err != nil {
21608		return err
21609	}
21610	for k, v := range m {
21611		switch k {
21612		case "properties":
21613			if v != nil {
21614				var vpnConnectionProperties VpnConnectionProperties
21615				err = json.Unmarshal(*v, &vpnConnectionProperties)
21616				if err != nil {
21617					return err
21618				}
21619				vc.VpnConnectionProperties = &vpnConnectionProperties
21620			}
21621		case "name":
21622			if v != nil {
21623				var name string
21624				err = json.Unmarshal(*v, &name)
21625				if err != nil {
21626					return err
21627				}
21628				vc.Name = &name
21629			}
21630		case "etag":
21631			if v != nil {
21632				var etag string
21633				err = json.Unmarshal(*v, &etag)
21634				if err != nil {
21635					return err
21636				}
21637				vc.Etag = &etag
21638			}
21639		case "id":
21640			if v != nil {
21641				var ID string
21642				err = json.Unmarshal(*v, &ID)
21643				if err != nil {
21644					return err
21645				}
21646				vc.ID = &ID
21647			}
21648		}
21649	}
21650
21651	return nil
21652}
21653
21654// VpnConnectionProperties parameters for VpnConnection
21655type VpnConnectionProperties struct {
21656	// RemoteVpnSite - Id of the connected vpn site.
21657	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
21658	// RoutingWeight - routing weight for vpn connection.
21659	RoutingWeight *int32 `json:"routingWeight,omitempty"`
21660	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
21661	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
21662	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
21663	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
21664	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
21665	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
21666	// ConnectionBandwidthInMbps - READ-ONLY; Expected bandwidth in MBPS.
21667	ConnectionBandwidthInMbps *int32 `json:"connectionBandwidthInMbps,omitempty"`
21668	// SharedKey - SharedKey for the vpn connection.
21669	SharedKey *string `json:"sharedKey,omitempty"`
21670	// EnableBgp - EnableBgp flag
21671	EnableBgp *bool `json:"enableBgp,omitempty"`
21672	// IpsecPolicies - The IPSec Policies to be considered by this connection.
21673	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
21674	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21675	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21676}
21677
21678// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21679// long-running operation.
21680type VpnConnectionsCreateOrUpdateFuture struct {
21681	azure.Future
21682}
21683
21684// Result returns the result of the asynchronous operation.
21685// If the operation has not completed it will return an error.
21686func (future *VpnConnectionsCreateOrUpdateFuture) Result(client VpnConnectionsClient) (vc VpnConnection, err error) {
21687	var done bool
21688	done, err = future.DoneWithContext(context.Background(), client)
21689	if err != nil {
21690		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21691		return
21692	}
21693	if !done {
21694		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
21695		return
21696	}
21697	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21698	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
21699		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
21700		if err != nil {
21701			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
21702		}
21703	}
21704	return
21705}
21706
21707// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21708// operation.
21709type VpnConnectionsDeleteFuture struct {
21710	azure.Future
21711}
21712
21713// Result returns the result of the asynchronous operation.
21714// If the operation has not completed it will return an error.
21715func (future *VpnConnectionsDeleteFuture) Result(client VpnConnectionsClient) (ar autorest.Response, err error) {
21716	var done bool
21717	done, err = future.DoneWithContext(context.Background(), client)
21718	if err != nil {
21719		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
21720		return
21721	}
21722	if !done {
21723		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
21724		return
21725	}
21726	ar.Response = future.Response()
21727	return
21728}
21729
21730// VpnDeviceScriptParameters vpn device configuration script generation parameters
21731type VpnDeviceScriptParameters struct {
21732	// Vendor - The vendor for the vpn device.
21733	Vendor *string `json:"vendor,omitempty"`
21734	// DeviceFamily - The device family for the vpn device.
21735	DeviceFamily *string `json:"deviceFamily,omitempty"`
21736	// FirmwareVersion - The firmware version for the vpn device.
21737	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
21738}
21739
21740// VpnGateway vpnGateway Resource.
21741type VpnGateway struct {
21742	autorest.Response     `json:"-"`
21743	*VpnGatewayProperties `json:"properties,omitempty"`
21744	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21745	Etag *string `json:"etag,omitempty"`
21746	// ID - Resource ID.
21747	ID *string `json:"id,omitempty"`
21748	// Name - READ-ONLY; Resource name.
21749	Name *string `json:"name,omitempty"`
21750	// Type - READ-ONLY; Resource type.
21751	Type *string `json:"type,omitempty"`
21752	// Location - Resource location.
21753	Location *string `json:"location,omitempty"`
21754	// Tags - Resource tags.
21755	Tags map[string]*string `json:"tags"`
21756}
21757
21758// MarshalJSON is the custom marshaler for VpnGateway.
21759func (vg VpnGateway) MarshalJSON() ([]byte, error) {
21760	objectMap := make(map[string]interface{})
21761	if vg.VpnGatewayProperties != nil {
21762		objectMap["properties"] = vg.VpnGatewayProperties
21763	}
21764	if vg.ID != nil {
21765		objectMap["id"] = vg.ID
21766	}
21767	if vg.Location != nil {
21768		objectMap["location"] = vg.Location
21769	}
21770	if vg.Tags != nil {
21771		objectMap["tags"] = vg.Tags
21772	}
21773	return json.Marshal(objectMap)
21774}
21775
21776// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
21777func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
21778	var m map[string]*json.RawMessage
21779	err := json.Unmarshal(body, &m)
21780	if err != nil {
21781		return err
21782	}
21783	for k, v := range m {
21784		switch k {
21785		case "properties":
21786			if v != nil {
21787				var vpnGatewayProperties VpnGatewayProperties
21788				err = json.Unmarshal(*v, &vpnGatewayProperties)
21789				if err != nil {
21790					return err
21791				}
21792				vg.VpnGatewayProperties = &vpnGatewayProperties
21793			}
21794		case "etag":
21795			if v != nil {
21796				var etag string
21797				err = json.Unmarshal(*v, &etag)
21798				if err != nil {
21799					return err
21800				}
21801				vg.Etag = &etag
21802			}
21803		case "id":
21804			if v != nil {
21805				var ID string
21806				err = json.Unmarshal(*v, &ID)
21807				if err != nil {
21808					return err
21809				}
21810				vg.ID = &ID
21811			}
21812		case "name":
21813			if v != nil {
21814				var name string
21815				err = json.Unmarshal(*v, &name)
21816				if err != nil {
21817					return err
21818				}
21819				vg.Name = &name
21820			}
21821		case "type":
21822			if v != nil {
21823				var typeVar string
21824				err = json.Unmarshal(*v, &typeVar)
21825				if err != nil {
21826					return err
21827				}
21828				vg.Type = &typeVar
21829			}
21830		case "location":
21831			if v != nil {
21832				var location string
21833				err = json.Unmarshal(*v, &location)
21834				if err != nil {
21835					return err
21836				}
21837				vg.Location = &location
21838			}
21839		case "tags":
21840			if v != nil {
21841				var tags map[string]*string
21842				err = json.Unmarshal(*v, &tags)
21843				if err != nil {
21844					return err
21845				}
21846				vg.Tags = tags
21847			}
21848		}
21849	}
21850
21851	return nil
21852}
21853
21854// VpnGatewayProperties parameters for VpnGateway
21855type VpnGatewayProperties struct {
21856	// VirtualHub - The VirtualHub to which the gateway belongs
21857	VirtualHub *SubResource `json:"virtualHub,omitempty"`
21858	// Connections - list of all vpn connections to the gateway.
21859	Connections *[]VpnConnection `json:"connections,omitempty"`
21860	// BgpSettings - Local network gateway's BGP speaker settings.
21861	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
21862	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21863	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21864	// Policies - The policies applied to this vpn gateway.
21865	Policies *Policies `json:"policies,omitempty"`
21866}
21867
21868// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21869// long-running operation.
21870type VpnGatewaysCreateOrUpdateFuture struct {
21871	azure.Future
21872}
21873
21874// Result returns the result of the asynchronous operation.
21875// If the operation has not completed it will return an error.
21876func (future *VpnGatewaysCreateOrUpdateFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
21877	var done bool
21878	done, err = future.DoneWithContext(context.Background(), client)
21879	if err != nil {
21880		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21881		return
21882	}
21883	if !done {
21884		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
21885		return
21886	}
21887	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21888	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
21889		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
21890		if err != nil {
21891			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
21892		}
21893	}
21894	return
21895}
21896
21897// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21898// operation.
21899type VpnGatewaysDeleteFuture struct {
21900	azure.Future
21901}
21902
21903// Result returns the result of the asynchronous operation.
21904// If the operation has not completed it will return an error.
21905func (future *VpnGatewaysDeleteFuture) Result(client VpnGatewaysClient) (ar autorest.Response, err error) {
21906	var done bool
21907	done, err = future.DoneWithContext(context.Background(), client)
21908	if err != nil {
21909		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
21910		return
21911	}
21912	if !done {
21913		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
21914		return
21915	}
21916	ar.Response = future.Response()
21917	return
21918}
21919
21920// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
21921// operation.
21922type VpnGatewaysUpdateTagsFuture struct {
21923	azure.Future
21924}
21925
21926// Result returns the result of the asynchronous operation.
21927// If the operation has not completed it will return an error.
21928func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) {
21929	var done bool
21930	done, err = future.DoneWithContext(context.Background(), client)
21931	if err != nil {
21932		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21933		return
21934	}
21935	if !done {
21936		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
21937		return
21938	}
21939	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21940	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
21941		vg, err = client.UpdateTagsResponder(vg.Response.Response)
21942		if err != nil {
21943			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
21944		}
21945	}
21946	return
21947}
21948
21949// VpnSite vpnSite Resource.
21950type VpnSite struct {
21951	autorest.Response  `json:"-"`
21952	*VpnSiteProperties `json:"properties,omitempty"`
21953	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21954	Etag *string `json:"etag,omitempty"`
21955	// ID - Resource ID.
21956	ID *string `json:"id,omitempty"`
21957	// Name - READ-ONLY; Resource name.
21958	Name *string `json:"name,omitempty"`
21959	// Type - READ-ONLY; Resource type.
21960	Type *string `json:"type,omitempty"`
21961	// Location - Resource location.
21962	Location *string `json:"location,omitempty"`
21963	// Tags - Resource tags.
21964	Tags map[string]*string `json:"tags"`
21965}
21966
21967// MarshalJSON is the custom marshaler for VpnSite.
21968func (vs VpnSite) MarshalJSON() ([]byte, error) {
21969	objectMap := make(map[string]interface{})
21970	if vs.VpnSiteProperties != nil {
21971		objectMap["properties"] = vs.VpnSiteProperties
21972	}
21973	if vs.ID != nil {
21974		objectMap["id"] = vs.ID
21975	}
21976	if vs.Location != nil {
21977		objectMap["location"] = vs.Location
21978	}
21979	if vs.Tags != nil {
21980		objectMap["tags"] = vs.Tags
21981	}
21982	return json.Marshal(objectMap)
21983}
21984
21985// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
21986func (vs *VpnSite) UnmarshalJSON(body []byte) error {
21987	var m map[string]*json.RawMessage
21988	err := json.Unmarshal(body, &m)
21989	if err != nil {
21990		return err
21991	}
21992	for k, v := range m {
21993		switch k {
21994		case "properties":
21995			if v != nil {
21996				var vpnSiteProperties VpnSiteProperties
21997				err = json.Unmarshal(*v, &vpnSiteProperties)
21998				if err != nil {
21999					return err
22000				}
22001				vs.VpnSiteProperties = &vpnSiteProperties
22002			}
22003		case "etag":
22004			if v != nil {
22005				var etag string
22006				err = json.Unmarshal(*v, &etag)
22007				if err != nil {
22008					return err
22009				}
22010				vs.Etag = &etag
22011			}
22012		case "id":
22013			if v != nil {
22014				var ID string
22015				err = json.Unmarshal(*v, &ID)
22016				if err != nil {
22017					return err
22018				}
22019				vs.ID = &ID
22020			}
22021		case "name":
22022			if v != nil {
22023				var name string
22024				err = json.Unmarshal(*v, &name)
22025				if err != nil {
22026					return err
22027				}
22028				vs.Name = &name
22029			}
22030		case "type":
22031			if v != nil {
22032				var typeVar string
22033				err = json.Unmarshal(*v, &typeVar)
22034				if err != nil {
22035					return err
22036				}
22037				vs.Type = &typeVar
22038			}
22039		case "location":
22040			if v != nil {
22041				var location string
22042				err = json.Unmarshal(*v, &location)
22043				if err != nil {
22044					return err
22045				}
22046				vs.Location = &location
22047			}
22048		case "tags":
22049			if v != nil {
22050				var tags map[string]*string
22051				err = json.Unmarshal(*v, &tags)
22052				if err != nil {
22053					return err
22054				}
22055				vs.Tags = tags
22056			}
22057		}
22058	}
22059
22060	return nil
22061}
22062
22063// VpnSiteID vpnSite Resource.
22064type VpnSiteID struct {
22065	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
22066	VpnSite *string `json:"vpnSite,omitempty"`
22067}
22068
22069// VpnSiteProperties parameters for VpnSite
22070type VpnSiteProperties struct {
22071	// VirtualWAN - The VirtualWAN to which the vpnSite belongs
22072	VirtualWAN *SubResource `json:"virtualWAN,omitempty"`
22073	// DeviceProperties - The device properties
22074	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
22075	// IPAddress - The ip-address for the vpn-site.
22076	IPAddress *string `json:"ipAddress,omitempty"`
22077	// SiteKey - The key for vpn-site that can be used for connections.
22078	SiteKey *string `json:"siteKey,omitempty"`
22079	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
22080	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
22081	// BgpProperties - The set of bgp properties.
22082	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
22083	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22084	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22085}
22086
22087// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
22088// long-running operation.
22089type VpnSitesConfigurationDownloadFuture struct {
22090	azure.Future
22091}
22092
22093// Result returns the result of the asynchronous operation.
22094// If the operation has not completed it will return an error.
22095func (future *VpnSitesConfigurationDownloadFuture) Result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
22096	var done bool
22097	done, err = future.DoneWithContext(context.Background(), client)
22098	if err != nil {
22099		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
22100		return
22101	}
22102	if !done {
22103		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
22104		return
22105	}
22106	ar.Response = future.Response()
22107	return
22108}
22109
22110// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22111// operation.
22112type VpnSitesCreateOrUpdateFuture struct {
22113	azure.Future
22114}
22115
22116// Result returns the result of the asynchronous operation.
22117// If the operation has not completed it will return an error.
22118func (future *VpnSitesCreateOrUpdateFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
22119	var done bool
22120	done, err = future.DoneWithContext(context.Background(), client)
22121	if err != nil {
22122		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22123		return
22124	}
22125	if !done {
22126		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
22127		return
22128	}
22129	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22130	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
22131		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
22132		if err != nil {
22133			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
22134		}
22135	}
22136	return
22137}
22138
22139// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22140// operation.
22141type VpnSitesDeleteFuture struct {
22142	azure.Future
22143}
22144
22145// Result returns the result of the asynchronous operation.
22146// If the operation has not completed it will return an error.
22147func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.Response, err error) {
22148	var done bool
22149	done, err = future.DoneWithContext(context.Background(), client)
22150	if err != nil {
22151		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
22152		return
22153	}
22154	if !done {
22155		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
22156		return
22157	}
22158	ar.Response = future.Response()
22159	return
22160}
22161
22162// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22163// operation.
22164type VpnSitesUpdateTagsFuture struct {
22165	azure.Future
22166}
22167
22168// Result returns the result of the asynchronous operation.
22169// If the operation has not completed it will return an error.
22170func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSite, err error) {
22171	var done bool
22172	done, err = future.DoneWithContext(context.Background(), client)
22173	if err != nil {
22174		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22175		return
22176	}
22177	if !done {
22178		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
22179		return
22180	}
22181	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22182	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
22183		vs, err = client.UpdateTagsResponder(vs.Response.Response)
22184		if err != nil {
22185			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
22186		}
22187	}
22188	return
22189}
22190
22191// Watcher network watcher in a resource group.
22192type Watcher struct {
22193	autorest.Response `json:"-"`
22194	// Etag - A unique read-only string that changes whenever the resource is updated.
22195	Etag                     *string `json:"etag,omitempty"`
22196	*WatcherPropertiesFormat `json:"properties,omitempty"`
22197	// ID - Resource ID.
22198	ID *string `json:"id,omitempty"`
22199	// Name - READ-ONLY; Resource name.
22200	Name *string `json:"name,omitempty"`
22201	// Type - READ-ONLY; Resource type.
22202	Type *string `json:"type,omitempty"`
22203	// Location - Resource location.
22204	Location *string `json:"location,omitempty"`
22205	// Tags - Resource tags.
22206	Tags map[string]*string `json:"tags"`
22207}
22208
22209// MarshalJSON is the custom marshaler for Watcher.
22210func (w Watcher) MarshalJSON() ([]byte, error) {
22211	objectMap := make(map[string]interface{})
22212	if w.Etag != nil {
22213		objectMap["etag"] = w.Etag
22214	}
22215	if w.WatcherPropertiesFormat != nil {
22216		objectMap["properties"] = w.WatcherPropertiesFormat
22217	}
22218	if w.ID != nil {
22219		objectMap["id"] = w.ID
22220	}
22221	if w.Location != nil {
22222		objectMap["location"] = w.Location
22223	}
22224	if w.Tags != nil {
22225		objectMap["tags"] = w.Tags
22226	}
22227	return json.Marshal(objectMap)
22228}
22229
22230// UnmarshalJSON is the custom unmarshaler for Watcher struct.
22231func (w *Watcher) UnmarshalJSON(body []byte) error {
22232	var m map[string]*json.RawMessage
22233	err := json.Unmarshal(body, &m)
22234	if err != nil {
22235		return err
22236	}
22237	for k, v := range m {
22238		switch k {
22239		case "etag":
22240			if v != nil {
22241				var etag string
22242				err = json.Unmarshal(*v, &etag)
22243				if err != nil {
22244					return err
22245				}
22246				w.Etag = &etag
22247			}
22248		case "properties":
22249			if v != nil {
22250				var watcherPropertiesFormat WatcherPropertiesFormat
22251				err = json.Unmarshal(*v, &watcherPropertiesFormat)
22252				if err != nil {
22253					return err
22254				}
22255				w.WatcherPropertiesFormat = &watcherPropertiesFormat
22256			}
22257		case "id":
22258			if v != nil {
22259				var ID string
22260				err = json.Unmarshal(*v, &ID)
22261				if err != nil {
22262					return err
22263				}
22264				w.ID = &ID
22265			}
22266		case "name":
22267			if v != nil {
22268				var name string
22269				err = json.Unmarshal(*v, &name)
22270				if err != nil {
22271					return err
22272				}
22273				w.Name = &name
22274			}
22275		case "type":
22276			if v != nil {
22277				var typeVar string
22278				err = json.Unmarshal(*v, &typeVar)
22279				if err != nil {
22280					return err
22281				}
22282				w.Type = &typeVar
22283			}
22284		case "location":
22285			if v != nil {
22286				var location string
22287				err = json.Unmarshal(*v, &location)
22288				if err != nil {
22289					return err
22290				}
22291				w.Location = &location
22292			}
22293		case "tags":
22294			if v != nil {
22295				var tags map[string]*string
22296				err = json.Unmarshal(*v, &tags)
22297				if err != nil {
22298					return err
22299				}
22300				w.Tags = tags
22301			}
22302		}
22303	}
22304
22305	return nil
22306}
22307
22308// WatcherListResult list of network watcher resources.
22309type WatcherListResult struct {
22310	autorest.Response `json:"-"`
22311	Value             *[]Watcher `json:"value,omitempty"`
22312}
22313
22314// WatcherPropertiesFormat the network watcher properties.
22315type WatcherPropertiesFormat struct {
22316	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22317	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22318}
22319
22320// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
22321// long-running operation.
22322type WatchersCheckConnectivityFuture struct {
22323	azure.Future
22324}
22325
22326// Result returns the result of the asynchronous operation.
22327// If the operation has not completed it will return an error.
22328func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci ConnectivityInformation, err error) {
22329	var done bool
22330	done, err = future.DoneWithContext(context.Background(), client)
22331	if err != nil {
22332		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
22333		return
22334	}
22335	if !done {
22336		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
22337		return
22338	}
22339	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22340	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
22341		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
22342		if err != nil {
22343			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
22344		}
22345	}
22346	return
22347}
22348
22349// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22350// operation.
22351type WatchersDeleteFuture struct {
22352	azure.Future
22353}
22354
22355// Result returns the result of the asynchronous operation.
22356// If the operation has not completed it will return an error.
22357func (future *WatchersDeleteFuture) Result(client WatchersClient) (ar autorest.Response, err error) {
22358	var done bool
22359	done, err = future.DoneWithContext(context.Background(), client)
22360	if err != nil {
22361		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
22362		return
22363	}
22364	if !done {
22365		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
22366		return
22367	}
22368	ar.Response = future.Response()
22369	return
22370}
22371
22372// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
22373// long-running operation.
22374type WatchersGetAzureReachabilityReportFuture struct {
22375	azure.Future
22376}
22377
22378// Result returns the result of the asynchronous operation.
22379// If the operation has not completed it will return an error.
22380func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersClient) (arr AzureReachabilityReport, err error) {
22381	var done bool
22382	done, err = future.DoneWithContext(context.Background(), client)
22383	if err != nil {
22384		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
22385		return
22386	}
22387	if !done {
22388		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
22389		return
22390	}
22391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22392	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
22393		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
22394		if err != nil {
22395			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
22396		}
22397	}
22398	return
22399}
22400
22401// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
22402// long-running operation.
22403type WatchersGetFlowLogStatusFuture struct {
22404	azure.Future
22405}
22406
22407// Result returns the result of the asynchronous operation.
22408// If the operation has not completed it will return an error.
22409func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
22410	var done bool
22411	done, err = future.DoneWithContext(context.Background(), client)
22412	if err != nil {
22413		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
22414		return
22415	}
22416	if !done {
22417		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
22418		return
22419	}
22420	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22421	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
22422		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
22423		if err != nil {
22424			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
22425		}
22426	}
22427	return
22428}
22429
22430// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
22431// of a long-running operation.
22432type WatchersGetNetworkConfigurationDiagnosticFuture struct {
22433	azure.Future
22434}
22435
22436// Result returns the result of the asynchronous operation.
22437// If the operation has not completed it will return an error.
22438func (future *WatchersGetNetworkConfigurationDiagnosticFuture) Result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
22439	var done bool
22440	done, err = future.DoneWithContext(context.Background(), client)
22441	if err != nil {
22442		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
22443		return
22444	}
22445	if !done {
22446		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
22447		return
22448	}
22449	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22450	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
22451		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
22452		if err != nil {
22453			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
22454		}
22455	}
22456	return
22457}
22458
22459// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
22460// operation.
22461type WatchersGetNextHopFuture struct {
22462	azure.Future
22463}
22464
22465// Result returns the result of the asynchronous operation.
22466// If the operation has not completed it will return an error.
22467func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextHopResult, err error) {
22468	var done bool
22469	done, err = future.DoneWithContext(context.Background(), client)
22470	if err != nil {
22471		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
22472		return
22473	}
22474	if !done {
22475		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
22476		return
22477	}
22478	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22479	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
22480		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
22481		if err != nil {
22482			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
22483		}
22484	}
22485	return
22486}
22487
22488// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
22489// long-running operation.
22490type WatchersGetTroubleshootingFuture struct {
22491	azure.Future
22492}
22493
22494// Result returns the result of the asynchronous operation.
22495// If the operation has not completed it will return an error.
22496func (future *WatchersGetTroubleshootingFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
22497	var done bool
22498	done, err = future.DoneWithContext(context.Background(), client)
22499	if err != nil {
22500		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
22501		return
22502	}
22503	if !done {
22504		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
22505		return
22506	}
22507	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22508	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
22509		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
22510		if err != nil {
22511			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
22512		}
22513	}
22514	return
22515}
22516
22517// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
22518// long-running operation.
22519type WatchersGetTroubleshootingResultFuture struct {
22520	azure.Future
22521}
22522
22523// Result returns the result of the asynchronous operation.
22524// If the operation has not completed it will return an error.
22525func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClient) (tr TroubleshootingResult, err error) {
22526	var done bool
22527	done, err = future.DoneWithContext(context.Background(), client)
22528	if err != nil {
22529		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
22530		return
22531	}
22532	if !done {
22533		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
22534		return
22535	}
22536	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22537	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
22538		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
22539		if err != nil {
22540			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
22541		}
22542	}
22543	return
22544}
22545
22546// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
22547// long-running operation.
22548type WatchersGetVMSecurityRulesFuture struct {
22549	azure.Future
22550}
22551
22552// Result returns the result of the asynchronous operation.
22553// If the operation has not completed it will return an error.
22554func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
22555	var done bool
22556	done, err = future.DoneWithContext(context.Background(), client)
22557	if err != nil {
22558		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
22559		return
22560	}
22561	if !done {
22562		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
22563		return
22564	}
22565	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22566	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
22567		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
22568		if err != nil {
22569			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
22570		}
22571	}
22572	return
22573}
22574
22575// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
22576// long-running operation.
22577type WatchersListAvailableProvidersFuture struct {
22578	azure.Future
22579}
22580
22581// Result returns the result of the asynchronous operation.
22582// If the operation has not completed it will return an error.
22583func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient) (apl AvailableProvidersList, err error) {
22584	var done bool
22585	done, err = future.DoneWithContext(context.Background(), client)
22586	if err != nil {
22587		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
22588		return
22589	}
22590	if !done {
22591		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
22592		return
22593	}
22594	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22595	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
22596		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
22597		if err != nil {
22598			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
22599		}
22600	}
22601	return
22602}
22603
22604// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
22605// long-running operation.
22606type WatchersSetFlowLogConfigurationFuture struct {
22607	azure.Future
22608}
22609
22610// Result returns the result of the asynchronous operation.
22611// If the operation has not completed it will return an error.
22612func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClient) (fli FlowLogInformation, err error) {
22613	var done bool
22614	done, err = future.DoneWithContext(context.Background(), client)
22615	if err != nil {
22616		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
22617		return
22618	}
22619	if !done {
22620		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
22621		return
22622	}
22623	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22624	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
22625		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
22626		if err != nil {
22627			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
22628		}
22629	}
22630	return
22631}
22632
22633// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
22634// operation.
22635type WatchersVerifyIPFlowFuture struct {
22636	azure.Future
22637}
22638
22639// Result returns the result of the asynchronous operation.
22640// If the operation has not completed it will return an error.
22641func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
22642	var done bool
22643	done, err = future.DoneWithContext(context.Background(), client)
22644	if err != nil {
22645		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
22646		return
22647	}
22648	if !done {
22649		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
22650		return
22651	}
22652	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22653	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
22654		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
22655		if err != nil {
22656			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
22657		}
22658	}
22659	return
22660}
22661