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	"encoding/json"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/azure"
24	"github.com/Azure/go-autorest/autorest/to"
25	"net/http"
26)
27
28// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity.
29type ApplicationGatewayCookieBasedAffinity string
30
31const (
32	// Disabled ...
33	Disabled ApplicationGatewayCookieBasedAffinity = "Disabled"
34	// Enabled ...
35	Enabled ApplicationGatewayCookieBasedAffinity = "Enabled"
36)
37
38// PossibleApplicationGatewayCookieBasedAffinityValues returns an array of possible values for the ApplicationGatewayCookieBasedAffinity const type.
39func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayCookieBasedAffinity {
40	return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled}
41}
42
43// ApplicationGatewayOperationalState enumerates the values for application gateway operational state.
44type ApplicationGatewayOperationalState string
45
46const (
47	// Running ...
48	Running ApplicationGatewayOperationalState = "Running"
49	// Starting ...
50	Starting ApplicationGatewayOperationalState = "Starting"
51	// Stopped ...
52	Stopped ApplicationGatewayOperationalState = "Stopped"
53	// Stopping ...
54	Stopping ApplicationGatewayOperationalState = "Stopping"
55)
56
57// PossibleApplicationGatewayOperationalStateValues returns an array of possible values for the ApplicationGatewayOperationalState const type.
58func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOperationalState {
59	return []ApplicationGatewayOperationalState{Running, Starting, Stopped, Stopping}
60}
61
62// ApplicationGatewayProtocol enumerates the values for application gateway protocol.
63type ApplicationGatewayProtocol string
64
65const (
66	// HTTP ...
67	HTTP ApplicationGatewayProtocol = "Http"
68	// HTTPS ...
69	HTTPS ApplicationGatewayProtocol = "Https"
70)
71
72// PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type.
73func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol {
74	return []ApplicationGatewayProtocol{HTTP, HTTPS}
75}
76
77// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule
78// type.
79type ApplicationGatewayRequestRoutingRuleType string
80
81const (
82	// Basic ...
83	Basic ApplicationGatewayRequestRoutingRuleType = "Basic"
84	// PathBasedRouting ...
85	PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting"
86)
87
88// PossibleApplicationGatewayRequestRoutingRuleTypeValues returns an array of possible values for the ApplicationGatewayRequestRoutingRuleType const type.
89func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatewayRequestRoutingRuleType {
90	return []ApplicationGatewayRequestRoutingRuleType{Basic, PathBasedRouting}
91}
92
93// ApplicationGatewaySkuName enumerates the values for application gateway sku name.
94type ApplicationGatewaySkuName string
95
96const (
97	// StandardLarge ...
98	StandardLarge ApplicationGatewaySkuName = "Standard_Large"
99	// StandardMedium ...
100	StandardMedium ApplicationGatewaySkuName = "Standard_Medium"
101	// StandardSmall ...
102	StandardSmall ApplicationGatewaySkuName = "Standard_Small"
103)
104
105// PossibleApplicationGatewaySkuNameValues returns an array of possible values for the ApplicationGatewaySkuName const type.
106func PossibleApplicationGatewaySkuNameValues() []ApplicationGatewaySkuName {
107	return []ApplicationGatewaySkuName{StandardLarge, StandardMedium, StandardSmall}
108}
109
110// ApplicationGatewayTier enumerates the values for application gateway tier.
111type ApplicationGatewayTier string
112
113const (
114	// Standard ...
115	Standard ApplicationGatewayTier = "Standard"
116)
117
118// PossibleApplicationGatewayTierValues returns an array of possible values for the ApplicationGatewayTier const type.
119func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier {
120	return []ApplicationGatewayTier{Standard}
121}
122
123// AuthorizationUseStatus enumerates the values for authorization use status.
124type AuthorizationUseStatus string
125
126const (
127	// Available ...
128	Available AuthorizationUseStatus = "Available"
129	// InUse ...
130	InUse AuthorizationUseStatus = "InUse"
131)
132
133// PossibleAuthorizationUseStatusValues returns an array of possible values for the AuthorizationUseStatus const type.
134func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus {
135	return []AuthorizationUseStatus{Available, InUse}
136}
137
138// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit
139// peering advertised public prefix state.
140type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string
141
142const (
143	// Configured ...
144	Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured"
145	// Configuring ...
146	Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring"
147	// NotConfigured ...
148	NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured"
149	// ValidationNeeded ...
150	ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded"
151)
152
153// PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues returns an array of possible values for the ExpressRouteCircuitPeeringAdvertisedPublicPrefixState const type.
154func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState {
155	return []ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{Configured, Configuring, NotConfigured, ValidationNeeded}
156}
157
158// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state.
159type ExpressRouteCircuitPeeringState string
160
161const (
162	// ExpressRouteCircuitPeeringStateDisabled ...
163	ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled"
164	// ExpressRouteCircuitPeeringStateEnabled ...
165	ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled"
166)
167
168// PossibleExpressRouteCircuitPeeringStateValues returns an array of possible values for the ExpressRouteCircuitPeeringState const type.
169func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeeringState {
170	return []ExpressRouteCircuitPeeringState{ExpressRouteCircuitPeeringStateDisabled, ExpressRouteCircuitPeeringStateEnabled}
171}
172
173// ExpressRouteCircuitPeeringType enumerates the values for express route circuit peering type.
174type ExpressRouteCircuitPeeringType string
175
176const (
177	// AzurePrivatePeering ...
178	AzurePrivatePeering ExpressRouteCircuitPeeringType = "AzurePrivatePeering"
179	// AzurePublicPeering ...
180	AzurePublicPeering ExpressRouteCircuitPeeringType = "AzurePublicPeering"
181	// MicrosoftPeering ...
182	MicrosoftPeering ExpressRouteCircuitPeeringType = "MicrosoftPeering"
183)
184
185// PossibleExpressRouteCircuitPeeringTypeValues returns an array of possible values for the ExpressRouteCircuitPeeringType const type.
186func PossibleExpressRouteCircuitPeeringTypeValues() []ExpressRouteCircuitPeeringType {
187	return []ExpressRouteCircuitPeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
188}
189
190// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family.
191type ExpressRouteCircuitSkuFamily string
192
193const (
194	// MeteredData ...
195	MeteredData ExpressRouteCircuitSkuFamily = "MeteredData"
196	// UnlimitedData ...
197	UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData"
198)
199
200// PossibleExpressRouteCircuitSkuFamilyValues returns an array of possible values for the ExpressRouteCircuitSkuFamily const type.
201func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily {
202	return []ExpressRouteCircuitSkuFamily{MeteredData, UnlimitedData}
203}
204
205// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier.
206type ExpressRouteCircuitSkuTier string
207
208const (
209	// ExpressRouteCircuitSkuTierPremium ...
210	ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium"
211	// ExpressRouteCircuitSkuTierStandard ...
212	ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard"
213)
214
215// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type.
216func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
217	return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard}
218}
219
220// IPAllocationMethod enumerates the values for ip allocation method.
221type IPAllocationMethod string
222
223const (
224	// Dynamic ...
225	Dynamic IPAllocationMethod = "Dynamic"
226	// Static ...
227	Static IPAllocationMethod = "Static"
228)
229
230// PossibleIPAllocationMethodValues returns an array of possible values for the IPAllocationMethod const type.
231func PossibleIPAllocationMethodValues() []IPAllocationMethod {
232	return []IPAllocationMethod{Dynamic, Static}
233}
234
235// LoadDistribution enumerates the values for load distribution.
236type LoadDistribution string
237
238const (
239	// Default ...
240	Default LoadDistribution = "Default"
241	// SourceIP ...
242	SourceIP LoadDistribution = "SourceIP"
243	// SourceIPProtocol ...
244	SourceIPProtocol LoadDistribution = "SourceIPProtocol"
245)
246
247// PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type.
248func PossibleLoadDistributionValues() []LoadDistribution {
249	return []LoadDistribution{Default, SourceIP, SourceIPProtocol}
250}
251
252// OperationStatus enumerates the values for operation status.
253type OperationStatus string
254
255const (
256	// Failed ...
257	Failed OperationStatus = "Failed"
258	// InProgress ...
259	InProgress OperationStatus = "InProgress"
260	// Succeeded ...
261	Succeeded OperationStatus = "Succeeded"
262)
263
264// PossibleOperationStatusValues returns an array of possible values for the OperationStatus const type.
265func PossibleOperationStatusValues() []OperationStatus {
266	return []OperationStatus{Failed, InProgress, Succeeded}
267}
268
269// ProbeProtocol enumerates the values for probe protocol.
270type ProbeProtocol string
271
272const (
273	// ProbeProtocolHTTP ...
274	ProbeProtocolHTTP ProbeProtocol = "Http"
275	// ProbeProtocolTCP ...
276	ProbeProtocolTCP ProbeProtocol = "Tcp"
277)
278
279// PossibleProbeProtocolValues returns an array of possible values for the ProbeProtocol const type.
280func PossibleProbeProtocolValues() []ProbeProtocol {
281	return []ProbeProtocol{ProbeProtocolHTTP, ProbeProtocolTCP}
282}
283
284// ProcessorArchitecture enumerates the values for processor architecture.
285type ProcessorArchitecture string
286
287const (
288	// Amd64 ...
289	Amd64 ProcessorArchitecture = "Amd64"
290	// X86 ...
291	X86 ProcessorArchitecture = "X86"
292)
293
294// PossibleProcessorArchitectureValues returns an array of possible values for the ProcessorArchitecture const type.
295func PossibleProcessorArchitectureValues() []ProcessorArchitecture {
296	return []ProcessorArchitecture{Amd64, X86}
297}
298
299// RouteNextHopType enumerates the values for route next hop type.
300type RouteNextHopType string
301
302const (
303	// RouteNextHopTypeInternet ...
304	RouteNextHopTypeInternet RouteNextHopType = "Internet"
305	// RouteNextHopTypeNone ...
306	RouteNextHopTypeNone RouteNextHopType = "None"
307	// RouteNextHopTypeVirtualAppliance ...
308	RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance"
309	// RouteNextHopTypeVirtualNetworkGateway ...
310	RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway"
311	// RouteNextHopTypeVnetLocal ...
312	RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal"
313)
314
315// PossibleRouteNextHopTypeValues returns an array of possible values for the RouteNextHopType const type.
316func PossibleRouteNextHopTypeValues() []RouteNextHopType {
317	return []RouteNextHopType{RouteNextHopTypeInternet, RouteNextHopTypeNone, RouteNextHopTypeVirtualAppliance, RouteNextHopTypeVirtualNetworkGateway, RouteNextHopTypeVnetLocal}
318}
319
320// SecurityRuleAccess enumerates the values for security rule access.
321type SecurityRuleAccess string
322
323const (
324	// Allow ...
325	Allow SecurityRuleAccess = "Allow"
326	// Deny ...
327	Deny SecurityRuleAccess = "Deny"
328)
329
330// PossibleSecurityRuleAccessValues returns an array of possible values for the SecurityRuleAccess const type.
331func PossibleSecurityRuleAccessValues() []SecurityRuleAccess {
332	return []SecurityRuleAccess{Allow, Deny}
333}
334
335// SecurityRuleDirection enumerates the values for security rule direction.
336type SecurityRuleDirection string
337
338const (
339	// Inbound ...
340	Inbound SecurityRuleDirection = "Inbound"
341	// Outbound ...
342	Outbound SecurityRuleDirection = "Outbound"
343)
344
345// PossibleSecurityRuleDirectionValues returns an array of possible values for the SecurityRuleDirection const type.
346func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection {
347	return []SecurityRuleDirection{Inbound, Outbound}
348}
349
350// SecurityRuleProtocol enumerates the values for security rule protocol.
351type SecurityRuleProtocol string
352
353const (
354	// Asterisk ...
355	Asterisk SecurityRuleProtocol = "*"
356	// TCP ...
357	TCP SecurityRuleProtocol = "Tcp"
358	// UDP ...
359	UDP SecurityRuleProtocol = "Udp"
360)
361
362// PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type.
363func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol {
364	return []SecurityRuleProtocol{Asterisk, TCP, UDP}
365}
366
367// ServiceProviderProvisioningState enumerates the values for service provider provisioning state.
368type ServiceProviderProvisioningState string
369
370const (
371	// Deprovisioning ...
372	Deprovisioning ServiceProviderProvisioningState = "Deprovisioning"
373	// NotProvisioned ...
374	NotProvisioned ServiceProviderProvisioningState = "NotProvisioned"
375	// Provisioned ...
376	Provisioned ServiceProviderProvisioningState = "Provisioned"
377	// Provisioning ...
378	Provisioning ServiceProviderProvisioningState = "Provisioning"
379)
380
381// PossibleServiceProviderProvisioningStateValues returns an array of possible values for the ServiceProviderProvisioningState const type.
382func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvisioningState {
383	return []ServiceProviderProvisioningState{Deprovisioning, NotProvisioned, Provisioned, Provisioning}
384}
385
386// TransportProtocol enumerates the values for transport protocol.
387type TransportProtocol string
388
389const (
390	// TransportProtocolTCP ...
391	TransportProtocolTCP TransportProtocol = "Tcp"
392	// TransportProtocolUDP ...
393	TransportProtocolUDP TransportProtocol = "Udp"
394)
395
396// PossibleTransportProtocolValues returns an array of possible values for the TransportProtocol const type.
397func PossibleTransportProtocolValues() []TransportProtocol {
398	return []TransportProtocol{TransportProtocolTCP, TransportProtocolUDP}
399}
400
401// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status.
402type VirtualNetworkGatewayConnectionStatus string
403
404const (
405	// Connected ...
406	Connected VirtualNetworkGatewayConnectionStatus = "Connected"
407	// Connecting ...
408	Connecting VirtualNetworkGatewayConnectionStatus = "Connecting"
409	// NotConnected ...
410	NotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected"
411	// Unknown ...
412	Unknown VirtualNetworkGatewayConnectionStatus = "Unknown"
413)
414
415// PossibleVirtualNetworkGatewayConnectionStatusValues returns an array of possible values for the VirtualNetworkGatewayConnectionStatus const type.
416func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatewayConnectionStatus {
417	return []VirtualNetworkGatewayConnectionStatus{Connected, Connecting, NotConnected, Unknown}
418}
419
420// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type.
421type VirtualNetworkGatewayConnectionType string
422
423const (
424	// ExpressRoute ...
425	ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute"
426	// IPsec ...
427	IPsec VirtualNetworkGatewayConnectionType = "IPsec"
428	// Vnet2Vnet ...
429	Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet"
430	// VPNClient ...
431	VPNClient VirtualNetworkGatewayConnectionType = "VPNClient"
432)
433
434// PossibleVirtualNetworkGatewayConnectionTypeValues returns an array of possible values for the VirtualNetworkGatewayConnectionType const type.
435func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGatewayConnectionType {
436	return []VirtualNetworkGatewayConnectionType{ExpressRoute, IPsec, Vnet2Vnet, VPNClient}
437}
438
439// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name.
440type VirtualNetworkGatewaySkuName string
441
442const (
443	// VirtualNetworkGatewaySkuNameBasic ...
444	VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic"
445	// VirtualNetworkGatewaySkuNameHighPerformance ...
446	VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance"
447	// VirtualNetworkGatewaySkuNameStandard ...
448	VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard"
449)
450
451// PossibleVirtualNetworkGatewaySkuNameValues returns an array of possible values for the VirtualNetworkGatewaySkuName const type.
452func PossibleVirtualNetworkGatewaySkuNameValues() []VirtualNetworkGatewaySkuName {
453	return []VirtualNetworkGatewaySkuName{VirtualNetworkGatewaySkuNameBasic, VirtualNetworkGatewaySkuNameHighPerformance, VirtualNetworkGatewaySkuNameStandard}
454}
455
456// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier.
457type VirtualNetworkGatewaySkuTier string
458
459const (
460	// VirtualNetworkGatewaySkuTierBasic ...
461	VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic"
462	// VirtualNetworkGatewaySkuTierHighPerformance ...
463	VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance"
464	// VirtualNetworkGatewaySkuTierStandard ...
465	VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard"
466)
467
468// PossibleVirtualNetworkGatewaySkuTierValues returns an array of possible values for the VirtualNetworkGatewaySkuTier const type.
469func PossibleVirtualNetworkGatewaySkuTierValues() []VirtualNetworkGatewaySkuTier {
470	return []VirtualNetworkGatewaySkuTier{VirtualNetworkGatewaySkuTierBasic, VirtualNetworkGatewaySkuTierHighPerformance, VirtualNetworkGatewaySkuTierStandard}
471}
472
473// VirtualNetworkGatewayType enumerates the values for virtual network gateway type.
474type VirtualNetworkGatewayType string
475
476const (
477	// VirtualNetworkGatewayTypeExpressRoute ...
478	VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute"
479	// VirtualNetworkGatewayTypeVpn ...
480	VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn"
481)
482
483// PossibleVirtualNetworkGatewayTypeValues returns an array of possible values for the VirtualNetworkGatewayType const type.
484func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType {
485	return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeVpn}
486}
487
488// VpnType enumerates the values for vpn type.
489type VpnType string
490
491const (
492	// PolicyBased ...
493	PolicyBased VpnType = "PolicyBased"
494	// RouteBased ...
495	RouteBased VpnType = "RouteBased"
496)
497
498// PossibleVpnTypeValues returns an array of possible values for the VpnType const type.
499func PossibleVpnTypeValues() []VpnType {
500	return []VpnType{PolicyBased, RouteBased}
501}
502
503// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual
504// network.
505type AddressSpace struct {
506	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
507	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
508}
509
510// ApplicationGateway application gateway resource
511type ApplicationGateway struct {
512	autorest.Response                   `json:"-"`
513	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
514	// Etag - A unique read-only string that changes whenever the resource is updated.
515	Etag *string `json:"etag,omitempty"`
516	// ID - Resource Identifier.
517	ID *string `json:"id,omitempty"`
518	// Name - Resource name.
519	Name *string `json:"name,omitempty"`
520	// Type - Resource type.
521	Type *string `json:"type,omitempty"`
522	// Location - Resource location.
523	Location *string `json:"location,omitempty"`
524	// Tags - Resource tags.
525	Tags map[string]*string `json:"tags"`
526}
527
528// MarshalJSON is the custom marshaler for ApplicationGateway.
529func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
530	objectMap := make(map[string]interface{})
531	if ag.ApplicationGatewayPropertiesFormat != nil {
532		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
533	}
534	if ag.Etag != nil {
535		objectMap["etag"] = ag.Etag
536	}
537	if ag.ID != nil {
538		objectMap["id"] = ag.ID
539	}
540	if ag.Name != nil {
541		objectMap["name"] = ag.Name
542	}
543	if ag.Type != nil {
544		objectMap["type"] = ag.Type
545	}
546	if ag.Location != nil {
547		objectMap["location"] = ag.Location
548	}
549	if ag.Tags != nil {
550		objectMap["tags"] = ag.Tags
551	}
552	return json.Marshal(objectMap)
553}
554
555// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
556func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
557	var m map[string]*json.RawMessage
558	err := json.Unmarshal(body, &m)
559	if err != nil {
560		return err
561	}
562	for k, v := range m {
563		switch k {
564		case "properties":
565			if v != nil {
566				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
567				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
568				if err != nil {
569					return err
570				}
571				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
572			}
573		case "etag":
574			if v != nil {
575				var etag string
576				err = json.Unmarshal(*v, &etag)
577				if err != nil {
578					return err
579				}
580				ag.Etag = &etag
581			}
582		case "id":
583			if v != nil {
584				var ID string
585				err = json.Unmarshal(*v, &ID)
586				if err != nil {
587					return err
588				}
589				ag.ID = &ID
590			}
591		case "name":
592			if v != nil {
593				var name string
594				err = json.Unmarshal(*v, &name)
595				if err != nil {
596					return err
597				}
598				ag.Name = &name
599			}
600		case "type":
601			if v != nil {
602				var typeVar string
603				err = json.Unmarshal(*v, &typeVar)
604				if err != nil {
605					return err
606				}
607				ag.Type = &typeVar
608			}
609		case "location":
610			if v != nil {
611				var location string
612				err = json.Unmarshal(*v, &location)
613				if err != nil {
614					return err
615				}
616				ag.Location = &location
617			}
618		case "tags":
619			if v != nil {
620				var tags map[string]*string
621				err = json.Unmarshal(*v, &tags)
622				if err != nil {
623					return err
624				}
625				ag.Tags = tags
626			}
627		}
628	}
629
630	return nil
631}
632
633// ApplicationGatewayBackendAddress backend address of an application gateway.
634type ApplicationGatewayBackendAddress struct {
635	// Fqdn - Fully qualified domain name (FQDN).
636	Fqdn *string `json:"fqdn,omitempty"`
637	// IPAddress - IP address
638	IPAddress *string `json:"ipAddress,omitempty"`
639}
640
641// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
642type ApplicationGatewayBackendAddressPool struct {
643	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
644	// Name - Resource that is unique within a resource group. This name can be used to access the resource.
645	Name *string `json:"name,omitempty"`
646	// Etag - A unique read-only string that changes whenever the resource is updated.
647	Etag *string `json:"etag,omitempty"`
648	// ID - Resource Identifier.
649	ID *string `json:"id,omitempty"`
650}
651
652// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
653func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
654	objectMap := make(map[string]interface{})
655	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
656		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
657	}
658	if agbap.Name != nil {
659		objectMap["name"] = agbap.Name
660	}
661	if agbap.Etag != nil {
662		objectMap["etag"] = agbap.Etag
663	}
664	if agbap.ID != nil {
665		objectMap["id"] = agbap.ID
666	}
667	return json.Marshal(objectMap)
668}
669
670// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
671func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
672	var m map[string]*json.RawMessage
673	err := json.Unmarshal(body, &m)
674	if err != nil {
675		return err
676	}
677	for k, v := range m {
678		switch k {
679		case "properties":
680			if v != nil {
681				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
682				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
683				if err != nil {
684					return err
685				}
686				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
687			}
688		case "name":
689			if v != nil {
690				var name string
691				err = json.Unmarshal(*v, &name)
692				if err != nil {
693					return err
694				}
695				agbap.Name = &name
696			}
697		case "etag":
698			if v != nil {
699				var etag string
700				err = json.Unmarshal(*v, &etag)
701				if err != nil {
702					return err
703				}
704				agbap.Etag = &etag
705			}
706		case "id":
707			if v != nil {
708				var ID string
709				err = json.Unmarshal(*v, &ID)
710				if err != nil {
711					return err
712				}
713				agbap.ID = &ID
714			}
715		}
716	}
717
718	return nil
719}
720
721// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application
722// gateway.
723type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
724	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
725	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
726	// BackendAddresses - Backend addresses
727	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
728	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
729	ProvisioningState *string `json:"provisioningState,omitempty"`
730}
731
732// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
733type ApplicationGatewayBackendHTTPSettings struct {
734	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
735	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
736	Name *string `json:"name,omitempty"`
737	// Etag - A unique read-only string that changes whenever the resource is updated.
738	Etag *string `json:"etag,omitempty"`
739	// ID - Resource Identifier.
740	ID *string `json:"id,omitempty"`
741}
742
743// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
744func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
745	objectMap := make(map[string]interface{})
746	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
747		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
748	}
749	if agbhs.Name != nil {
750		objectMap["name"] = agbhs.Name
751	}
752	if agbhs.Etag != nil {
753		objectMap["etag"] = agbhs.Etag
754	}
755	if agbhs.ID != nil {
756		objectMap["id"] = agbhs.ID
757	}
758	return json.Marshal(objectMap)
759}
760
761// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
762func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
763	var m map[string]*json.RawMessage
764	err := json.Unmarshal(body, &m)
765	if err != nil {
766		return err
767	}
768	for k, v := range m {
769		switch k {
770		case "properties":
771			if v != nil {
772				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
773				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
774				if err != nil {
775					return err
776				}
777				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
778			}
779		case "name":
780			if v != nil {
781				var name string
782				err = json.Unmarshal(*v, &name)
783				if err != nil {
784					return err
785				}
786				agbhs.Name = &name
787			}
788		case "etag":
789			if v != nil {
790				var etag string
791				err = json.Unmarshal(*v, &etag)
792				if err != nil {
793					return err
794				}
795				agbhs.Etag = &etag
796			}
797		case "id":
798			if v != nil {
799				var ID string
800				err = json.Unmarshal(*v, &ID)
801				if err != nil {
802					return err
803				}
804				agbhs.ID = &ID
805			}
806		}
807	}
808
809	return nil
810}
811
812// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
813// application gateway.
814type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
815	// Port - Port
816	Port *int32 `json:"port,omitempty"`
817	// Protocol - Protocol. Possible values are: 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
818	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
819	// CookieBasedAffinity - Cookie based affinity. Possible values are: 'Enabled' and 'Disabled'. Possible values include: 'Enabled', 'Disabled'
820	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
821	// 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.
822	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
823	// Probe - Probe resource of an application gateway.
824	Probe *SubResource `json:"probe,omitempty"`
825	// ProvisioningState - Gets or sets Provisioning state of the backend http settings resource Updating/Deleting/Failed
826	ProvisioningState *string `json:"provisioningState,omitempty"`
827}
828
829// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
830type ApplicationGatewayFrontendIPConfiguration struct {
831	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
832	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
833	Name *string `json:"name,omitempty"`
834	// Etag - A unique read-only string that changes whenever the resource is updated.
835	Etag *string `json:"etag,omitempty"`
836	// ID - Resource Identifier.
837	ID *string `json:"id,omitempty"`
838}
839
840// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
841func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
842	objectMap := make(map[string]interface{})
843	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
844		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
845	}
846	if agfic.Name != nil {
847		objectMap["name"] = agfic.Name
848	}
849	if agfic.Etag != nil {
850		objectMap["etag"] = agfic.Etag
851	}
852	if agfic.ID != nil {
853		objectMap["id"] = agfic.ID
854	}
855	return json.Marshal(objectMap)
856}
857
858// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
859func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
860	var m map[string]*json.RawMessage
861	err := json.Unmarshal(body, &m)
862	if err != nil {
863		return err
864	}
865	for k, v := range m {
866		switch k {
867		case "properties":
868			if v != nil {
869				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
870				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
871				if err != nil {
872					return err
873				}
874				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
875			}
876		case "name":
877			if v != nil {
878				var name string
879				err = json.Unmarshal(*v, &name)
880				if err != nil {
881					return err
882				}
883				agfic.Name = &name
884			}
885		case "etag":
886			if v != nil {
887				var etag string
888				err = json.Unmarshal(*v, &etag)
889				if err != nil {
890					return err
891				}
892				agfic.Etag = &etag
893			}
894		case "id":
895			if v != nil {
896				var ID string
897				err = json.Unmarshal(*v, &ID)
898				if err != nil {
899					return err
900				}
901				agfic.ID = &ID
902			}
903		}
904	}
905
906	return nil
907}
908
909// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
910// application gateway.
911type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
912	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
913	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
914	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
915	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
916	// Subnet - Reference of the subnet resource.
917	Subnet *SubResource `json:"subnet,omitempty"`
918	// PublicIPAddress - Reference of the PublicIP resource.
919	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
920	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
921	ProvisioningState *string `json:"provisioningState,omitempty"`
922}
923
924// ApplicationGatewayFrontendPort frontend port of an application gateway.
925type ApplicationGatewayFrontendPort struct {
926	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
927	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
928	Name *string `json:"name,omitempty"`
929	// Etag - A unique read-only string that changes whenever the resource is updated.
930	Etag *string `json:"etag,omitempty"`
931	// ID - Resource Identifier.
932	ID *string `json:"id,omitempty"`
933}
934
935// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
936func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
937	objectMap := make(map[string]interface{})
938	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
939		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
940	}
941	if agfp.Name != nil {
942		objectMap["name"] = agfp.Name
943	}
944	if agfp.Etag != nil {
945		objectMap["etag"] = agfp.Etag
946	}
947	if agfp.ID != nil {
948		objectMap["id"] = agfp.ID
949	}
950	return json.Marshal(objectMap)
951}
952
953// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
954func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
955	var m map[string]*json.RawMessage
956	err := json.Unmarshal(body, &m)
957	if err != nil {
958		return err
959	}
960	for k, v := range m {
961		switch k {
962		case "properties":
963			if v != nil {
964				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
965				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
966				if err != nil {
967					return err
968				}
969				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
970			}
971		case "name":
972			if v != nil {
973				var name string
974				err = json.Unmarshal(*v, &name)
975				if err != nil {
976					return err
977				}
978				agfp.Name = &name
979			}
980		case "etag":
981			if v != nil {
982				var etag string
983				err = json.Unmarshal(*v, &etag)
984				if err != nil {
985					return err
986				}
987				agfp.Etag = &etag
988			}
989		case "id":
990			if v != nil {
991				var ID string
992				err = json.Unmarshal(*v, &ID)
993				if err != nil {
994					return err
995				}
996				agfp.ID = &ID
997			}
998		}
999	}
1000
1001	return nil
1002}
1003
1004// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1005type ApplicationGatewayFrontendPortPropertiesFormat struct {
1006	// Port - Frontend port
1007	Port *int32 `json:"port,omitempty"`
1008	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1009	ProvisioningState *string `json:"provisioningState,omitempty"`
1010}
1011
1012// ApplicationGatewayHTTPListener http listener of an application gateway.
1013type ApplicationGatewayHTTPListener struct {
1014	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1015	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1016	Name *string `json:"name,omitempty"`
1017	// Etag - A unique read-only string that changes whenever the resource is updated.
1018	Etag *string `json:"etag,omitempty"`
1019	// ID - Resource Identifier.
1020	ID *string `json:"id,omitempty"`
1021}
1022
1023// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1024func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1025	objectMap := make(map[string]interface{})
1026	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1027		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1028	}
1029	if aghl.Name != nil {
1030		objectMap["name"] = aghl.Name
1031	}
1032	if aghl.Etag != nil {
1033		objectMap["etag"] = aghl.Etag
1034	}
1035	if aghl.ID != nil {
1036		objectMap["id"] = aghl.ID
1037	}
1038	return json.Marshal(objectMap)
1039}
1040
1041// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1042func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1043	var m map[string]*json.RawMessage
1044	err := json.Unmarshal(body, &m)
1045	if err != nil {
1046		return err
1047	}
1048	for k, v := range m {
1049		switch k {
1050		case "properties":
1051			if v != nil {
1052				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1053				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1054				if err != nil {
1055					return err
1056				}
1057				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1058			}
1059		case "name":
1060			if v != nil {
1061				var name string
1062				err = json.Unmarshal(*v, &name)
1063				if err != nil {
1064					return err
1065				}
1066				aghl.Name = &name
1067			}
1068		case "etag":
1069			if v != nil {
1070				var etag string
1071				err = json.Unmarshal(*v, &etag)
1072				if err != nil {
1073					return err
1074				}
1075				aghl.Etag = &etag
1076			}
1077		case "id":
1078			if v != nil {
1079				var ID string
1080				err = json.Unmarshal(*v, &ID)
1081				if err != nil {
1082					return err
1083				}
1084				aghl.ID = &ID
1085			}
1086		}
1087	}
1088
1089	return nil
1090}
1091
1092// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1093type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1094	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1095	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1096	// FrontendPort - Frontend port resource of an application gateway.
1097	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1098	// Protocol - Protocol. Possible values are: 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1099	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1100	// HostName - Host name of HTTP listener.
1101	HostName *string `json:"hostName,omitempty"`
1102	// SslCertificate - SSL certificate resource of an application gateway.
1103	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1104	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1105	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1106	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1107	ProvisioningState *string `json:"provisioningState,omitempty"`
1108}
1109
1110// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 private
1111// IP configuration is allowed.
1112type ApplicationGatewayIPConfiguration struct {
1113	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1114	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1115	Name *string `json:"name,omitempty"`
1116	// Etag - A unique read-only string that changes whenever the resource is updated.
1117	Etag *string `json:"etag,omitempty"`
1118	// ID - Resource Identifier.
1119	ID *string `json:"id,omitempty"`
1120}
1121
1122// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1123func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1124	objectMap := make(map[string]interface{})
1125	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1126		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1127	}
1128	if agic.Name != nil {
1129		objectMap["name"] = agic.Name
1130	}
1131	if agic.Etag != nil {
1132		objectMap["etag"] = agic.Etag
1133	}
1134	if agic.ID != nil {
1135		objectMap["id"] = agic.ID
1136	}
1137	return json.Marshal(objectMap)
1138}
1139
1140// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1141func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1142	var m map[string]*json.RawMessage
1143	err := json.Unmarshal(body, &m)
1144	if err != nil {
1145		return err
1146	}
1147	for k, v := range m {
1148		switch k {
1149		case "properties":
1150			if v != nil {
1151				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1152				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1153				if err != nil {
1154					return err
1155				}
1156				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1157			}
1158		case "name":
1159			if v != nil {
1160				var name string
1161				err = json.Unmarshal(*v, &name)
1162				if err != nil {
1163					return err
1164				}
1165				agic.Name = &name
1166			}
1167		case "etag":
1168			if v != nil {
1169				var etag string
1170				err = json.Unmarshal(*v, &etag)
1171				if err != nil {
1172					return err
1173				}
1174				agic.Etag = &etag
1175			}
1176		case "id":
1177			if v != nil {
1178				var ID string
1179				err = json.Unmarshal(*v, &ID)
1180				if err != nil {
1181					return err
1182				}
1183				agic.ID = &ID
1184			}
1185		}
1186	}
1187
1188	return nil
1189}
1190
1191// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway.
1192type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1193	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1194	Subnet *SubResource `json:"subnet,omitempty"`
1195	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1196	ProvisioningState *string `json:"provisioningState,omitempty"`
1197}
1198
1199// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1200type ApplicationGatewayListResult struct {
1201	autorest.Response `json:"-"`
1202	// Value - List of an application gateways in a resource group.
1203	Value *[]ApplicationGateway `json:"value,omitempty"`
1204	// NextLink - URL to get the next set of results.
1205	NextLink *string `json:"nextLink,omitempty"`
1206}
1207
1208// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1209type ApplicationGatewayListResultIterator struct {
1210	i    int
1211	page ApplicationGatewayListResultPage
1212}
1213
1214// Next advances to the next value.  If there was an error making
1215// the request the iterator does not advance and the error is returned.
1216func (iter *ApplicationGatewayListResultIterator) Next() error {
1217	iter.i++
1218	if iter.i < len(iter.page.Values()) {
1219		return nil
1220	}
1221	err := iter.page.Next()
1222	if err != nil {
1223		iter.i--
1224		return err
1225	}
1226	iter.i = 0
1227	return nil
1228}
1229
1230// NotDone returns true if the enumeration should be started or is not yet complete.
1231func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1232	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1233}
1234
1235// Response returns the raw server response from the last page request.
1236func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1237	return iter.page.Response()
1238}
1239
1240// Value returns the current value or a zero-initialized value if the
1241// iterator has advanced beyond the end of the collection.
1242func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1243	if !iter.page.NotDone() {
1244		return ApplicationGateway{}
1245	}
1246	return iter.page.Values()[iter.i]
1247}
1248
1249// IsEmpty returns true if the ListResult contains no values.
1250func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1251	return aglr.Value == nil || len(*aglr.Value) == 0
1252}
1253
1254// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1255// It returns nil if no more results exist.
1256func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() (*http.Request, error) {
1257	if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 {
1258		return nil, nil
1259	}
1260	return autorest.Prepare(&http.Request{},
1261		autorest.AsJSON(),
1262		autorest.AsGet(),
1263		autorest.WithBaseURL(to.String(aglr.NextLink)))
1264}
1265
1266// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1267type ApplicationGatewayListResultPage struct {
1268	fn   func(ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1269	aglr ApplicationGatewayListResult
1270}
1271
1272// Next advances to the next page of values.  If there was an error making
1273// the request the page does not advance and the error is returned.
1274func (page *ApplicationGatewayListResultPage) Next() error {
1275	next, err := page.fn(page.aglr)
1276	if err != nil {
1277		return err
1278	}
1279	page.aglr = next
1280	return nil
1281}
1282
1283// NotDone returns true if the page enumeration should be started or is not yet complete.
1284func (page ApplicationGatewayListResultPage) NotDone() bool {
1285	return !page.aglr.IsEmpty()
1286}
1287
1288// Response returns the raw server response from the last page request.
1289func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1290	return page.aglr
1291}
1292
1293// Values returns the slice of values for the current page or nil if there are no values.
1294func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1295	if page.aglr.IsEmpty() {
1296		return nil
1297	}
1298	return *page.aglr.Value
1299}
1300
1301// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1302type ApplicationGatewayPathRule struct {
1303	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1304	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1305	Name *string `json:"name,omitempty"`
1306	// Etag - A unique read-only string that changes whenever the resource is updated.
1307	Etag *string `json:"etag,omitempty"`
1308	// ID - Resource Identifier.
1309	ID *string `json:"id,omitempty"`
1310}
1311
1312// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1313func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1314	objectMap := make(map[string]interface{})
1315	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1316		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1317	}
1318	if agpr.Name != nil {
1319		objectMap["name"] = agpr.Name
1320	}
1321	if agpr.Etag != nil {
1322		objectMap["etag"] = agpr.Etag
1323	}
1324	if agpr.ID != nil {
1325		objectMap["id"] = agpr.ID
1326	}
1327	return json.Marshal(objectMap)
1328}
1329
1330// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1331func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1332	var m map[string]*json.RawMessage
1333	err := json.Unmarshal(body, &m)
1334	if err != nil {
1335		return err
1336	}
1337	for k, v := range m {
1338		switch k {
1339		case "properties":
1340			if v != nil {
1341				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1342				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1343				if err != nil {
1344					return err
1345				}
1346				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1347			}
1348		case "name":
1349			if v != nil {
1350				var name string
1351				err = json.Unmarshal(*v, &name)
1352				if err != nil {
1353					return err
1354				}
1355				agpr.Name = &name
1356			}
1357		case "etag":
1358			if v != nil {
1359				var etag string
1360				err = json.Unmarshal(*v, &etag)
1361				if err != nil {
1362					return err
1363				}
1364				agpr.Etag = &etag
1365			}
1366		case "id":
1367			if v != nil {
1368				var ID string
1369				err = json.Unmarshal(*v, &ID)
1370				if err != nil {
1371					return err
1372				}
1373				agpr.ID = &ID
1374			}
1375		}
1376	}
1377
1378	return nil
1379}
1380
1381// ApplicationGatewayPathRulePropertiesFormat properties of probe of an application gateway.
1382type ApplicationGatewayPathRulePropertiesFormat struct {
1383	// Paths - Path rules of URL path map.
1384	Paths *[]string `json:"paths,omitempty"`
1385	// BackendAddressPool - Backend address pool resource of URL path map.
1386	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1387	// BackendHTTPSettings - Backend http settings resource of URL path map.
1388	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1389	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1390	ProvisioningState *string `json:"provisioningState,omitempty"`
1391}
1392
1393// ApplicationGatewayProbe probe of the application gateway.
1394type ApplicationGatewayProbe struct {
1395	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1396	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1397	Name *string `json:"name,omitempty"`
1398	// Etag - A unique read-only string that changes whenever the resource is updated.
1399	Etag *string `json:"etag,omitempty"`
1400	// ID - Resource Identifier.
1401	ID *string `json:"id,omitempty"`
1402}
1403
1404// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1405func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1406	objectMap := make(map[string]interface{})
1407	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1408		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1409	}
1410	if agp.Name != nil {
1411		objectMap["name"] = agp.Name
1412	}
1413	if agp.Etag != nil {
1414		objectMap["etag"] = agp.Etag
1415	}
1416	if agp.ID != nil {
1417		objectMap["id"] = agp.ID
1418	}
1419	return json.Marshal(objectMap)
1420}
1421
1422// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1423func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1424	var m map[string]*json.RawMessage
1425	err := json.Unmarshal(body, &m)
1426	if err != nil {
1427		return err
1428	}
1429	for k, v := range m {
1430		switch k {
1431		case "properties":
1432			if v != nil {
1433				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1434				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1435				if err != nil {
1436					return err
1437				}
1438				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1439			}
1440		case "name":
1441			if v != nil {
1442				var name string
1443				err = json.Unmarshal(*v, &name)
1444				if err != nil {
1445					return err
1446				}
1447				agp.Name = &name
1448			}
1449		case "etag":
1450			if v != nil {
1451				var etag string
1452				err = json.Unmarshal(*v, &etag)
1453				if err != nil {
1454					return err
1455				}
1456				agp.Etag = &etag
1457			}
1458		case "id":
1459			if v != nil {
1460				var ID string
1461				err = json.Unmarshal(*v, &ID)
1462				if err != nil {
1463					return err
1464				}
1465				agp.ID = &ID
1466			}
1467		}
1468	}
1469
1470	return nil
1471}
1472
1473// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1474type ApplicationGatewayProbePropertiesFormat struct {
1475	// Protocol - Protocol. Possible values are: 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1476	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1477	// Host - Host name to send the probe to.
1478	Host *string `json:"host,omitempty"`
1479	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1480	Path *string `json:"path,omitempty"`
1481	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1482	Interval *int32 `json:"interval,omitempty"`
1483	// 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.
1484	Timeout *int32 `json:"timeout,omitempty"`
1485	// 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.
1486	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1487	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1488	ProvisioningState *string `json:"provisioningState,omitempty"`
1489}
1490
1491// ApplicationGatewayPropertiesFormat properties of the application gateway.
1492type ApplicationGatewayPropertiesFormat struct {
1493	// Sku - SKU of the application gateway resource.
1494	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1495	// OperationalState - Operational state of the application gateway resource. Possible values are: 'Stopped', 'Started', 'Running', and 'Stopping'. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1496	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1497	// GatewayIPConfigurations - Gets or sets subnets of application gateway resource
1498	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1499	// SslCertificates - SSL certificates of the application gateway resource.
1500	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1501	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1502	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1503	// FrontendPorts - Frontend ports of the application gateway resource.
1504	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1505	// Probes - Probes of the application gateway resource.
1506	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1507	// BackendAddressPools - Backend address pool of the application gateway resource.
1508	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1509	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1510	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1511	// HTTPListeners - Http listeners of the application gateway resource.
1512	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1513	// URLPathMaps - URL path map of the application gateway resource.
1514	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1515	// RequestRoutingRules - Request routing rules of the application gateway resource.
1516	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1517	// ResourceGUID - Resource GUID property of the application gateway resource.
1518	ResourceGUID *string `json:"resourceGuid,omitempty"`
1519	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1520	ProvisioningState *string `json:"provisioningState,omitempty"`
1521}
1522
1523// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
1524type ApplicationGatewayRequestRoutingRule struct {
1525	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
1526	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1527	Name *string `json:"name,omitempty"`
1528	// Etag - A unique read-only string that changes whenever the resource is updated.
1529	Etag *string `json:"etag,omitempty"`
1530	// ID - Resource Identifier.
1531	ID *string `json:"id,omitempty"`
1532}
1533
1534// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
1535func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
1536	objectMap := make(map[string]interface{})
1537	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
1538		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
1539	}
1540	if agrrr.Name != nil {
1541		objectMap["name"] = agrrr.Name
1542	}
1543	if agrrr.Etag != nil {
1544		objectMap["etag"] = agrrr.Etag
1545	}
1546	if agrrr.ID != nil {
1547		objectMap["id"] = agrrr.ID
1548	}
1549	return json.Marshal(objectMap)
1550}
1551
1552// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
1553func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
1554	var m map[string]*json.RawMessage
1555	err := json.Unmarshal(body, &m)
1556	if err != nil {
1557		return err
1558	}
1559	for k, v := range m {
1560		switch k {
1561		case "properties":
1562			if v != nil {
1563				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
1564				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
1565				if err != nil {
1566					return err
1567				}
1568				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
1569			}
1570		case "name":
1571			if v != nil {
1572				var name string
1573				err = json.Unmarshal(*v, &name)
1574				if err != nil {
1575					return err
1576				}
1577				agrrr.Name = &name
1578			}
1579		case "etag":
1580			if v != nil {
1581				var etag string
1582				err = json.Unmarshal(*v, &etag)
1583				if err != nil {
1584					return err
1585				}
1586				agrrr.Etag = &etag
1587			}
1588		case "id":
1589			if v != nil {
1590				var ID string
1591				err = json.Unmarshal(*v, &ID)
1592				if err != nil {
1593					return err
1594				}
1595				agrrr.ID = &ID
1596			}
1597		}
1598	}
1599
1600	return nil
1601}
1602
1603// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application
1604// gateway.
1605type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
1606	// RuleType - Rule type. Possible values are: 'Basic' and 'PathBasedRouting'. Possible values include: 'Basic', 'PathBasedRouting'
1607	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
1608	// BackendAddressPool - Backend address pool resource of the application gateway.
1609	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1610	// BackendHTTPSettings - Frontend port resource of the application gateway.
1611	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1612	// HTTPListener - Http listener resource of the application gateway.
1613	HTTPListener *SubResource `json:"httpListener,omitempty"`
1614	// URLPathMap - URL path map resource of the application gateway.
1615	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
1616	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1617	ProvisioningState *string `json:"provisioningState,omitempty"`
1618}
1619
1620// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1621// long-running operation.
1622type ApplicationGatewaysCreateOrUpdateFuture struct {
1623	azure.Future
1624	req *http.Request
1625}
1626
1627// Result returns the result of the asynchronous operation.
1628// If the operation has not completed it will return an error.
1629func (future ApplicationGatewaysCreateOrUpdateFuture) Result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
1630	var done bool
1631	done, err = future.Done(client)
1632	if err != nil {
1633		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1634		return
1635	}
1636	if !done {
1637		return ag, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
1638	}
1639	if future.PollingMethod() == azure.PollingLocation {
1640		ag, err = client.CreateOrUpdateResponder(future.Response())
1641		if err != nil {
1642			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
1643		}
1644		return
1645	}
1646	var req *http.Request
1647	var resp *http.Response
1648	if future.PollingURL() != "" {
1649		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
1650		if err != nil {
1651			return
1652		}
1653	} else {
1654		req = autorest.ChangeToGet(future.req)
1655	}
1656	resp, err = autorest.SendWithSender(client, req,
1657		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1658	if err != nil {
1659		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
1660		return
1661	}
1662	ag, err = client.CreateOrUpdateResponder(resp)
1663	if err != nil {
1664		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
1665	}
1666	return
1667}
1668
1669// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
1670// operation.
1671type ApplicationGatewaysDeleteFuture struct {
1672	azure.Future
1673	req *http.Request
1674}
1675
1676// Result returns the result of the asynchronous operation.
1677// If the operation has not completed it will return an error.
1678func (future ApplicationGatewaysDeleteFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
1679	var done bool
1680	done, err = future.Done(client)
1681	if err != nil {
1682		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
1683		return
1684	}
1685	if !done {
1686		return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
1687	}
1688	if future.PollingMethod() == azure.PollingLocation {
1689		ar, err = client.DeleteResponder(future.Response())
1690		if err != nil {
1691			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
1692		}
1693		return
1694	}
1695	var req *http.Request
1696	var resp *http.Response
1697	if future.PollingURL() != "" {
1698		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
1699		if err != nil {
1700			return
1701		}
1702	} else {
1703		req = autorest.ChangeToGet(future.req)
1704	}
1705	resp, err = autorest.SendWithSender(client, req,
1706		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1707	if err != nil {
1708		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure sending request")
1709		return
1710	}
1711	ar, err = client.DeleteResponder(resp)
1712	if err != nil {
1713		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
1714	}
1715	return
1716}
1717
1718// ApplicationGatewaySku SKU of application gateway
1719type ApplicationGatewaySku struct {
1720	// Name - Name of an application gateway SKU. Possible values are: 'Standard_Small', 'Standard_Medium', 'Standard_Large', 'WAF_Medium', and 'WAF_Large'. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge'
1721	Name ApplicationGatewaySkuName `json:"name,omitempty"`
1722	// Tier - Tier of an application gateway. Possible values include: 'Standard'
1723	Tier ApplicationGatewayTier `json:"tier,omitempty"`
1724	// Capacity - Capacity (instance count) of an application gateway.
1725	Capacity *int32 `json:"capacity,omitempty"`
1726}
1727
1728// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
1729type ApplicationGatewaySslCertificate struct {
1730	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
1731	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1732	Name *string `json:"name,omitempty"`
1733	// Etag - A unique read-only string that changes whenever the resource is updated.
1734	Etag *string `json:"etag,omitempty"`
1735	// ID - Resource Identifier.
1736	ID *string `json:"id,omitempty"`
1737}
1738
1739// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
1740func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
1741	objectMap := make(map[string]interface{})
1742	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
1743		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
1744	}
1745	if agsc.Name != nil {
1746		objectMap["name"] = agsc.Name
1747	}
1748	if agsc.Etag != nil {
1749		objectMap["etag"] = agsc.Etag
1750	}
1751	if agsc.ID != nil {
1752		objectMap["id"] = agsc.ID
1753	}
1754	return json.Marshal(objectMap)
1755}
1756
1757// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
1758func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
1759	var m map[string]*json.RawMessage
1760	err := json.Unmarshal(body, &m)
1761	if err != nil {
1762		return err
1763	}
1764	for k, v := range m {
1765		switch k {
1766		case "properties":
1767			if v != nil {
1768				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
1769				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
1770				if err != nil {
1771					return err
1772				}
1773				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
1774			}
1775		case "name":
1776			if v != nil {
1777				var name string
1778				err = json.Unmarshal(*v, &name)
1779				if err != nil {
1780					return err
1781				}
1782				agsc.Name = &name
1783			}
1784		case "etag":
1785			if v != nil {
1786				var etag string
1787				err = json.Unmarshal(*v, &etag)
1788				if err != nil {
1789					return err
1790				}
1791				agsc.Etag = &etag
1792			}
1793		case "id":
1794			if v != nil {
1795				var ID string
1796				err = json.Unmarshal(*v, &ID)
1797				if err != nil {
1798					return err
1799				}
1800				agsc.ID = &ID
1801			}
1802		}
1803	}
1804
1805	return nil
1806}
1807
1808// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway.
1809type ApplicationGatewaySslCertificatePropertiesFormat struct {
1810	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
1811	Data *string `json:"data,omitempty"`
1812	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
1813	Password *string `json:"password,omitempty"`
1814	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
1815	PublicCertData *string `json:"publicCertData,omitempty"`
1816	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
1817	ProvisioningState *string `json:"provisioningState,omitempty"`
1818}
1819
1820// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running
1821// operation.
1822type ApplicationGatewaysStartFuture struct {
1823	azure.Future
1824	req *http.Request
1825}
1826
1827// Result returns the result of the asynchronous operation.
1828// If the operation has not completed it will return an error.
1829func (future ApplicationGatewaysStartFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
1830	var done bool
1831	done, err = future.Done(client)
1832	if err != nil {
1833		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
1834		return
1835	}
1836	if !done {
1837		return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
1838	}
1839	if future.PollingMethod() == azure.PollingLocation {
1840		ar, err = client.StartResponder(future.Response())
1841		if err != nil {
1842			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Failure responding to request")
1843		}
1844		return
1845	}
1846	var req *http.Request
1847	var resp *http.Response
1848	if future.PollingURL() != "" {
1849		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
1850		if err != nil {
1851			return
1852		}
1853	} else {
1854		req = autorest.ChangeToGet(future.req)
1855	}
1856	resp, err = autorest.SendWithSender(client, req,
1857		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1858	if err != nil {
1859		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure sending request")
1860		return
1861	}
1862	ar, err = client.StartResponder(resp)
1863	if err != nil {
1864		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", resp, "Failure responding to request")
1865	}
1866	return
1867}
1868
1869// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
1870// operation.
1871type ApplicationGatewaysStopFuture struct {
1872	azure.Future
1873	req *http.Request
1874}
1875
1876// Result returns the result of the asynchronous operation.
1877// If the operation has not completed it will return an error.
1878func (future ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
1879	var done bool
1880	done, err = future.Done(client)
1881	if err != nil {
1882		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
1883		return
1884	}
1885	if !done {
1886		return ar, azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
1887	}
1888	if future.PollingMethod() == azure.PollingLocation {
1889		ar, err = client.StopResponder(future.Response())
1890		if err != nil {
1891			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Failure responding to request")
1892		}
1893		return
1894	}
1895	var req *http.Request
1896	var resp *http.Response
1897	if future.PollingURL() != "" {
1898		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
1899		if err != nil {
1900			return
1901		}
1902	} else {
1903		req = autorest.ChangeToGet(future.req)
1904	}
1905	resp, err = autorest.SendWithSender(client, req,
1906		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1907	if err != nil {
1908		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure sending request")
1909		return
1910	}
1911	ar, err = client.StopResponder(resp)
1912	if err != nil {
1913		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", resp, "Failure responding to request")
1914	}
1915	return
1916}
1917
1918// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
1919// PathBasedRouting.
1920type ApplicationGatewayURLPathMap struct {
1921	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
1922	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1923	Name *string `json:"name,omitempty"`
1924	// Etag - A unique read-only string that changes whenever the resource is updated.
1925	Etag *string `json:"etag,omitempty"`
1926	// ID - Resource Identifier.
1927	ID *string `json:"id,omitempty"`
1928}
1929
1930// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
1931func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
1932	objectMap := make(map[string]interface{})
1933	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
1934		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
1935	}
1936	if agupm.Name != nil {
1937		objectMap["name"] = agupm.Name
1938	}
1939	if agupm.Etag != nil {
1940		objectMap["etag"] = agupm.Etag
1941	}
1942	if agupm.ID != nil {
1943		objectMap["id"] = agupm.ID
1944	}
1945	return json.Marshal(objectMap)
1946}
1947
1948// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
1949func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
1950	var m map[string]*json.RawMessage
1951	err := json.Unmarshal(body, &m)
1952	if err != nil {
1953		return err
1954	}
1955	for k, v := range m {
1956		switch k {
1957		case "properties":
1958			if v != nil {
1959				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
1960				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
1961				if err != nil {
1962					return err
1963				}
1964				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
1965			}
1966		case "name":
1967			if v != nil {
1968				var name string
1969				err = json.Unmarshal(*v, &name)
1970				if err != nil {
1971					return err
1972				}
1973				agupm.Name = &name
1974			}
1975		case "etag":
1976			if v != nil {
1977				var etag string
1978				err = json.Unmarshal(*v, &etag)
1979				if err != nil {
1980					return err
1981				}
1982				agupm.Etag = &etag
1983			}
1984		case "id":
1985			if v != nil {
1986				var ID string
1987				err = json.Unmarshal(*v, &ID)
1988				if err != nil {
1989					return err
1990				}
1991				agupm.ID = &ID
1992			}
1993		}
1994	}
1995
1996	return nil
1997}
1998
1999// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2000type ApplicationGatewayURLPathMapPropertiesFormat struct {
2001	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2002	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2003	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2004	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2005	// PathRules - Path rule of URL path map resource.
2006	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2007	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2008	ProvisioningState *string `json:"provisioningState,omitempty"`
2009}
2010
2011// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that
2012// belongs to an ExpressRouteCircuit.
2013type AuthorizationListResult struct {
2014	autorest.Response `json:"-"`
2015	// Value - The authorizations in an ExpressRoute Circuit.
2016	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
2017	// NextLink - The URL to get the next set of results.
2018	NextLink *string `json:"nextLink,omitempty"`
2019}
2020
2021// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization
2022// values.
2023type AuthorizationListResultIterator struct {
2024	i    int
2025	page AuthorizationListResultPage
2026}
2027
2028// Next advances to the next value.  If there was an error making
2029// the request the iterator does not advance and the error is returned.
2030func (iter *AuthorizationListResultIterator) Next() error {
2031	iter.i++
2032	if iter.i < len(iter.page.Values()) {
2033		return nil
2034	}
2035	err := iter.page.Next()
2036	if err != nil {
2037		iter.i--
2038		return err
2039	}
2040	iter.i = 0
2041	return nil
2042}
2043
2044// NotDone returns true if the enumeration should be started or is not yet complete.
2045func (iter AuthorizationListResultIterator) NotDone() bool {
2046	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2047}
2048
2049// Response returns the raw server response from the last page request.
2050func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
2051	return iter.page.Response()
2052}
2053
2054// Value returns the current value or a zero-initialized value if the
2055// iterator has advanced beyond the end of the collection.
2056func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
2057	if !iter.page.NotDone() {
2058		return ExpressRouteCircuitAuthorization{}
2059	}
2060	return iter.page.Values()[iter.i]
2061}
2062
2063// IsEmpty returns true if the ListResult contains no values.
2064func (alr AuthorizationListResult) IsEmpty() bool {
2065	return alr.Value == nil || len(*alr.Value) == 0
2066}
2067
2068// authorizationListResultPreparer prepares a request to retrieve the next set of results.
2069// It returns nil if no more results exist.
2070func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Request, error) {
2071	if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
2072		return nil, nil
2073	}
2074	return autorest.Prepare(&http.Request{},
2075		autorest.AsJSON(),
2076		autorest.AsGet(),
2077		autorest.WithBaseURL(to.String(alr.NextLink)))
2078}
2079
2080// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
2081type AuthorizationListResultPage struct {
2082	fn  func(AuthorizationListResult) (AuthorizationListResult, error)
2083	alr AuthorizationListResult
2084}
2085
2086// Next advances to the next page of values.  If there was an error making
2087// the request the page does not advance and the error is returned.
2088func (page *AuthorizationListResultPage) Next() error {
2089	next, err := page.fn(page.alr)
2090	if err != nil {
2091		return err
2092	}
2093	page.alr = next
2094	return nil
2095}
2096
2097// NotDone returns true if the page enumeration should be started or is not yet complete.
2098func (page AuthorizationListResultPage) NotDone() bool {
2099	return !page.alr.IsEmpty()
2100}
2101
2102// Response returns the raw server response from the last page request.
2103func (page AuthorizationListResultPage) Response() AuthorizationListResult {
2104	return page.alr
2105}
2106
2107// Values returns the slice of values for the current page or nil if there are no values.
2108func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
2109	if page.alr.IsEmpty() {
2110		return nil
2111	}
2112	return *page.alr.Value
2113}
2114
2115// AuthorizationPropertiesFormat ...
2116type AuthorizationPropertiesFormat struct {
2117	// AuthorizationKey - The authorization key.
2118	AuthorizationKey *string `json:"authorizationKey,omitempty"`
2119	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
2120	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
2121	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2122	ProvisioningState *string `json:"provisioningState,omitempty"`
2123}
2124
2125// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
2126// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the
2127// HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation
2128// succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous
2129// operation failed, the response body includes the HTTP status code for the failed request and error information
2130// regarding the failure.
2131type AzureAsyncOperationResult struct {
2132	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed'
2133	Status OperationStatus `json:"status,omitempty"`
2134	Error  *Error          `json:"error,omitempty"`
2135}
2136
2137// BackendAddressPool pool of backend IP addresses.
2138type BackendAddressPool struct {
2139	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
2140	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
2141	Name *string `json:"name,omitempty"`
2142	// Etag - A unique read-only string that changes whenever the resource is updated.
2143	Etag *string `json:"etag,omitempty"`
2144	// ID - Resource Identifier.
2145	ID *string `json:"id,omitempty"`
2146}
2147
2148// MarshalJSON is the custom marshaler for BackendAddressPool.
2149func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
2150	objectMap := make(map[string]interface{})
2151	if bap.BackendAddressPoolPropertiesFormat != nil {
2152		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
2153	}
2154	if bap.Name != nil {
2155		objectMap["name"] = bap.Name
2156	}
2157	if bap.Etag != nil {
2158		objectMap["etag"] = bap.Etag
2159	}
2160	if bap.ID != nil {
2161		objectMap["id"] = bap.ID
2162	}
2163	return json.Marshal(objectMap)
2164}
2165
2166// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
2167func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
2168	var m map[string]*json.RawMessage
2169	err := json.Unmarshal(body, &m)
2170	if err != nil {
2171		return err
2172	}
2173	for k, v := range m {
2174		switch k {
2175		case "properties":
2176			if v != nil {
2177				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
2178				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
2179				if err != nil {
2180					return err
2181				}
2182				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
2183			}
2184		case "name":
2185			if v != nil {
2186				var name string
2187				err = json.Unmarshal(*v, &name)
2188				if err != nil {
2189					return err
2190				}
2191				bap.Name = &name
2192			}
2193		case "etag":
2194			if v != nil {
2195				var etag string
2196				err = json.Unmarshal(*v, &etag)
2197				if err != nil {
2198					return err
2199				}
2200				bap.Etag = &etag
2201			}
2202		case "id":
2203			if v != nil {
2204				var ID string
2205				err = json.Unmarshal(*v, &ID)
2206				if err != nil {
2207					return err
2208				}
2209				bap.ID = &ID
2210			}
2211		}
2212	}
2213
2214	return nil
2215}
2216
2217// BackendAddressPoolPropertiesFormat properties of the backend address pool.
2218type BackendAddressPoolPropertiesFormat struct {
2219	// BackendIPConfigurations - Gets collection of references to IP addresses defined in network interfaces.
2220	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
2221	// LoadBalancingRules - Gets load balancing rules that use this backend address pool.
2222	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
2223	// OutboundNatRule - Gets outbound rules that use this backend address pool.
2224	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
2225	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2226	ProvisioningState *string `json:"provisioningState,omitempty"`
2227}
2228
2229// BgpSettings ...
2230type BgpSettings struct {
2231	// Asn - Gets or sets this BGP speaker's ASN
2232	Asn *int64 `json:"asn,omitempty"`
2233	// BgpPeeringAddress - Gets or sets the BGP peering address and BGP identifier of this BGP speaker
2234	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
2235	// PeerWeight - Gets or sets the weight added to routes learned from this BGP speaker
2236	PeerWeight *int32 `json:"peerWeight,omitempty"`
2237}
2238
2239// ConnectionResetSharedKey ...
2240type ConnectionResetSharedKey struct {
2241	autorest.Response `json:"-"`
2242	// KeyLength - The virtual network connection reset shared key length
2243	KeyLength *int64 `json:"keyLength,omitempty"`
2244}
2245
2246// ConnectionSharedKey response for GetConnectionSharedKey Api servive call
2247type ConnectionSharedKey struct {
2248	autorest.Response `json:"-"`
2249	// Value - The virtual network connection shared key value
2250	Value *string `json:"value,omitempty"`
2251}
2252
2253// ConnectionSharedKeyResult response for CheckConnectionSharedKey Api servive call
2254type ConnectionSharedKeyResult struct {
2255	autorest.Response `json:"-"`
2256	// Value - The virtual network connection shared key value
2257	Value *string `json:"value,omitempty"`
2258}
2259
2260// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network.
2261// Standard DHCP option for a subnet overrides VNET DHCP options.
2262type DhcpOptions struct {
2263	// DNSServers - The list of DNS servers IP addresses.
2264	DNSServers *[]string `json:"dnsServers,omitempty"`
2265}
2266
2267// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
2268type DNSNameAvailabilityResult struct {
2269	autorest.Response `json:"-"`
2270	// Available - Domain availability (True/False).
2271	Available *bool `json:"available,omitempty"`
2272}
2273
2274// Error error object properties
2275type Error struct {
2276	Code       *string         `json:"code,omitempty"`
2277	Message    *string         `json:"message,omitempty"`
2278	Target     *string         `json:"target,omitempty"`
2279	Details    *[]ErrorDetails `json:"details,omitempty"`
2280	InnerError *string         `json:"innerError,omitempty"`
2281}
2282
2283// ErrorDetails error details properties
2284type ErrorDetails struct {
2285	Code    *string `json:"code,omitempty"`
2286	Target  *string `json:"target,omitempty"`
2287	Message *string `json:"message,omitempty"`
2288}
2289
2290// ExpressRouteCircuit expressRouteCircuit resource
2291type ExpressRouteCircuit struct {
2292	autorest.Response `json:"-"`
2293	// Sku - The SKU.
2294	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
2295	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
2296	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
2297	Etag *string `json:"etag,omitempty"`
2298	// ID - Resource Identifier.
2299	ID *string `json:"id,omitempty"`
2300	// Name - Resource name.
2301	Name *string `json:"name,omitempty"`
2302	// Type - Resource type.
2303	Type *string `json:"type,omitempty"`
2304	// Location - Resource location.
2305	Location *string `json:"location,omitempty"`
2306	// Tags - Resource tags.
2307	Tags map[string]*string `json:"tags"`
2308}
2309
2310// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
2311func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
2312	objectMap := make(map[string]interface{})
2313	if erc.Sku != nil {
2314		objectMap["sku"] = erc.Sku
2315	}
2316	if erc.ExpressRouteCircuitPropertiesFormat != nil {
2317		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
2318	}
2319	if erc.Etag != nil {
2320		objectMap["etag"] = erc.Etag
2321	}
2322	if erc.ID != nil {
2323		objectMap["id"] = erc.ID
2324	}
2325	if erc.Name != nil {
2326		objectMap["name"] = erc.Name
2327	}
2328	if erc.Type != nil {
2329		objectMap["type"] = erc.Type
2330	}
2331	if erc.Location != nil {
2332		objectMap["location"] = erc.Location
2333	}
2334	if erc.Tags != nil {
2335		objectMap["tags"] = erc.Tags
2336	}
2337	return json.Marshal(objectMap)
2338}
2339
2340// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
2341func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
2342	var m map[string]*json.RawMessage
2343	err := json.Unmarshal(body, &m)
2344	if err != nil {
2345		return err
2346	}
2347	for k, v := range m {
2348		switch k {
2349		case "sku":
2350			if v != nil {
2351				var sku ExpressRouteCircuitSku
2352				err = json.Unmarshal(*v, &sku)
2353				if err != nil {
2354					return err
2355				}
2356				erc.Sku = &sku
2357			}
2358		case "properties":
2359			if v != nil {
2360				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
2361				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
2362				if err != nil {
2363					return err
2364				}
2365				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
2366			}
2367		case "etag":
2368			if v != nil {
2369				var etag string
2370				err = json.Unmarshal(*v, &etag)
2371				if err != nil {
2372					return err
2373				}
2374				erc.Etag = &etag
2375			}
2376		case "id":
2377			if v != nil {
2378				var ID string
2379				err = json.Unmarshal(*v, &ID)
2380				if err != nil {
2381					return err
2382				}
2383				erc.ID = &ID
2384			}
2385		case "name":
2386			if v != nil {
2387				var name string
2388				err = json.Unmarshal(*v, &name)
2389				if err != nil {
2390					return err
2391				}
2392				erc.Name = &name
2393			}
2394		case "type":
2395			if v != nil {
2396				var typeVar string
2397				err = json.Unmarshal(*v, &typeVar)
2398				if err != nil {
2399					return err
2400				}
2401				erc.Type = &typeVar
2402			}
2403		case "location":
2404			if v != nil {
2405				var location string
2406				err = json.Unmarshal(*v, &location)
2407				if err != nil {
2408					return err
2409				}
2410				erc.Location = &location
2411			}
2412		case "tags":
2413			if v != nil {
2414				var tags map[string]*string
2415				err = json.Unmarshal(*v, &tags)
2416				if err != nil {
2417					return err
2418				}
2419				erc.Tags = tags
2420			}
2421		}
2422	}
2423
2424	return nil
2425}
2426
2427// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
2428type ExpressRouteCircuitArpTable struct {
2429	// IPAddress - The IP address.
2430	IPAddress *string `json:"ipAddress,omitempty"`
2431	// MacAddress - The MAC address.
2432	MacAddress *string `json:"macAddress,omitempty"`
2433}
2434
2435// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
2436type ExpressRouteCircuitAuthorization struct {
2437	autorest.Response              `json:"-"`
2438	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
2439	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
2440	Name *string `json:"name,omitempty"`
2441	// Etag - A unique read-only string that changes whenever the resource is updated.
2442	Etag *string `json:"etag,omitempty"`
2443	// ID - Resource Identifier.
2444	ID *string `json:"id,omitempty"`
2445}
2446
2447// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
2448func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
2449	objectMap := make(map[string]interface{})
2450	if erca.AuthorizationPropertiesFormat != nil {
2451		objectMap["properties"] = erca.AuthorizationPropertiesFormat
2452	}
2453	if erca.Name != nil {
2454		objectMap["name"] = erca.Name
2455	}
2456	if erca.Etag != nil {
2457		objectMap["etag"] = erca.Etag
2458	}
2459	if erca.ID != nil {
2460		objectMap["id"] = erca.ID
2461	}
2462	return json.Marshal(objectMap)
2463}
2464
2465// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
2466func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
2467	var m map[string]*json.RawMessage
2468	err := json.Unmarshal(body, &m)
2469	if err != nil {
2470		return err
2471	}
2472	for k, v := range m {
2473		switch k {
2474		case "properties":
2475			if v != nil {
2476				var authorizationPropertiesFormat AuthorizationPropertiesFormat
2477				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
2478				if err != nil {
2479					return err
2480				}
2481				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
2482			}
2483		case "name":
2484			if v != nil {
2485				var name string
2486				err = json.Unmarshal(*v, &name)
2487				if err != nil {
2488					return err
2489				}
2490				erca.Name = &name
2491			}
2492		case "etag":
2493			if v != nil {
2494				var etag string
2495				err = json.Unmarshal(*v, &etag)
2496				if err != nil {
2497					return err
2498				}
2499				erca.Etag = &etag
2500			}
2501		case "id":
2502			if v != nil {
2503				var ID string
2504				err = json.Unmarshal(*v, &ID)
2505				if err != nil {
2506					return err
2507				}
2508				erca.ID = &ID
2509			}
2510		}
2511	}
2512
2513	return nil
2514}
2515
2516// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2517// of a long-running operation.
2518type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
2519	azure.Future
2520	req *http.Request
2521}
2522
2523// Result returns the result of the asynchronous operation.
2524// If the operation has not completed it will return an error.
2525func (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
2526	var done bool
2527	done, err = future.Done(client)
2528	if err != nil {
2529		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2530		return
2531	}
2532	if !done {
2533		return erca, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
2534	}
2535	if future.PollingMethod() == azure.PollingLocation {
2536		erca, err = client.CreateOrUpdateResponder(future.Response())
2537		if err != nil {
2538			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
2539		}
2540		return
2541	}
2542	var req *http.Request
2543	var resp *http.Response
2544	if future.PollingURL() != "" {
2545		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
2546		if err != nil {
2547			return
2548		}
2549	} else {
2550		req = autorest.ChangeToGet(future.req)
2551	}
2552	resp, err = autorest.SendWithSender(client, req,
2553		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2554	if err != nil {
2555		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
2556		return
2557	}
2558	erca, err = client.CreateOrUpdateResponder(resp)
2559	if err != nil {
2560		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
2561	}
2562	return
2563}
2564
2565// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a
2566// long-running operation.
2567type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
2568	azure.Future
2569	req *http.Request
2570}
2571
2572// Result returns the result of the asynchronous operation.
2573// If the operation has not completed it will return an error.
2574func (future ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
2575	var done bool
2576	done, err = future.Done(client)
2577	if err != nil {
2578		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
2579		return
2580	}
2581	if !done {
2582		return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
2583	}
2584	if future.PollingMethod() == azure.PollingLocation {
2585		ar, err = client.DeleteResponder(future.Response())
2586		if err != nil {
2587			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Failure responding to request")
2588		}
2589		return
2590	}
2591	var req *http.Request
2592	var resp *http.Response
2593	if future.PollingURL() != "" {
2594		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
2595		if err != nil {
2596			return
2597		}
2598	} else {
2599		req = autorest.ChangeToGet(future.req)
2600	}
2601	resp, err = autorest.SendWithSender(client, req,
2602		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2603	if err != nil {
2604		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure sending request")
2605		return
2606	}
2607	ar, err = client.DeleteResponder(resp)
2608	if err != nil {
2609		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", resp, "Failure responding to request")
2610	}
2611	return
2612}
2613
2614// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
2615type ExpressRouteCircuitListResult struct {
2616	autorest.Response `json:"-"`
2617	// Value - A list of ExpressRouteCircuits in a resource group.
2618	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
2619	// NextLink - The URL to get the next set of results.
2620	NextLink *string `json:"nextLink,omitempty"`
2621}
2622
2623// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values.
2624type ExpressRouteCircuitListResultIterator struct {
2625	i    int
2626	page ExpressRouteCircuitListResultPage
2627}
2628
2629// Next advances to the next value.  If there was an error making
2630// the request the iterator does not advance and the error is returned.
2631func (iter *ExpressRouteCircuitListResultIterator) Next() error {
2632	iter.i++
2633	if iter.i < len(iter.page.Values()) {
2634		return nil
2635	}
2636	err := iter.page.Next()
2637	if err != nil {
2638		iter.i--
2639		return err
2640	}
2641	iter.i = 0
2642	return nil
2643}
2644
2645// NotDone returns true if the enumeration should be started or is not yet complete.
2646func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
2647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2648}
2649
2650// Response returns the raw server response from the last page request.
2651func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
2652	return iter.page.Response()
2653}
2654
2655// Value returns the current value or a zero-initialized value if the
2656// iterator has advanced beyond the end of the collection.
2657func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
2658	if !iter.page.NotDone() {
2659		return ExpressRouteCircuit{}
2660	}
2661	return iter.page.Values()[iter.i]
2662}
2663
2664// IsEmpty returns true if the ListResult contains no values.
2665func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
2666	return erclr.Value == nil || len(*erclr.Value) == 0
2667}
2668
2669// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
2670// It returns nil if no more results exist.
2671func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) {
2672	if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 {
2673		return nil, nil
2674	}
2675	return autorest.Prepare(&http.Request{},
2676		autorest.AsJSON(),
2677		autorest.AsGet(),
2678		autorest.WithBaseURL(to.String(erclr.NextLink)))
2679}
2680
2681// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
2682type ExpressRouteCircuitListResultPage struct {
2683	fn    func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
2684	erclr ExpressRouteCircuitListResult
2685}
2686
2687// Next advances to the next page of values.  If there was an error making
2688// the request the page does not advance and the error is returned.
2689func (page *ExpressRouteCircuitListResultPage) Next() error {
2690	next, err := page.fn(page.erclr)
2691	if err != nil {
2692		return err
2693	}
2694	page.erclr = next
2695	return nil
2696}
2697
2698// NotDone returns true if the page enumeration should be started or is not yet complete.
2699func (page ExpressRouteCircuitListResultPage) NotDone() bool {
2700	return !page.erclr.IsEmpty()
2701}
2702
2703// Response returns the raw server response from the last page request.
2704func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
2705	return page.erclr
2706}
2707
2708// Values returns the slice of values for the current page or nil if there are no values.
2709func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
2710	if page.erclr.IsEmpty() {
2711		return nil
2712	}
2713	return *page.erclr.Value
2714}
2715
2716// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
2717type ExpressRouteCircuitPeering struct {
2718	autorest.Response                           `json:"-"`
2719	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
2720	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
2721	Name *string `json:"name,omitempty"`
2722	// Etag - A unique read-only string that changes whenever the resource is updated.
2723	Etag *string `json:"etag,omitempty"`
2724	// ID - Resource Identifier.
2725	ID *string `json:"id,omitempty"`
2726}
2727
2728// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
2729func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
2730	objectMap := make(map[string]interface{})
2731	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
2732		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
2733	}
2734	if ercp.Name != nil {
2735		objectMap["name"] = ercp.Name
2736	}
2737	if ercp.Etag != nil {
2738		objectMap["etag"] = ercp.Etag
2739	}
2740	if ercp.ID != nil {
2741		objectMap["id"] = ercp.ID
2742	}
2743	return json.Marshal(objectMap)
2744}
2745
2746// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
2747func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
2748	var m map[string]*json.RawMessage
2749	err := json.Unmarshal(body, &m)
2750	if err != nil {
2751		return err
2752	}
2753	for k, v := range m {
2754		switch k {
2755		case "properties":
2756			if v != nil {
2757				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
2758				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
2759				if err != nil {
2760					return err
2761				}
2762				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
2763			}
2764		case "name":
2765			if v != nil {
2766				var name string
2767				err = json.Unmarshal(*v, &name)
2768				if err != nil {
2769					return err
2770				}
2771				ercp.Name = &name
2772			}
2773		case "etag":
2774			if v != nil {
2775				var etag string
2776				err = json.Unmarshal(*v, &etag)
2777				if err != nil {
2778					return err
2779				}
2780				ercp.Etag = &etag
2781			}
2782		case "id":
2783			if v != nil {
2784				var ID string
2785				err = json.Unmarshal(*v, &ID)
2786				if err != nil {
2787					return err
2788				}
2789				ercp.ID = &ID
2790			}
2791		}
2792	}
2793
2794	return nil
2795}
2796
2797// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
2798type ExpressRouteCircuitPeeringConfig struct {
2799	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
2800	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
2801	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
2802	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
2803	// CustomerASN - The CustomerASN of the peering.
2804	CustomerASN *int32 `json:"customerASN,omitempty"`
2805	// RoutingRegistryName - The RoutingRegistryName of the configuration.
2806	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
2807}
2808
2809// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that
2810// belong to an ExpressRouteCircuit.
2811type ExpressRouteCircuitPeeringListResult struct {
2812	autorest.Response `json:"-"`
2813	// Value - The peerings in an express route circuit.
2814	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
2815	// NextLink - The URL to get the next set of results.
2816	NextLink *string `json:"nextLink,omitempty"`
2817}
2818
2819// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering
2820// values.
2821type ExpressRouteCircuitPeeringListResultIterator struct {
2822	i    int
2823	page ExpressRouteCircuitPeeringListResultPage
2824}
2825
2826// Next advances to the next value.  If there was an error making
2827// the request the iterator does not advance and the error is returned.
2828func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
2829	iter.i++
2830	if iter.i < len(iter.page.Values()) {
2831		return nil
2832	}
2833	err := iter.page.Next()
2834	if err != nil {
2835		iter.i--
2836		return err
2837	}
2838	iter.i = 0
2839	return nil
2840}
2841
2842// NotDone returns true if the enumeration should be started or is not yet complete.
2843func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
2844	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2845}
2846
2847// Response returns the raw server response from the last page request.
2848func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
2849	return iter.page.Response()
2850}
2851
2852// Value returns the current value or a zero-initialized value if the
2853// iterator has advanced beyond the end of the collection.
2854func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
2855	if !iter.page.NotDone() {
2856		return ExpressRouteCircuitPeering{}
2857	}
2858	return iter.page.Values()[iter.i]
2859}
2860
2861// IsEmpty returns true if the ListResult contains no values.
2862func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
2863	return ercplr.Value == nil || len(*ercplr.Value) == 0
2864}
2865
2866// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
2867// It returns nil if no more results exist.
2868func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) {
2869	if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 {
2870		return nil, nil
2871	}
2872	return autorest.Prepare(&http.Request{},
2873		autorest.AsJSON(),
2874		autorest.AsGet(),
2875		autorest.WithBaseURL(to.String(ercplr.NextLink)))
2876}
2877
2878// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
2879type ExpressRouteCircuitPeeringListResultPage struct {
2880	fn     func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
2881	ercplr ExpressRouteCircuitPeeringListResult
2882}
2883
2884// Next advances to the next page of values.  If there was an error making
2885// the request the page does not advance and the error is returned.
2886func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
2887	next, err := page.fn(page.ercplr)
2888	if err != nil {
2889		return err
2890	}
2891	page.ercplr = next
2892	return nil
2893}
2894
2895// NotDone returns true if the page enumeration should be started or is not yet complete.
2896func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
2897	return !page.ercplr.IsEmpty()
2898}
2899
2900// Response returns the raw server response from the last page request.
2901func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
2902	return page.ercplr
2903}
2904
2905// Values returns the slice of values for the current page or nil if there are no values.
2906func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
2907	if page.ercplr.IsEmpty() {
2908		return nil
2909	}
2910	return *page.ercplr.Value
2911}
2912
2913// ExpressRouteCircuitPeeringPropertiesFormat ...
2914type ExpressRouteCircuitPeeringPropertiesFormat struct {
2915	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
2916	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
2917	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
2918	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
2919	// AzureASN - The Azure ASN.
2920	AzureASN *int32 `json:"azureASN,omitempty"`
2921	// PeerASN - The peer ASN.
2922	PeerASN *int32 `json:"peerASN,omitempty"`
2923	// PrimaryPeerAddressPrefix - The primary address prefix.
2924	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
2925	// SecondaryPeerAddressPrefix - The secondary address prefix.
2926	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
2927	// PrimaryAzurePort - The primary port.
2928	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
2929	// SecondaryAzurePort - The secondary port.
2930	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
2931	// SharedKey - The shared key.
2932	SharedKey *string `json:"sharedKey,omitempty"`
2933	// VlanID - The VLAN ID.
2934	VlanID *int32 `json:"vlanId,omitempty"`
2935	// MicrosoftPeeringConfig - The Microsoft peering configuration.
2936	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
2937	// Stats - Gets peering stats.
2938	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
2939	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2940	ProvisioningState *string `json:"provisioningState,omitempty"`
2941}
2942
2943// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2944// long-running operation.
2945type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
2946	azure.Future
2947	req *http.Request
2948}
2949
2950// Result returns the result of the asynchronous operation.
2951// If the operation has not completed it will return an error.
2952func (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
2953	var done bool
2954	done, err = future.Done(client)
2955	if err != nil {
2956		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2957		return
2958	}
2959	if !done {
2960		return ercp, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
2961	}
2962	if future.PollingMethod() == azure.PollingLocation {
2963		ercp, err = client.CreateOrUpdateResponder(future.Response())
2964		if err != nil {
2965			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
2966		}
2967		return
2968	}
2969	var req *http.Request
2970	var resp *http.Response
2971	if future.PollingURL() != "" {
2972		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
2973		if err != nil {
2974			return
2975		}
2976	} else {
2977		req = autorest.ChangeToGet(future.req)
2978	}
2979	resp, err = autorest.SendWithSender(client, req,
2980		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2981	if err != nil {
2982		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
2983		return
2984	}
2985	ercp, err = client.CreateOrUpdateResponder(resp)
2986	if err != nil {
2987		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
2988	}
2989	return
2990}
2991
2992// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
2993// long-running operation.
2994type ExpressRouteCircuitPeeringsDeleteFuture struct {
2995	azure.Future
2996	req *http.Request
2997}
2998
2999// Result returns the result of the asynchronous operation.
3000// If the operation has not completed it will return an error.
3001func (future ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
3002	var done bool
3003	done, err = future.Done(client)
3004	if err != nil {
3005		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
3006		return
3007	}
3008	if !done {
3009		return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
3010	}
3011	if future.PollingMethod() == azure.PollingLocation {
3012		ar, err = client.DeleteResponder(future.Response())
3013		if err != nil {
3014			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Failure responding to request")
3015		}
3016		return
3017	}
3018	var req *http.Request
3019	var resp *http.Response
3020	if future.PollingURL() != "" {
3021		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
3022		if err != nil {
3023			return
3024		}
3025	} else {
3026		req = autorest.ChangeToGet(future.req)
3027	}
3028	resp, err = autorest.SendWithSender(client, req,
3029		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3030	if err != nil {
3031		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure sending request")
3032		return
3033	}
3034	ar, err = client.DeleteResponder(resp)
3035	if err != nil {
3036		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", resp, "Failure responding to request")
3037	}
3038	return
3039}
3040
3041// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
3042type ExpressRouteCircuitPropertiesFormat struct {
3043	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
3044	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
3045	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
3046	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
3047	// Authorizations - The list of authorizations.
3048	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
3049	// Peerings - The list of peerings.
3050	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
3051	// ServiceKey - The ServiceKey.
3052	ServiceKey *string `json:"serviceKey,omitempty"`
3053	// ServiceProviderNotes - The ServiceProviderNotes.
3054	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
3055	// ServiceProviderProperties - The ServiceProviderProperties.
3056	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
3057	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3058	ProvisioningState *string `json:"provisioningState,omitempty"`
3059}
3060
3061// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
3062type ExpressRouteCircuitRoutesTable struct {
3063	// AddressPrefix - Gets AddressPrefix.
3064	AddressPrefix *string `json:"addressPrefix,omitempty"`
3065	// NextHopType - Gets NextHopType. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
3066	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
3067	// NextHopIP - Gets NextHopIP.
3068	NextHopIP *string `json:"nextHopIP,omitempty"`
3069	// AsPath - Gets AsPath.
3070	AsPath *string `json:"asPath,omitempty"`
3071}
3072
3073// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API.
3074type ExpressRouteCircuitsArpTableListResult struct {
3075	autorest.Response `json:"-"`
3076	// Value - Gets list of the ARP table.
3077	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
3078	// NextLink - The URL to get the next set of results.
3079	NextLink *string `json:"nextLink,omitempty"`
3080}
3081
3082// ExpressRouteCircuitsArpTableListResultIterator provides access to a complete listing of
3083// ExpressRouteCircuitArpTable values.
3084type ExpressRouteCircuitsArpTableListResultIterator struct {
3085	i    int
3086	page ExpressRouteCircuitsArpTableListResultPage
3087}
3088
3089// Next advances to the next value.  If there was an error making
3090// the request the iterator does not advance and the error is returned.
3091func (iter *ExpressRouteCircuitsArpTableListResultIterator) Next() error {
3092	iter.i++
3093	if iter.i < len(iter.page.Values()) {
3094		return nil
3095	}
3096	err := iter.page.Next()
3097	if err != nil {
3098		iter.i--
3099		return err
3100	}
3101	iter.i = 0
3102	return nil
3103}
3104
3105// NotDone returns true if the enumeration should be started or is not yet complete.
3106func (iter ExpressRouteCircuitsArpTableListResultIterator) NotDone() bool {
3107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3108}
3109
3110// Response returns the raw server response from the last page request.
3111func (iter ExpressRouteCircuitsArpTableListResultIterator) Response() ExpressRouteCircuitsArpTableListResult {
3112	return iter.page.Response()
3113}
3114
3115// Value returns the current value or a zero-initialized value if the
3116// iterator has advanced beyond the end of the collection.
3117func (iter ExpressRouteCircuitsArpTableListResultIterator) Value() ExpressRouteCircuitArpTable {
3118	if !iter.page.NotDone() {
3119		return ExpressRouteCircuitArpTable{}
3120	}
3121	return iter.page.Values()[iter.i]
3122}
3123
3124// IsEmpty returns true if the ListResult contains no values.
3125func (ercatlr ExpressRouteCircuitsArpTableListResult) IsEmpty() bool {
3126	return ercatlr.Value == nil || len(*ercatlr.Value) == 0
3127}
3128
3129// expressRouteCircuitsArpTableListResultPreparer prepares a request to retrieve the next set of results.
3130// It returns nil if no more results exist.
3131func (ercatlr ExpressRouteCircuitsArpTableListResult) expressRouteCircuitsArpTableListResultPreparer() (*http.Request, error) {
3132	if ercatlr.NextLink == nil || len(to.String(ercatlr.NextLink)) < 1 {
3133		return nil, nil
3134	}
3135	return autorest.Prepare(&http.Request{},
3136		autorest.AsJSON(),
3137		autorest.AsGet(),
3138		autorest.WithBaseURL(to.String(ercatlr.NextLink)))
3139}
3140
3141// ExpressRouteCircuitsArpTableListResultPage contains a page of ExpressRouteCircuitArpTable values.
3142type ExpressRouteCircuitsArpTableListResultPage struct {
3143	fn      func(ExpressRouteCircuitsArpTableListResult) (ExpressRouteCircuitsArpTableListResult, error)
3144	ercatlr ExpressRouteCircuitsArpTableListResult
3145}
3146
3147// Next advances to the next page of values.  If there was an error making
3148// the request the page does not advance and the error is returned.
3149func (page *ExpressRouteCircuitsArpTableListResultPage) Next() error {
3150	next, err := page.fn(page.ercatlr)
3151	if err != nil {
3152		return err
3153	}
3154	page.ercatlr = next
3155	return nil
3156}
3157
3158// NotDone returns true if the page enumeration should be started or is not yet complete.
3159func (page ExpressRouteCircuitsArpTableListResultPage) NotDone() bool {
3160	return !page.ercatlr.IsEmpty()
3161}
3162
3163// Response returns the raw server response from the last page request.
3164func (page ExpressRouteCircuitsArpTableListResultPage) Response() ExpressRouteCircuitsArpTableListResult {
3165	return page.ercatlr
3166}
3167
3168// Values returns the slice of values for the current page or nil if there are no values.
3169func (page ExpressRouteCircuitsArpTableListResultPage) Values() []ExpressRouteCircuitArpTable {
3170	if page.ercatlr.IsEmpty() {
3171		return nil
3172	}
3173	return *page.ercatlr.Value
3174}
3175
3176// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3177// long-running operation.
3178type ExpressRouteCircuitsCreateOrUpdateFuture struct {
3179	azure.Future
3180	req *http.Request
3181}
3182
3183// Result returns the result of the asynchronous operation.
3184// If the operation has not completed it will return an error.
3185func (future ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
3186	var done bool
3187	done, err = future.Done(client)
3188	if err != nil {
3189		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3190		return
3191	}
3192	if !done {
3193		return erc, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
3194	}
3195	if future.PollingMethod() == azure.PollingLocation {
3196		erc, err = client.CreateOrUpdateResponder(future.Response())
3197		if err != nil {
3198			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
3199		}
3200		return
3201	}
3202	var req *http.Request
3203	var resp *http.Response
3204	if future.PollingURL() != "" {
3205		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
3206		if err != nil {
3207			return
3208		}
3209	} else {
3210		req = autorest.ChangeToGet(future.req)
3211	}
3212	resp, err = autorest.SendWithSender(client, req,
3213		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3214	if err != nil {
3215		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
3216		return
3217	}
3218	erc, err = client.CreateOrUpdateResponder(resp)
3219	if err != nil {
3220		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
3221	}
3222	return
3223}
3224
3225// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3226// operation.
3227type ExpressRouteCircuitsDeleteFuture struct {
3228	azure.Future
3229	req *http.Request
3230}
3231
3232// Result returns the result of the asynchronous operation.
3233// If the operation has not completed it will return an error.
3234func (future ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
3235	var done bool
3236	done, err = future.Done(client)
3237	if err != nil {
3238		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
3239		return
3240	}
3241	if !done {
3242		return ar, azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
3243	}
3244	if future.PollingMethod() == azure.PollingLocation {
3245		ar, err = client.DeleteResponder(future.Response())
3246		if err != nil {
3247			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Failure responding to request")
3248		}
3249		return
3250	}
3251	var req *http.Request
3252	var resp *http.Response
3253	if future.PollingURL() != "" {
3254		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
3255		if err != nil {
3256			return
3257		}
3258	} else {
3259		req = autorest.ChangeToGet(future.req)
3260	}
3261	resp, err = autorest.SendWithSender(client, req,
3262		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3263	if err != nil {
3264		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure sending request")
3265		return
3266	}
3267	ar, err = client.DeleteResponder(resp)
3268	if err != nil {
3269		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", resp, "Failure responding to request")
3270	}
3271	return
3272}
3273
3274// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit.
3275type ExpressRouteCircuitServiceProviderProperties struct {
3276	// ServiceProviderName - The serviceProviderName.
3277	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
3278	// PeeringLocation - The peering location.
3279	PeeringLocation *string `json:"peeringLocation,omitempty"`
3280	// BandwidthInMbps - The BandwidthInMbps.
3281	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
3282}
3283
3284// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
3285type ExpressRouteCircuitSku struct {
3286	// Name - The name of the SKU.
3287	Name *string `json:"name,omitempty"`
3288	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
3289	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
3290	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
3291	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
3292}
3293
3294// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
3295// Circuits API.
3296type ExpressRouteCircuitsRoutesTableListResult struct {
3297	autorest.Response `json:"-"`
3298	// Value - The list of routes table.
3299	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
3300	// NextLink - The URL to get the next set of results.
3301	NextLink *string `json:"nextLink,omitempty"`
3302}
3303
3304// ExpressRouteCircuitsRoutesTableListResultIterator provides access to a complete listing of
3305// ExpressRouteCircuitRoutesTable values.
3306type ExpressRouteCircuitsRoutesTableListResultIterator struct {
3307	i    int
3308	page ExpressRouteCircuitsRoutesTableListResultPage
3309}
3310
3311// Next advances to the next value.  If there was an error making
3312// the request the iterator does not advance and the error is returned.
3313func (iter *ExpressRouteCircuitsRoutesTableListResultIterator) Next() error {
3314	iter.i++
3315	if iter.i < len(iter.page.Values()) {
3316		return nil
3317	}
3318	err := iter.page.Next()
3319	if err != nil {
3320		iter.i--
3321		return err
3322	}
3323	iter.i = 0
3324	return nil
3325}
3326
3327// NotDone returns true if the enumeration should be started or is not yet complete.
3328func (iter ExpressRouteCircuitsRoutesTableListResultIterator) NotDone() bool {
3329	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3330}
3331
3332// Response returns the raw server response from the last page request.
3333func (iter ExpressRouteCircuitsRoutesTableListResultIterator) Response() ExpressRouteCircuitsRoutesTableListResult {
3334	return iter.page.Response()
3335}
3336
3337// Value returns the current value or a zero-initialized value if the
3338// iterator has advanced beyond the end of the collection.
3339func (iter ExpressRouteCircuitsRoutesTableListResultIterator) Value() ExpressRouteCircuitRoutesTable {
3340	if !iter.page.NotDone() {
3341		return ExpressRouteCircuitRoutesTable{}
3342	}
3343	return iter.page.Values()[iter.i]
3344}
3345
3346// IsEmpty returns true if the ListResult contains no values.
3347func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) IsEmpty() bool {
3348	return ercrtlr.Value == nil || len(*ercrtlr.Value) == 0
3349}
3350
3351// expressRouteCircuitsRoutesTableListResultPreparer prepares a request to retrieve the next set of results.
3352// It returns nil if no more results exist.
3353func (ercrtlr ExpressRouteCircuitsRoutesTableListResult) expressRouteCircuitsRoutesTableListResultPreparer() (*http.Request, error) {
3354	if ercrtlr.NextLink == nil || len(to.String(ercrtlr.NextLink)) < 1 {
3355		return nil, nil
3356	}
3357	return autorest.Prepare(&http.Request{},
3358		autorest.AsJSON(),
3359		autorest.AsGet(),
3360		autorest.WithBaseURL(to.String(ercrtlr.NextLink)))
3361}
3362
3363// ExpressRouteCircuitsRoutesTableListResultPage contains a page of ExpressRouteCircuitRoutesTable values.
3364type ExpressRouteCircuitsRoutesTableListResultPage struct {
3365	fn      func(ExpressRouteCircuitsRoutesTableListResult) (ExpressRouteCircuitsRoutesTableListResult, error)
3366	ercrtlr ExpressRouteCircuitsRoutesTableListResult
3367}
3368
3369// Next advances to the next page of values.  If there was an error making
3370// the request the page does not advance and the error is returned.
3371func (page *ExpressRouteCircuitsRoutesTableListResultPage) Next() error {
3372	next, err := page.fn(page.ercrtlr)
3373	if err != nil {
3374		return err
3375	}
3376	page.ercrtlr = next
3377	return nil
3378}
3379
3380// NotDone returns true if the page enumeration should be started or is not yet complete.
3381func (page ExpressRouteCircuitsRoutesTableListResultPage) NotDone() bool {
3382	return !page.ercrtlr.IsEmpty()
3383}
3384
3385// Response returns the raw server response from the last page request.
3386func (page ExpressRouteCircuitsRoutesTableListResultPage) Response() ExpressRouteCircuitsRoutesTableListResult {
3387	return page.ercrtlr
3388}
3389
3390// Values returns the slice of values for the current page or nil if there are no values.
3391func (page ExpressRouteCircuitsRoutesTableListResultPage) Values() []ExpressRouteCircuitRoutesTable {
3392	if page.ercrtlr.IsEmpty() {
3393		return nil
3394	}
3395	return *page.ercrtlr.Value
3396}
3397
3398// ExpressRouteCircuitsStatsListResult response for ListStats from Express Route Circuits Api service call
3399type ExpressRouteCircuitsStatsListResult struct {
3400	autorest.Response `json:"-"`
3401	// Value - Gets List of Stats
3402	Value *[]ExpressRouteCircuitStats `json:"value,omitempty"`
3403	// NextLink - Gets the URL to get the next set of results.
3404	NextLink *string `json:"nextLink,omitempty"`
3405}
3406
3407// ExpressRouteCircuitsStatsListResultIterator provides access to a complete listing of ExpressRouteCircuitStats
3408// values.
3409type ExpressRouteCircuitsStatsListResultIterator struct {
3410	i    int
3411	page ExpressRouteCircuitsStatsListResultPage
3412}
3413
3414// Next advances to the next value.  If there was an error making
3415// the request the iterator does not advance and the error is returned.
3416func (iter *ExpressRouteCircuitsStatsListResultIterator) Next() error {
3417	iter.i++
3418	if iter.i < len(iter.page.Values()) {
3419		return nil
3420	}
3421	err := iter.page.Next()
3422	if err != nil {
3423		iter.i--
3424		return err
3425	}
3426	iter.i = 0
3427	return nil
3428}
3429
3430// NotDone returns true if the enumeration should be started or is not yet complete.
3431func (iter ExpressRouteCircuitsStatsListResultIterator) NotDone() bool {
3432	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3433}
3434
3435// Response returns the raw server response from the last page request.
3436func (iter ExpressRouteCircuitsStatsListResultIterator) Response() ExpressRouteCircuitsStatsListResult {
3437	return iter.page.Response()
3438}
3439
3440// Value returns the current value or a zero-initialized value if the
3441// iterator has advanced beyond the end of the collection.
3442func (iter ExpressRouteCircuitsStatsListResultIterator) Value() ExpressRouteCircuitStats {
3443	if !iter.page.NotDone() {
3444		return ExpressRouteCircuitStats{}
3445	}
3446	return iter.page.Values()[iter.i]
3447}
3448
3449// IsEmpty returns true if the ListResult contains no values.
3450func (ercslr ExpressRouteCircuitsStatsListResult) IsEmpty() bool {
3451	return ercslr.Value == nil || len(*ercslr.Value) == 0
3452}
3453
3454// expressRouteCircuitsStatsListResultPreparer prepares a request to retrieve the next set of results.
3455// It returns nil if no more results exist.
3456func (ercslr ExpressRouteCircuitsStatsListResult) expressRouteCircuitsStatsListResultPreparer() (*http.Request, error) {
3457	if ercslr.NextLink == nil || len(to.String(ercslr.NextLink)) < 1 {
3458		return nil, nil
3459	}
3460	return autorest.Prepare(&http.Request{},
3461		autorest.AsJSON(),
3462		autorest.AsGet(),
3463		autorest.WithBaseURL(to.String(ercslr.NextLink)))
3464}
3465
3466// ExpressRouteCircuitsStatsListResultPage contains a page of ExpressRouteCircuitStats values.
3467type ExpressRouteCircuitsStatsListResultPage struct {
3468	fn     func(ExpressRouteCircuitsStatsListResult) (ExpressRouteCircuitsStatsListResult, error)
3469	ercslr ExpressRouteCircuitsStatsListResult
3470}
3471
3472// Next advances to the next page of values.  If there was an error making
3473// the request the page does not advance and the error is returned.
3474func (page *ExpressRouteCircuitsStatsListResultPage) Next() error {
3475	next, err := page.fn(page.ercslr)
3476	if err != nil {
3477		return err
3478	}
3479	page.ercslr = next
3480	return nil
3481}
3482
3483// NotDone returns true if the page enumeration should be started or is not yet complete.
3484func (page ExpressRouteCircuitsStatsListResultPage) NotDone() bool {
3485	return !page.ercslr.IsEmpty()
3486}
3487
3488// Response returns the raw server response from the last page request.
3489func (page ExpressRouteCircuitsStatsListResultPage) Response() ExpressRouteCircuitsStatsListResult {
3490	return page.ercslr
3491}
3492
3493// Values returns the slice of values for the current page or nil if there are no values.
3494func (page ExpressRouteCircuitsStatsListResultPage) Values() []ExpressRouteCircuitStats {
3495	if page.ercslr.IsEmpty() {
3496		return nil
3497	}
3498	return *page.ercslr.Value
3499}
3500
3501// ExpressRouteCircuitStats contains stats associated with the peering.
3502type ExpressRouteCircuitStats struct {
3503	// BytesIn - Gets BytesIn of the peering.
3504	BytesIn *int32 `json:"bytesIn,omitempty"`
3505	// BytesOut - Gets BytesOut of the peering.
3506	BytesOut *int32 `json:"bytesOut,omitempty"`
3507}
3508
3509// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
3510type ExpressRouteServiceProvider struct {
3511	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
3512	// ID - Resource Identifier.
3513	ID *string `json:"id,omitempty"`
3514	// Name - Resource name.
3515	Name *string `json:"name,omitempty"`
3516	// Type - Resource type.
3517	Type *string `json:"type,omitempty"`
3518	// Location - Resource location.
3519	Location *string `json:"location,omitempty"`
3520	// Tags - Resource tags.
3521	Tags map[string]*string `json:"tags"`
3522}
3523
3524// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
3525func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
3526	objectMap := make(map[string]interface{})
3527	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
3528		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
3529	}
3530	if ersp.ID != nil {
3531		objectMap["id"] = ersp.ID
3532	}
3533	if ersp.Name != nil {
3534		objectMap["name"] = ersp.Name
3535	}
3536	if ersp.Type != nil {
3537		objectMap["type"] = ersp.Type
3538	}
3539	if ersp.Location != nil {
3540		objectMap["location"] = ersp.Location
3541	}
3542	if ersp.Tags != nil {
3543		objectMap["tags"] = ersp.Tags
3544	}
3545	return json.Marshal(objectMap)
3546}
3547
3548// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
3549func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
3550	var m map[string]*json.RawMessage
3551	err := json.Unmarshal(body, &m)
3552	if err != nil {
3553		return err
3554	}
3555	for k, v := range m {
3556		switch k {
3557		case "properties":
3558			if v != nil {
3559				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
3560				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
3561				if err != nil {
3562					return err
3563				}
3564				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
3565			}
3566		case "id":
3567			if v != nil {
3568				var ID string
3569				err = json.Unmarshal(*v, &ID)
3570				if err != nil {
3571					return err
3572				}
3573				ersp.ID = &ID
3574			}
3575		case "name":
3576			if v != nil {
3577				var name string
3578				err = json.Unmarshal(*v, &name)
3579				if err != nil {
3580					return err
3581				}
3582				ersp.Name = &name
3583			}
3584		case "type":
3585			if v != nil {
3586				var typeVar string
3587				err = json.Unmarshal(*v, &typeVar)
3588				if err != nil {
3589					return err
3590				}
3591				ersp.Type = &typeVar
3592			}
3593		case "location":
3594			if v != nil {
3595				var location string
3596				err = json.Unmarshal(*v, &location)
3597				if err != nil {
3598					return err
3599				}
3600				ersp.Location = &location
3601			}
3602		case "tags":
3603			if v != nil {
3604				var tags map[string]*string
3605				err = json.Unmarshal(*v, &tags)
3606				if err != nil {
3607					return err
3608				}
3609				ersp.Tags = tags
3610			}
3611		}
3612	}
3613
3614	return nil
3615}
3616
3617// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
3618// resources.
3619type ExpressRouteServiceProviderBandwidthsOffered struct {
3620	// OfferName - The OfferName.
3621	OfferName *string `json:"offerName,omitempty"`
3622	// ValueInMbps - The ValueInMbps.
3623	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
3624}
3625
3626// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
3627type ExpressRouteServiceProviderListResult struct {
3628	autorest.Response `json:"-"`
3629	// Value - A list of ExpressRouteResourceProvider resources.
3630	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
3631	// NextLink - The URL to get the next set of results.
3632	NextLink *string `json:"nextLink,omitempty"`
3633}
3634
3635// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
3636// ExpressRouteServiceProvider values.
3637type ExpressRouteServiceProviderListResultIterator struct {
3638	i    int
3639	page ExpressRouteServiceProviderListResultPage
3640}
3641
3642// Next advances to the next value.  If there was an error making
3643// the request the iterator does not advance and the error is returned.
3644func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
3645	iter.i++
3646	if iter.i < len(iter.page.Values()) {
3647		return nil
3648	}
3649	err := iter.page.Next()
3650	if err != nil {
3651		iter.i--
3652		return err
3653	}
3654	iter.i = 0
3655	return nil
3656}
3657
3658// NotDone returns true if the enumeration should be started or is not yet complete.
3659func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
3660	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3661}
3662
3663// Response returns the raw server response from the last page request.
3664func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
3665	return iter.page.Response()
3666}
3667
3668// Value returns the current value or a zero-initialized value if the
3669// iterator has advanced beyond the end of the collection.
3670func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
3671	if !iter.page.NotDone() {
3672		return ExpressRouteServiceProvider{}
3673	}
3674	return iter.page.Values()[iter.i]
3675}
3676
3677// IsEmpty returns true if the ListResult contains no values.
3678func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
3679	return ersplr.Value == nil || len(*ersplr.Value) == 0
3680}
3681
3682// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
3683// It returns nil if no more results exist.
3684func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) {
3685	if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 {
3686		return nil, nil
3687	}
3688	return autorest.Prepare(&http.Request{},
3689		autorest.AsJSON(),
3690		autorest.AsGet(),
3691		autorest.WithBaseURL(to.String(ersplr.NextLink)))
3692}
3693
3694// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
3695type ExpressRouteServiceProviderListResultPage struct {
3696	fn     func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
3697	ersplr ExpressRouteServiceProviderListResult
3698}
3699
3700// Next advances to the next page of values.  If there was an error making
3701// the request the page does not advance and the error is returned.
3702func (page *ExpressRouteServiceProviderListResultPage) Next() error {
3703	next, err := page.fn(page.ersplr)
3704	if err != nil {
3705		return err
3706	}
3707	page.ersplr = next
3708	return nil
3709}
3710
3711// NotDone returns true if the page enumeration should be started or is not yet complete.
3712func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
3713	return !page.ersplr.IsEmpty()
3714}
3715
3716// Response returns the raw server response from the last page request.
3717func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
3718	return page.ersplr
3719}
3720
3721// Values returns the slice of values for the current page or nil if there are no values.
3722func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
3723	if page.ersplr.IsEmpty() {
3724		return nil
3725	}
3726	return *page.ersplr.Value
3727}
3728
3729// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
3730type ExpressRouteServiceProviderPropertiesFormat struct {
3731	// PeeringLocations - Get a list of peering locations.
3732	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
3733	// BandwidthsOffered - Gets bandwidths offered.
3734	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
3735	// ProvisioningState - Gets the provisioning state of the resource.
3736	ProvisioningState *string `json:"provisioningState,omitempty"`
3737}
3738
3739// FrontendIPConfiguration frontend IP address of the load balancer.
3740type FrontendIPConfiguration struct {
3741	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
3742	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
3743	Name *string `json:"name,omitempty"`
3744	// Etag - A unique read-only string that changes whenever the resource is updated.
3745	Etag *string `json:"etag,omitempty"`
3746	// ID - Resource Identifier.
3747	ID *string `json:"id,omitempty"`
3748}
3749
3750// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
3751func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
3752	objectMap := make(map[string]interface{})
3753	if fic.FrontendIPConfigurationPropertiesFormat != nil {
3754		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
3755	}
3756	if fic.Name != nil {
3757		objectMap["name"] = fic.Name
3758	}
3759	if fic.Etag != nil {
3760		objectMap["etag"] = fic.Etag
3761	}
3762	if fic.ID != nil {
3763		objectMap["id"] = fic.ID
3764	}
3765	return json.Marshal(objectMap)
3766}
3767
3768// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
3769func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
3770	var m map[string]*json.RawMessage
3771	err := json.Unmarshal(body, &m)
3772	if err != nil {
3773		return err
3774	}
3775	for k, v := range m {
3776		switch k {
3777		case "properties":
3778			if v != nil {
3779				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
3780				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
3781				if err != nil {
3782					return err
3783				}
3784				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
3785			}
3786		case "name":
3787			if v != nil {
3788				var name string
3789				err = json.Unmarshal(*v, &name)
3790				if err != nil {
3791					return err
3792				}
3793				fic.Name = &name
3794			}
3795		case "etag":
3796			if v != nil {
3797				var etag string
3798				err = json.Unmarshal(*v, &etag)
3799				if err != nil {
3800					return err
3801				}
3802				fic.Etag = &etag
3803			}
3804		case "id":
3805			if v != nil {
3806				var ID string
3807				err = json.Unmarshal(*v, &ID)
3808				if err != nil {
3809					return err
3810				}
3811				fic.ID = &ID
3812			}
3813		}
3814	}
3815
3816	return nil
3817}
3818
3819// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
3820type FrontendIPConfigurationPropertiesFormat struct {
3821	// InboundNatRules - Read only. Inbound rules URIs that use this frontend IP.
3822	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
3823	// InboundNatPools - Read only. Inbound pools URIs that use this frontend IP.
3824	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
3825	// OutboundNatRules - Read only. Outbound rules URIs that use this frontend IP.
3826	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
3827	// LoadBalancingRules - Gets load balancing rules URIs that use this frontend IP.
3828	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3829	// PrivateIPAddress - The private IP address of the IP configuration.
3830	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
3831	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
3832	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
3833	// Subnet - The reference of the subnet resource.
3834	Subnet *Subnet `json:"subnet,omitempty"`
3835	// PublicIPAddress - The reference of the Public IP resource.
3836	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
3837	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3838	ProvisioningState *string `json:"provisioningState,omitempty"`
3839}
3840
3841// InboundNatPool inbound NAT pool of the load balancer.
3842type InboundNatPool struct {
3843	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
3844	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
3845	Name *string `json:"name,omitempty"`
3846	// Etag - A unique read-only string that changes whenever the resource is updated.
3847	Etag *string `json:"etag,omitempty"`
3848	// ID - Resource Identifier.
3849	ID *string `json:"id,omitempty"`
3850}
3851
3852// MarshalJSON is the custom marshaler for InboundNatPool.
3853func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
3854	objectMap := make(map[string]interface{})
3855	if inp.InboundNatPoolPropertiesFormat != nil {
3856		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
3857	}
3858	if inp.Name != nil {
3859		objectMap["name"] = inp.Name
3860	}
3861	if inp.Etag != nil {
3862		objectMap["etag"] = inp.Etag
3863	}
3864	if inp.ID != nil {
3865		objectMap["id"] = inp.ID
3866	}
3867	return json.Marshal(objectMap)
3868}
3869
3870// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
3871func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
3872	var m map[string]*json.RawMessage
3873	err := json.Unmarshal(body, &m)
3874	if err != nil {
3875		return err
3876	}
3877	for k, v := range m {
3878		switch k {
3879		case "properties":
3880			if v != nil {
3881				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
3882				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
3883				if err != nil {
3884					return err
3885				}
3886				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
3887			}
3888		case "name":
3889			if v != nil {
3890				var name string
3891				err = json.Unmarshal(*v, &name)
3892				if err != nil {
3893					return err
3894				}
3895				inp.Name = &name
3896			}
3897		case "etag":
3898			if v != nil {
3899				var etag string
3900				err = json.Unmarshal(*v, &etag)
3901				if err != nil {
3902					return err
3903				}
3904				inp.Etag = &etag
3905			}
3906		case "id":
3907			if v != nil {
3908				var ID string
3909				err = json.Unmarshal(*v, &ID)
3910				if err != nil {
3911					return err
3912				}
3913				inp.ID = &ID
3914			}
3915		}
3916	}
3917
3918	return nil
3919}
3920
3921// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
3922type InboundNatPoolPropertiesFormat struct {
3923	// FrontendIPConfiguration - A reference to frontend IP addresses.
3924	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
3925	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
3926	Protocol TransportProtocol `json:"protocol,omitempty"`
3927	// 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.
3928	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
3929	// 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.
3930	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
3931	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
3932	BackendPort *int32 `json:"backendPort,omitempty"`
3933	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3934	ProvisioningState *string `json:"provisioningState,omitempty"`
3935}
3936
3937// InboundNatRule inbound NAT rule of the load balancer.
3938type InboundNatRule struct {
3939	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
3940	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3941	Name *string `json:"name,omitempty"`
3942	// Etag - A unique read-only string that changes whenever the resource is updated.
3943	Etag *string `json:"etag,omitempty"`
3944	// ID - Resource Identifier.
3945	ID *string `json:"id,omitempty"`
3946}
3947
3948// MarshalJSON is the custom marshaler for InboundNatRule.
3949func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
3950	objectMap := make(map[string]interface{})
3951	if inr.InboundNatRulePropertiesFormat != nil {
3952		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
3953	}
3954	if inr.Name != nil {
3955		objectMap["name"] = inr.Name
3956	}
3957	if inr.Etag != nil {
3958		objectMap["etag"] = inr.Etag
3959	}
3960	if inr.ID != nil {
3961		objectMap["id"] = inr.ID
3962	}
3963	return json.Marshal(objectMap)
3964}
3965
3966// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
3967func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
3968	var m map[string]*json.RawMessage
3969	err := json.Unmarshal(body, &m)
3970	if err != nil {
3971		return err
3972	}
3973	for k, v := range m {
3974		switch k {
3975		case "properties":
3976			if v != nil {
3977				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
3978				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
3979				if err != nil {
3980					return err
3981				}
3982				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
3983			}
3984		case "name":
3985			if v != nil {
3986				var name string
3987				err = json.Unmarshal(*v, &name)
3988				if err != nil {
3989					return err
3990				}
3991				inr.Name = &name
3992			}
3993		case "etag":
3994			if v != nil {
3995				var etag string
3996				err = json.Unmarshal(*v, &etag)
3997				if err != nil {
3998					return err
3999				}
4000				inr.Etag = &etag
4001			}
4002		case "id":
4003			if v != nil {
4004				var ID string
4005				err = json.Unmarshal(*v, &ID)
4006				if err != nil {
4007					return err
4008				}
4009				inr.ID = &ID
4010			}
4011		}
4012	}
4013
4014	return nil
4015}
4016
4017// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
4018type InboundNatRulePropertiesFormat struct {
4019	// FrontendIPConfiguration - A reference to frontend IP addresses.
4020	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
4021	// BackendIPConfiguration - 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 backed IP.
4022	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
4023	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
4024	Protocol TransportProtocol `json:"protocol,omitempty"`
4025	// 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.
4026	FrontendPort *int32 `json:"frontendPort,omitempty"`
4027	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
4028	BackendPort *int32 `json:"backendPort,omitempty"`
4029	// 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.
4030	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
4031	// 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.
4032	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
4033	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4034	ProvisioningState *string `json:"provisioningState,omitempty"`
4035}
4036
4037// Interface a network interface in a resource group.
4038type Interface struct {
4039	autorest.Response          `json:"-"`
4040	*InterfacePropertiesFormat `json:"properties,omitempty"`
4041	// Etag - A unique read-only string that changes whenever the resource is updated.
4042	Etag *string `json:"etag,omitempty"`
4043	// ID - Resource Identifier.
4044	ID *string `json:"id,omitempty"`
4045	// Name - Resource name.
4046	Name *string `json:"name,omitempty"`
4047	// Type - Resource type.
4048	Type *string `json:"type,omitempty"`
4049	// Location - Resource location.
4050	Location *string `json:"location,omitempty"`
4051	// Tags - Resource tags.
4052	Tags map[string]*string `json:"tags"`
4053}
4054
4055// MarshalJSON is the custom marshaler for Interface.
4056func (i Interface) MarshalJSON() ([]byte, error) {
4057	objectMap := make(map[string]interface{})
4058	if i.InterfacePropertiesFormat != nil {
4059		objectMap["properties"] = i.InterfacePropertiesFormat
4060	}
4061	if i.Etag != nil {
4062		objectMap["etag"] = i.Etag
4063	}
4064	if i.ID != nil {
4065		objectMap["id"] = i.ID
4066	}
4067	if i.Name != nil {
4068		objectMap["name"] = i.Name
4069	}
4070	if i.Type != nil {
4071		objectMap["type"] = i.Type
4072	}
4073	if i.Location != nil {
4074		objectMap["location"] = i.Location
4075	}
4076	if i.Tags != nil {
4077		objectMap["tags"] = i.Tags
4078	}
4079	return json.Marshal(objectMap)
4080}
4081
4082// UnmarshalJSON is the custom unmarshaler for Interface struct.
4083func (i *Interface) UnmarshalJSON(body []byte) error {
4084	var m map[string]*json.RawMessage
4085	err := json.Unmarshal(body, &m)
4086	if err != nil {
4087		return err
4088	}
4089	for k, v := range m {
4090		switch k {
4091		case "properties":
4092			if v != nil {
4093				var interfacePropertiesFormat InterfacePropertiesFormat
4094				err = json.Unmarshal(*v, &interfacePropertiesFormat)
4095				if err != nil {
4096					return err
4097				}
4098				i.InterfacePropertiesFormat = &interfacePropertiesFormat
4099			}
4100		case "etag":
4101			if v != nil {
4102				var etag string
4103				err = json.Unmarshal(*v, &etag)
4104				if err != nil {
4105					return err
4106				}
4107				i.Etag = &etag
4108			}
4109		case "id":
4110			if v != nil {
4111				var ID string
4112				err = json.Unmarshal(*v, &ID)
4113				if err != nil {
4114					return err
4115				}
4116				i.ID = &ID
4117			}
4118		case "name":
4119			if v != nil {
4120				var name string
4121				err = json.Unmarshal(*v, &name)
4122				if err != nil {
4123					return err
4124				}
4125				i.Name = &name
4126			}
4127		case "type":
4128			if v != nil {
4129				var typeVar string
4130				err = json.Unmarshal(*v, &typeVar)
4131				if err != nil {
4132					return err
4133				}
4134				i.Type = &typeVar
4135			}
4136		case "location":
4137			if v != nil {
4138				var location string
4139				err = json.Unmarshal(*v, &location)
4140				if err != nil {
4141					return err
4142				}
4143				i.Location = &location
4144			}
4145		case "tags":
4146			if v != nil {
4147				var tags map[string]*string
4148				err = json.Unmarshal(*v, &tags)
4149				if err != nil {
4150					return err
4151				}
4152				i.Tags = tags
4153			}
4154		}
4155	}
4156
4157	return nil
4158}
4159
4160// InterfaceDNSSettings DNS settings of a network interface.
4161type InterfaceDNSSettings struct {
4162	// 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.
4163	DNSServers *[]string `json:"dnsServers,omitempty"`
4164	// 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.
4165	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
4166	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
4167	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
4168	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
4169	InternalFqdn *string `json:"internalFqdn,omitempty"`
4170}
4171
4172// InterfaceIPConfiguration iPConfiguration in a network interface.
4173type InterfaceIPConfiguration struct {
4174	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4175	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
4176	Name *string `json:"name,omitempty"`
4177	// Etag - A unique read-only string that changes whenever the resource is updated.
4178	Etag *string `json:"etag,omitempty"`
4179	// ID - Resource Identifier.
4180	ID *string `json:"id,omitempty"`
4181}
4182
4183// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
4184func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
4185	objectMap := make(map[string]interface{})
4186	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
4187		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
4188	}
4189	if iic.Name != nil {
4190		objectMap["name"] = iic.Name
4191	}
4192	if iic.Etag != nil {
4193		objectMap["etag"] = iic.Etag
4194	}
4195	if iic.ID != nil {
4196		objectMap["id"] = iic.ID
4197	}
4198	return json.Marshal(objectMap)
4199}
4200
4201// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
4202func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
4203	var m map[string]*json.RawMessage
4204	err := json.Unmarshal(body, &m)
4205	if err != nil {
4206		return err
4207	}
4208	for k, v := range m {
4209		switch k {
4210		case "properties":
4211			if v != nil {
4212				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
4213				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
4214				if err != nil {
4215					return err
4216				}
4217				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
4218			}
4219		case "name":
4220			if v != nil {
4221				var name string
4222				err = json.Unmarshal(*v, &name)
4223				if err != nil {
4224					return err
4225				}
4226				iic.Name = &name
4227			}
4228		case "etag":
4229			if v != nil {
4230				var etag string
4231				err = json.Unmarshal(*v, &etag)
4232				if err != nil {
4233					return err
4234				}
4235				iic.Etag = &etag
4236			}
4237		case "id":
4238			if v != nil {
4239				var ID string
4240				err = json.Unmarshal(*v, &ID)
4241				if err != nil {
4242					return err
4243				}
4244				iic.ID = &ID
4245			}
4246		}
4247	}
4248
4249	return nil
4250}
4251
4252// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
4253type InterfaceIPConfigurationPropertiesFormat struct {
4254	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
4255	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
4256	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
4257	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
4258	PrivateIPAddress            *string           `json:"privateIPAddress,omitempty"`
4259	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
4260	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
4261	Subnet                    *Subnet            `json:"subnet,omitempty"`
4262	PublicIPAddress           *PublicIPAddress   `json:"publicIPAddress,omitempty"`
4263	ProvisioningState         *string            `json:"provisioningState,omitempty"`
4264}
4265
4266// InterfaceListResult response for the ListNetworkInterface API service call.
4267type InterfaceListResult struct {
4268	autorest.Response `json:"-"`
4269	// Value - A list of network interfaces in a resource group.
4270	Value *[]Interface `json:"value,omitempty"`
4271	// NextLink - The URL to get the next set of results.
4272	NextLink *string `json:"nextLink,omitempty"`
4273}
4274
4275// InterfaceListResultIterator provides access to a complete listing of Interface values.
4276type InterfaceListResultIterator struct {
4277	i    int
4278	page InterfaceListResultPage
4279}
4280
4281// Next advances to the next value.  If there was an error making
4282// the request the iterator does not advance and the error is returned.
4283func (iter *InterfaceListResultIterator) Next() error {
4284	iter.i++
4285	if iter.i < len(iter.page.Values()) {
4286		return nil
4287	}
4288	err := iter.page.Next()
4289	if err != nil {
4290		iter.i--
4291		return err
4292	}
4293	iter.i = 0
4294	return nil
4295}
4296
4297// NotDone returns true if the enumeration should be started or is not yet complete.
4298func (iter InterfaceListResultIterator) NotDone() bool {
4299	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4300}
4301
4302// Response returns the raw server response from the last page request.
4303func (iter InterfaceListResultIterator) Response() InterfaceListResult {
4304	return iter.page.Response()
4305}
4306
4307// Value returns the current value or a zero-initialized value if the
4308// iterator has advanced beyond the end of the collection.
4309func (iter InterfaceListResultIterator) Value() Interface {
4310	if !iter.page.NotDone() {
4311		return Interface{}
4312	}
4313	return iter.page.Values()[iter.i]
4314}
4315
4316// IsEmpty returns true if the ListResult contains no values.
4317func (ilr InterfaceListResult) IsEmpty() bool {
4318	return ilr.Value == nil || len(*ilr.Value) == 0
4319}
4320
4321// interfaceListResultPreparer prepares a request to retrieve the next set of results.
4322// It returns nil if no more results exist.
4323func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) {
4324	if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
4325		return nil, nil
4326	}
4327	return autorest.Prepare(&http.Request{},
4328		autorest.AsJSON(),
4329		autorest.AsGet(),
4330		autorest.WithBaseURL(to.String(ilr.NextLink)))
4331}
4332
4333// InterfaceListResultPage contains a page of Interface values.
4334type InterfaceListResultPage struct {
4335	fn  func(InterfaceListResult) (InterfaceListResult, error)
4336	ilr InterfaceListResult
4337}
4338
4339// Next advances to the next page of values.  If there was an error making
4340// the request the page does not advance and the error is returned.
4341func (page *InterfaceListResultPage) Next() error {
4342	next, err := page.fn(page.ilr)
4343	if err != nil {
4344		return err
4345	}
4346	page.ilr = next
4347	return nil
4348}
4349
4350// NotDone returns true if the page enumeration should be started or is not yet complete.
4351func (page InterfaceListResultPage) NotDone() bool {
4352	return !page.ilr.IsEmpty()
4353}
4354
4355// Response returns the raw server response from the last page request.
4356func (page InterfaceListResultPage) Response() InterfaceListResult {
4357	return page.ilr
4358}
4359
4360// Values returns the slice of values for the current page or nil if there are no values.
4361func (page InterfaceListResultPage) Values() []Interface {
4362	if page.ilr.IsEmpty() {
4363		return nil
4364	}
4365	return *page.ilr.Value
4366}
4367
4368// InterfacePropertiesFormat networkInterface properties.
4369type InterfacePropertiesFormat struct {
4370	// VirtualMachine - The reference of a virtual machine.
4371	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
4372	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
4373	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
4374	// IPConfigurations - A list of IPConfigurations of the network interface.
4375	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
4376	// DNSSettings - The DNS settings in network interface.
4377	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
4378	// MacAddress - The MAC address of the network interface.
4379	MacAddress *string `json:"macAddress,omitempty"`
4380	// Primary - Gets whether this is a primary network interface on a virtual machine.
4381	Primary *bool `json:"primary,omitempty"`
4382	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
4383	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
4384	// ResourceGUID - The resource GUID property of the network interface resource.
4385	ResourceGUID *string `json:"resourceGuid,omitempty"`
4386	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4387	ProvisioningState *string `json:"provisioningState,omitempty"`
4388}
4389
4390// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4391// operation.
4392type InterfacesCreateOrUpdateFuture struct {
4393	azure.Future
4394	req *http.Request
4395}
4396
4397// Result returns the result of the asynchronous operation.
4398// If the operation has not completed it will return an error.
4399func (future InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) {
4400	var done bool
4401	done, err = future.Done(client)
4402	if err != nil {
4403		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4404		return
4405	}
4406	if !done {
4407		return i, azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
4408	}
4409	if future.PollingMethod() == azure.PollingLocation {
4410		i, err = client.CreateOrUpdateResponder(future.Response())
4411		if err != nil {
4412			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
4413		}
4414		return
4415	}
4416	var req *http.Request
4417	var resp *http.Response
4418	if future.PollingURL() != "" {
4419		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
4420		if err != nil {
4421			return
4422		}
4423	} else {
4424		req = autorest.ChangeToGet(future.req)
4425	}
4426	resp, err = autorest.SendWithSender(client, req,
4427		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4428	if err != nil {
4429		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
4430		return
4431	}
4432	i, err = client.CreateOrUpdateResponder(resp)
4433	if err != nil {
4434		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
4435	}
4436	return
4437}
4438
4439// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
4440type InterfacesDeleteFuture struct {
4441	azure.Future
4442	req *http.Request
4443}
4444
4445// Result returns the result of the asynchronous operation.
4446// If the operation has not completed it will return an error.
4447func (future InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) {
4448	var done bool
4449	done, err = future.Done(client)
4450	if err != nil {
4451		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
4452		return
4453	}
4454	if !done {
4455		return ar, azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
4456	}
4457	if future.PollingMethod() == azure.PollingLocation {
4458		ar, err = client.DeleteResponder(future.Response())
4459		if err != nil {
4460			err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Failure responding to request")
4461		}
4462		return
4463	}
4464	var req *http.Request
4465	var resp *http.Response
4466	if future.PollingURL() != "" {
4467		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
4468		if err != nil {
4469			return
4470		}
4471	} else {
4472		req = autorest.ChangeToGet(future.req)
4473	}
4474	resp, err = autorest.SendWithSender(client, req,
4475		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4476	if err != nil {
4477		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure sending request")
4478		return
4479	}
4480	ar, err = client.DeleteResponder(resp)
4481	if err != nil {
4482		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", resp, "Failure responding to request")
4483	}
4484	return
4485}
4486
4487// IPConfiguration iPConfiguration
4488type IPConfiguration struct {
4489	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
4490	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
4491	Name *string `json:"name,omitempty"`
4492	// Etag - A unique read-only string that changes whenever the resource is updated.
4493	Etag *string `json:"etag,omitempty"`
4494	// ID - Resource Identifier.
4495	ID *string `json:"id,omitempty"`
4496}
4497
4498// MarshalJSON is the custom marshaler for IPConfiguration.
4499func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
4500	objectMap := make(map[string]interface{})
4501	if ic.IPConfigurationPropertiesFormat != nil {
4502		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
4503	}
4504	if ic.Name != nil {
4505		objectMap["name"] = ic.Name
4506	}
4507	if ic.Etag != nil {
4508		objectMap["etag"] = ic.Etag
4509	}
4510	if ic.ID != nil {
4511		objectMap["id"] = ic.ID
4512	}
4513	return json.Marshal(objectMap)
4514}
4515
4516// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
4517func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
4518	var m map[string]*json.RawMessage
4519	err := json.Unmarshal(body, &m)
4520	if err != nil {
4521		return err
4522	}
4523	for k, v := range m {
4524		switch k {
4525		case "properties":
4526			if v != nil {
4527				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
4528				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
4529				if err != nil {
4530					return err
4531				}
4532				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
4533			}
4534		case "name":
4535			if v != nil {
4536				var name string
4537				err = json.Unmarshal(*v, &name)
4538				if err != nil {
4539					return err
4540				}
4541				ic.Name = &name
4542			}
4543		case "etag":
4544			if v != nil {
4545				var etag string
4546				err = json.Unmarshal(*v, &etag)
4547				if err != nil {
4548					return err
4549				}
4550				ic.Etag = &etag
4551			}
4552		case "id":
4553			if v != nil {
4554				var ID string
4555				err = json.Unmarshal(*v, &ID)
4556				if err != nil {
4557					return err
4558				}
4559				ic.ID = &ID
4560			}
4561		}
4562	}
4563
4564	return nil
4565}
4566
4567// IPConfigurationPropertiesFormat properties of IP configuration.
4568type IPConfigurationPropertiesFormat struct {
4569	// PrivateIPAddress - The private IP address of the IP configuration.
4570	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4571	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
4572	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
4573	// Subnet - The reference of the subnet resource.
4574	Subnet *Subnet `json:"subnet,omitempty"`
4575	// PublicIPAddress - The reference of the public IP resource.
4576	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
4577	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4578	ProvisioningState *string `json:"provisioningState,omitempty"`
4579}
4580
4581// LoadBalancer loadBalancer resource
4582type LoadBalancer struct {
4583	autorest.Response             `json:"-"`
4584	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
4585	// Etag - A unique read-only string that changes whenever the resource is updated.
4586	Etag *string `json:"etag,omitempty"`
4587	// ID - Resource Identifier.
4588	ID *string `json:"id,omitempty"`
4589	// Name - Resource name.
4590	Name *string `json:"name,omitempty"`
4591	// Type - Resource type.
4592	Type *string `json:"type,omitempty"`
4593	// Location - Resource location.
4594	Location *string `json:"location,omitempty"`
4595	// Tags - Resource tags.
4596	Tags map[string]*string `json:"tags"`
4597}
4598
4599// MarshalJSON is the custom marshaler for LoadBalancer.
4600func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
4601	objectMap := make(map[string]interface{})
4602	if lb.LoadBalancerPropertiesFormat != nil {
4603		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
4604	}
4605	if lb.Etag != nil {
4606		objectMap["etag"] = lb.Etag
4607	}
4608	if lb.ID != nil {
4609		objectMap["id"] = lb.ID
4610	}
4611	if lb.Name != nil {
4612		objectMap["name"] = lb.Name
4613	}
4614	if lb.Type != nil {
4615		objectMap["type"] = lb.Type
4616	}
4617	if lb.Location != nil {
4618		objectMap["location"] = lb.Location
4619	}
4620	if lb.Tags != nil {
4621		objectMap["tags"] = lb.Tags
4622	}
4623	return json.Marshal(objectMap)
4624}
4625
4626// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
4627func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
4628	var m map[string]*json.RawMessage
4629	err := json.Unmarshal(body, &m)
4630	if err != nil {
4631		return err
4632	}
4633	for k, v := range m {
4634		switch k {
4635		case "properties":
4636			if v != nil {
4637				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
4638				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
4639				if err != nil {
4640					return err
4641				}
4642				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
4643			}
4644		case "etag":
4645			if v != nil {
4646				var etag string
4647				err = json.Unmarshal(*v, &etag)
4648				if err != nil {
4649					return err
4650				}
4651				lb.Etag = &etag
4652			}
4653		case "id":
4654			if v != nil {
4655				var ID string
4656				err = json.Unmarshal(*v, &ID)
4657				if err != nil {
4658					return err
4659				}
4660				lb.ID = &ID
4661			}
4662		case "name":
4663			if v != nil {
4664				var name string
4665				err = json.Unmarshal(*v, &name)
4666				if err != nil {
4667					return err
4668				}
4669				lb.Name = &name
4670			}
4671		case "type":
4672			if v != nil {
4673				var typeVar string
4674				err = json.Unmarshal(*v, &typeVar)
4675				if err != nil {
4676					return err
4677				}
4678				lb.Type = &typeVar
4679			}
4680		case "location":
4681			if v != nil {
4682				var location string
4683				err = json.Unmarshal(*v, &location)
4684				if err != nil {
4685					return err
4686				}
4687				lb.Location = &location
4688			}
4689		case "tags":
4690			if v != nil {
4691				var tags map[string]*string
4692				err = json.Unmarshal(*v, &tags)
4693				if err != nil {
4694					return err
4695				}
4696				lb.Tags = tags
4697			}
4698		}
4699	}
4700
4701	return nil
4702}
4703
4704// LoadBalancerListResult response for ListLoadBalancers API service call.
4705type LoadBalancerListResult struct {
4706	autorest.Response `json:"-"`
4707	// Value - A list of load balancers in a resource group.
4708	Value *[]LoadBalancer `json:"value,omitempty"`
4709	// NextLink - The URL to get the next set of results.
4710	NextLink *string `json:"nextLink,omitempty"`
4711}
4712
4713// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
4714type LoadBalancerListResultIterator struct {
4715	i    int
4716	page LoadBalancerListResultPage
4717}
4718
4719// Next advances to the next value.  If there was an error making
4720// the request the iterator does not advance and the error is returned.
4721func (iter *LoadBalancerListResultIterator) Next() error {
4722	iter.i++
4723	if iter.i < len(iter.page.Values()) {
4724		return nil
4725	}
4726	err := iter.page.Next()
4727	if err != nil {
4728		iter.i--
4729		return err
4730	}
4731	iter.i = 0
4732	return nil
4733}
4734
4735// NotDone returns true if the enumeration should be started or is not yet complete.
4736func (iter LoadBalancerListResultIterator) NotDone() bool {
4737	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4738}
4739
4740// Response returns the raw server response from the last page request.
4741func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
4742	return iter.page.Response()
4743}
4744
4745// Value returns the current value or a zero-initialized value if the
4746// iterator has advanced beyond the end of the collection.
4747func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
4748	if !iter.page.NotDone() {
4749		return LoadBalancer{}
4750	}
4751	return iter.page.Values()[iter.i]
4752}
4753
4754// IsEmpty returns true if the ListResult contains no values.
4755func (lblr LoadBalancerListResult) IsEmpty() bool {
4756	return lblr.Value == nil || len(*lblr.Value) == 0
4757}
4758
4759// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
4760// It returns nil if no more results exist.
4761func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) {
4762	if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
4763		return nil, nil
4764	}
4765	return autorest.Prepare(&http.Request{},
4766		autorest.AsJSON(),
4767		autorest.AsGet(),
4768		autorest.WithBaseURL(to.String(lblr.NextLink)))
4769}
4770
4771// LoadBalancerListResultPage contains a page of LoadBalancer values.
4772type LoadBalancerListResultPage struct {
4773	fn   func(LoadBalancerListResult) (LoadBalancerListResult, error)
4774	lblr LoadBalancerListResult
4775}
4776
4777// Next advances to the next page of values.  If there was an error making
4778// the request the page does not advance and the error is returned.
4779func (page *LoadBalancerListResultPage) Next() error {
4780	next, err := page.fn(page.lblr)
4781	if err != nil {
4782		return err
4783	}
4784	page.lblr = next
4785	return nil
4786}
4787
4788// NotDone returns true if the page enumeration should be started or is not yet complete.
4789func (page LoadBalancerListResultPage) NotDone() bool {
4790	return !page.lblr.IsEmpty()
4791}
4792
4793// Response returns the raw server response from the last page request.
4794func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
4795	return page.lblr
4796}
4797
4798// Values returns the slice of values for the current page or nil if there are no values.
4799func (page LoadBalancerListResultPage) Values() []LoadBalancer {
4800	if page.lblr.IsEmpty() {
4801		return nil
4802	}
4803	return *page.lblr.Value
4804}
4805
4806// LoadBalancerPropertiesFormat properties of the load balancer.
4807type LoadBalancerPropertiesFormat struct {
4808	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
4809	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
4810	// BackendAddressPools - Collection of backend address pools used by a load balancer
4811	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
4812	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
4813	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
4814	// Probes - Collection of probe objects used in the load balancer
4815	Probes *[]Probe `json:"probes,omitempty"`
4816	// 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.
4817	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
4818	// 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.
4819	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
4820	// OutboundNatRules - The outbound NAT rules.
4821	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
4822	// ResourceGUID - The resource GUID property of the load balancer resource.
4823	ResourceGUID *string `json:"resourceGuid,omitempty"`
4824	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4825	ProvisioningState *string `json:"provisioningState,omitempty"`
4826}
4827
4828// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
4829// operation.
4830type LoadBalancersCreateOrUpdateFuture struct {
4831	azure.Future
4832	req *http.Request
4833}
4834
4835// Result returns the result of the asynchronous operation.
4836// If the operation has not completed it will return an error.
4837func (future LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) {
4838	var done bool
4839	done, err = future.Done(client)
4840	if err != nil {
4841		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4842		return
4843	}
4844	if !done {
4845		return lb, azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
4846	}
4847	if future.PollingMethod() == azure.PollingLocation {
4848		lb, err = client.CreateOrUpdateResponder(future.Response())
4849		if err != nil {
4850			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
4851		}
4852		return
4853	}
4854	var req *http.Request
4855	var resp *http.Response
4856	if future.PollingURL() != "" {
4857		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
4858		if err != nil {
4859			return
4860		}
4861	} else {
4862		req = autorest.ChangeToGet(future.req)
4863	}
4864	resp, err = autorest.SendWithSender(client, req,
4865		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4866	if err != nil {
4867		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure sending request")
4868		return
4869	}
4870	lb, err = client.CreateOrUpdateResponder(resp)
4871	if err != nil {
4872		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
4873	}
4874	return
4875}
4876
4877// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
4878type LoadBalancersDeleteFuture struct {
4879	azure.Future
4880	req *http.Request
4881}
4882
4883// Result returns the result of the asynchronous operation.
4884// If the operation has not completed it will return an error.
4885func (future LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) {
4886	var done bool
4887	done, err = future.Done(client)
4888	if err != nil {
4889		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
4890		return
4891	}
4892	if !done {
4893		return ar, azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
4894	}
4895	if future.PollingMethod() == azure.PollingLocation {
4896		ar, err = client.DeleteResponder(future.Response())
4897		if err != nil {
4898			err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Failure responding to request")
4899		}
4900		return
4901	}
4902	var req *http.Request
4903	var resp *http.Response
4904	if future.PollingURL() != "" {
4905		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
4906		if err != nil {
4907			return
4908		}
4909	} else {
4910		req = autorest.ChangeToGet(future.req)
4911	}
4912	resp, err = autorest.SendWithSender(client, req,
4913		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4914	if err != nil {
4915		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure sending request")
4916		return
4917	}
4918	ar, err = client.DeleteResponder(resp)
4919	if err != nil {
4920		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", resp, "Failure responding to request")
4921	}
4922	return
4923}
4924
4925// LoadBalancingRule a loag balancing rule for a load balancer.
4926type LoadBalancingRule struct {
4927	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
4928	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
4929	Name *string `json:"name,omitempty"`
4930	// Etag - A unique read-only string that changes whenever the resource is updated.
4931	Etag *string `json:"etag,omitempty"`
4932	// ID - Resource Identifier.
4933	ID *string `json:"id,omitempty"`
4934}
4935
4936// MarshalJSON is the custom marshaler for LoadBalancingRule.
4937func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
4938	objectMap := make(map[string]interface{})
4939	if lbr.LoadBalancingRulePropertiesFormat != nil {
4940		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
4941	}
4942	if lbr.Name != nil {
4943		objectMap["name"] = lbr.Name
4944	}
4945	if lbr.Etag != nil {
4946		objectMap["etag"] = lbr.Etag
4947	}
4948	if lbr.ID != nil {
4949		objectMap["id"] = lbr.ID
4950	}
4951	return json.Marshal(objectMap)
4952}
4953
4954// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
4955func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
4956	var m map[string]*json.RawMessage
4957	err := json.Unmarshal(body, &m)
4958	if err != nil {
4959		return err
4960	}
4961	for k, v := range m {
4962		switch k {
4963		case "properties":
4964			if v != nil {
4965				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
4966				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
4967				if err != nil {
4968					return err
4969				}
4970				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
4971			}
4972		case "name":
4973			if v != nil {
4974				var name string
4975				err = json.Unmarshal(*v, &name)
4976				if err != nil {
4977					return err
4978				}
4979				lbr.Name = &name
4980			}
4981		case "etag":
4982			if v != nil {
4983				var etag string
4984				err = json.Unmarshal(*v, &etag)
4985				if err != nil {
4986					return err
4987				}
4988				lbr.Etag = &etag
4989			}
4990		case "id":
4991			if v != nil {
4992				var ID string
4993				err = json.Unmarshal(*v, &ID)
4994				if err != nil {
4995					return err
4996				}
4997				lbr.ID = &ID
4998			}
4999		}
5000	}
5001
5002	return nil
5003}
5004
5005// LoadBalancingRulePropertiesFormat properties of the load balancer.
5006type LoadBalancingRulePropertiesFormat struct {
5007	// FrontendIPConfiguration - A reference to frontend IP addresses.
5008	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
5009	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
5010	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
5011	// Probe - The reference of the load balancer probe used by the load balancing rule.
5012	Probe *SubResource `json:"probe,omitempty"`
5013	// Protocol - The transport protocol for the external endpoint. Possible values are 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
5014	Protocol TransportProtocol `json:"protocol,omitempty"`
5015	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
5016	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
5017	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.
5018	FrontendPort *int32 `json:"frontendPort,omitempty"`
5019	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
5020	BackendPort *int32 `json:"backendPort,omitempty"`
5021	// 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.
5022	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5023	// 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.
5024	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
5025	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5026	ProvisioningState *string `json:"provisioningState,omitempty"`
5027}
5028
5029// LocalNetworkGateway a common class for general resource information
5030type LocalNetworkGateway struct {
5031	autorest.Response                    `json:"-"`
5032	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
5033	// Etag - Gets a unique read-only string that changes whenever the resource is updated
5034	Etag *string `json:"etag,omitempty"`
5035	// ID - Resource Identifier.
5036	ID *string `json:"id,omitempty"`
5037	// Name - Resource name.
5038	Name *string `json:"name,omitempty"`
5039	// Type - Resource type.
5040	Type *string `json:"type,omitempty"`
5041	// Location - Resource location.
5042	Location *string `json:"location,omitempty"`
5043	// Tags - Resource tags.
5044	Tags map[string]*string `json:"tags"`
5045}
5046
5047// MarshalJSON is the custom marshaler for LocalNetworkGateway.
5048func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
5049	objectMap := make(map[string]interface{})
5050	if lng.LocalNetworkGatewayPropertiesFormat != nil {
5051		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
5052	}
5053	if lng.Etag != nil {
5054		objectMap["etag"] = lng.Etag
5055	}
5056	if lng.ID != nil {
5057		objectMap["id"] = lng.ID
5058	}
5059	if lng.Name != nil {
5060		objectMap["name"] = lng.Name
5061	}
5062	if lng.Type != nil {
5063		objectMap["type"] = lng.Type
5064	}
5065	if lng.Location != nil {
5066		objectMap["location"] = lng.Location
5067	}
5068	if lng.Tags != nil {
5069		objectMap["tags"] = lng.Tags
5070	}
5071	return json.Marshal(objectMap)
5072}
5073
5074// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
5075func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
5076	var m map[string]*json.RawMessage
5077	err := json.Unmarshal(body, &m)
5078	if err != nil {
5079		return err
5080	}
5081	for k, v := range m {
5082		switch k {
5083		case "properties":
5084			if v != nil {
5085				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
5086				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
5087				if err != nil {
5088					return err
5089				}
5090				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
5091			}
5092		case "etag":
5093			if v != nil {
5094				var etag string
5095				err = json.Unmarshal(*v, &etag)
5096				if err != nil {
5097					return err
5098				}
5099				lng.Etag = &etag
5100			}
5101		case "id":
5102			if v != nil {
5103				var ID string
5104				err = json.Unmarshal(*v, &ID)
5105				if err != nil {
5106					return err
5107				}
5108				lng.ID = &ID
5109			}
5110		case "name":
5111			if v != nil {
5112				var name string
5113				err = json.Unmarshal(*v, &name)
5114				if err != nil {
5115					return err
5116				}
5117				lng.Name = &name
5118			}
5119		case "type":
5120			if v != nil {
5121				var typeVar string
5122				err = json.Unmarshal(*v, &typeVar)
5123				if err != nil {
5124					return err
5125				}
5126				lng.Type = &typeVar
5127			}
5128		case "location":
5129			if v != nil {
5130				var location string
5131				err = json.Unmarshal(*v, &location)
5132				if err != nil {
5133					return err
5134				}
5135				lng.Location = &location
5136			}
5137		case "tags":
5138			if v != nil {
5139				var tags map[string]*string
5140				err = json.Unmarshal(*v, &tags)
5141				if err != nil {
5142					return err
5143				}
5144				lng.Tags = tags
5145			}
5146		}
5147	}
5148
5149	return nil
5150}
5151
5152// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
5153type LocalNetworkGatewayListResult struct {
5154	autorest.Response `json:"-"`
5155	// Value - A list of local network gateways that exists in a resource group.
5156	Value *[]LocalNetworkGateway `json:"value,omitempty"`
5157	// NextLink - The URL to get the next set of results.
5158	NextLink *string `json:"nextLink,omitempty"`
5159}
5160
5161// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values.
5162type LocalNetworkGatewayListResultIterator struct {
5163	i    int
5164	page LocalNetworkGatewayListResultPage
5165}
5166
5167// Next advances to the next value.  If there was an error making
5168// the request the iterator does not advance and the error is returned.
5169func (iter *LocalNetworkGatewayListResultIterator) Next() error {
5170	iter.i++
5171	if iter.i < len(iter.page.Values()) {
5172		return nil
5173	}
5174	err := iter.page.Next()
5175	if err != nil {
5176		iter.i--
5177		return err
5178	}
5179	iter.i = 0
5180	return nil
5181}
5182
5183// NotDone returns true if the enumeration should be started or is not yet complete.
5184func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
5185	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5186}
5187
5188// Response returns the raw server response from the last page request.
5189func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
5190	return iter.page.Response()
5191}
5192
5193// Value returns the current value or a zero-initialized value if the
5194// iterator has advanced beyond the end of the collection.
5195func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
5196	if !iter.page.NotDone() {
5197		return LocalNetworkGateway{}
5198	}
5199	return iter.page.Values()[iter.i]
5200}
5201
5202// IsEmpty returns true if the ListResult contains no values.
5203func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
5204	return lnglr.Value == nil || len(*lnglr.Value) == 0
5205}
5206
5207// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
5208// It returns nil if no more results exist.
5209func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) {
5210	if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 {
5211		return nil, nil
5212	}
5213	return autorest.Prepare(&http.Request{},
5214		autorest.AsJSON(),
5215		autorest.AsGet(),
5216		autorest.WithBaseURL(to.String(lnglr.NextLink)))
5217}
5218
5219// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
5220type LocalNetworkGatewayListResultPage struct {
5221	fn    func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
5222	lnglr LocalNetworkGatewayListResult
5223}
5224
5225// Next advances to the next page of values.  If there was an error making
5226// the request the page does not advance and the error is returned.
5227func (page *LocalNetworkGatewayListResultPage) Next() error {
5228	next, err := page.fn(page.lnglr)
5229	if err != nil {
5230		return err
5231	}
5232	page.lnglr = next
5233	return nil
5234}
5235
5236// NotDone returns true if the page enumeration should be started or is not yet complete.
5237func (page LocalNetworkGatewayListResultPage) NotDone() bool {
5238	return !page.lnglr.IsEmpty()
5239}
5240
5241// Response returns the raw server response from the last page request.
5242func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
5243	return page.lnglr
5244}
5245
5246// Values returns the slice of values for the current page or nil if there are no values.
5247func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
5248	if page.lnglr.IsEmpty() {
5249		return nil
5250	}
5251	return *page.lnglr.Value
5252}
5253
5254// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
5255type LocalNetworkGatewayPropertiesFormat struct {
5256	// LocalNetworkAddressSpace - Local network site address space.
5257	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
5258	// GatewayIPAddress - IP address of local network gateway.
5259	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
5260	// BgpSettings - Local network gateway's BGP speaker settings.
5261	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
5262	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
5263	ResourceGUID *string `json:"resourceGuid,omitempty"`
5264	// ProvisioningState - Gets or sets Provisioning state of the LocalNetworkGateway resource Updating/Deleting/Failed
5265	ProvisioningState *string `json:"provisioningState,omitempty"`
5266}
5267
5268// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5269// long-running operation.
5270type LocalNetworkGatewaysCreateOrUpdateFuture struct {
5271	azure.Future
5272	req *http.Request
5273}
5274
5275// Result returns the result of the asynchronous operation.
5276// If the operation has not completed it will return an error.
5277func (future LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
5278	var done bool
5279	done, err = future.Done(client)
5280	if err != nil {
5281		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5282		return
5283	}
5284	if !done {
5285		return lng, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
5286	}
5287	if future.PollingMethod() == azure.PollingLocation {
5288		lng, err = client.CreateOrUpdateResponder(future.Response())
5289		if err != nil {
5290			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
5291		}
5292		return
5293	}
5294	var req *http.Request
5295	var resp *http.Response
5296	if future.PollingURL() != "" {
5297		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
5298		if err != nil {
5299			return
5300		}
5301	} else {
5302		req = autorest.ChangeToGet(future.req)
5303	}
5304	resp, err = autorest.SendWithSender(client, req,
5305		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5306	if err != nil {
5307		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
5308		return
5309	}
5310	lng, err = client.CreateOrUpdateResponder(resp)
5311	if err != nil {
5312		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
5313	}
5314	return
5315}
5316
5317// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5318// operation.
5319type LocalNetworkGatewaysDeleteFuture struct {
5320	azure.Future
5321	req *http.Request
5322}
5323
5324// Result returns the result of the asynchronous operation.
5325// If the operation has not completed it will return an error.
5326func (future LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
5327	var done bool
5328	done, err = future.Done(client)
5329	if err != nil {
5330		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
5331		return
5332	}
5333	if !done {
5334		return ar, azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
5335	}
5336	if future.PollingMethod() == azure.PollingLocation {
5337		ar, err = client.DeleteResponder(future.Response())
5338		if err != nil {
5339			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
5340		}
5341		return
5342	}
5343	var req *http.Request
5344	var resp *http.Response
5345	if future.PollingURL() != "" {
5346		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
5347		if err != nil {
5348			return
5349		}
5350	} else {
5351		req = autorest.ChangeToGet(future.req)
5352	}
5353	resp, err = autorest.SendWithSender(client, req,
5354		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5355	if err != nil {
5356		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
5357		return
5358	}
5359	ar, err = client.DeleteResponder(resp)
5360	if err != nil {
5361		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
5362	}
5363	return
5364}
5365
5366// OutboundNatRule outbound NAT pool of the load balancer.
5367type OutboundNatRule struct {
5368	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
5369	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5370	Name *string `json:"name,omitempty"`
5371	// Etag - A unique read-only string that changes whenever the resource is updated.
5372	Etag *string `json:"etag,omitempty"`
5373	// ID - Resource Identifier.
5374	ID *string `json:"id,omitempty"`
5375}
5376
5377// MarshalJSON is the custom marshaler for OutboundNatRule.
5378func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
5379	objectMap := make(map[string]interface{})
5380	if onr.OutboundNatRulePropertiesFormat != nil {
5381		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
5382	}
5383	if onr.Name != nil {
5384		objectMap["name"] = onr.Name
5385	}
5386	if onr.Etag != nil {
5387		objectMap["etag"] = onr.Etag
5388	}
5389	if onr.ID != nil {
5390		objectMap["id"] = onr.ID
5391	}
5392	return json.Marshal(objectMap)
5393}
5394
5395// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
5396func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
5397	var m map[string]*json.RawMessage
5398	err := json.Unmarshal(body, &m)
5399	if err != nil {
5400		return err
5401	}
5402	for k, v := range m {
5403		switch k {
5404		case "properties":
5405			if v != nil {
5406				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
5407				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
5408				if err != nil {
5409					return err
5410				}
5411				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
5412			}
5413		case "name":
5414			if v != nil {
5415				var name string
5416				err = json.Unmarshal(*v, &name)
5417				if err != nil {
5418					return err
5419				}
5420				onr.Name = &name
5421			}
5422		case "etag":
5423			if v != nil {
5424				var etag string
5425				err = json.Unmarshal(*v, &etag)
5426				if err != nil {
5427					return err
5428				}
5429				onr.Etag = &etag
5430			}
5431		case "id":
5432			if v != nil {
5433				var ID string
5434				err = json.Unmarshal(*v, &ID)
5435				if err != nil {
5436					return err
5437				}
5438				onr.ID = &ID
5439			}
5440		}
5441	}
5442
5443	return nil
5444}
5445
5446// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
5447type OutboundNatRulePropertiesFormat struct {
5448	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
5449	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
5450	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
5451	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
5452	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
5453	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
5454	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5455	ProvisioningState *string `json:"provisioningState,omitempty"`
5456}
5457
5458// Probe a load balancer probe.
5459type Probe struct {
5460	*ProbePropertiesFormat `json:"properties,omitempty"`
5461	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5462	Name *string `json:"name,omitempty"`
5463	// Etag - A unique read-only string that changes whenever the resource is updated.
5464	Etag *string `json:"etag,omitempty"`
5465	// ID - Resource Identifier.
5466	ID *string `json:"id,omitempty"`
5467}
5468
5469// MarshalJSON is the custom marshaler for Probe.
5470func (p Probe) MarshalJSON() ([]byte, error) {
5471	objectMap := make(map[string]interface{})
5472	if p.ProbePropertiesFormat != nil {
5473		objectMap["properties"] = p.ProbePropertiesFormat
5474	}
5475	if p.Name != nil {
5476		objectMap["name"] = p.Name
5477	}
5478	if p.Etag != nil {
5479		objectMap["etag"] = p.Etag
5480	}
5481	if p.ID != nil {
5482		objectMap["id"] = p.ID
5483	}
5484	return json.Marshal(objectMap)
5485}
5486
5487// UnmarshalJSON is the custom unmarshaler for Probe struct.
5488func (p *Probe) UnmarshalJSON(body []byte) error {
5489	var m map[string]*json.RawMessage
5490	err := json.Unmarshal(body, &m)
5491	if err != nil {
5492		return err
5493	}
5494	for k, v := range m {
5495		switch k {
5496		case "properties":
5497			if v != nil {
5498				var probePropertiesFormat ProbePropertiesFormat
5499				err = json.Unmarshal(*v, &probePropertiesFormat)
5500				if err != nil {
5501					return err
5502				}
5503				p.ProbePropertiesFormat = &probePropertiesFormat
5504			}
5505		case "name":
5506			if v != nil {
5507				var name string
5508				err = json.Unmarshal(*v, &name)
5509				if err != nil {
5510					return err
5511				}
5512				p.Name = &name
5513			}
5514		case "etag":
5515			if v != nil {
5516				var etag string
5517				err = json.Unmarshal(*v, &etag)
5518				if err != nil {
5519					return err
5520				}
5521				p.Etag = &etag
5522			}
5523		case "id":
5524			if v != nil {
5525				var ID string
5526				err = json.Unmarshal(*v, &ID)
5527				if err != nil {
5528					return err
5529				}
5530				p.ID = &ID
5531			}
5532		}
5533	}
5534
5535	return nil
5536}
5537
5538// ProbePropertiesFormat ...
5539type ProbePropertiesFormat struct {
5540	// LoadBalancingRules - The load balancer rules that use this probe.
5541	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5542	// Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP'
5543	Protocol ProbeProtocol `json:"protocol,omitempty"`
5544	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
5545	Port *int32 `json:"port,omitempty"`
5546	// 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.
5547	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
5548	// 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.
5549	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
5550	// 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.
5551	RequestPath *string `json:"requestPath,omitempty"`
5552	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5553	ProvisioningState *string `json:"provisioningState,omitempty"`
5554}
5555
5556// PublicIPAddress public IP address resource.
5557type PublicIPAddress struct {
5558	autorest.Response                `json:"-"`
5559	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
5560	// Etag - A unique read-only string that changes whenever the resource is updated.
5561	Etag *string `json:"etag,omitempty"`
5562	// ID - Resource Identifier.
5563	ID *string `json:"id,omitempty"`
5564	// Name - Resource name.
5565	Name *string `json:"name,omitempty"`
5566	// Type - Resource type.
5567	Type *string `json:"type,omitempty"`
5568	// Location - Resource location.
5569	Location *string `json:"location,omitempty"`
5570	// Tags - Resource tags.
5571	Tags map[string]*string `json:"tags"`
5572}
5573
5574// MarshalJSON is the custom marshaler for PublicIPAddress.
5575func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
5576	objectMap := make(map[string]interface{})
5577	if pia.PublicIPAddressPropertiesFormat != nil {
5578		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
5579	}
5580	if pia.Etag != nil {
5581		objectMap["etag"] = pia.Etag
5582	}
5583	if pia.ID != nil {
5584		objectMap["id"] = pia.ID
5585	}
5586	if pia.Name != nil {
5587		objectMap["name"] = pia.Name
5588	}
5589	if pia.Type != nil {
5590		objectMap["type"] = pia.Type
5591	}
5592	if pia.Location != nil {
5593		objectMap["location"] = pia.Location
5594	}
5595	if pia.Tags != nil {
5596		objectMap["tags"] = pia.Tags
5597	}
5598	return json.Marshal(objectMap)
5599}
5600
5601// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
5602func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
5603	var m map[string]*json.RawMessage
5604	err := json.Unmarshal(body, &m)
5605	if err != nil {
5606		return err
5607	}
5608	for k, v := range m {
5609		switch k {
5610		case "properties":
5611			if v != nil {
5612				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
5613				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
5614				if err != nil {
5615					return err
5616				}
5617				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
5618			}
5619		case "etag":
5620			if v != nil {
5621				var etag string
5622				err = json.Unmarshal(*v, &etag)
5623				if err != nil {
5624					return err
5625				}
5626				pia.Etag = &etag
5627			}
5628		case "id":
5629			if v != nil {
5630				var ID string
5631				err = json.Unmarshal(*v, &ID)
5632				if err != nil {
5633					return err
5634				}
5635				pia.ID = &ID
5636			}
5637		case "name":
5638			if v != nil {
5639				var name string
5640				err = json.Unmarshal(*v, &name)
5641				if err != nil {
5642					return err
5643				}
5644				pia.Name = &name
5645			}
5646		case "type":
5647			if v != nil {
5648				var typeVar string
5649				err = json.Unmarshal(*v, &typeVar)
5650				if err != nil {
5651					return err
5652				}
5653				pia.Type = &typeVar
5654			}
5655		case "location":
5656			if v != nil {
5657				var location string
5658				err = json.Unmarshal(*v, &location)
5659				if err != nil {
5660					return err
5661				}
5662				pia.Location = &location
5663			}
5664		case "tags":
5665			if v != nil {
5666				var tags map[string]*string
5667				err = json.Unmarshal(*v, &tags)
5668				if err != nil {
5669					return err
5670				}
5671				pia.Tags = tags
5672			}
5673		}
5674	}
5675
5676	return nil
5677}
5678
5679// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
5680type PublicIPAddressDNSSettings struct {
5681	// 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.
5682	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
5683	// 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.
5684	Fqdn *string `json:"fqdn,omitempty"`
5685	// 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.
5686	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
5687}
5688
5689// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
5690// operation.
5691type PublicIPAddressesCreateOrUpdateFuture struct {
5692	azure.Future
5693	req *http.Request
5694}
5695
5696// Result returns the result of the asynchronous operation.
5697// If the operation has not completed it will return an error.
5698func (future PublicIPAddressesCreateOrUpdateFuture) Result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
5699	var done bool
5700	done, err = future.Done(client)
5701	if err != nil {
5702		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5703		return
5704	}
5705	if !done {
5706		return pia, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
5707	}
5708	if future.PollingMethod() == azure.PollingLocation {
5709		pia, err = client.CreateOrUpdateResponder(future.Response())
5710		if err != nil {
5711			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
5712		}
5713		return
5714	}
5715	var req *http.Request
5716	var resp *http.Response
5717	if future.PollingURL() != "" {
5718		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
5719		if err != nil {
5720			return
5721		}
5722	} else {
5723		req = autorest.ChangeToGet(future.req)
5724	}
5725	resp, err = autorest.SendWithSender(client, req,
5726		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5727	if err != nil {
5728		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
5729		return
5730	}
5731	pia, err = client.CreateOrUpdateResponder(resp)
5732	if err != nil {
5733		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
5734	}
5735	return
5736}
5737
5738// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5739// operation.
5740type PublicIPAddressesDeleteFuture struct {
5741	azure.Future
5742	req *http.Request
5743}
5744
5745// Result returns the result of the asynchronous operation.
5746// If the operation has not completed it will return an error.
5747func (future PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
5748	var done bool
5749	done, err = future.Done(client)
5750	if err != nil {
5751		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
5752		return
5753	}
5754	if !done {
5755		return ar, azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
5756	}
5757	if future.PollingMethod() == azure.PollingLocation {
5758		ar, err = client.DeleteResponder(future.Response())
5759		if err != nil {
5760			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Failure responding to request")
5761		}
5762		return
5763	}
5764	var req *http.Request
5765	var resp *http.Response
5766	if future.PollingURL() != "" {
5767		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
5768		if err != nil {
5769			return
5770		}
5771	} else {
5772		req = autorest.ChangeToGet(future.req)
5773	}
5774	resp, err = autorest.SendWithSender(client, req,
5775		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5776	if err != nil {
5777		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure sending request")
5778		return
5779	}
5780	ar, err = client.DeleteResponder(resp)
5781	if err != nil {
5782		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", resp, "Failure responding to request")
5783	}
5784	return
5785}
5786
5787// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
5788type PublicIPAddressListResult struct {
5789	autorest.Response `json:"-"`
5790	// Value - A list of public IP addresses that exists in a resource group.
5791	Value *[]PublicIPAddress `json:"value,omitempty"`
5792	// NextLink - The URL to get the next set of results.
5793	NextLink *string `json:"nextLink,omitempty"`
5794}
5795
5796// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
5797type PublicIPAddressListResultIterator struct {
5798	i    int
5799	page PublicIPAddressListResultPage
5800}
5801
5802// Next advances to the next value.  If there was an error making
5803// the request the iterator does not advance and the error is returned.
5804func (iter *PublicIPAddressListResultIterator) Next() error {
5805	iter.i++
5806	if iter.i < len(iter.page.Values()) {
5807		return nil
5808	}
5809	err := iter.page.Next()
5810	if err != nil {
5811		iter.i--
5812		return err
5813	}
5814	iter.i = 0
5815	return nil
5816}
5817
5818// NotDone returns true if the enumeration should be started or is not yet complete.
5819func (iter PublicIPAddressListResultIterator) NotDone() bool {
5820	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5821}
5822
5823// Response returns the raw server response from the last page request.
5824func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
5825	return iter.page.Response()
5826}
5827
5828// Value returns the current value or a zero-initialized value if the
5829// iterator has advanced beyond the end of the collection.
5830func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
5831	if !iter.page.NotDone() {
5832		return PublicIPAddress{}
5833	}
5834	return iter.page.Values()[iter.i]
5835}
5836
5837// IsEmpty returns true if the ListResult contains no values.
5838func (pialr PublicIPAddressListResult) IsEmpty() bool {
5839	return pialr.Value == nil || len(*pialr.Value) == 0
5840}
5841
5842// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
5843// It returns nil if no more results exist.
5844func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) {
5845	if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 {
5846		return nil, nil
5847	}
5848	return autorest.Prepare(&http.Request{},
5849		autorest.AsJSON(),
5850		autorest.AsGet(),
5851		autorest.WithBaseURL(to.String(pialr.NextLink)))
5852}
5853
5854// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
5855type PublicIPAddressListResultPage struct {
5856	fn    func(PublicIPAddressListResult) (PublicIPAddressListResult, error)
5857	pialr PublicIPAddressListResult
5858}
5859
5860// Next advances to the next page of values.  If there was an error making
5861// the request the page does not advance and the error is returned.
5862func (page *PublicIPAddressListResultPage) Next() error {
5863	next, err := page.fn(page.pialr)
5864	if err != nil {
5865		return err
5866	}
5867	page.pialr = next
5868	return nil
5869}
5870
5871// NotDone returns true if the page enumeration should be started or is not yet complete.
5872func (page PublicIPAddressListResultPage) NotDone() bool {
5873	return !page.pialr.IsEmpty()
5874}
5875
5876// Response returns the raw server response from the last page request.
5877func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
5878	return page.pialr
5879}
5880
5881// Values returns the slice of values for the current page or nil if there are no values.
5882func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
5883	if page.pialr.IsEmpty() {
5884		return nil
5885	}
5886	return *page.pialr.Value
5887}
5888
5889// PublicIPAddressPropertiesFormat public IP address properties.
5890type PublicIPAddressPropertiesFormat struct {
5891	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
5892	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
5893	IPConfiguration          *IPConfiguration   `json:"ipConfiguration,omitempty"`
5894	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
5895	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
5896	IPAddress   *string                     `json:"ipAddress,omitempty"`
5897	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
5898	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5899	// ResourceGUID - The resource GUID property of the public IP resource.
5900	ResourceGUID *string `json:"resourceGuid,omitempty"`
5901	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5902	ProvisioningState *string `json:"provisioningState,omitempty"`
5903}
5904
5905// Resource azure resource manager resource properties.
5906type Resource struct {
5907	// ID - Resource Identifier.
5908	ID *string `json:"id,omitempty"`
5909	// Name - Resource name.
5910	Name *string `json:"name,omitempty"`
5911	// Type - Resource type.
5912	Type *string `json:"type,omitempty"`
5913	// Location - Resource location.
5914	Location *string `json:"location,omitempty"`
5915	// Tags - Resource tags.
5916	Tags map[string]*string `json:"tags"`
5917}
5918
5919// MarshalJSON is the custom marshaler for Resource.
5920func (r Resource) MarshalJSON() ([]byte, error) {
5921	objectMap := make(map[string]interface{})
5922	if r.ID != nil {
5923		objectMap["id"] = r.ID
5924	}
5925	if r.Name != nil {
5926		objectMap["name"] = r.Name
5927	}
5928	if r.Type != nil {
5929		objectMap["type"] = r.Type
5930	}
5931	if r.Location != nil {
5932		objectMap["location"] = r.Location
5933	}
5934	if r.Tags != nil {
5935		objectMap["tags"] = r.Tags
5936	}
5937	return json.Marshal(objectMap)
5938}
5939
5940// Route route resource
5941type Route struct {
5942	autorest.Response      `json:"-"`
5943	*RoutePropertiesFormat `json:"properties,omitempty"`
5944	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5945	Name *string `json:"name,omitempty"`
5946	// Etag - A unique read-only string that changes whenever the resource is updated.
5947	Etag *string `json:"etag,omitempty"`
5948	// ID - Resource Identifier.
5949	ID *string `json:"id,omitempty"`
5950}
5951
5952// MarshalJSON is the custom marshaler for Route.
5953func (r Route) MarshalJSON() ([]byte, error) {
5954	objectMap := make(map[string]interface{})
5955	if r.RoutePropertiesFormat != nil {
5956		objectMap["properties"] = r.RoutePropertiesFormat
5957	}
5958	if r.Name != nil {
5959		objectMap["name"] = r.Name
5960	}
5961	if r.Etag != nil {
5962		objectMap["etag"] = r.Etag
5963	}
5964	if r.ID != nil {
5965		objectMap["id"] = r.ID
5966	}
5967	return json.Marshal(objectMap)
5968}
5969
5970// UnmarshalJSON is the custom unmarshaler for Route struct.
5971func (r *Route) UnmarshalJSON(body []byte) error {
5972	var m map[string]*json.RawMessage
5973	err := json.Unmarshal(body, &m)
5974	if err != nil {
5975		return err
5976	}
5977	for k, v := range m {
5978		switch k {
5979		case "properties":
5980			if v != nil {
5981				var routePropertiesFormat RoutePropertiesFormat
5982				err = json.Unmarshal(*v, &routePropertiesFormat)
5983				if err != nil {
5984					return err
5985				}
5986				r.RoutePropertiesFormat = &routePropertiesFormat
5987			}
5988		case "name":
5989			if v != nil {
5990				var name string
5991				err = json.Unmarshal(*v, &name)
5992				if err != nil {
5993					return err
5994				}
5995				r.Name = &name
5996			}
5997		case "etag":
5998			if v != nil {
5999				var etag string
6000				err = json.Unmarshal(*v, &etag)
6001				if err != nil {
6002					return err
6003				}
6004				r.Etag = &etag
6005			}
6006		case "id":
6007			if v != nil {
6008				var ID string
6009				err = json.Unmarshal(*v, &ID)
6010				if err != nil {
6011					return err
6012				}
6013				r.ID = &ID
6014			}
6015		}
6016	}
6017
6018	return nil
6019}
6020
6021// RouteListResult response for the ListRoute API service call
6022type RouteListResult struct {
6023	autorest.Response `json:"-"`
6024	// Value - Gets a list of routes in a resource group.
6025	Value *[]Route `json:"value,omitempty"`
6026	// NextLink - The URL to get the next set of results.
6027	NextLink *string `json:"nextLink,omitempty"`
6028}
6029
6030// RouteListResultIterator provides access to a complete listing of Route values.
6031type RouteListResultIterator struct {
6032	i    int
6033	page RouteListResultPage
6034}
6035
6036// Next advances to the next value.  If there was an error making
6037// the request the iterator does not advance and the error is returned.
6038func (iter *RouteListResultIterator) Next() error {
6039	iter.i++
6040	if iter.i < len(iter.page.Values()) {
6041		return nil
6042	}
6043	err := iter.page.Next()
6044	if err != nil {
6045		iter.i--
6046		return err
6047	}
6048	iter.i = 0
6049	return nil
6050}
6051
6052// NotDone returns true if the enumeration should be started or is not yet complete.
6053func (iter RouteListResultIterator) NotDone() bool {
6054	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6055}
6056
6057// Response returns the raw server response from the last page request.
6058func (iter RouteListResultIterator) Response() RouteListResult {
6059	return iter.page.Response()
6060}
6061
6062// Value returns the current value or a zero-initialized value if the
6063// iterator has advanced beyond the end of the collection.
6064func (iter RouteListResultIterator) Value() Route {
6065	if !iter.page.NotDone() {
6066		return Route{}
6067	}
6068	return iter.page.Values()[iter.i]
6069}
6070
6071// IsEmpty returns true if the ListResult contains no values.
6072func (rlr RouteListResult) IsEmpty() bool {
6073	return rlr.Value == nil || len(*rlr.Value) == 0
6074}
6075
6076// routeListResultPreparer prepares a request to retrieve the next set of results.
6077// It returns nil if no more results exist.
6078func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) {
6079	if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
6080		return nil, nil
6081	}
6082	return autorest.Prepare(&http.Request{},
6083		autorest.AsJSON(),
6084		autorest.AsGet(),
6085		autorest.WithBaseURL(to.String(rlr.NextLink)))
6086}
6087
6088// RouteListResultPage contains a page of Route values.
6089type RouteListResultPage struct {
6090	fn  func(RouteListResult) (RouteListResult, error)
6091	rlr RouteListResult
6092}
6093
6094// Next advances to the next page of values.  If there was an error making
6095// the request the page does not advance and the error is returned.
6096func (page *RouteListResultPage) Next() error {
6097	next, err := page.fn(page.rlr)
6098	if err != nil {
6099		return err
6100	}
6101	page.rlr = next
6102	return nil
6103}
6104
6105// NotDone returns true if the page enumeration should be started or is not yet complete.
6106func (page RouteListResultPage) NotDone() bool {
6107	return !page.rlr.IsEmpty()
6108}
6109
6110// Response returns the raw server response from the last page request.
6111func (page RouteListResultPage) Response() RouteListResult {
6112	return page.rlr
6113}
6114
6115// Values returns the slice of values for the current page or nil if there are no values.
6116func (page RouteListResultPage) Values() []Route {
6117	if page.rlr.IsEmpty() {
6118		return nil
6119	}
6120	return *page.rlr.Value
6121}
6122
6123// RoutePropertiesFormat route resource
6124type RoutePropertiesFormat struct {
6125	// AddressPrefix - The destination CIDR to which the route applies.
6126	AddressPrefix *string `json:"addressPrefix,omitempty"`
6127	// 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'
6128	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6129	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
6130	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
6131	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6132	ProvisioningState *string `json:"provisioningState,omitempty"`
6133}
6134
6135// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
6136type RoutesCreateOrUpdateFuture struct {
6137	azure.Future
6138	req *http.Request
6139}
6140
6141// Result returns the result of the asynchronous operation.
6142// If the operation has not completed it will return an error.
6143func (future RoutesCreateOrUpdateFuture) Result(client RoutesClient) (r Route, err error) {
6144	var done bool
6145	done, err = future.Done(client)
6146	if err != nil {
6147		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6148		return
6149	}
6150	if !done {
6151		return r, azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
6152	}
6153	if future.PollingMethod() == azure.PollingLocation {
6154		r, err = client.CreateOrUpdateResponder(future.Response())
6155		if err != nil {
6156			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
6157		}
6158		return
6159	}
6160	var req *http.Request
6161	var resp *http.Response
6162	if future.PollingURL() != "" {
6163		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6164		if err != nil {
6165			return
6166		}
6167	} else {
6168		req = autorest.ChangeToGet(future.req)
6169	}
6170	resp, err = autorest.SendWithSender(client, req,
6171		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6172	if err != nil {
6173		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
6174		return
6175	}
6176	r, err = client.CreateOrUpdateResponder(resp)
6177	if err != nil {
6178		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
6179	}
6180	return
6181}
6182
6183// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
6184type RoutesDeleteFuture struct {
6185	azure.Future
6186	req *http.Request
6187}
6188
6189// Result returns the result of the asynchronous operation.
6190// If the operation has not completed it will return an error.
6191func (future RoutesDeleteFuture) Result(client RoutesClient) (ar autorest.Response, err error) {
6192	var done bool
6193	done, err = future.Done(client)
6194	if err != nil {
6195		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
6196		return
6197	}
6198	if !done {
6199		return ar, azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
6200	}
6201	if future.PollingMethod() == azure.PollingLocation {
6202		ar, err = client.DeleteResponder(future.Response())
6203		if err != nil {
6204			err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Failure responding to request")
6205		}
6206		return
6207	}
6208	var req *http.Request
6209	var resp *http.Response
6210	if future.PollingURL() != "" {
6211		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6212		if err != nil {
6213			return
6214		}
6215	} else {
6216		req = autorest.ChangeToGet(future.req)
6217	}
6218	resp, err = autorest.SendWithSender(client, req,
6219		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6220	if err != nil {
6221		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure sending request")
6222		return
6223	}
6224	ar, err = client.DeleteResponder(resp)
6225	if err != nil {
6226		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", resp, "Failure responding to request")
6227	}
6228	return
6229}
6230
6231// RouteTable route table resource.
6232type RouteTable struct {
6233	autorest.Response           `json:"-"`
6234	*RouteTablePropertiesFormat `json:"properties,omitempty"`
6235	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
6236	Etag *string `json:"etag,omitempty"`
6237	// ID - Resource Identifier.
6238	ID *string `json:"id,omitempty"`
6239	// Name - Resource name.
6240	Name *string `json:"name,omitempty"`
6241	// Type - Resource type.
6242	Type *string `json:"type,omitempty"`
6243	// Location - Resource location.
6244	Location *string `json:"location,omitempty"`
6245	// Tags - Resource tags.
6246	Tags map[string]*string `json:"tags"`
6247}
6248
6249// MarshalJSON is the custom marshaler for RouteTable.
6250func (rt RouteTable) MarshalJSON() ([]byte, error) {
6251	objectMap := make(map[string]interface{})
6252	if rt.RouteTablePropertiesFormat != nil {
6253		objectMap["properties"] = rt.RouteTablePropertiesFormat
6254	}
6255	if rt.Etag != nil {
6256		objectMap["etag"] = rt.Etag
6257	}
6258	if rt.ID != nil {
6259		objectMap["id"] = rt.ID
6260	}
6261	if rt.Name != nil {
6262		objectMap["name"] = rt.Name
6263	}
6264	if rt.Type != nil {
6265		objectMap["type"] = rt.Type
6266	}
6267	if rt.Location != nil {
6268		objectMap["location"] = rt.Location
6269	}
6270	if rt.Tags != nil {
6271		objectMap["tags"] = rt.Tags
6272	}
6273	return json.Marshal(objectMap)
6274}
6275
6276// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
6277func (rt *RouteTable) UnmarshalJSON(body []byte) error {
6278	var m map[string]*json.RawMessage
6279	err := json.Unmarshal(body, &m)
6280	if err != nil {
6281		return err
6282	}
6283	for k, v := range m {
6284		switch k {
6285		case "properties":
6286			if v != nil {
6287				var routeTablePropertiesFormat RouteTablePropertiesFormat
6288				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
6289				if err != nil {
6290					return err
6291				}
6292				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
6293			}
6294		case "etag":
6295			if v != nil {
6296				var etag string
6297				err = json.Unmarshal(*v, &etag)
6298				if err != nil {
6299					return err
6300				}
6301				rt.Etag = &etag
6302			}
6303		case "id":
6304			if v != nil {
6305				var ID string
6306				err = json.Unmarshal(*v, &ID)
6307				if err != nil {
6308					return err
6309				}
6310				rt.ID = &ID
6311			}
6312		case "name":
6313			if v != nil {
6314				var name string
6315				err = json.Unmarshal(*v, &name)
6316				if err != nil {
6317					return err
6318				}
6319				rt.Name = &name
6320			}
6321		case "type":
6322			if v != nil {
6323				var typeVar string
6324				err = json.Unmarshal(*v, &typeVar)
6325				if err != nil {
6326					return err
6327				}
6328				rt.Type = &typeVar
6329			}
6330		case "location":
6331			if v != nil {
6332				var location string
6333				err = json.Unmarshal(*v, &location)
6334				if err != nil {
6335					return err
6336				}
6337				rt.Location = &location
6338			}
6339		case "tags":
6340			if v != nil {
6341				var tags map[string]*string
6342				err = json.Unmarshal(*v, &tags)
6343				if err != nil {
6344					return err
6345				}
6346				rt.Tags = tags
6347			}
6348		}
6349	}
6350
6351	return nil
6352}
6353
6354// RouteTableListResult response for the ListRouteTable API service call.
6355type RouteTableListResult struct {
6356	autorest.Response `json:"-"`
6357	// Value - Gets a list of route tables in a resource group.
6358	Value *[]RouteTable `json:"value,omitempty"`
6359	// NextLink - The URL to get the next set of results.
6360	NextLink *string `json:"nextLink,omitempty"`
6361}
6362
6363// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
6364type RouteTableListResultIterator struct {
6365	i    int
6366	page RouteTableListResultPage
6367}
6368
6369// Next advances to the next value.  If there was an error making
6370// the request the iterator does not advance and the error is returned.
6371func (iter *RouteTableListResultIterator) Next() error {
6372	iter.i++
6373	if iter.i < len(iter.page.Values()) {
6374		return nil
6375	}
6376	err := iter.page.Next()
6377	if err != nil {
6378		iter.i--
6379		return err
6380	}
6381	iter.i = 0
6382	return nil
6383}
6384
6385// NotDone returns true if the enumeration should be started or is not yet complete.
6386func (iter RouteTableListResultIterator) 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 RouteTableListResultIterator) Response() RouteTableListResult {
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 RouteTableListResultIterator) Value() RouteTable {
6398	if !iter.page.NotDone() {
6399		return RouteTable{}
6400	}
6401	return iter.page.Values()[iter.i]
6402}
6403
6404// IsEmpty returns true if the ListResult contains no values.
6405func (rtlr RouteTableListResult) IsEmpty() bool {
6406	return rtlr.Value == nil || len(*rtlr.Value) == 0
6407}
6408
6409// routeTableListResultPreparer prepares a request to retrieve the next set of results.
6410// It returns nil if no more results exist.
6411func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) {
6412	if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 {
6413		return nil, nil
6414	}
6415	return autorest.Prepare(&http.Request{},
6416		autorest.AsJSON(),
6417		autorest.AsGet(),
6418		autorest.WithBaseURL(to.String(rtlr.NextLink)))
6419}
6420
6421// RouteTableListResultPage contains a page of RouteTable values.
6422type RouteTableListResultPage struct {
6423	fn   func(RouteTableListResult) (RouteTableListResult, error)
6424	rtlr RouteTableListResult
6425}
6426
6427// Next advances to the next page of values.  If there was an error making
6428// the request the page does not advance and the error is returned.
6429func (page *RouteTableListResultPage) Next() error {
6430	next, err := page.fn(page.rtlr)
6431	if err != nil {
6432		return err
6433	}
6434	page.rtlr = next
6435	return nil
6436}
6437
6438// NotDone returns true if the page enumeration should be started or is not yet complete.
6439func (page RouteTableListResultPage) NotDone() bool {
6440	return !page.rtlr.IsEmpty()
6441}
6442
6443// Response returns the raw server response from the last page request.
6444func (page RouteTableListResultPage) Response() RouteTableListResult {
6445	return page.rtlr
6446}
6447
6448// Values returns the slice of values for the current page or nil if there are no values.
6449func (page RouteTableListResultPage) Values() []RouteTable {
6450	if page.rtlr.IsEmpty() {
6451		return nil
6452	}
6453	return *page.rtlr.Value
6454}
6455
6456// RouteTablePropertiesFormat route Table resource
6457type RouteTablePropertiesFormat struct {
6458	// Routes - Collection of routes contained within a route table.
6459	Routes *[]Route `json:"routes,omitempty"`
6460	// Subnets - A collection of references to subnets.
6461	Subnets *[]Subnet `json:"subnets,omitempty"`
6462	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6463	ProvisioningState *string `json:"provisioningState,omitempty"`
6464}
6465
6466// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6467// operation.
6468type RouteTablesCreateOrUpdateFuture struct {
6469	azure.Future
6470	req *http.Request
6471}
6472
6473// Result returns the result of the asynchronous operation.
6474// If the operation has not completed it will return an error.
6475func (future RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient) (rt RouteTable, err error) {
6476	var done bool
6477	done, err = future.Done(client)
6478	if err != nil {
6479		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6480		return
6481	}
6482	if !done {
6483		return rt, azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
6484	}
6485	if future.PollingMethod() == azure.PollingLocation {
6486		rt, err = client.CreateOrUpdateResponder(future.Response())
6487		if err != nil {
6488			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
6489		}
6490		return
6491	}
6492	var req *http.Request
6493	var resp *http.Response
6494	if future.PollingURL() != "" {
6495		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6496		if err != nil {
6497			return
6498		}
6499	} else {
6500		req = autorest.ChangeToGet(future.req)
6501	}
6502	resp, err = autorest.SendWithSender(client, req,
6503		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6504	if err != nil {
6505		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
6506		return
6507	}
6508	rt, err = client.CreateOrUpdateResponder(resp)
6509	if err != nil {
6510		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
6511	}
6512	return
6513}
6514
6515// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
6516type RouteTablesDeleteFuture struct {
6517	azure.Future
6518	req *http.Request
6519}
6520
6521// Result returns the result of the asynchronous operation.
6522// If the operation has not completed it will return an error.
6523func (future RouteTablesDeleteFuture) Result(client RouteTablesClient) (ar autorest.Response, err error) {
6524	var done bool
6525	done, err = future.Done(client)
6526	if err != nil {
6527		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
6528		return
6529	}
6530	if !done {
6531		return ar, azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
6532	}
6533	if future.PollingMethod() == azure.PollingLocation {
6534		ar, err = client.DeleteResponder(future.Response())
6535		if err != nil {
6536			err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Failure responding to request")
6537		}
6538		return
6539	}
6540	var req *http.Request
6541	var resp *http.Response
6542	if future.PollingURL() != "" {
6543		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6544		if err != nil {
6545			return
6546		}
6547	} else {
6548		req = autorest.ChangeToGet(future.req)
6549	}
6550	resp, err = autorest.SendWithSender(client, req,
6551		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6552	if err != nil {
6553		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure sending request")
6554		return
6555	}
6556	ar, err = client.DeleteResponder(resp)
6557	if err != nil {
6558		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", resp, "Failure responding to request")
6559	}
6560	return
6561}
6562
6563// SecurityGroup networkSecurityGroup resource.
6564type SecurityGroup struct {
6565	autorest.Response              `json:"-"`
6566	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
6567	// Etag - A unique read-only string that changes whenever the resource is updated.
6568	Etag *string `json:"etag,omitempty"`
6569	// ID - Resource Identifier.
6570	ID *string `json:"id,omitempty"`
6571	// Name - Resource name.
6572	Name *string `json:"name,omitempty"`
6573	// Type - Resource type.
6574	Type *string `json:"type,omitempty"`
6575	// Location - Resource location.
6576	Location *string `json:"location,omitempty"`
6577	// Tags - Resource tags.
6578	Tags map[string]*string `json:"tags"`
6579}
6580
6581// MarshalJSON is the custom marshaler for SecurityGroup.
6582func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
6583	objectMap := make(map[string]interface{})
6584	if sg.SecurityGroupPropertiesFormat != nil {
6585		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
6586	}
6587	if sg.Etag != nil {
6588		objectMap["etag"] = sg.Etag
6589	}
6590	if sg.ID != nil {
6591		objectMap["id"] = sg.ID
6592	}
6593	if sg.Name != nil {
6594		objectMap["name"] = sg.Name
6595	}
6596	if sg.Type != nil {
6597		objectMap["type"] = sg.Type
6598	}
6599	if sg.Location != nil {
6600		objectMap["location"] = sg.Location
6601	}
6602	if sg.Tags != nil {
6603		objectMap["tags"] = sg.Tags
6604	}
6605	return json.Marshal(objectMap)
6606}
6607
6608// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
6609func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
6610	var m map[string]*json.RawMessage
6611	err := json.Unmarshal(body, &m)
6612	if err != nil {
6613		return err
6614	}
6615	for k, v := range m {
6616		switch k {
6617		case "properties":
6618			if v != nil {
6619				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
6620				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
6621				if err != nil {
6622					return err
6623				}
6624				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
6625			}
6626		case "etag":
6627			if v != nil {
6628				var etag string
6629				err = json.Unmarshal(*v, &etag)
6630				if err != nil {
6631					return err
6632				}
6633				sg.Etag = &etag
6634			}
6635		case "id":
6636			if v != nil {
6637				var ID string
6638				err = json.Unmarshal(*v, &ID)
6639				if err != nil {
6640					return err
6641				}
6642				sg.ID = &ID
6643			}
6644		case "name":
6645			if v != nil {
6646				var name string
6647				err = json.Unmarshal(*v, &name)
6648				if err != nil {
6649					return err
6650				}
6651				sg.Name = &name
6652			}
6653		case "type":
6654			if v != nil {
6655				var typeVar string
6656				err = json.Unmarshal(*v, &typeVar)
6657				if err != nil {
6658					return err
6659				}
6660				sg.Type = &typeVar
6661			}
6662		case "location":
6663			if v != nil {
6664				var location string
6665				err = json.Unmarshal(*v, &location)
6666				if err != nil {
6667					return err
6668				}
6669				sg.Location = &location
6670			}
6671		case "tags":
6672			if v != nil {
6673				var tags map[string]*string
6674				err = json.Unmarshal(*v, &tags)
6675				if err != nil {
6676					return err
6677				}
6678				sg.Tags = tags
6679			}
6680		}
6681	}
6682
6683	return nil
6684}
6685
6686// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
6687type SecurityGroupListResult struct {
6688	autorest.Response `json:"-"`
6689	// Value - A list of NetworkSecurityGroup resources.
6690	Value *[]SecurityGroup `json:"value,omitempty"`
6691	// NextLink - The URL to get the next set of results.
6692	NextLink *string `json:"nextLink,omitempty"`
6693}
6694
6695// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
6696type SecurityGroupListResultIterator struct {
6697	i    int
6698	page SecurityGroupListResultPage
6699}
6700
6701// Next advances to the next value.  If there was an error making
6702// the request the iterator does not advance and the error is returned.
6703func (iter *SecurityGroupListResultIterator) Next() error {
6704	iter.i++
6705	if iter.i < len(iter.page.Values()) {
6706		return nil
6707	}
6708	err := iter.page.Next()
6709	if err != nil {
6710		iter.i--
6711		return err
6712	}
6713	iter.i = 0
6714	return nil
6715}
6716
6717// NotDone returns true if the enumeration should be started or is not yet complete.
6718func (iter SecurityGroupListResultIterator) NotDone() bool {
6719	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6720}
6721
6722// Response returns the raw server response from the last page request.
6723func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
6724	return iter.page.Response()
6725}
6726
6727// Value returns the current value or a zero-initialized value if the
6728// iterator has advanced beyond the end of the collection.
6729func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
6730	if !iter.page.NotDone() {
6731		return SecurityGroup{}
6732	}
6733	return iter.page.Values()[iter.i]
6734}
6735
6736// IsEmpty returns true if the ListResult contains no values.
6737func (sglr SecurityGroupListResult) IsEmpty() bool {
6738	return sglr.Value == nil || len(*sglr.Value) == 0
6739}
6740
6741// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
6742// It returns nil if no more results exist.
6743func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) {
6744	if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
6745		return nil, nil
6746	}
6747	return autorest.Prepare(&http.Request{},
6748		autorest.AsJSON(),
6749		autorest.AsGet(),
6750		autorest.WithBaseURL(to.String(sglr.NextLink)))
6751}
6752
6753// SecurityGroupListResultPage contains a page of SecurityGroup values.
6754type SecurityGroupListResultPage struct {
6755	fn   func(SecurityGroupListResult) (SecurityGroupListResult, error)
6756	sglr SecurityGroupListResult
6757}
6758
6759// Next advances to the next page of values.  If there was an error making
6760// the request the page does not advance and the error is returned.
6761func (page *SecurityGroupListResultPage) Next() error {
6762	next, err := page.fn(page.sglr)
6763	if err != nil {
6764		return err
6765	}
6766	page.sglr = next
6767	return nil
6768}
6769
6770// NotDone returns true if the page enumeration should be started or is not yet complete.
6771func (page SecurityGroupListResultPage) NotDone() bool {
6772	return !page.sglr.IsEmpty()
6773}
6774
6775// Response returns the raw server response from the last page request.
6776func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
6777	return page.sglr
6778}
6779
6780// Values returns the slice of values for the current page or nil if there are no values.
6781func (page SecurityGroupListResultPage) Values() []SecurityGroup {
6782	if page.sglr.IsEmpty() {
6783		return nil
6784	}
6785	return *page.sglr.Value
6786}
6787
6788// SecurityGroupPropertiesFormat network Security Group resource.
6789type SecurityGroupPropertiesFormat struct {
6790	// SecurityRules - A collection of security rules of the network security group.
6791	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
6792	// DefaultSecurityRules - The default security rules of network security group.
6793	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
6794	// NetworkInterfaces - A collection of references to network interfaces.
6795	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
6796	// Subnets - A collection of references to subnets.
6797	Subnets *[]Subnet `json:"subnets,omitempty"`
6798	// ResourceGUID - The resource GUID property of the network security group resource.
6799	ResourceGUID *string `json:"resourceGuid,omitempty"`
6800	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6801	ProvisioningState *string `json:"provisioningState,omitempty"`
6802}
6803
6804// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
6805// operation.
6806type SecurityGroupsCreateOrUpdateFuture struct {
6807	azure.Future
6808	req *http.Request
6809}
6810
6811// Result returns the result of the asynchronous operation.
6812// If the operation has not completed it will return an error.
6813func (future SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
6814	var done bool
6815	done, err = future.Done(client)
6816	if err != nil {
6817		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6818		return
6819	}
6820	if !done {
6821		return sg, azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
6822	}
6823	if future.PollingMethod() == azure.PollingLocation {
6824		sg, err = client.CreateOrUpdateResponder(future.Response())
6825		if err != nil {
6826			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
6827		}
6828		return
6829	}
6830	var req *http.Request
6831	var resp *http.Response
6832	if future.PollingURL() != "" {
6833		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6834		if err != nil {
6835			return
6836		}
6837	} else {
6838		req = autorest.ChangeToGet(future.req)
6839	}
6840	resp, err = autorest.SendWithSender(client, req,
6841		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6842	if err != nil {
6843		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
6844		return
6845	}
6846	sg, err = client.CreateOrUpdateResponder(resp)
6847	if err != nil {
6848		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
6849	}
6850	return
6851}
6852
6853// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
6854type SecurityGroupsDeleteFuture struct {
6855	azure.Future
6856	req *http.Request
6857}
6858
6859// Result returns the result of the asynchronous operation.
6860// If the operation has not completed it will return an error.
6861func (future SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (ar autorest.Response, err error) {
6862	var done bool
6863	done, err = future.Done(client)
6864	if err != nil {
6865		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
6866		return
6867	}
6868	if !done {
6869		return ar, azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
6870	}
6871	if future.PollingMethod() == azure.PollingLocation {
6872		ar, err = client.DeleteResponder(future.Response())
6873		if err != nil {
6874			err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Failure responding to request")
6875		}
6876		return
6877	}
6878	var req *http.Request
6879	var resp *http.Response
6880	if future.PollingURL() != "" {
6881		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
6882		if err != nil {
6883			return
6884		}
6885	} else {
6886		req = autorest.ChangeToGet(future.req)
6887	}
6888	resp, err = autorest.SendWithSender(client, req,
6889		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6890	if err != nil {
6891		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure sending request")
6892		return
6893	}
6894	ar, err = client.DeleteResponder(resp)
6895	if err != nil {
6896		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", resp, "Failure responding to request")
6897	}
6898	return
6899}
6900
6901// SecurityRule network security rule.
6902type SecurityRule struct {
6903	autorest.Response             `json:"-"`
6904	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
6905	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6906	Name *string `json:"name,omitempty"`
6907	// Etag - A unique read-only string that changes whenever the resource is updated.
6908	Etag *string `json:"etag,omitempty"`
6909	// ID - Resource Identifier.
6910	ID *string `json:"id,omitempty"`
6911}
6912
6913// MarshalJSON is the custom marshaler for SecurityRule.
6914func (sr SecurityRule) MarshalJSON() ([]byte, error) {
6915	objectMap := make(map[string]interface{})
6916	if sr.SecurityRulePropertiesFormat != nil {
6917		objectMap["properties"] = sr.SecurityRulePropertiesFormat
6918	}
6919	if sr.Name != nil {
6920		objectMap["name"] = sr.Name
6921	}
6922	if sr.Etag != nil {
6923		objectMap["etag"] = sr.Etag
6924	}
6925	if sr.ID != nil {
6926		objectMap["id"] = sr.ID
6927	}
6928	return json.Marshal(objectMap)
6929}
6930
6931// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
6932func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
6933	var m map[string]*json.RawMessage
6934	err := json.Unmarshal(body, &m)
6935	if err != nil {
6936		return err
6937	}
6938	for k, v := range m {
6939		switch k {
6940		case "properties":
6941			if v != nil {
6942				var securityRulePropertiesFormat SecurityRulePropertiesFormat
6943				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
6944				if err != nil {
6945					return err
6946				}
6947				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
6948			}
6949		case "name":
6950			if v != nil {
6951				var name string
6952				err = json.Unmarshal(*v, &name)
6953				if err != nil {
6954					return err
6955				}
6956				sr.Name = &name
6957			}
6958		case "etag":
6959			if v != nil {
6960				var etag string
6961				err = json.Unmarshal(*v, &etag)
6962				if err != nil {
6963					return err
6964				}
6965				sr.Etag = &etag
6966			}
6967		case "id":
6968			if v != nil {
6969				var ID string
6970				err = json.Unmarshal(*v, &ID)
6971				if err != nil {
6972					return err
6973				}
6974				sr.ID = &ID
6975			}
6976		}
6977	}
6978
6979	return nil
6980}
6981
6982// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs
6983// to a network security group.
6984type SecurityRuleListResult struct {
6985	autorest.Response `json:"-"`
6986	// Value - The security rules in a network security group.
6987	Value *[]SecurityRule `json:"value,omitempty"`
6988	// NextLink - The URL to get the next set of results.
6989	NextLink *string `json:"nextLink,omitempty"`
6990}
6991
6992// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
6993type SecurityRuleListResultIterator struct {
6994	i    int
6995	page SecurityRuleListResultPage
6996}
6997
6998// Next advances to the next value.  If there was an error making
6999// the request the iterator does not advance and the error is returned.
7000func (iter *SecurityRuleListResultIterator) Next() error {
7001	iter.i++
7002	if iter.i < len(iter.page.Values()) {
7003		return nil
7004	}
7005	err := iter.page.Next()
7006	if err != nil {
7007		iter.i--
7008		return err
7009	}
7010	iter.i = 0
7011	return nil
7012}
7013
7014// NotDone returns true if the enumeration should be started or is not yet complete.
7015func (iter SecurityRuleListResultIterator) NotDone() bool {
7016	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7017}
7018
7019// Response returns the raw server response from the last page request.
7020func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
7021	return iter.page.Response()
7022}
7023
7024// Value returns the current value or a zero-initialized value if the
7025// iterator has advanced beyond the end of the collection.
7026func (iter SecurityRuleListResultIterator) Value() SecurityRule {
7027	if !iter.page.NotDone() {
7028		return SecurityRule{}
7029	}
7030	return iter.page.Values()[iter.i]
7031}
7032
7033// IsEmpty returns true if the ListResult contains no values.
7034func (srlr SecurityRuleListResult) IsEmpty() bool {
7035	return srlr.Value == nil || len(*srlr.Value) == 0
7036}
7037
7038// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
7039// It returns nil if no more results exist.
7040func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) {
7041	if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 {
7042		return nil, nil
7043	}
7044	return autorest.Prepare(&http.Request{},
7045		autorest.AsJSON(),
7046		autorest.AsGet(),
7047		autorest.WithBaseURL(to.String(srlr.NextLink)))
7048}
7049
7050// SecurityRuleListResultPage contains a page of SecurityRule values.
7051type SecurityRuleListResultPage struct {
7052	fn   func(SecurityRuleListResult) (SecurityRuleListResult, error)
7053	srlr SecurityRuleListResult
7054}
7055
7056// Next advances to the next page of values.  If there was an error making
7057// the request the page does not advance and the error is returned.
7058func (page *SecurityRuleListResultPage) Next() error {
7059	next, err := page.fn(page.srlr)
7060	if err != nil {
7061		return err
7062	}
7063	page.srlr = next
7064	return nil
7065}
7066
7067// NotDone returns true if the page enumeration should be started or is not yet complete.
7068func (page SecurityRuleListResultPage) NotDone() bool {
7069	return !page.srlr.IsEmpty()
7070}
7071
7072// Response returns the raw server response from the last page request.
7073func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
7074	return page.srlr
7075}
7076
7077// Values returns the slice of values for the current page or nil if there are no values.
7078func (page SecurityRuleListResultPage) Values() []SecurityRule {
7079	if page.srlr.IsEmpty() {
7080		return nil
7081	}
7082	return *page.srlr.Value
7083}
7084
7085// SecurityRulePropertiesFormat ...
7086type SecurityRulePropertiesFormat struct {
7087	// Description - A description for this rule. Restricted to 140 chars.
7088	Description *string `json:"description,omitempty"`
7089	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'TCP', 'UDP', 'Asterisk'
7090	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
7091	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
7092	SourcePortRange *string `json:"sourcePortRange,omitempty"`
7093	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be used to match all ports.
7094	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
7095	// SourceAddressPrefix - The CIDR or source IP range. Asterix '*' 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.
7096	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
7097	// DestinationAddressPrefix - The destination address prefix. CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
7098	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
7099	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'
7100	Access SecurityRuleAccess `json:"access,omitempty"`
7101	// 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.
7102	Priority *int32 `json:"priority,omitempty"`
7103	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
7104	Direction SecurityRuleDirection `json:"direction,omitempty"`
7105	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7106	ProvisioningState *string `json:"provisioningState,omitempty"`
7107}
7108
7109// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7110// operation.
7111type SecurityRulesCreateOrUpdateFuture struct {
7112	azure.Future
7113	req *http.Request
7114}
7115
7116// Result returns the result of the asynchronous operation.
7117// If the operation has not completed it will return an error.
7118func (future SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClient) (sr SecurityRule, err error) {
7119	var done bool
7120	done, err = future.Done(client)
7121	if err != nil {
7122		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7123		return
7124	}
7125	if !done {
7126		return sr, azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
7127	}
7128	if future.PollingMethod() == azure.PollingLocation {
7129		sr, err = client.CreateOrUpdateResponder(future.Response())
7130		if err != nil {
7131			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
7132		}
7133		return
7134	}
7135	var req *http.Request
7136	var resp *http.Response
7137	if future.PollingURL() != "" {
7138		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
7139		if err != nil {
7140			return
7141		}
7142	} else {
7143		req = autorest.ChangeToGet(future.req)
7144	}
7145	resp, err = autorest.SendWithSender(client, req,
7146		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7147	if err != nil {
7148		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure sending request")
7149		return
7150	}
7151	sr, err = client.CreateOrUpdateResponder(resp)
7152	if err != nil {
7153		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
7154	}
7155	return
7156}
7157
7158// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7159type SecurityRulesDeleteFuture struct {
7160	azure.Future
7161	req *http.Request
7162}
7163
7164// Result returns the result of the asynchronous operation.
7165// If the operation has not completed it will return an error.
7166func (future SecurityRulesDeleteFuture) Result(client SecurityRulesClient) (ar autorest.Response, err error) {
7167	var done bool
7168	done, err = future.Done(client)
7169	if err != nil {
7170		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
7171		return
7172	}
7173	if !done {
7174		return ar, azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
7175	}
7176	if future.PollingMethod() == azure.PollingLocation {
7177		ar, err = client.DeleteResponder(future.Response())
7178		if err != nil {
7179			err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Failure responding to request")
7180		}
7181		return
7182	}
7183	var req *http.Request
7184	var resp *http.Response
7185	if future.PollingURL() != "" {
7186		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
7187		if err != nil {
7188			return
7189		}
7190	} else {
7191		req = autorest.ChangeToGet(future.req)
7192	}
7193	resp, err = autorest.SendWithSender(client, req,
7194		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7195	if err != nil {
7196		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure sending request")
7197		return
7198	}
7199	ar, err = client.DeleteResponder(resp)
7200	if err != nil {
7201		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", resp, "Failure responding to request")
7202	}
7203	return
7204}
7205
7206// String ...
7207type String struct {
7208	autorest.Response `json:"-"`
7209	Value             *string `json:"value,omitempty"`
7210}
7211
7212// Subnet subnet in a virtual network resource.
7213type Subnet struct {
7214	autorest.Response       `json:"-"`
7215	*SubnetPropertiesFormat `json:"properties,omitempty"`
7216	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7217	Name *string `json:"name,omitempty"`
7218	// Etag - A unique read-only string that changes whenever the resource is updated.
7219	Etag *string `json:"etag,omitempty"`
7220	// ID - Resource Identifier.
7221	ID *string `json:"id,omitempty"`
7222}
7223
7224// MarshalJSON is the custom marshaler for Subnet.
7225func (s Subnet) MarshalJSON() ([]byte, error) {
7226	objectMap := make(map[string]interface{})
7227	if s.SubnetPropertiesFormat != nil {
7228		objectMap["properties"] = s.SubnetPropertiesFormat
7229	}
7230	if s.Name != nil {
7231		objectMap["name"] = s.Name
7232	}
7233	if s.Etag != nil {
7234		objectMap["etag"] = s.Etag
7235	}
7236	if s.ID != nil {
7237		objectMap["id"] = s.ID
7238	}
7239	return json.Marshal(objectMap)
7240}
7241
7242// UnmarshalJSON is the custom unmarshaler for Subnet struct.
7243func (s *Subnet) UnmarshalJSON(body []byte) error {
7244	var m map[string]*json.RawMessage
7245	err := json.Unmarshal(body, &m)
7246	if err != nil {
7247		return err
7248	}
7249	for k, v := range m {
7250		switch k {
7251		case "properties":
7252			if v != nil {
7253				var subnetPropertiesFormat SubnetPropertiesFormat
7254				err = json.Unmarshal(*v, &subnetPropertiesFormat)
7255				if err != nil {
7256					return err
7257				}
7258				s.SubnetPropertiesFormat = &subnetPropertiesFormat
7259			}
7260		case "name":
7261			if v != nil {
7262				var name string
7263				err = json.Unmarshal(*v, &name)
7264				if err != nil {
7265					return err
7266				}
7267				s.Name = &name
7268			}
7269		case "etag":
7270			if v != nil {
7271				var etag string
7272				err = json.Unmarshal(*v, &etag)
7273				if err != nil {
7274					return err
7275				}
7276				s.Etag = &etag
7277			}
7278		case "id":
7279			if v != nil {
7280				var ID string
7281				err = json.Unmarshal(*v, &ID)
7282				if err != nil {
7283					return err
7284				}
7285				s.ID = &ID
7286			}
7287		}
7288	}
7289
7290	return nil
7291}
7292
7293// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network
7294type SubnetListResult struct {
7295	autorest.Response `json:"-"`
7296	// Value - The subnets in a virtual network.
7297	Value *[]Subnet `json:"value,omitempty"`
7298	// NextLink - The URL to get the next set of results.
7299	NextLink *string `json:"nextLink,omitempty"`
7300}
7301
7302// SubnetListResultIterator provides access to a complete listing of Subnet values.
7303type SubnetListResultIterator struct {
7304	i    int
7305	page SubnetListResultPage
7306}
7307
7308// Next advances to the next value.  If there was an error making
7309// the request the iterator does not advance and the error is returned.
7310func (iter *SubnetListResultIterator) Next() error {
7311	iter.i++
7312	if iter.i < len(iter.page.Values()) {
7313		return nil
7314	}
7315	err := iter.page.Next()
7316	if err != nil {
7317		iter.i--
7318		return err
7319	}
7320	iter.i = 0
7321	return nil
7322}
7323
7324// NotDone returns true if the enumeration should be started or is not yet complete.
7325func (iter SubnetListResultIterator) NotDone() bool {
7326	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7327}
7328
7329// Response returns the raw server response from the last page request.
7330func (iter SubnetListResultIterator) Response() SubnetListResult {
7331	return iter.page.Response()
7332}
7333
7334// Value returns the current value or a zero-initialized value if the
7335// iterator has advanced beyond the end of the collection.
7336func (iter SubnetListResultIterator) Value() Subnet {
7337	if !iter.page.NotDone() {
7338		return Subnet{}
7339	}
7340	return iter.page.Values()[iter.i]
7341}
7342
7343// IsEmpty returns true if the ListResult contains no values.
7344func (slr SubnetListResult) IsEmpty() bool {
7345	return slr.Value == nil || len(*slr.Value) == 0
7346}
7347
7348// subnetListResultPreparer prepares a request to retrieve the next set of results.
7349// It returns nil if no more results exist.
7350func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) {
7351	if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
7352		return nil, nil
7353	}
7354	return autorest.Prepare(&http.Request{},
7355		autorest.AsJSON(),
7356		autorest.AsGet(),
7357		autorest.WithBaseURL(to.String(slr.NextLink)))
7358}
7359
7360// SubnetListResultPage contains a page of Subnet values.
7361type SubnetListResultPage struct {
7362	fn  func(SubnetListResult) (SubnetListResult, error)
7363	slr SubnetListResult
7364}
7365
7366// Next advances to the next page of values.  If there was an error making
7367// the request the page does not advance and the error is returned.
7368func (page *SubnetListResultPage) Next() error {
7369	next, err := page.fn(page.slr)
7370	if err != nil {
7371		return err
7372	}
7373	page.slr = next
7374	return nil
7375}
7376
7377// NotDone returns true if the page enumeration should be started or is not yet complete.
7378func (page SubnetListResultPage) NotDone() bool {
7379	return !page.slr.IsEmpty()
7380}
7381
7382// Response returns the raw server response from the last page request.
7383func (page SubnetListResultPage) Response() SubnetListResult {
7384	return page.slr
7385}
7386
7387// Values returns the slice of values for the current page or nil if there are no values.
7388func (page SubnetListResultPage) Values() []Subnet {
7389	if page.slr.IsEmpty() {
7390		return nil
7391	}
7392	return *page.slr.Value
7393}
7394
7395// SubnetPropertiesFormat ...
7396type SubnetPropertiesFormat struct {
7397	// AddressPrefix - The address prefix for the subnet.
7398	AddressPrefix *string `json:"addressPrefix,omitempty"`
7399	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
7400	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
7401	// RouteTable - The reference of the RouteTable resource.
7402	RouteTable *RouteTable `json:"routeTable,omitempty"`
7403	// IPConfigurations - Gets an array of references to the network interface IP configurations using subnet.
7404	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
7405	// ProvisioningState - The provisioning state of the resource.
7406	ProvisioningState *string `json:"provisioningState,omitempty"`
7407}
7408
7409// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
7410// operation.
7411type SubnetsCreateOrUpdateFuture struct {
7412	azure.Future
7413	req *http.Request
7414}
7415
7416// Result returns the result of the asynchronous operation.
7417// If the operation has not completed it will return an error.
7418func (future SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subnet, err error) {
7419	var done bool
7420	done, err = future.Done(client)
7421	if err != nil {
7422		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7423		return
7424	}
7425	if !done {
7426		return s, azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
7427	}
7428	if future.PollingMethod() == azure.PollingLocation {
7429		s, err = client.CreateOrUpdateResponder(future.Response())
7430		if err != nil {
7431			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
7432		}
7433		return
7434	}
7435	var req *http.Request
7436	var resp *http.Response
7437	if future.PollingURL() != "" {
7438		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
7439		if err != nil {
7440			return
7441		}
7442	} else {
7443		req = autorest.ChangeToGet(future.req)
7444	}
7445	resp, err = autorest.SendWithSender(client, req,
7446		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7447	if err != nil {
7448		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
7449		return
7450	}
7451	s, err = client.CreateOrUpdateResponder(resp)
7452	if err != nil {
7453		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
7454	}
7455	return
7456}
7457
7458// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
7459type SubnetsDeleteFuture struct {
7460	azure.Future
7461	req *http.Request
7462}
7463
7464// Result returns the result of the asynchronous operation.
7465// If the operation has not completed it will return an error.
7466func (future SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Response, err error) {
7467	var done bool
7468	done, err = future.Done(client)
7469	if err != nil {
7470		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
7471		return
7472	}
7473	if !done {
7474		return ar, azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
7475	}
7476	if future.PollingMethod() == azure.PollingLocation {
7477		ar, err = client.DeleteResponder(future.Response())
7478		if err != nil {
7479			err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Failure responding to request")
7480		}
7481		return
7482	}
7483	var req *http.Request
7484	var resp *http.Response
7485	if future.PollingURL() != "" {
7486		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
7487		if err != nil {
7488			return
7489		}
7490	} else {
7491		req = autorest.ChangeToGet(future.req)
7492	}
7493	resp, err = autorest.SendWithSender(client, req,
7494		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7495	if err != nil {
7496		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure sending request")
7497		return
7498	}
7499	ar, err = client.DeleteResponder(resp)
7500	if err != nil {
7501		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", resp, "Failure responding to request")
7502	}
7503	return
7504}
7505
7506// SubResource azure resource manager sub resource properties.
7507type SubResource struct {
7508	// ID - Resource Identifier.
7509	ID *string `json:"id,omitempty"`
7510}
7511
7512// Usage describes network resource usage.
7513type Usage struct {
7514	// Unit - An enum describing the unit of measurement.
7515	Unit *string `json:"unit,omitempty"`
7516	// CurrentValue - The current value of the usage.
7517	CurrentValue *int64 `json:"currentValue,omitempty"`
7518	// Limit - The limit of usage.
7519	Limit *int64 `json:"limit,omitempty"`
7520	// Name - The name of the type of usage.
7521	Name *UsageName `json:"name,omitempty"`
7522}
7523
7524// UsageName the usage names.
7525type UsageName struct {
7526	// Value - A string describing the resource name.
7527	Value *string `json:"value,omitempty"`
7528	// LocalizedValue - A localized string describing the resource name.
7529	LocalizedValue *string `json:"localizedValue,omitempty"`
7530}
7531
7532// UsagesListResult the list usages operation response.
7533type UsagesListResult struct {
7534	autorest.Response `json:"-"`
7535	// Value - The list network resource usages.
7536	Value *[]Usage `json:"value,omitempty"`
7537	// NextLink - URL to get the next set of results.
7538	NextLink *string `json:"nextLink,omitempty"`
7539}
7540
7541// UsagesListResultIterator provides access to a complete listing of Usage values.
7542type UsagesListResultIterator struct {
7543	i    int
7544	page UsagesListResultPage
7545}
7546
7547// Next advances to the next value.  If there was an error making
7548// the request the iterator does not advance and the error is returned.
7549func (iter *UsagesListResultIterator) Next() error {
7550	iter.i++
7551	if iter.i < len(iter.page.Values()) {
7552		return nil
7553	}
7554	err := iter.page.Next()
7555	if err != nil {
7556		iter.i--
7557		return err
7558	}
7559	iter.i = 0
7560	return nil
7561}
7562
7563// NotDone returns true if the enumeration should be started or is not yet complete.
7564func (iter UsagesListResultIterator) NotDone() bool {
7565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7566}
7567
7568// Response returns the raw server response from the last page request.
7569func (iter UsagesListResultIterator) Response() UsagesListResult {
7570	return iter.page.Response()
7571}
7572
7573// Value returns the current value or a zero-initialized value if the
7574// iterator has advanced beyond the end of the collection.
7575func (iter UsagesListResultIterator) Value() Usage {
7576	if !iter.page.NotDone() {
7577		return Usage{}
7578	}
7579	return iter.page.Values()[iter.i]
7580}
7581
7582// IsEmpty returns true if the ListResult contains no values.
7583func (ulr UsagesListResult) IsEmpty() bool {
7584	return ulr.Value == nil || len(*ulr.Value) == 0
7585}
7586
7587// usagesListResultPreparer prepares a request to retrieve the next set of results.
7588// It returns nil if no more results exist.
7589func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) {
7590	if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 {
7591		return nil, nil
7592	}
7593	return autorest.Prepare(&http.Request{},
7594		autorest.AsJSON(),
7595		autorest.AsGet(),
7596		autorest.WithBaseURL(to.String(ulr.NextLink)))
7597}
7598
7599// UsagesListResultPage contains a page of Usage values.
7600type UsagesListResultPage struct {
7601	fn  func(UsagesListResult) (UsagesListResult, error)
7602	ulr UsagesListResult
7603}
7604
7605// Next advances to the next page of values.  If there was an error making
7606// the request the page does not advance and the error is returned.
7607func (page *UsagesListResultPage) Next() error {
7608	next, err := page.fn(page.ulr)
7609	if err != nil {
7610		return err
7611	}
7612	page.ulr = next
7613	return nil
7614}
7615
7616// NotDone returns true if the page enumeration should be started or is not yet complete.
7617func (page UsagesListResultPage) NotDone() bool {
7618	return !page.ulr.IsEmpty()
7619}
7620
7621// Response returns the raw server response from the last page request.
7622func (page UsagesListResultPage) Response() UsagesListResult {
7623	return page.ulr
7624}
7625
7626// Values returns the slice of values for the current page or nil if there are no values.
7627func (page UsagesListResultPage) Values() []Usage {
7628	if page.ulr.IsEmpty() {
7629		return nil
7630	}
7631	return *page.ulr.Value
7632}
7633
7634// VirtualNetwork virtual Network resource.
7635type VirtualNetwork struct {
7636	autorest.Response               `json:"-"`
7637	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
7638	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
7639	Etag *string `json:"etag,omitempty"`
7640	// ID - Resource Identifier.
7641	ID *string `json:"id,omitempty"`
7642	// Name - Resource name.
7643	Name *string `json:"name,omitempty"`
7644	// Type - Resource type.
7645	Type *string `json:"type,omitempty"`
7646	// Location - Resource location.
7647	Location *string `json:"location,omitempty"`
7648	// Tags - Resource tags.
7649	Tags map[string]*string `json:"tags"`
7650}
7651
7652// MarshalJSON is the custom marshaler for VirtualNetwork.
7653func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
7654	objectMap := make(map[string]interface{})
7655	if vn.VirtualNetworkPropertiesFormat != nil {
7656		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
7657	}
7658	if vn.Etag != nil {
7659		objectMap["etag"] = vn.Etag
7660	}
7661	if vn.ID != nil {
7662		objectMap["id"] = vn.ID
7663	}
7664	if vn.Name != nil {
7665		objectMap["name"] = vn.Name
7666	}
7667	if vn.Type != nil {
7668		objectMap["type"] = vn.Type
7669	}
7670	if vn.Location != nil {
7671		objectMap["location"] = vn.Location
7672	}
7673	if vn.Tags != nil {
7674		objectMap["tags"] = vn.Tags
7675	}
7676	return json.Marshal(objectMap)
7677}
7678
7679// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
7680func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
7681	var m map[string]*json.RawMessage
7682	err := json.Unmarshal(body, &m)
7683	if err != nil {
7684		return err
7685	}
7686	for k, v := range m {
7687		switch k {
7688		case "properties":
7689			if v != nil {
7690				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
7691				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
7692				if err != nil {
7693					return err
7694				}
7695				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
7696			}
7697		case "etag":
7698			if v != nil {
7699				var etag string
7700				err = json.Unmarshal(*v, &etag)
7701				if err != nil {
7702					return err
7703				}
7704				vn.Etag = &etag
7705			}
7706		case "id":
7707			if v != nil {
7708				var ID string
7709				err = json.Unmarshal(*v, &ID)
7710				if err != nil {
7711					return err
7712				}
7713				vn.ID = &ID
7714			}
7715		case "name":
7716			if v != nil {
7717				var name string
7718				err = json.Unmarshal(*v, &name)
7719				if err != nil {
7720					return err
7721				}
7722				vn.Name = &name
7723			}
7724		case "type":
7725			if v != nil {
7726				var typeVar string
7727				err = json.Unmarshal(*v, &typeVar)
7728				if err != nil {
7729					return err
7730				}
7731				vn.Type = &typeVar
7732			}
7733		case "location":
7734			if v != nil {
7735				var location string
7736				err = json.Unmarshal(*v, &location)
7737				if err != nil {
7738					return err
7739				}
7740				vn.Location = &location
7741			}
7742		case "tags":
7743			if v != nil {
7744				var tags map[string]*string
7745				err = json.Unmarshal(*v, &tags)
7746				if err != nil {
7747					return err
7748				}
7749				vn.Tags = tags
7750			}
7751		}
7752	}
7753
7754	return nil
7755}
7756
7757// VirtualNetworkGateway a common class for general resource information
7758type VirtualNetworkGateway struct {
7759	autorest.Response                      `json:"-"`
7760	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
7761	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
7762	Etag *string `json:"etag,omitempty"`
7763	// ID - Resource Identifier.
7764	ID *string `json:"id,omitempty"`
7765	// Name - Resource name.
7766	Name *string `json:"name,omitempty"`
7767	// Type - Resource type.
7768	Type *string `json:"type,omitempty"`
7769	// Location - Resource location.
7770	Location *string `json:"location,omitempty"`
7771	// Tags - Resource tags.
7772	Tags map[string]*string `json:"tags"`
7773}
7774
7775// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
7776func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
7777	objectMap := make(map[string]interface{})
7778	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
7779		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
7780	}
7781	if vng.Etag != nil {
7782		objectMap["etag"] = vng.Etag
7783	}
7784	if vng.ID != nil {
7785		objectMap["id"] = vng.ID
7786	}
7787	if vng.Name != nil {
7788		objectMap["name"] = vng.Name
7789	}
7790	if vng.Type != nil {
7791		objectMap["type"] = vng.Type
7792	}
7793	if vng.Location != nil {
7794		objectMap["location"] = vng.Location
7795	}
7796	if vng.Tags != nil {
7797		objectMap["tags"] = vng.Tags
7798	}
7799	return json.Marshal(objectMap)
7800}
7801
7802// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
7803func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
7804	var m map[string]*json.RawMessage
7805	err := json.Unmarshal(body, &m)
7806	if err != nil {
7807		return err
7808	}
7809	for k, v := range m {
7810		switch k {
7811		case "properties":
7812			if v != nil {
7813				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
7814				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
7815				if err != nil {
7816					return err
7817				}
7818				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
7819			}
7820		case "etag":
7821			if v != nil {
7822				var etag string
7823				err = json.Unmarshal(*v, &etag)
7824				if err != nil {
7825					return err
7826				}
7827				vng.Etag = &etag
7828			}
7829		case "id":
7830			if v != nil {
7831				var ID string
7832				err = json.Unmarshal(*v, &ID)
7833				if err != nil {
7834					return err
7835				}
7836				vng.ID = &ID
7837			}
7838		case "name":
7839			if v != nil {
7840				var name string
7841				err = json.Unmarshal(*v, &name)
7842				if err != nil {
7843					return err
7844				}
7845				vng.Name = &name
7846			}
7847		case "type":
7848			if v != nil {
7849				var typeVar string
7850				err = json.Unmarshal(*v, &typeVar)
7851				if err != nil {
7852					return err
7853				}
7854				vng.Type = &typeVar
7855			}
7856		case "location":
7857			if v != nil {
7858				var location string
7859				err = json.Unmarshal(*v, &location)
7860				if err != nil {
7861					return err
7862				}
7863				vng.Location = &location
7864			}
7865		case "tags":
7866			if v != nil {
7867				var tags map[string]*string
7868				err = json.Unmarshal(*v, &tags)
7869				if err != nil {
7870					return err
7871				}
7872				vng.Tags = tags
7873			}
7874		}
7875	}
7876
7877	return nil
7878}
7879
7880// VirtualNetworkGatewayConnection a common class for general resource information
7881type VirtualNetworkGatewayConnection struct {
7882	autorest.Response                                `json:"-"`
7883	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
7884	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
7885	Etag *string `json:"etag,omitempty"`
7886	// ID - Resource Identifier.
7887	ID *string `json:"id,omitempty"`
7888	// Name - Resource name.
7889	Name *string `json:"name,omitempty"`
7890	// Type - Resource type.
7891	Type *string `json:"type,omitempty"`
7892	// Location - Resource location.
7893	Location *string `json:"location,omitempty"`
7894	// Tags - Resource tags.
7895	Tags map[string]*string `json:"tags"`
7896}
7897
7898// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
7899func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
7900	objectMap := make(map[string]interface{})
7901	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
7902		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
7903	}
7904	if vngc.Etag != nil {
7905		objectMap["etag"] = vngc.Etag
7906	}
7907	if vngc.ID != nil {
7908		objectMap["id"] = vngc.ID
7909	}
7910	if vngc.Name != nil {
7911		objectMap["name"] = vngc.Name
7912	}
7913	if vngc.Type != nil {
7914		objectMap["type"] = vngc.Type
7915	}
7916	if vngc.Location != nil {
7917		objectMap["location"] = vngc.Location
7918	}
7919	if vngc.Tags != nil {
7920		objectMap["tags"] = vngc.Tags
7921	}
7922	return json.Marshal(objectMap)
7923}
7924
7925// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
7926func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
7927	var m map[string]*json.RawMessage
7928	err := json.Unmarshal(body, &m)
7929	if err != nil {
7930		return err
7931	}
7932	for k, v := range m {
7933		switch k {
7934		case "properties":
7935			if v != nil {
7936				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
7937				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
7938				if err != nil {
7939					return err
7940				}
7941				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
7942			}
7943		case "etag":
7944			if v != nil {
7945				var etag string
7946				err = json.Unmarshal(*v, &etag)
7947				if err != nil {
7948					return err
7949				}
7950				vngc.Etag = &etag
7951			}
7952		case "id":
7953			if v != nil {
7954				var ID string
7955				err = json.Unmarshal(*v, &ID)
7956				if err != nil {
7957					return err
7958				}
7959				vngc.ID = &ID
7960			}
7961		case "name":
7962			if v != nil {
7963				var name string
7964				err = json.Unmarshal(*v, &name)
7965				if err != nil {
7966					return err
7967				}
7968				vngc.Name = &name
7969			}
7970		case "type":
7971			if v != nil {
7972				var typeVar string
7973				err = json.Unmarshal(*v, &typeVar)
7974				if err != nil {
7975					return err
7976				}
7977				vngc.Type = &typeVar
7978			}
7979		case "location":
7980			if v != nil {
7981				var location string
7982				err = json.Unmarshal(*v, &location)
7983				if err != nil {
7984					return err
7985				}
7986				vngc.Location = &location
7987			}
7988		case "tags":
7989			if v != nil {
7990				var tags map[string]*string
7991				err = json.Unmarshal(*v, &tags)
7992				if err != nil {
7993					return err
7994				}
7995				vngc.Tags = tags
7996			}
7997		}
7998	}
7999
8000	return nil
8001}
8002
8003// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call
8004type VirtualNetworkGatewayConnectionListResult struct {
8005	autorest.Response `json:"-"`
8006	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
8007	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
8008	// NextLink - The URL to get the next set of results.
8009	NextLink *string `json:"nextLink,omitempty"`
8010}
8011
8012// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
8013// VirtualNetworkGatewayConnection values.
8014type VirtualNetworkGatewayConnectionListResultIterator struct {
8015	i    int
8016	page VirtualNetworkGatewayConnectionListResultPage
8017}
8018
8019// Next advances to the next value.  If there was an error making
8020// the request the iterator does not advance and the error is returned.
8021func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
8022	iter.i++
8023	if iter.i < len(iter.page.Values()) {
8024		return nil
8025	}
8026	err := iter.page.Next()
8027	if err != nil {
8028		iter.i--
8029		return err
8030	}
8031	iter.i = 0
8032	return nil
8033}
8034
8035// NotDone returns true if the enumeration should be started or is not yet complete.
8036func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
8037	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8038}
8039
8040// Response returns the raw server response from the last page request.
8041func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
8042	return iter.page.Response()
8043}
8044
8045// Value returns the current value or a zero-initialized value if the
8046// iterator has advanced beyond the end of the collection.
8047func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
8048	if !iter.page.NotDone() {
8049		return VirtualNetworkGatewayConnection{}
8050	}
8051	return iter.page.Values()[iter.i]
8052}
8053
8054// IsEmpty returns true if the ListResult contains no values.
8055func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
8056	return vngclr.Value == nil || len(*vngclr.Value) == 0
8057}
8058
8059// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
8060// It returns nil if no more results exist.
8061func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) {
8062	if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 {
8063		return nil, nil
8064	}
8065	return autorest.Prepare(&http.Request{},
8066		autorest.AsJSON(),
8067		autorest.AsGet(),
8068		autorest.WithBaseURL(to.String(vngclr.NextLink)))
8069}
8070
8071// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
8072type VirtualNetworkGatewayConnectionListResultPage struct {
8073	fn     func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
8074	vngclr VirtualNetworkGatewayConnectionListResult
8075}
8076
8077// Next advances to the next page of values.  If there was an error making
8078// the request the page does not advance and the error is returned.
8079func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
8080	next, err := page.fn(page.vngclr)
8081	if err != nil {
8082		return err
8083	}
8084	page.vngclr = next
8085	return nil
8086}
8087
8088// NotDone returns true if the page enumeration should be started or is not yet complete.
8089func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
8090	return !page.vngclr.IsEmpty()
8091}
8092
8093// Response returns the raw server response from the last page request.
8094func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
8095	return page.vngclr
8096}
8097
8098// Values returns the slice of values for the current page or nil if there are no values.
8099func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
8100	if page.vngclr.IsEmpty() {
8101		return nil
8102	}
8103	return *page.vngclr.Value
8104}
8105
8106// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
8107type VirtualNetworkGatewayConnectionPropertiesFormat struct {
8108	// AuthorizationKey - The authorizationKey.
8109	AuthorizationKey       *string                `json:"authorizationKey,omitempty"`
8110	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
8111	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
8112	LocalNetworkGateway2   *LocalNetworkGateway   `json:"localNetworkGateway2,omitempty"`
8113	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
8114	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
8115	// RoutingWeight - The routing weight.
8116	RoutingWeight *int32 `json:"routingWeight,omitempty"`
8117	// SharedKey - The IPSec shared key.
8118	SharedKey *string `json:"sharedKey,omitempty"`
8119	// ConnectionStatus - Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'
8120	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
8121	// EgressBytesTransferred - The egress bytes transferred in this connection.
8122	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
8123	// IngressBytesTransferred - The ingress bytes transferred in this connection.
8124	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
8125	// Peer - The reference to peerings resource.
8126	Peer *SubResource `json:"peer,omitempty"`
8127	// EnableBgp - EnableBgp flag
8128	EnableBgp *bool `json:"enableBgp,omitempty"`
8129	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
8130	ResourceGUID *string `json:"resourceGuid,omitempty"`
8131	// ProvisioningState - The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8132	ProvisioningState *string `json:"provisioningState,omitempty"`
8133}
8134
8135// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8136// a long-running operation.
8137type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
8138	azure.Future
8139	req *http.Request
8140}
8141
8142// Result returns the result of the asynchronous operation.
8143// If the operation has not completed it will return an error.
8144func (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
8145	var done bool
8146	done, err = future.Done(client)
8147	if err != nil {
8148		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8149		return
8150	}
8151	if !done {
8152		return vngc, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
8153	}
8154	if future.PollingMethod() == azure.PollingLocation {
8155		vngc, err = client.CreateOrUpdateResponder(future.Response())
8156		if err != nil {
8157			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
8158		}
8159		return
8160	}
8161	var req *http.Request
8162	var resp *http.Response
8163	if future.PollingURL() != "" {
8164		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8165		if err != nil {
8166			return
8167		}
8168	} else {
8169		req = autorest.ChangeToGet(future.req)
8170	}
8171	resp, err = autorest.SendWithSender(client, req,
8172		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8173	if err != nil {
8174		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure sending request")
8175		return
8176	}
8177	vngc, err = client.CreateOrUpdateResponder(resp)
8178	if err != nil {
8179		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
8180	}
8181	return
8182}
8183
8184// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8185// long-running operation.
8186type VirtualNetworkGatewayConnectionsDeleteFuture struct {
8187	azure.Future
8188	req *http.Request
8189}
8190
8191// Result returns the result of the asynchronous operation.
8192// If the operation has not completed it will return an error.
8193func (future VirtualNetworkGatewayConnectionsDeleteFuture) Result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
8194	var done bool
8195	done, err = future.Done(client)
8196	if err != nil {
8197		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
8198		return
8199	}
8200	if !done {
8201		return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
8202	}
8203	if future.PollingMethod() == azure.PollingLocation {
8204		ar, err = client.DeleteResponder(future.Response())
8205		if err != nil {
8206			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Failure responding to request")
8207		}
8208		return
8209	}
8210	var req *http.Request
8211	var resp *http.Response
8212	if future.PollingURL() != "" {
8213		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8214		if err != nil {
8215			return
8216		}
8217	} else {
8218		req = autorest.ChangeToGet(future.req)
8219	}
8220	resp, err = autorest.SendWithSender(client, req,
8221		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8222	if err != nil {
8223		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure sending request")
8224		return
8225	}
8226	ar, err = client.DeleteResponder(resp)
8227	if err != nil {
8228		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", resp, "Failure responding to request")
8229	}
8230	return
8231}
8232
8233// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of
8234// a long-running operation.
8235type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
8236	azure.Future
8237	req *http.Request
8238}
8239
8240// Result returns the result of the asynchronous operation.
8241// If the operation has not completed it will return an error.
8242func (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
8243	var done bool
8244	done, err = future.Done(client)
8245	if err != nil {
8246		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
8247		return
8248	}
8249	if !done {
8250		return crsk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
8251	}
8252	if future.PollingMethod() == azure.PollingLocation {
8253		crsk, err = client.ResetSharedKeyResponder(future.Response())
8254		if err != nil {
8255			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
8256		}
8257		return
8258	}
8259	var req *http.Request
8260	var resp *http.Response
8261	if future.PollingURL() != "" {
8262		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8263		if err != nil {
8264			return
8265		}
8266	} else {
8267		req = autorest.ChangeToGet(future.req)
8268	}
8269	resp, err = autorest.SendWithSender(client, req,
8270		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8271	if err != nil {
8272		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure sending request")
8273		return
8274	}
8275	crsk, err = client.ResetSharedKeyResponder(resp)
8276	if err != nil {
8277		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", resp, "Failure responding to request")
8278	}
8279	return
8280}
8281
8282// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a
8283// long-running operation.
8284type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
8285	azure.Future
8286	req *http.Request
8287}
8288
8289// Result returns the result of the asynchronous operation.
8290// If the operation has not completed it will return an error.
8291func (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
8292	var done bool
8293	done, err = future.Done(client)
8294	if err != nil {
8295		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
8296		return
8297	}
8298	if !done {
8299		return csk, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
8300	}
8301	if future.PollingMethod() == azure.PollingLocation {
8302		csk, err = client.SetSharedKeyResponder(future.Response())
8303		if err != nil {
8304			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Failure responding to request")
8305		}
8306		return
8307	}
8308	var req *http.Request
8309	var resp *http.Response
8310	if future.PollingURL() != "" {
8311		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8312		if err != nil {
8313			return
8314		}
8315	} else {
8316		req = autorest.ChangeToGet(future.req)
8317	}
8318	resp, err = autorest.SendWithSender(client, req,
8319		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8320	if err != nil {
8321		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure sending request")
8322		return
8323	}
8324	csk, err = client.SetSharedKeyResponder(resp)
8325	if err != nil {
8326		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", resp, "Failure responding to request")
8327	}
8328	return
8329}
8330
8331// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
8332type VirtualNetworkGatewayIPConfiguration struct {
8333	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8334	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8335	Name *string `json:"name,omitempty"`
8336	// Etag - A unique read-only string that changes whenever the resource is updated.
8337	Etag *string `json:"etag,omitempty"`
8338	// ID - Resource Identifier.
8339	ID *string `json:"id,omitempty"`
8340}
8341
8342// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
8343func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
8344	objectMap := make(map[string]interface{})
8345	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
8346		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
8347	}
8348	if vngic.Name != nil {
8349		objectMap["name"] = vngic.Name
8350	}
8351	if vngic.Etag != nil {
8352		objectMap["etag"] = vngic.Etag
8353	}
8354	if vngic.ID != nil {
8355		objectMap["id"] = vngic.ID
8356	}
8357	return json.Marshal(objectMap)
8358}
8359
8360// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
8361func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
8362	var m map[string]*json.RawMessage
8363	err := json.Unmarshal(body, &m)
8364	if err != nil {
8365		return err
8366	}
8367	for k, v := range m {
8368		switch k {
8369		case "properties":
8370			if v != nil {
8371				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
8372				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
8373				if err != nil {
8374					return err
8375				}
8376				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
8377			}
8378		case "name":
8379			if v != nil {
8380				var name string
8381				err = json.Unmarshal(*v, &name)
8382				if err != nil {
8383					return err
8384				}
8385				vngic.Name = &name
8386			}
8387		case "etag":
8388			if v != nil {
8389				var etag string
8390				err = json.Unmarshal(*v, &etag)
8391				if err != nil {
8392					return err
8393				}
8394				vngic.Etag = &etag
8395			}
8396		case "id":
8397			if v != nil {
8398				var ID string
8399				err = json.Unmarshal(*v, &ID)
8400				if err != nil {
8401					return err
8402				}
8403				vngic.ID = &ID
8404			}
8405		}
8406	}
8407
8408	return nil
8409}
8410
8411// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
8412type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
8413	// PrivateIPAddress - Gets or sets the privateIPAddress of the IP Configuration
8414	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
8415	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
8416	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8417	// Subnet - The reference of the subnet resource.
8418	Subnet *SubResource `json:"subnet,omitempty"`
8419	// PublicIPAddress - The reference of the public IP resource.
8420	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
8421	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8422	ProvisioningState *string `json:"provisioningState,omitempty"`
8423}
8424
8425// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
8426type VirtualNetworkGatewayListResult struct {
8427	autorest.Response `json:"-"`
8428	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
8429	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
8430	// NextLink - The URL to get the next set of results.
8431	NextLink *string `json:"nextLink,omitempty"`
8432}
8433
8434// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values.
8435type VirtualNetworkGatewayListResultIterator struct {
8436	i    int
8437	page VirtualNetworkGatewayListResultPage
8438}
8439
8440// Next advances to the next value.  If there was an error making
8441// the request the iterator does not advance and the error is returned.
8442func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
8443	iter.i++
8444	if iter.i < len(iter.page.Values()) {
8445		return nil
8446	}
8447	err := iter.page.Next()
8448	if err != nil {
8449		iter.i--
8450		return err
8451	}
8452	iter.i = 0
8453	return nil
8454}
8455
8456// NotDone returns true if the enumeration should be started or is not yet complete.
8457func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
8458	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8459}
8460
8461// Response returns the raw server response from the last page request.
8462func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
8463	return iter.page.Response()
8464}
8465
8466// Value returns the current value or a zero-initialized value if the
8467// iterator has advanced beyond the end of the collection.
8468func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
8469	if !iter.page.NotDone() {
8470		return VirtualNetworkGateway{}
8471	}
8472	return iter.page.Values()[iter.i]
8473}
8474
8475// IsEmpty returns true if the ListResult contains no values.
8476func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
8477	return vnglr.Value == nil || len(*vnglr.Value) == 0
8478}
8479
8480// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
8481// It returns nil if no more results exist.
8482func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) {
8483	if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 {
8484		return nil, nil
8485	}
8486	return autorest.Prepare(&http.Request{},
8487		autorest.AsJSON(),
8488		autorest.AsGet(),
8489		autorest.WithBaseURL(to.String(vnglr.NextLink)))
8490}
8491
8492// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
8493type VirtualNetworkGatewayListResultPage struct {
8494	fn    func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
8495	vnglr VirtualNetworkGatewayListResult
8496}
8497
8498// Next advances to the next page of values.  If there was an error making
8499// the request the page does not advance and the error is returned.
8500func (page *VirtualNetworkGatewayListResultPage) Next() error {
8501	next, err := page.fn(page.vnglr)
8502	if err != nil {
8503		return err
8504	}
8505	page.vnglr = next
8506	return nil
8507}
8508
8509// NotDone returns true if the page enumeration should be started or is not yet complete.
8510func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
8511	return !page.vnglr.IsEmpty()
8512}
8513
8514// Response returns the raw server response from the last page request.
8515func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
8516	return page.vnglr
8517}
8518
8519// Values returns the slice of values for the current page or nil if there are no values.
8520func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
8521	if page.vnglr.IsEmpty() {
8522		return nil
8523	}
8524	return *page.vnglr.Value
8525}
8526
8527// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
8528type VirtualNetworkGatewayPropertiesFormat struct {
8529	// IPConfigurations - IP configurations for virtual network gateway.
8530	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
8531	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
8532	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
8533	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
8534	VpnType VpnType `json:"vpnType,omitempty"`
8535	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
8536	EnableBgp *bool `json:"enableBgp,omitempty"`
8537	// 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.
8538	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
8539	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
8540	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
8541	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
8542	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
8543	// BgpSettings - Virtual network gateway's BGP speaker settings.
8544	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
8545	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
8546	ResourceGUID *string `json:"resourceGuid,omitempty"`
8547	// ProvisioningState - The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8548	ProvisioningState *string `json:"provisioningState,omitempty"`
8549}
8550
8551// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8552// long-running operation.
8553type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
8554	azure.Future
8555	req *http.Request
8556}
8557
8558// Result returns the result of the asynchronous operation.
8559// If the operation has not completed it will return an error.
8560func (future VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
8561	var done bool
8562	done, err = future.Done(client)
8563	if err != nil {
8564		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8565		return
8566	}
8567	if !done {
8568		return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
8569	}
8570	if future.PollingMethod() == azure.PollingLocation {
8571		vng, err = client.CreateOrUpdateResponder(future.Response())
8572		if err != nil {
8573			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
8574		}
8575		return
8576	}
8577	var req *http.Request
8578	var resp *http.Response
8579	if future.PollingURL() != "" {
8580		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8581		if err != nil {
8582			return
8583		}
8584	} else {
8585		req = autorest.ChangeToGet(future.req)
8586	}
8587	resp, err = autorest.SendWithSender(client, req,
8588		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8589	if err != nil {
8590		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure sending request")
8591		return
8592	}
8593	vng, err = client.CreateOrUpdateResponder(resp)
8594	if err != nil {
8595		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
8596	}
8597	return
8598}
8599
8600// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8601// operation.
8602type VirtualNetworkGatewaysDeleteFuture struct {
8603	azure.Future
8604	req *http.Request
8605}
8606
8607// Result returns the result of the asynchronous operation.
8608// If the operation has not completed it will return an error.
8609func (future VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
8610	var done bool
8611	done, err = future.Done(client)
8612	if err != nil {
8613		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
8614		return
8615	}
8616	if !done {
8617		return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
8618	}
8619	if future.PollingMethod() == azure.PollingLocation {
8620		ar, err = client.DeleteResponder(future.Response())
8621		if err != nil {
8622			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Failure responding to request")
8623		}
8624		return
8625	}
8626	var req *http.Request
8627	var resp *http.Response
8628	if future.PollingURL() != "" {
8629		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8630		if err != nil {
8631			return
8632		}
8633	} else {
8634		req = autorest.ChangeToGet(future.req)
8635	}
8636	resp, err = autorest.SendWithSender(client, req,
8637		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8638	if err != nil {
8639		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure sending request")
8640		return
8641	}
8642	ar, err = client.DeleteResponder(resp)
8643	if err != nil {
8644		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", resp, "Failure responding to request")
8645	}
8646	return
8647}
8648
8649// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
8650type VirtualNetworkGatewaySku struct {
8651	// Name - Gateway sku name -Basic/HighPerformance/Standard. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard'
8652	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
8653	// Tier - Gateway sku tier -Basic/HighPerformance/Standard. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard'
8654	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
8655	// Capacity - The capacity
8656	Capacity *int32 `json:"capacity,omitempty"`
8657}
8658
8659// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
8660// operation.
8661type VirtualNetworkGatewaysResetFuture struct {
8662	azure.Future
8663	req *http.Request
8664}
8665
8666// Result returns the result of the asynchronous operation.
8667// If the operation has not completed it will return an error.
8668func (future VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
8669	var done bool
8670	done, err = future.Done(client)
8671	if err != nil {
8672		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
8673		return
8674	}
8675	if !done {
8676		return vng, azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
8677	}
8678	if future.PollingMethod() == azure.PollingLocation {
8679		vng, err = client.ResetResponder(future.Response())
8680		if err != nil {
8681			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Failure responding to request")
8682		}
8683		return
8684	}
8685	var req *http.Request
8686	var resp *http.Response
8687	if future.PollingURL() != "" {
8688		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8689		if err != nil {
8690			return
8691		}
8692	} else {
8693		req = autorest.ChangeToGet(future.req)
8694	}
8695	resp, err = autorest.SendWithSender(client, req,
8696		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8697	if err != nil {
8698		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure sending request")
8699		return
8700	}
8701	vng, err = client.ResetResponder(resp)
8702	if err != nil {
8703		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", resp, "Failure responding to request")
8704	}
8705	return
8706}
8707
8708// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
8709type VirtualNetworkListResult struct {
8710	autorest.Response `json:"-"`
8711	// Value - Gets a list of VirtualNetwork resources in a resource group.
8712	Value *[]VirtualNetwork `json:"value,omitempty"`
8713	// NextLink - The URL to get the next set of results.
8714	NextLink *string `json:"nextLink,omitempty"`
8715}
8716
8717// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
8718type VirtualNetworkListResultIterator struct {
8719	i    int
8720	page VirtualNetworkListResultPage
8721}
8722
8723// Next advances to the next value.  If there was an error making
8724// the request the iterator does not advance and the error is returned.
8725func (iter *VirtualNetworkListResultIterator) Next() error {
8726	iter.i++
8727	if iter.i < len(iter.page.Values()) {
8728		return nil
8729	}
8730	err := iter.page.Next()
8731	if err != nil {
8732		iter.i--
8733		return err
8734	}
8735	iter.i = 0
8736	return nil
8737}
8738
8739// NotDone returns true if the enumeration should be started or is not yet complete.
8740func (iter VirtualNetworkListResultIterator) NotDone() bool {
8741	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8742}
8743
8744// Response returns the raw server response from the last page request.
8745func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
8746	return iter.page.Response()
8747}
8748
8749// Value returns the current value or a zero-initialized value if the
8750// iterator has advanced beyond the end of the collection.
8751func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
8752	if !iter.page.NotDone() {
8753		return VirtualNetwork{}
8754	}
8755	return iter.page.Values()[iter.i]
8756}
8757
8758// IsEmpty returns true if the ListResult contains no values.
8759func (vnlr VirtualNetworkListResult) IsEmpty() bool {
8760	return vnlr.Value == nil || len(*vnlr.Value) == 0
8761}
8762
8763// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
8764// It returns nil if no more results exist.
8765func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) {
8766	if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 {
8767		return nil, nil
8768	}
8769	return autorest.Prepare(&http.Request{},
8770		autorest.AsJSON(),
8771		autorest.AsGet(),
8772		autorest.WithBaseURL(to.String(vnlr.NextLink)))
8773}
8774
8775// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
8776type VirtualNetworkListResultPage struct {
8777	fn   func(VirtualNetworkListResult) (VirtualNetworkListResult, error)
8778	vnlr VirtualNetworkListResult
8779}
8780
8781// Next advances to the next page of values.  If there was an error making
8782// the request the page does not advance and the error is returned.
8783func (page *VirtualNetworkListResultPage) Next() error {
8784	next, err := page.fn(page.vnlr)
8785	if err != nil {
8786		return err
8787	}
8788	page.vnlr = next
8789	return nil
8790}
8791
8792// NotDone returns true if the page enumeration should be started or is not yet complete.
8793func (page VirtualNetworkListResultPage) NotDone() bool {
8794	return !page.vnlr.IsEmpty()
8795}
8796
8797// Response returns the raw server response from the last page request.
8798func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
8799	return page.vnlr
8800}
8801
8802// Values returns the slice of values for the current page or nil if there are no values.
8803func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
8804	if page.vnlr.IsEmpty() {
8805		return nil
8806	}
8807	return *page.vnlr.Value
8808}
8809
8810// VirtualNetworkPropertiesFormat ...
8811type VirtualNetworkPropertiesFormat struct {
8812	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
8813	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
8814	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
8815	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
8816	// Subnets - A list of subnets in a Virtual Network.
8817	Subnets *[]Subnet `json:"subnets,omitempty"`
8818	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
8819	ResourceGUID *string `json:"resourceGuid,omitempty"`
8820	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8821	ProvisioningState *string `json:"provisioningState,omitempty"`
8822}
8823
8824// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
8825// operation.
8826type VirtualNetworksCreateOrUpdateFuture struct {
8827	azure.Future
8828	req *http.Request
8829}
8830
8831// Result returns the result of the asynchronous operation.
8832// If the operation has not completed it will return an error.
8833func (future VirtualNetworksCreateOrUpdateFuture) Result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
8834	var done bool
8835	done, err = future.Done(client)
8836	if err != nil {
8837		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8838		return
8839	}
8840	if !done {
8841		return vn, azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
8842	}
8843	if future.PollingMethod() == azure.PollingLocation {
8844		vn, err = client.CreateOrUpdateResponder(future.Response())
8845		if err != nil {
8846			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Failure responding to request")
8847		}
8848		return
8849	}
8850	var req *http.Request
8851	var resp *http.Response
8852	if future.PollingURL() != "" {
8853		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8854		if err != nil {
8855			return
8856		}
8857	} else {
8858		req = autorest.ChangeToGet(future.req)
8859	}
8860	resp, err = autorest.SendWithSender(client, req,
8861		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8862	if err != nil {
8863		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure sending request")
8864		return
8865	}
8866	vn, err = client.CreateOrUpdateResponder(resp)
8867	if err != nil {
8868		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", resp, "Failure responding to request")
8869	}
8870	return
8871}
8872
8873// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8874// operation.
8875type VirtualNetworksDeleteFuture struct {
8876	azure.Future
8877	req *http.Request
8878}
8879
8880// Result returns the result of the asynchronous operation.
8881// If the operation has not completed it will return an error.
8882func (future VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient) (ar autorest.Response, err error) {
8883	var done bool
8884	done, err = future.Done(client)
8885	if err != nil {
8886		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
8887		return
8888	}
8889	if !done {
8890		return ar, azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
8891	}
8892	if future.PollingMethod() == azure.PollingLocation {
8893		ar, err = client.DeleteResponder(future.Response())
8894		if err != nil {
8895			err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Failure responding to request")
8896		}
8897		return
8898	}
8899	var req *http.Request
8900	var resp *http.Response
8901	if future.PollingURL() != "" {
8902		req, err = http.NewRequest(http.MethodGet, future.PollingURL(), nil)
8903		if err != nil {
8904			return
8905		}
8906	} else {
8907		req = autorest.ChangeToGet(future.req)
8908	}
8909	resp, err = autorest.SendWithSender(client, req,
8910		autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8911	if err != nil {
8912		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure sending request")
8913		return
8914	}
8915	ar, err = client.DeleteResponder(resp)
8916	if err != nil {
8917		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", resp, "Failure responding to request")
8918	}
8919	return
8920}
8921
8922// VpnClientConfiguration vpnClientConfiguration for P2S client
8923type VpnClientConfiguration struct {
8924	// VpnClientAddressPool - Gets or sets the reference of the Address space resource which represents Address space for P2S VpnClient.
8925	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
8926	// VpnClientRootCertificates - VpnClientRootCertificate for Virtual network gateway.
8927	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
8928	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
8929	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
8930}
8931
8932// VpnClientParameters vpnClientParameters
8933type VpnClientParameters struct {
8934	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
8935	ProcessorArchitecture ProcessorArchitecture `json:"ProcessorArchitecture,omitempty"`
8936}
8937
8938// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
8939type VpnClientRevokedCertificate struct {
8940	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
8941	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8942	Name *string `json:"name,omitempty"`
8943	// Etag - A unique read-only string that changes whenever the resource is updated.
8944	Etag *string `json:"etag,omitempty"`
8945	// ID - Resource Identifier.
8946	ID *string `json:"id,omitempty"`
8947}
8948
8949// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
8950func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
8951	objectMap := make(map[string]interface{})
8952	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
8953		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
8954	}
8955	if vcrc.Name != nil {
8956		objectMap["name"] = vcrc.Name
8957	}
8958	if vcrc.Etag != nil {
8959		objectMap["etag"] = vcrc.Etag
8960	}
8961	if vcrc.ID != nil {
8962		objectMap["id"] = vcrc.ID
8963	}
8964	return json.Marshal(objectMap)
8965}
8966
8967// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
8968func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
8969	var m map[string]*json.RawMessage
8970	err := json.Unmarshal(body, &m)
8971	if err != nil {
8972		return err
8973	}
8974	for k, v := range m {
8975		switch k {
8976		case "properties":
8977			if v != nil {
8978				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
8979				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
8980				if err != nil {
8981					return err
8982				}
8983				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
8984			}
8985		case "name":
8986			if v != nil {
8987				var name string
8988				err = json.Unmarshal(*v, &name)
8989				if err != nil {
8990					return err
8991				}
8992				vcrc.Name = &name
8993			}
8994		case "etag":
8995			if v != nil {
8996				var etag string
8997				err = json.Unmarshal(*v, &etag)
8998				if err != nil {
8999					return err
9000				}
9001				vcrc.Etag = &etag
9002			}
9003		case "id":
9004			if v != nil {
9005				var ID string
9006				err = json.Unmarshal(*v, &ID)
9007				if err != nil {
9008					return err
9009				}
9010				vcrc.ID = &ID
9011			}
9012		}
9013	}
9014
9015	return nil
9016}
9017
9018// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network
9019// gateway.
9020type VpnClientRevokedCertificatePropertiesFormat struct {
9021	// Thumbprint - The revoked VPN client certificate thumbprint.
9022	Thumbprint *string `json:"thumbprint,omitempty"`
9023	// ProvisioningState - The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9024	ProvisioningState *string `json:"provisioningState,omitempty"`
9025}
9026
9027// VpnClientRootCertificate VPN client root certificate of virtual network gateway
9028type VpnClientRootCertificate struct {
9029	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
9030	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9031	Name *string `json:"name,omitempty"`
9032	// Etag - A unique read-only string that changes whenever the resource is updated.
9033	Etag *string `json:"etag,omitempty"`
9034	// ID - Resource Identifier.
9035	ID *string `json:"id,omitempty"`
9036}
9037
9038// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
9039func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
9040	objectMap := make(map[string]interface{})
9041	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
9042		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
9043	}
9044	if vcrc.Name != nil {
9045		objectMap["name"] = vcrc.Name
9046	}
9047	if vcrc.Etag != nil {
9048		objectMap["etag"] = vcrc.Etag
9049	}
9050	if vcrc.ID != nil {
9051		objectMap["id"] = vcrc.ID
9052	}
9053	return json.Marshal(objectMap)
9054}
9055
9056// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
9057func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
9058	var m map[string]*json.RawMessage
9059	err := json.Unmarshal(body, &m)
9060	if err != nil {
9061		return err
9062	}
9063	for k, v := range m {
9064		switch k {
9065		case "properties":
9066			if v != nil {
9067				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
9068				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
9069				if err != nil {
9070					return err
9071				}
9072				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
9073			}
9074		case "name":
9075			if v != nil {
9076				var name string
9077				err = json.Unmarshal(*v, &name)
9078				if err != nil {
9079					return err
9080				}
9081				vcrc.Name = &name
9082			}
9083		case "etag":
9084			if v != nil {
9085				var etag string
9086				err = json.Unmarshal(*v, &etag)
9087				if err != nil {
9088					return err
9089				}
9090				vcrc.Etag = &etag
9091			}
9092		case "id":
9093			if v != nil {
9094				var ID string
9095				err = json.Unmarshal(*v, &ID)
9096				if err != nil {
9097					return err
9098				}
9099				vcrc.ID = &ID
9100			}
9101		}
9102	}
9103
9104	return nil
9105}
9106
9107// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
9108type VpnClientRootCertificatePropertiesFormat struct {
9109	// PublicCertData - Gets or sets the certificate public data
9110	PublicCertData *string `json:"publicCertData,omitempty"`
9111	// ProvisioningState - The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9112	ProvisioningState *string `json:"provisioningState,omitempty"`
9113}
9114