1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-06-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response                   `json:"-"`
33	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
34	// Etag - A unique read-only string that changes whenever the resource is updated.
35	Etag *string `json:"etag,omitempty"`
36	// Zones - A list of availability zones denoting where the resource needs to come from.
37	Zones *[]string `json:"zones,omitempty"`
38	// ID - Resource ID.
39	ID *string `json:"id,omitempty"`
40	// Name - READ-ONLY; Resource name.
41	Name *string `json:"name,omitempty"`
42	// Type - READ-ONLY; Resource type.
43	Type *string `json:"type,omitempty"`
44	// Location - Resource location.
45	Location *string `json:"location,omitempty"`
46	// Tags - Resource tags.
47	Tags map[string]*string `json:"tags"`
48}
49
50// MarshalJSON is the custom marshaler for ApplicationGateway.
51func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
52	objectMap := make(map[string]interface{})
53	if ag.ApplicationGatewayPropertiesFormat != nil {
54		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
55	}
56	if ag.Etag != nil {
57		objectMap["etag"] = ag.Etag
58	}
59	if ag.Zones != nil {
60		objectMap["zones"] = ag.Zones
61	}
62	if ag.ID != nil {
63		objectMap["id"] = ag.ID
64	}
65	if ag.Location != nil {
66		objectMap["location"] = ag.Location
67	}
68	if ag.Tags != nil {
69		objectMap["tags"] = ag.Tags
70	}
71	return json.Marshal(objectMap)
72}
73
74// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
75func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
76	var m map[string]*json.RawMessage
77	err := json.Unmarshal(body, &m)
78	if err != nil {
79		return err
80	}
81	for k, v := range m {
82		switch k {
83		case "properties":
84			if v != nil {
85				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
86				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
87				if err != nil {
88					return err
89				}
90				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
91			}
92		case "etag":
93			if v != nil {
94				var etag string
95				err = json.Unmarshal(*v, &etag)
96				if err != nil {
97					return err
98				}
99				ag.Etag = &etag
100			}
101		case "zones":
102			if v != nil {
103				var zones []string
104				err = json.Unmarshal(*v, &zones)
105				if err != nil {
106					return err
107				}
108				ag.Zones = &zones
109			}
110		case "id":
111			if v != nil {
112				var ID string
113				err = json.Unmarshal(*v, &ID)
114				if err != nil {
115					return err
116				}
117				ag.ID = &ID
118			}
119		case "name":
120			if v != nil {
121				var name string
122				err = json.Unmarshal(*v, &name)
123				if err != nil {
124					return err
125				}
126				ag.Name = &name
127			}
128		case "type":
129			if v != nil {
130				var typeVar string
131				err = json.Unmarshal(*v, &typeVar)
132				if err != nil {
133					return err
134				}
135				ag.Type = &typeVar
136			}
137		case "location":
138			if v != nil {
139				var location string
140				err = json.Unmarshal(*v, &location)
141				if err != nil {
142					return err
143				}
144				ag.Location = &location
145			}
146		case "tags":
147			if v != nil {
148				var tags map[string]*string
149				err = json.Unmarshal(*v, &tags)
150				if err != nil {
151					return err
152				}
153				ag.Tags = tags
154			}
155		}
156	}
157
158	return nil
159}
160
161// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
162type ApplicationGatewayAuthenticationCertificate struct {
163	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
164	// Name - Name of the authentication certificate that is unique within an Application Gateway.
165	Name *string `json:"name,omitempty"`
166	// Etag - A unique read-only string that changes whenever the resource is updated.
167	Etag *string `json:"etag,omitempty"`
168	// Type - Type of the resource.
169	Type *string `json:"type,omitempty"`
170	// ID - Resource ID.
171	ID *string `json:"id,omitempty"`
172}
173
174// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
175func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
176	objectMap := make(map[string]interface{})
177	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
178		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
179	}
180	if agac.Name != nil {
181		objectMap["name"] = agac.Name
182	}
183	if agac.Etag != nil {
184		objectMap["etag"] = agac.Etag
185	}
186	if agac.Type != nil {
187		objectMap["type"] = agac.Type
188	}
189	if agac.ID != nil {
190		objectMap["id"] = agac.ID
191	}
192	return json.Marshal(objectMap)
193}
194
195// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
196func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
197	var m map[string]*json.RawMessage
198	err := json.Unmarshal(body, &m)
199	if err != nil {
200		return err
201	}
202	for k, v := range m {
203		switch k {
204		case "properties":
205			if v != nil {
206				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
207				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
208				if err != nil {
209					return err
210				}
211				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
212			}
213		case "name":
214			if v != nil {
215				var name string
216				err = json.Unmarshal(*v, &name)
217				if err != nil {
218					return err
219				}
220				agac.Name = &name
221			}
222		case "etag":
223			if v != nil {
224				var etag string
225				err = json.Unmarshal(*v, &etag)
226				if err != nil {
227					return err
228				}
229				agac.Etag = &etag
230			}
231		case "type":
232			if v != nil {
233				var typeVar string
234				err = json.Unmarshal(*v, &typeVar)
235				if err != nil {
236					return err
237				}
238				agac.Type = &typeVar
239			}
240		case "id":
241			if v != nil {
242				var ID string
243				err = json.Unmarshal(*v, &ID)
244				if err != nil {
245					return err
246				}
247				agac.ID = &ID
248			}
249		}
250	}
251
252	return nil
253}
254
255// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
256// application gateway.
257type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
258	// Data - Certificate public data.
259	Data *string `json:"data,omitempty"`
260	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
261	ProvisioningState *string `json:"provisioningState,omitempty"`
262}
263
264// ApplicationGatewayAutoscaleBounds application Gateway autoscale bounds on number of Application Gateway
265// instance.
266type ApplicationGatewayAutoscaleBounds struct {
267	// Min - Lower bound on number of Application Gateway instances.
268	Min *int32 `json:"min,omitempty"`
269	// Max - Upper bound on number of Application Gateway instances.
270	Max *int32 `json:"max,omitempty"`
271}
272
273// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
274type ApplicationGatewayAutoscaleConfiguration struct {
275	// Bounds - Autoscale bounds
276	Bounds *ApplicationGatewayAutoscaleBounds `json:"bounds,omitempty"`
277}
278
279// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
280// call.
281type ApplicationGatewayAvailableSslOptions struct {
282	autorest.Response                                      `json:"-"`
283	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
284	// ID - Resource ID.
285	ID *string `json:"id,omitempty"`
286	// Name - READ-ONLY; Resource name.
287	Name *string `json:"name,omitempty"`
288	// Type - READ-ONLY; Resource type.
289	Type *string `json:"type,omitempty"`
290	// Location - Resource location.
291	Location *string `json:"location,omitempty"`
292	// Tags - Resource tags.
293	Tags map[string]*string `json:"tags"`
294}
295
296// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
297func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
298	objectMap := make(map[string]interface{})
299	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
300		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
301	}
302	if agaso.ID != nil {
303		objectMap["id"] = agaso.ID
304	}
305	if agaso.Location != nil {
306		objectMap["location"] = agaso.Location
307	}
308	if agaso.Tags != nil {
309		objectMap["tags"] = agaso.Tags
310	}
311	return json.Marshal(objectMap)
312}
313
314// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
315func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
316	var m map[string]*json.RawMessage
317	err := json.Unmarshal(body, &m)
318	if err != nil {
319		return err
320	}
321	for k, v := range m {
322		switch k {
323		case "properties":
324			if v != nil {
325				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
326				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
327				if err != nil {
328					return err
329				}
330				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
331			}
332		case "id":
333			if v != nil {
334				var ID string
335				err = json.Unmarshal(*v, &ID)
336				if err != nil {
337					return err
338				}
339				agaso.ID = &ID
340			}
341		case "name":
342			if v != nil {
343				var name string
344				err = json.Unmarshal(*v, &name)
345				if err != nil {
346					return err
347				}
348				agaso.Name = &name
349			}
350		case "type":
351			if v != nil {
352				var typeVar string
353				err = json.Unmarshal(*v, &typeVar)
354				if err != nil {
355					return err
356				}
357				agaso.Type = &typeVar
358			}
359		case "location":
360			if v != nil {
361				var location string
362				err = json.Unmarshal(*v, &location)
363				if err != nil {
364					return err
365				}
366				agaso.Location = &location
367			}
368		case "tags":
369			if v != nil {
370				var tags map[string]*string
371				err = json.Unmarshal(*v, &tags)
372				if err != nil {
373					return err
374				}
375				agaso.Tags = tags
376			}
377		}
378	}
379
380	return nil
381}
382
383// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
384// ApplicationGatewayAvailableSslOptions
385type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
386	// PredefinedPolicies - List of available Ssl predefined policy.
387	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
388	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
389	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
390	// AvailableCipherSuites - List of available Ssl cipher suites.
391	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
392	// AvailableProtocols - List of available Ssl protocols.
393	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
394}
395
396// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
397// service call.
398type ApplicationGatewayAvailableSslPredefinedPolicies struct {
399	autorest.Response `json:"-"`
400	// Value - List of available Ssl predefined policy.
401	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
402	// NextLink - URL to get the next set of results.
403	NextLink *string `json:"nextLink,omitempty"`
404}
405
406// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
407// ApplicationGatewaySslPredefinedPolicy values.
408type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
409	i    int
410	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
411}
412
413// NextWithContext advances to the next value.  If there was an error making
414// the request the iterator does not advance and the error is returned.
415func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
416	if tracing.IsEnabled() {
417		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
418		defer func() {
419			sc := -1
420			if iter.Response().Response.Response != nil {
421				sc = iter.Response().Response.Response.StatusCode
422			}
423			tracing.EndSpan(ctx, sc, err)
424		}()
425	}
426	iter.i++
427	if iter.i < len(iter.page.Values()) {
428		return nil
429	}
430	err = iter.page.NextWithContext(ctx)
431	if err != nil {
432		iter.i--
433		return err
434	}
435	iter.i = 0
436	return nil
437}
438
439// Next advances to the next value.  If there was an error making
440// the request the iterator does not advance and the error is returned.
441// Deprecated: Use NextWithContext() instead.
442func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
443	return iter.NextWithContext(context.Background())
444}
445
446// NotDone returns true if the enumeration should be started or is not yet complete.
447func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
449}
450
451// Response returns the raw server response from the last page request.
452func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
453	return iter.page.Response()
454}
455
456// Value returns the current value or a zero-initialized value if the
457// iterator has advanced beyond the end of the collection.
458func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
459	if !iter.page.NotDone() {
460		return ApplicationGatewaySslPredefinedPolicy{}
461	}
462	return iter.page.Values()[iter.i]
463}
464
465// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
466func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
467	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
468}
469
470// IsEmpty returns true if the ListResult contains no values.
471func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
472	return agaspp.Value == nil || len(*agaspp.Value) == 0
473}
474
475// hasNextLink returns true if the NextLink is not empty.
476func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
477	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
478}
479
480// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
481// It returns nil if no more results exist.
482func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
483	if !agaspp.hasNextLink() {
484		return nil, nil
485	}
486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
487		autorest.AsJSON(),
488		autorest.AsGet(),
489		autorest.WithBaseURL(to.String(agaspp.NextLink)))
490}
491
492// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
493// ApplicationGatewaySslPredefinedPolicy values.
494type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
495	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
496	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
497}
498
499// NextWithContext advances to the next page of values.  If there was an error making
500// the request the page does not advance and the error is returned.
501func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
502	if tracing.IsEnabled() {
503		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
504		defer func() {
505			sc := -1
506			if page.Response().Response.Response != nil {
507				sc = page.Response().Response.Response.StatusCode
508			}
509			tracing.EndSpan(ctx, sc, err)
510		}()
511	}
512	for {
513		next, err := page.fn(ctx, page.agaspp)
514		if err != nil {
515			return err
516		}
517		page.agaspp = next
518		if !next.hasNextLink() || !next.IsEmpty() {
519			break
520		}
521	}
522	return nil
523}
524
525// Next advances to the next page of values.  If there was an error making
526// the request the page does not advance and the error is returned.
527// Deprecated: Use NextWithContext() instead.
528func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
529	return page.NextWithContext(context.Background())
530}
531
532// NotDone returns true if the page enumeration should be started or is not yet complete.
533func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
534	return !page.agaspp.IsEmpty()
535}
536
537// Response returns the raw server response from the last page request.
538func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
539	return page.agaspp
540}
541
542// Values returns the slice of values for the current page or nil if there are no values.
543func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
544	if page.agaspp.IsEmpty() {
545		return nil
546	}
547	return *page.agaspp.Value
548}
549
550// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
551func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
552	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
553		fn:     getNextPage,
554		agaspp: cur,
555	}
556}
557
558// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
559// service call.
560type ApplicationGatewayAvailableWafRuleSetsResult struct {
561	autorest.Response `json:"-"`
562	// Value - The list of application gateway rule sets.
563	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
564}
565
566// ApplicationGatewayBackendAddress backend address of an application gateway.
567type ApplicationGatewayBackendAddress struct {
568	// Fqdn - Fully qualified domain name (FQDN).
569	Fqdn *string `json:"fqdn,omitempty"`
570	// IPAddress - IP address
571	IPAddress *string `json:"ipAddress,omitempty"`
572}
573
574// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
575type ApplicationGatewayBackendAddressPool struct {
576	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
577	// Name - Name of the backend address pool that is unique within an Application Gateway.
578	Name *string `json:"name,omitempty"`
579	// Etag - A unique read-only string that changes whenever the resource is updated.
580	Etag *string `json:"etag,omitempty"`
581	// Type - Type of the resource.
582	Type *string `json:"type,omitempty"`
583	// ID - Resource ID.
584	ID *string `json:"id,omitempty"`
585}
586
587// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
588func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
589	objectMap := make(map[string]interface{})
590	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
591		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
592	}
593	if agbap.Name != nil {
594		objectMap["name"] = agbap.Name
595	}
596	if agbap.Etag != nil {
597		objectMap["etag"] = agbap.Etag
598	}
599	if agbap.Type != nil {
600		objectMap["type"] = agbap.Type
601	}
602	if agbap.ID != nil {
603		objectMap["id"] = agbap.ID
604	}
605	return json.Marshal(objectMap)
606}
607
608// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
609func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
610	var m map[string]*json.RawMessage
611	err := json.Unmarshal(body, &m)
612	if err != nil {
613		return err
614	}
615	for k, v := range m {
616		switch k {
617		case "properties":
618			if v != nil {
619				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
620				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
621				if err != nil {
622					return err
623				}
624				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
625			}
626		case "name":
627			if v != nil {
628				var name string
629				err = json.Unmarshal(*v, &name)
630				if err != nil {
631					return err
632				}
633				agbap.Name = &name
634			}
635		case "etag":
636			if v != nil {
637				var etag string
638				err = json.Unmarshal(*v, &etag)
639				if err != nil {
640					return err
641				}
642				agbap.Etag = &etag
643			}
644		case "type":
645			if v != nil {
646				var typeVar string
647				err = json.Unmarshal(*v, &typeVar)
648				if err != nil {
649					return err
650				}
651				agbap.Type = &typeVar
652			}
653		case "id":
654			if v != nil {
655				var ID string
656				err = json.Unmarshal(*v, &ID)
657				if err != nil {
658					return err
659				}
660				agbap.ID = &ID
661			}
662		}
663	}
664
665	return nil
666}
667
668// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
669// application gateway.
670type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
671	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
672	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
673	// BackendAddresses - Backend addresses
674	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
675	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
676	ProvisioningState *string `json:"provisioningState,omitempty"`
677}
678
679// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
680type ApplicationGatewayBackendHealth struct {
681	autorest.Response   `json:"-"`
682	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
683}
684
685// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
686type ApplicationGatewayBackendHealthHTTPSettings struct {
687	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
688	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
689	// Servers - List of ApplicationGatewayBackendHealthServer resources.
690	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
691}
692
693// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
694type ApplicationGatewayBackendHealthPool struct {
695	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
696	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
697	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
698	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
699}
700
701// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
702type ApplicationGatewayBackendHealthServer struct {
703	// Address - IP address or FQDN of backend server.
704	Address *string `json:"address,omitempty"`
705	// IPConfiguration - Reference of IP configuration of backend server.
706	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
707	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
708	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
709}
710
711// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
712type ApplicationGatewayBackendHTTPSettings struct {
713	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
714	// Name - Name of the backend http settings that is unique within an Application Gateway.
715	Name *string `json:"name,omitempty"`
716	// Etag - A unique read-only string that changes whenever the resource is updated.
717	Etag *string `json:"etag,omitempty"`
718	// Type - Type of the resource.
719	Type *string `json:"type,omitempty"`
720	// ID - Resource ID.
721	ID *string `json:"id,omitempty"`
722}
723
724// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
725func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
726	objectMap := make(map[string]interface{})
727	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
728		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
729	}
730	if agbhs.Name != nil {
731		objectMap["name"] = agbhs.Name
732	}
733	if agbhs.Etag != nil {
734		objectMap["etag"] = agbhs.Etag
735	}
736	if agbhs.Type != nil {
737		objectMap["type"] = agbhs.Type
738	}
739	if agbhs.ID != nil {
740		objectMap["id"] = agbhs.ID
741	}
742	return json.Marshal(objectMap)
743}
744
745// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
746func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
747	var m map[string]*json.RawMessage
748	err := json.Unmarshal(body, &m)
749	if err != nil {
750		return err
751	}
752	for k, v := range m {
753		switch k {
754		case "properties":
755			if v != nil {
756				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
757				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
758				if err != nil {
759					return err
760				}
761				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
762			}
763		case "name":
764			if v != nil {
765				var name string
766				err = json.Unmarshal(*v, &name)
767				if err != nil {
768					return err
769				}
770				agbhs.Name = &name
771			}
772		case "etag":
773			if v != nil {
774				var etag string
775				err = json.Unmarshal(*v, &etag)
776				if err != nil {
777					return err
778				}
779				agbhs.Etag = &etag
780			}
781		case "type":
782			if v != nil {
783				var typeVar string
784				err = json.Unmarshal(*v, &typeVar)
785				if err != nil {
786					return err
787				}
788				agbhs.Type = &typeVar
789			}
790		case "id":
791			if v != nil {
792				var ID string
793				err = json.Unmarshal(*v, &ID)
794				if err != nil {
795					return err
796				}
797				agbhs.ID = &ID
798			}
799		}
800	}
801
802	return nil
803}
804
805// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
806// application gateway.
807type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
808	// Port - The destination port on the backend.
809	Port *int32 `json:"port,omitempty"`
810	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
811	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
812	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
813	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
814	// 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.
815	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
816	// Probe - Probe resource of an application gateway.
817	Probe *SubResource `json:"probe,omitempty"`
818	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
819	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
820	// ConnectionDraining - Connection draining of the backend http settings resource.
821	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
822	// HostName - Host header to be sent to the backend servers.
823	HostName *string `json:"hostName,omitempty"`
824	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
825	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
826	// AffinityCookieName - Cookie name to use for the affinity cookie.
827	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
828	// ProbeEnabled - Whether the probe is enabled. Default value is false.
829	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
830	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
831	Path *string `json:"path,omitempty"`
832	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
833	ProvisioningState *string `json:"provisioningState,omitempty"`
834}
835
836// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
837// be active for a specified time after the backend server got removed from the configuration.
838type ApplicationGatewayConnectionDraining struct {
839	// Enabled - Whether connection draining is enabled or not.
840	Enabled *bool `json:"enabled,omitempty"`
841	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
842	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
843}
844
845// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
846// rule group.
847type ApplicationGatewayFirewallDisabledRuleGroup struct {
848	// RuleGroupName - The name of the rule group that will be disabled.
849	RuleGroupName *string `json:"ruleGroupName,omitempty"`
850	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
851	Rules *[]int32 `json:"rules,omitempty"`
852}
853
854// ApplicationGatewayFirewallRule a web application firewall rule.
855type ApplicationGatewayFirewallRule struct {
856	// RuleID - The identifier of the web application firewall rule.
857	RuleID *int32 `json:"ruleId,omitempty"`
858	// Description - The description of the web application firewall rule.
859	Description *string `json:"description,omitempty"`
860}
861
862// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
863type ApplicationGatewayFirewallRuleGroup struct {
864	// RuleGroupName - The name of the web application firewall rule group.
865	RuleGroupName *string `json:"ruleGroupName,omitempty"`
866	// Description - The description of the web application firewall rule group.
867	Description *string `json:"description,omitempty"`
868	// Rules - The rules of the web application firewall rule group.
869	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
870}
871
872// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
873type ApplicationGatewayFirewallRuleSet struct {
874	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
875	// ID - Resource ID.
876	ID *string `json:"id,omitempty"`
877	// Name - READ-ONLY; Resource name.
878	Name *string `json:"name,omitempty"`
879	// Type - READ-ONLY; Resource type.
880	Type *string `json:"type,omitempty"`
881	// Location - Resource location.
882	Location *string `json:"location,omitempty"`
883	// Tags - Resource tags.
884	Tags map[string]*string `json:"tags"`
885}
886
887// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
888func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
889	objectMap := make(map[string]interface{})
890	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
891		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
892	}
893	if agfrs.ID != nil {
894		objectMap["id"] = agfrs.ID
895	}
896	if agfrs.Location != nil {
897		objectMap["location"] = agfrs.Location
898	}
899	if agfrs.Tags != nil {
900		objectMap["tags"] = agfrs.Tags
901	}
902	return json.Marshal(objectMap)
903}
904
905// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
906func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
907	var m map[string]*json.RawMessage
908	err := json.Unmarshal(body, &m)
909	if err != nil {
910		return err
911	}
912	for k, v := range m {
913		switch k {
914		case "properties":
915			if v != nil {
916				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
917				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
918				if err != nil {
919					return err
920				}
921				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
922			}
923		case "id":
924			if v != nil {
925				var ID string
926				err = json.Unmarshal(*v, &ID)
927				if err != nil {
928					return err
929				}
930				agfrs.ID = &ID
931			}
932		case "name":
933			if v != nil {
934				var name string
935				err = json.Unmarshal(*v, &name)
936				if err != nil {
937					return err
938				}
939				agfrs.Name = &name
940			}
941		case "type":
942			if v != nil {
943				var typeVar string
944				err = json.Unmarshal(*v, &typeVar)
945				if err != nil {
946					return err
947				}
948				agfrs.Type = &typeVar
949			}
950		case "location":
951			if v != nil {
952				var location string
953				err = json.Unmarshal(*v, &location)
954				if err != nil {
955					return err
956				}
957				agfrs.Location = &location
958			}
959		case "tags":
960			if v != nil {
961				var tags map[string]*string
962				err = json.Unmarshal(*v, &tags)
963				if err != nil {
964					return err
965				}
966				agfrs.Tags = tags
967			}
968		}
969	}
970
971	return nil
972}
973
974// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
975type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
976	// ProvisioningState - The provisioning state of the web application firewall rule set.
977	ProvisioningState *string `json:"provisioningState,omitempty"`
978	// RuleSetType - The type of the web application firewall rule set.
979	RuleSetType *string `json:"ruleSetType,omitempty"`
980	// RuleSetVersion - The version of the web application firewall rule set type.
981	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
982	// RuleGroups - The rule groups of the web application firewall rule set.
983	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
984}
985
986// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
987type ApplicationGatewayFrontendIPConfiguration struct {
988	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
989	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
990	Name *string `json:"name,omitempty"`
991	// Etag - A unique read-only string that changes whenever the resource is updated.
992	Etag *string `json:"etag,omitempty"`
993	// Type - Type of the resource.
994	Type *string `json:"type,omitempty"`
995	// ID - Resource ID.
996	ID *string `json:"id,omitempty"`
997}
998
999// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1000func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1001	objectMap := make(map[string]interface{})
1002	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1003		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1004	}
1005	if agfic.Name != nil {
1006		objectMap["name"] = agfic.Name
1007	}
1008	if agfic.Etag != nil {
1009		objectMap["etag"] = agfic.Etag
1010	}
1011	if agfic.Type != nil {
1012		objectMap["type"] = agfic.Type
1013	}
1014	if agfic.ID != nil {
1015		objectMap["id"] = agfic.ID
1016	}
1017	return json.Marshal(objectMap)
1018}
1019
1020// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1021func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1022	var m map[string]*json.RawMessage
1023	err := json.Unmarshal(body, &m)
1024	if err != nil {
1025		return err
1026	}
1027	for k, v := range m {
1028		switch k {
1029		case "properties":
1030			if v != nil {
1031				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1032				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1033				if err != nil {
1034					return err
1035				}
1036				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1037			}
1038		case "name":
1039			if v != nil {
1040				var name string
1041				err = json.Unmarshal(*v, &name)
1042				if err != nil {
1043					return err
1044				}
1045				agfic.Name = &name
1046			}
1047		case "etag":
1048			if v != nil {
1049				var etag string
1050				err = json.Unmarshal(*v, &etag)
1051				if err != nil {
1052					return err
1053				}
1054				agfic.Etag = &etag
1055			}
1056		case "type":
1057			if v != nil {
1058				var typeVar string
1059				err = json.Unmarshal(*v, &typeVar)
1060				if err != nil {
1061					return err
1062				}
1063				agfic.Type = &typeVar
1064			}
1065		case "id":
1066			if v != nil {
1067				var ID string
1068				err = json.Unmarshal(*v, &ID)
1069				if err != nil {
1070					return err
1071				}
1072				agfic.ID = &ID
1073			}
1074		}
1075	}
1076
1077	return nil
1078}
1079
1080// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1081// application gateway.
1082type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1083	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1084	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1085	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1086	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1087	// Subnet - Reference of the subnet resource.
1088	Subnet *SubResource `json:"subnet,omitempty"`
1089	// PublicIPAddress - Reference of the PublicIP resource.
1090	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1091	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1092	ProvisioningState *string `json:"provisioningState,omitempty"`
1093}
1094
1095// ApplicationGatewayFrontendPort frontend port of an application gateway.
1096type ApplicationGatewayFrontendPort struct {
1097	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1098	// Name - Name of the frontend port that is unique within an Application Gateway
1099	Name *string `json:"name,omitempty"`
1100	// Etag - A unique read-only string that changes whenever the resource is updated.
1101	Etag *string `json:"etag,omitempty"`
1102	// Type - Type of the resource.
1103	Type *string `json:"type,omitempty"`
1104	// ID - Resource ID.
1105	ID *string `json:"id,omitempty"`
1106}
1107
1108// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1109func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1110	objectMap := make(map[string]interface{})
1111	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1112		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1113	}
1114	if agfp.Name != nil {
1115		objectMap["name"] = agfp.Name
1116	}
1117	if agfp.Etag != nil {
1118		objectMap["etag"] = agfp.Etag
1119	}
1120	if agfp.Type != nil {
1121		objectMap["type"] = agfp.Type
1122	}
1123	if agfp.ID != nil {
1124		objectMap["id"] = agfp.ID
1125	}
1126	return json.Marshal(objectMap)
1127}
1128
1129// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1130func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1131	var m map[string]*json.RawMessage
1132	err := json.Unmarshal(body, &m)
1133	if err != nil {
1134		return err
1135	}
1136	for k, v := range m {
1137		switch k {
1138		case "properties":
1139			if v != nil {
1140				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1141				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1142				if err != nil {
1143					return err
1144				}
1145				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1146			}
1147		case "name":
1148			if v != nil {
1149				var name string
1150				err = json.Unmarshal(*v, &name)
1151				if err != nil {
1152					return err
1153				}
1154				agfp.Name = &name
1155			}
1156		case "etag":
1157			if v != nil {
1158				var etag string
1159				err = json.Unmarshal(*v, &etag)
1160				if err != nil {
1161					return err
1162				}
1163				agfp.Etag = &etag
1164			}
1165		case "type":
1166			if v != nil {
1167				var typeVar string
1168				err = json.Unmarshal(*v, &typeVar)
1169				if err != nil {
1170					return err
1171				}
1172				agfp.Type = &typeVar
1173			}
1174		case "id":
1175			if v != nil {
1176				var ID string
1177				err = json.Unmarshal(*v, &ID)
1178				if err != nil {
1179					return err
1180				}
1181				agfp.ID = &ID
1182			}
1183		}
1184	}
1185
1186	return nil
1187}
1188
1189// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1190type ApplicationGatewayFrontendPortPropertiesFormat struct {
1191	// Port - Frontend port
1192	Port *int32 `json:"port,omitempty"`
1193	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1194	ProvisioningState *string `json:"provisioningState,omitempty"`
1195}
1196
1197// ApplicationGatewayHTTPListener http listener of an application gateway.
1198type ApplicationGatewayHTTPListener struct {
1199	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1200	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1201	Name *string `json:"name,omitempty"`
1202	// Etag - A unique read-only string that changes whenever the resource is updated.
1203	Etag *string `json:"etag,omitempty"`
1204	// Type - Type of the resource.
1205	Type *string `json:"type,omitempty"`
1206	// ID - Resource ID.
1207	ID *string `json:"id,omitempty"`
1208}
1209
1210// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1211func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1212	objectMap := make(map[string]interface{})
1213	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1214		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1215	}
1216	if aghl.Name != nil {
1217		objectMap["name"] = aghl.Name
1218	}
1219	if aghl.Etag != nil {
1220		objectMap["etag"] = aghl.Etag
1221	}
1222	if aghl.Type != nil {
1223		objectMap["type"] = aghl.Type
1224	}
1225	if aghl.ID != nil {
1226		objectMap["id"] = aghl.ID
1227	}
1228	return json.Marshal(objectMap)
1229}
1230
1231// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1232func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1233	var m map[string]*json.RawMessage
1234	err := json.Unmarshal(body, &m)
1235	if err != nil {
1236		return err
1237	}
1238	for k, v := range m {
1239		switch k {
1240		case "properties":
1241			if v != nil {
1242				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1243				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1244				if err != nil {
1245					return err
1246				}
1247				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1248			}
1249		case "name":
1250			if v != nil {
1251				var name string
1252				err = json.Unmarshal(*v, &name)
1253				if err != nil {
1254					return err
1255				}
1256				aghl.Name = &name
1257			}
1258		case "etag":
1259			if v != nil {
1260				var etag string
1261				err = json.Unmarshal(*v, &etag)
1262				if err != nil {
1263					return err
1264				}
1265				aghl.Etag = &etag
1266			}
1267		case "type":
1268			if v != nil {
1269				var typeVar string
1270				err = json.Unmarshal(*v, &typeVar)
1271				if err != nil {
1272					return err
1273				}
1274				aghl.Type = &typeVar
1275			}
1276		case "id":
1277			if v != nil {
1278				var ID string
1279				err = json.Unmarshal(*v, &ID)
1280				if err != nil {
1281					return err
1282				}
1283				aghl.ID = &ID
1284			}
1285		}
1286	}
1287
1288	return nil
1289}
1290
1291// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1292type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1293	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1294	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1295	// FrontendPort - Frontend port resource of an application gateway.
1296	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1297	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1298	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1299	// HostName - Host name of HTTP listener.
1300	HostName *string `json:"hostName,omitempty"`
1301	// SslCertificate - SSL certificate resource of an application gateway.
1302	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1303	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1304	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1305	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1306	ProvisioningState *string `json:"provisioningState,omitempty"`
1307}
1308
1309// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1310// private IP configuration is allowed.
1311type ApplicationGatewayIPConfiguration struct {
1312	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1313	// Name - Name of the IP configuration that is unique within an Application Gateway.
1314	Name *string `json:"name,omitempty"`
1315	// Etag - A unique read-only string that changes whenever the resource is updated.
1316	Etag *string `json:"etag,omitempty"`
1317	// Type - Type of the resource.
1318	Type *string `json:"type,omitempty"`
1319	// ID - Resource ID.
1320	ID *string `json:"id,omitempty"`
1321}
1322
1323// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1324func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1325	objectMap := make(map[string]interface{})
1326	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1327		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1328	}
1329	if agic.Name != nil {
1330		objectMap["name"] = agic.Name
1331	}
1332	if agic.Etag != nil {
1333		objectMap["etag"] = agic.Etag
1334	}
1335	if agic.Type != nil {
1336		objectMap["type"] = agic.Type
1337	}
1338	if agic.ID != nil {
1339		objectMap["id"] = agic.ID
1340	}
1341	return json.Marshal(objectMap)
1342}
1343
1344// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1345func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1346	var m map[string]*json.RawMessage
1347	err := json.Unmarshal(body, &m)
1348	if err != nil {
1349		return err
1350	}
1351	for k, v := range m {
1352		switch k {
1353		case "properties":
1354			if v != nil {
1355				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1356				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1357				if err != nil {
1358					return err
1359				}
1360				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1361			}
1362		case "name":
1363			if v != nil {
1364				var name string
1365				err = json.Unmarshal(*v, &name)
1366				if err != nil {
1367					return err
1368				}
1369				agic.Name = &name
1370			}
1371		case "etag":
1372			if v != nil {
1373				var etag string
1374				err = json.Unmarshal(*v, &etag)
1375				if err != nil {
1376					return err
1377				}
1378				agic.Etag = &etag
1379			}
1380		case "type":
1381			if v != nil {
1382				var typeVar string
1383				err = json.Unmarshal(*v, &typeVar)
1384				if err != nil {
1385					return err
1386				}
1387				agic.Type = &typeVar
1388			}
1389		case "id":
1390			if v != nil {
1391				var ID string
1392				err = json.Unmarshal(*v, &ID)
1393				if err != nil {
1394					return err
1395				}
1396				agic.ID = &ID
1397			}
1398		}
1399	}
1400
1401	return nil
1402}
1403
1404// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1405// gateway.
1406type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1407	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1408	Subnet *SubResource `json:"subnet,omitempty"`
1409	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1410	ProvisioningState *string `json:"provisioningState,omitempty"`
1411}
1412
1413// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1414type ApplicationGatewayListResult struct {
1415	autorest.Response `json:"-"`
1416	// Value - List of an application gateways in a resource group.
1417	Value *[]ApplicationGateway `json:"value,omitempty"`
1418	// NextLink - URL to get the next set of results.
1419	NextLink *string `json:"nextLink,omitempty"`
1420}
1421
1422// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1423type ApplicationGatewayListResultIterator struct {
1424	i    int
1425	page ApplicationGatewayListResultPage
1426}
1427
1428// NextWithContext advances to the next value.  If there was an error making
1429// the request the iterator does not advance and the error is returned.
1430func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1431	if tracing.IsEnabled() {
1432		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1433		defer func() {
1434			sc := -1
1435			if iter.Response().Response.Response != nil {
1436				sc = iter.Response().Response.Response.StatusCode
1437			}
1438			tracing.EndSpan(ctx, sc, err)
1439		}()
1440	}
1441	iter.i++
1442	if iter.i < len(iter.page.Values()) {
1443		return nil
1444	}
1445	err = iter.page.NextWithContext(ctx)
1446	if err != nil {
1447		iter.i--
1448		return err
1449	}
1450	iter.i = 0
1451	return nil
1452}
1453
1454// Next advances to the next value.  If there was an error making
1455// the request the iterator does not advance and the error is returned.
1456// Deprecated: Use NextWithContext() instead.
1457func (iter *ApplicationGatewayListResultIterator) Next() error {
1458	return iter.NextWithContext(context.Background())
1459}
1460
1461// NotDone returns true if the enumeration should be started or is not yet complete.
1462func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1463	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1464}
1465
1466// Response returns the raw server response from the last page request.
1467func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1468	return iter.page.Response()
1469}
1470
1471// Value returns the current value or a zero-initialized value if the
1472// iterator has advanced beyond the end of the collection.
1473func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1474	if !iter.page.NotDone() {
1475		return ApplicationGateway{}
1476	}
1477	return iter.page.Values()[iter.i]
1478}
1479
1480// Creates a new instance of the ApplicationGatewayListResultIterator type.
1481func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1482	return ApplicationGatewayListResultIterator{page: page}
1483}
1484
1485// IsEmpty returns true if the ListResult contains no values.
1486func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1487	return aglr.Value == nil || len(*aglr.Value) == 0
1488}
1489
1490// hasNextLink returns true if the NextLink is not empty.
1491func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1492	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1493}
1494
1495// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1496// It returns nil if no more results exist.
1497func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1498	if !aglr.hasNextLink() {
1499		return nil, nil
1500	}
1501	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1502		autorest.AsJSON(),
1503		autorest.AsGet(),
1504		autorest.WithBaseURL(to.String(aglr.NextLink)))
1505}
1506
1507// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1508type ApplicationGatewayListResultPage struct {
1509	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1510	aglr ApplicationGatewayListResult
1511}
1512
1513// NextWithContext advances to the next page of values.  If there was an error making
1514// the request the page does not advance and the error is returned.
1515func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1516	if tracing.IsEnabled() {
1517		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1518		defer func() {
1519			sc := -1
1520			if page.Response().Response.Response != nil {
1521				sc = page.Response().Response.Response.StatusCode
1522			}
1523			tracing.EndSpan(ctx, sc, err)
1524		}()
1525	}
1526	for {
1527		next, err := page.fn(ctx, page.aglr)
1528		if err != nil {
1529			return err
1530		}
1531		page.aglr = next
1532		if !next.hasNextLink() || !next.IsEmpty() {
1533			break
1534		}
1535	}
1536	return nil
1537}
1538
1539// Next advances to the next page of values.  If there was an error making
1540// the request the page does not advance and the error is returned.
1541// Deprecated: Use NextWithContext() instead.
1542func (page *ApplicationGatewayListResultPage) Next() error {
1543	return page.NextWithContext(context.Background())
1544}
1545
1546// NotDone returns true if the page enumeration should be started or is not yet complete.
1547func (page ApplicationGatewayListResultPage) NotDone() bool {
1548	return !page.aglr.IsEmpty()
1549}
1550
1551// Response returns the raw server response from the last page request.
1552func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1553	return page.aglr
1554}
1555
1556// Values returns the slice of values for the current page or nil if there are no values.
1557func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1558	if page.aglr.IsEmpty() {
1559		return nil
1560	}
1561	return *page.aglr.Value
1562}
1563
1564// Creates a new instance of the ApplicationGatewayListResultPage type.
1565func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1566	return ApplicationGatewayListResultPage{
1567		fn:   getNextPage,
1568		aglr: cur,
1569	}
1570}
1571
1572// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1573type ApplicationGatewayPathRule struct {
1574	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1575	// Name - Name of the path rule that is unique within an Application Gateway.
1576	Name *string `json:"name,omitempty"`
1577	// Etag - A unique read-only string that changes whenever the resource is updated.
1578	Etag *string `json:"etag,omitempty"`
1579	// Type - Type of the resource.
1580	Type *string `json:"type,omitempty"`
1581	// ID - Resource ID.
1582	ID *string `json:"id,omitempty"`
1583}
1584
1585// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1586func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1587	objectMap := make(map[string]interface{})
1588	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1589		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1590	}
1591	if agpr.Name != nil {
1592		objectMap["name"] = agpr.Name
1593	}
1594	if agpr.Etag != nil {
1595		objectMap["etag"] = agpr.Etag
1596	}
1597	if agpr.Type != nil {
1598		objectMap["type"] = agpr.Type
1599	}
1600	if agpr.ID != nil {
1601		objectMap["id"] = agpr.ID
1602	}
1603	return json.Marshal(objectMap)
1604}
1605
1606// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1607func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1608	var m map[string]*json.RawMessage
1609	err := json.Unmarshal(body, &m)
1610	if err != nil {
1611		return err
1612	}
1613	for k, v := range m {
1614		switch k {
1615		case "properties":
1616			if v != nil {
1617				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1618				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1619				if err != nil {
1620					return err
1621				}
1622				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1623			}
1624		case "name":
1625			if v != nil {
1626				var name string
1627				err = json.Unmarshal(*v, &name)
1628				if err != nil {
1629					return err
1630				}
1631				agpr.Name = &name
1632			}
1633		case "etag":
1634			if v != nil {
1635				var etag string
1636				err = json.Unmarshal(*v, &etag)
1637				if err != nil {
1638					return err
1639				}
1640				agpr.Etag = &etag
1641			}
1642		case "type":
1643			if v != nil {
1644				var typeVar string
1645				err = json.Unmarshal(*v, &typeVar)
1646				if err != nil {
1647					return err
1648				}
1649				agpr.Type = &typeVar
1650			}
1651		case "id":
1652			if v != nil {
1653				var ID string
1654				err = json.Unmarshal(*v, &ID)
1655				if err != nil {
1656					return err
1657				}
1658				agpr.ID = &ID
1659			}
1660		}
1661	}
1662
1663	return nil
1664}
1665
1666// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1667type ApplicationGatewayPathRulePropertiesFormat struct {
1668	// Paths - Path rules of URL path map.
1669	Paths *[]string `json:"paths,omitempty"`
1670	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1671	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1672	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1673	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1674	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1675	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1676	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1677	ProvisioningState *string `json:"provisioningState,omitempty"`
1678}
1679
1680// ApplicationGatewayProbe probe of the application gateway.
1681type ApplicationGatewayProbe struct {
1682	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1683	// Name - Name of the probe that is unique within an Application Gateway.
1684	Name *string `json:"name,omitempty"`
1685	// Etag - A unique read-only string that changes whenever the resource is updated.
1686	Etag *string `json:"etag,omitempty"`
1687	// Type - Type of the resource.
1688	Type *string `json:"type,omitempty"`
1689	// ID - Resource ID.
1690	ID *string `json:"id,omitempty"`
1691}
1692
1693// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1694func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1695	objectMap := make(map[string]interface{})
1696	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1697		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1698	}
1699	if agp.Name != nil {
1700		objectMap["name"] = agp.Name
1701	}
1702	if agp.Etag != nil {
1703		objectMap["etag"] = agp.Etag
1704	}
1705	if agp.Type != nil {
1706		objectMap["type"] = agp.Type
1707	}
1708	if agp.ID != nil {
1709		objectMap["id"] = agp.ID
1710	}
1711	return json.Marshal(objectMap)
1712}
1713
1714// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1715func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1716	var m map[string]*json.RawMessage
1717	err := json.Unmarshal(body, &m)
1718	if err != nil {
1719		return err
1720	}
1721	for k, v := range m {
1722		switch k {
1723		case "properties":
1724			if v != nil {
1725				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1726				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1727				if err != nil {
1728					return err
1729				}
1730				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1731			}
1732		case "name":
1733			if v != nil {
1734				var name string
1735				err = json.Unmarshal(*v, &name)
1736				if err != nil {
1737					return err
1738				}
1739				agp.Name = &name
1740			}
1741		case "etag":
1742			if v != nil {
1743				var etag string
1744				err = json.Unmarshal(*v, &etag)
1745				if err != nil {
1746					return err
1747				}
1748				agp.Etag = &etag
1749			}
1750		case "type":
1751			if v != nil {
1752				var typeVar string
1753				err = json.Unmarshal(*v, &typeVar)
1754				if err != nil {
1755					return err
1756				}
1757				agp.Type = &typeVar
1758			}
1759		case "id":
1760			if v != nil {
1761				var ID string
1762				err = json.Unmarshal(*v, &ID)
1763				if err != nil {
1764					return err
1765				}
1766				agp.ID = &ID
1767			}
1768		}
1769	}
1770
1771	return nil
1772}
1773
1774// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1775type ApplicationGatewayProbeHealthResponseMatch struct {
1776	// Body - Body that must be contained in the health response. Default value is empty.
1777	Body *string `json:"body,omitempty"`
1778	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1779	StatusCodes *[]string `json:"statusCodes,omitempty"`
1780}
1781
1782// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1783type ApplicationGatewayProbePropertiesFormat struct {
1784	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1785	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1786	// Host - Host name to send the probe to.
1787	Host *string `json:"host,omitempty"`
1788	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1789	Path *string `json:"path,omitempty"`
1790	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1791	Interval *int32 `json:"interval,omitempty"`
1792	// 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.
1793	Timeout *int32 `json:"timeout,omitempty"`
1794	// 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.
1795	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1796	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1797	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1798	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1799	MinServers *int32 `json:"minServers,omitempty"`
1800	// Match - Criterion for classifying a healthy probe response.
1801	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1802	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1803	ProvisioningState *string `json:"provisioningState,omitempty"`
1804}
1805
1806// ApplicationGatewayPropertiesFormat properties of the application gateway.
1807type ApplicationGatewayPropertiesFormat struct {
1808	// Sku - SKU of the application gateway resource.
1809	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1810	// SslPolicy - SSL policy of the application gateway resource.
1811	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1812	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1813	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1814	// GatewayIPConfigurations - Subnets of application the gateway resource.
1815	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1816	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1817	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1818	// SslCertificates - SSL certificates of the application gateway resource.
1819	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1820	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1821	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1822	// FrontendPorts - Frontend ports of the application gateway resource.
1823	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1824	// Probes - Probes of the application gateway resource.
1825	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1826	// BackendAddressPools - Backend address pool of the application gateway resource.
1827	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1828	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1829	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1830	// HTTPListeners - Http listeners of the application gateway resource.
1831	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1832	// URLPathMaps - URL path map of the application gateway resource.
1833	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1834	// RequestRoutingRules - Request routing rules of the application gateway resource.
1835	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1836	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1837	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1838	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1839	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1840	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1841	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1842	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1843	EnableFips *bool `json:"enableFips,omitempty"`
1844	// AutoscaleConfiguration - Autoscale Configuration.
1845	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1846	// ResourceGUID - Resource GUID property of the application gateway resource.
1847	ResourceGUID *string `json:"resourceGuid,omitempty"`
1848	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1849	ProvisioningState *string `json:"provisioningState,omitempty"`
1850}
1851
1852// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1853func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1854	objectMap := make(map[string]interface{})
1855	if agpf.Sku != nil {
1856		objectMap["sku"] = agpf.Sku
1857	}
1858	if agpf.SslPolicy != nil {
1859		objectMap["sslPolicy"] = agpf.SslPolicy
1860	}
1861	if agpf.GatewayIPConfigurations != nil {
1862		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1863	}
1864	if agpf.AuthenticationCertificates != nil {
1865		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1866	}
1867	if agpf.SslCertificates != nil {
1868		objectMap["sslCertificates"] = agpf.SslCertificates
1869	}
1870	if agpf.FrontendIPConfigurations != nil {
1871		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1872	}
1873	if agpf.FrontendPorts != nil {
1874		objectMap["frontendPorts"] = agpf.FrontendPorts
1875	}
1876	if agpf.Probes != nil {
1877		objectMap["probes"] = agpf.Probes
1878	}
1879	if agpf.BackendAddressPools != nil {
1880		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1881	}
1882	if agpf.BackendHTTPSettingsCollection != nil {
1883		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1884	}
1885	if agpf.HTTPListeners != nil {
1886		objectMap["httpListeners"] = agpf.HTTPListeners
1887	}
1888	if agpf.URLPathMaps != nil {
1889		objectMap["urlPathMaps"] = agpf.URLPathMaps
1890	}
1891	if agpf.RequestRoutingRules != nil {
1892		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1893	}
1894	if agpf.RedirectConfigurations != nil {
1895		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1896	}
1897	if agpf.WebApplicationFirewallConfiguration != nil {
1898		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1899	}
1900	if agpf.EnableHTTP2 != nil {
1901		objectMap["enableHttp2"] = agpf.EnableHTTP2
1902	}
1903	if agpf.EnableFips != nil {
1904		objectMap["enableFips"] = agpf.EnableFips
1905	}
1906	if agpf.AutoscaleConfiguration != nil {
1907		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1908	}
1909	if agpf.ResourceGUID != nil {
1910		objectMap["resourceGuid"] = agpf.ResourceGUID
1911	}
1912	if agpf.ProvisioningState != nil {
1913		objectMap["provisioningState"] = agpf.ProvisioningState
1914	}
1915	return json.Marshal(objectMap)
1916}
1917
1918// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1919type ApplicationGatewayRedirectConfiguration struct {
1920	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1921	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1922	Name *string `json:"name,omitempty"`
1923	// Etag - A unique read-only string that changes whenever the resource is updated.
1924	Etag *string `json:"etag,omitempty"`
1925	// Type - Type of the resource.
1926	Type *string `json:"type,omitempty"`
1927	// ID - Resource ID.
1928	ID *string `json:"id,omitempty"`
1929}
1930
1931// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1932func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1933	objectMap := make(map[string]interface{})
1934	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1935		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1936	}
1937	if agrc.Name != nil {
1938		objectMap["name"] = agrc.Name
1939	}
1940	if agrc.Etag != nil {
1941		objectMap["etag"] = agrc.Etag
1942	}
1943	if agrc.Type != nil {
1944		objectMap["type"] = agrc.Type
1945	}
1946	if agrc.ID != nil {
1947		objectMap["id"] = agrc.ID
1948	}
1949	return json.Marshal(objectMap)
1950}
1951
1952// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1953func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1954	var m map[string]*json.RawMessage
1955	err := json.Unmarshal(body, &m)
1956	if err != nil {
1957		return err
1958	}
1959	for k, v := range m {
1960		switch k {
1961		case "properties":
1962			if v != nil {
1963				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1964				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1965				if err != nil {
1966					return err
1967				}
1968				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1969			}
1970		case "name":
1971			if v != nil {
1972				var name string
1973				err = json.Unmarshal(*v, &name)
1974				if err != nil {
1975					return err
1976				}
1977				agrc.Name = &name
1978			}
1979		case "etag":
1980			if v != nil {
1981				var etag string
1982				err = json.Unmarshal(*v, &etag)
1983				if err != nil {
1984					return err
1985				}
1986				agrc.Etag = &etag
1987			}
1988		case "type":
1989			if v != nil {
1990				var typeVar string
1991				err = json.Unmarshal(*v, &typeVar)
1992				if err != nil {
1993					return err
1994				}
1995				agrc.Type = &typeVar
1996			}
1997		case "id":
1998			if v != nil {
1999				var ID string
2000				err = json.Unmarshal(*v, &ID)
2001				if err != nil {
2002					return err
2003				}
2004				agrc.ID = &ID
2005			}
2006		}
2007	}
2008
2009	return nil
2010}
2011
2012// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2013// application gateway.
2014type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2015	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2016	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2017	// TargetListener - Reference to a listener to redirect the request to.
2018	TargetListener *SubResource `json:"targetListener,omitempty"`
2019	// TargetURL - Url to redirect the request to.
2020	TargetURL *string `json:"targetUrl,omitempty"`
2021	// IncludePath - Include path in the redirected url.
2022	IncludePath *bool `json:"includePath,omitempty"`
2023	// IncludeQueryString - Include query string in the redirected url.
2024	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2025	// RequestRoutingRules - Request routing specifying redirect configuration.
2026	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2027	// URLPathMaps - Url path maps specifying default redirect configuration.
2028	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2029	// PathRules - Path rules specifying redirect configuration.
2030	PathRules *[]SubResource `json:"pathRules,omitempty"`
2031}
2032
2033// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2034type ApplicationGatewayRequestRoutingRule struct {
2035	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2036	// Name - Name of the request routing rule that is unique within an Application Gateway.
2037	Name *string `json:"name,omitempty"`
2038	// Etag - A unique read-only string that changes whenever the resource is updated.
2039	Etag *string `json:"etag,omitempty"`
2040	// Type - Type of the resource.
2041	Type *string `json:"type,omitempty"`
2042	// ID - Resource ID.
2043	ID *string `json:"id,omitempty"`
2044}
2045
2046// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2047func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2048	objectMap := make(map[string]interface{})
2049	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2050		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2051	}
2052	if agrrr.Name != nil {
2053		objectMap["name"] = agrrr.Name
2054	}
2055	if agrrr.Etag != nil {
2056		objectMap["etag"] = agrrr.Etag
2057	}
2058	if agrrr.Type != nil {
2059		objectMap["type"] = agrrr.Type
2060	}
2061	if agrrr.ID != nil {
2062		objectMap["id"] = agrrr.ID
2063	}
2064	return json.Marshal(objectMap)
2065}
2066
2067// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2068func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2069	var m map[string]*json.RawMessage
2070	err := json.Unmarshal(body, &m)
2071	if err != nil {
2072		return err
2073	}
2074	for k, v := range m {
2075		switch k {
2076		case "properties":
2077			if v != nil {
2078				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2079				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2080				if err != nil {
2081					return err
2082				}
2083				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2084			}
2085		case "name":
2086			if v != nil {
2087				var name string
2088				err = json.Unmarshal(*v, &name)
2089				if err != nil {
2090					return err
2091				}
2092				agrrr.Name = &name
2093			}
2094		case "etag":
2095			if v != nil {
2096				var etag string
2097				err = json.Unmarshal(*v, &etag)
2098				if err != nil {
2099					return err
2100				}
2101				agrrr.Etag = &etag
2102			}
2103		case "type":
2104			if v != nil {
2105				var typeVar string
2106				err = json.Unmarshal(*v, &typeVar)
2107				if err != nil {
2108					return err
2109				}
2110				agrrr.Type = &typeVar
2111			}
2112		case "id":
2113			if v != nil {
2114				var ID string
2115				err = json.Unmarshal(*v, &ID)
2116				if err != nil {
2117					return err
2118				}
2119				agrrr.ID = &ID
2120			}
2121		}
2122	}
2123
2124	return nil
2125}
2126
2127// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2128// application gateway.
2129type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2130	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2131	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2132	// BackendAddressPool - Backend address pool resource of the application gateway.
2133	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2134	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2135	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2136	// HTTPListener - Http listener resource of the application gateway.
2137	HTTPListener *SubResource `json:"httpListener,omitempty"`
2138	// URLPathMap - URL path map resource of the application gateway.
2139	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2140	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2141	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2142	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2143	ProvisioningState *string `json:"provisioningState,omitempty"`
2144}
2145
2146// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2147// long-running operation.
2148type ApplicationGatewaysBackendHealthFuture struct {
2149	azure.FutureAPI
2150	// Result returns the result of the asynchronous operation.
2151	// If the operation has not completed it will return an error.
2152	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2153}
2154
2155// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2156func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2157	var azFuture azure.Future
2158	if err := json.Unmarshal(body, &azFuture); err != nil {
2159		return err
2160	}
2161	future.FutureAPI = &azFuture
2162	future.Result = future.result
2163	return nil
2164}
2165
2166// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2167func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2168	var done bool
2169	done, err = future.DoneWithContext(context.Background(), client)
2170	if err != nil {
2171		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2172		return
2173	}
2174	if !done {
2175		agbh.Response.Response = future.Response()
2176		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2177		return
2178	}
2179	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2180	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2181		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2182		if err != nil {
2183			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2184		}
2185	}
2186	return
2187}
2188
2189// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2190// long-running operation.
2191type ApplicationGatewaysCreateOrUpdateFuture struct {
2192	azure.FutureAPI
2193	// Result returns the result of the asynchronous operation.
2194	// If the operation has not completed it will return an error.
2195	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2196}
2197
2198// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2199func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2200	var azFuture azure.Future
2201	if err := json.Unmarshal(body, &azFuture); err != nil {
2202		return err
2203	}
2204	future.FutureAPI = &azFuture
2205	future.Result = future.result
2206	return nil
2207}
2208
2209// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2210func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2211	var done bool
2212	done, err = future.DoneWithContext(context.Background(), client)
2213	if err != nil {
2214		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2215		return
2216	}
2217	if !done {
2218		ag.Response.Response = future.Response()
2219		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2220		return
2221	}
2222	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2223	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2224		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2225		if err != nil {
2226			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2227		}
2228	}
2229	return
2230}
2231
2232// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2233// long-running operation.
2234type ApplicationGatewaysDeleteFuture struct {
2235	azure.FutureAPI
2236	// Result returns the result of the asynchronous operation.
2237	// If the operation has not completed it will return an error.
2238	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2239}
2240
2241// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2242func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2243	var azFuture azure.Future
2244	if err := json.Unmarshal(body, &azFuture); err != nil {
2245		return err
2246	}
2247	future.FutureAPI = &azFuture
2248	future.Result = future.result
2249	return nil
2250}
2251
2252// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2253func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2254	var done bool
2255	done, err = future.DoneWithContext(context.Background(), client)
2256	if err != nil {
2257		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2258		return
2259	}
2260	if !done {
2261		ar.Response = future.Response()
2262		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2263		return
2264	}
2265	ar.Response = future.Response()
2266	return
2267}
2268
2269// ApplicationGatewaySku SKU of an application gateway
2270type ApplicationGatewaySku struct {
2271	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2272	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2273	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2274	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2275	// Capacity - Capacity (instance count) of an application gateway.
2276	Capacity *int32 `json:"capacity,omitempty"`
2277}
2278
2279// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2280type ApplicationGatewaySslCertificate struct {
2281	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2282	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2283	Name *string `json:"name,omitempty"`
2284	// Etag - A unique read-only string that changes whenever the resource is updated.
2285	Etag *string `json:"etag,omitempty"`
2286	// Type - Type of the resource.
2287	Type *string `json:"type,omitempty"`
2288	// ID - Resource ID.
2289	ID *string `json:"id,omitempty"`
2290}
2291
2292// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2293func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2294	objectMap := make(map[string]interface{})
2295	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2296		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2297	}
2298	if agsc.Name != nil {
2299		objectMap["name"] = agsc.Name
2300	}
2301	if agsc.Etag != nil {
2302		objectMap["etag"] = agsc.Etag
2303	}
2304	if agsc.Type != nil {
2305		objectMap["type"] = agsc.Type
2306	}
2307	if agsc.ID != nil {
2308		objectMap["id"] = agsc.ID
2309	}
2310	return json.Marshal(objectMap)
2311}
2312
2313// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2314func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2315	var m map[string]*json.RawMessage
2316	err := json.Unmarshal(body, &m)
2317	if err != nil {
2318		return err
2319	}
2320	for k, v := range m {
2321		switch k {
2322		case "properties":
2323			if v != nil {
2324				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2325				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2326				if err != nil {
2327					return err
2328				}
2329				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2330			}
2331		case "name":
2332			if v != nil {
2333				var name string
2334				err = json.Unmarshal(*v, &name)
2335				if err != nil {
2336					return err
2337				}
2338				agsc.Name = &name
2339			}
2340		case "etag":
2341			if v != nil {
2342				var etag string
2343				err = json.Unmarshal(*v, &etag)
2344				if err != nil {
2345					return err
2346				}
2347				agsc.Etag = &etag
2348			}
2349		case "type":
2350			if v != nil {
2351				var typeVar string
2352				err = json.Unmarshal(*v, &typeVar)
2353				if err != nil {
2354					return err
2355				}
2356				agsc.Type = &typeVar
2357			}
2358		case "id":
2359			if v != nil {
2360				var ID string
2361				err = json.Unmarshal(*v, &ID)
2362				if err != nil {
2363					return err
2364				}
2365				agsc.ID = &ID
2366			}
2367		}
2368	}
2369
2370	return nil
2371}
2372
2373// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2374// gateway.
2375type ApplicationGatewaySslCertificatePropertiesFormat struct {
2376	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2377	Data *string `json:"data,omitempty"`
2378	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2379	Password *string `json:"password,omitempty"`
2380	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2381	PublicCertData *string `json:"publicCertData,omitempty"`
2382	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2383	ProvisioningState *string `json:"provisioningState,omitempty"`
2384}
2385
2386// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2387type ApplicationGatewaySslPolicy struct {
2388	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2389	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2390	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2391	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2392	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2393	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2394	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2395	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2396	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2397	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2398}
2399
2400// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2401type ApplicationGatewaySslPredefinedPolicy struct {
2402	autorest.Response `json:"-"`
2403	// Name - Name of the Ssl predefined policy.
2404	Name                                                   *string `json:"name,omitempty"`
2405	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2406	// ID - Resource ID.
2407	ID *string `json:"id,omitempty"`
2408}
2409
2410// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2411func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2412	objectMap := make(map[string]interface{})
2413	if agspp.Name != nil {
2414		objectMap["name"] = agspp.Name
2415	}
2416	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2417		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2418	}
2419	if agspp.ID != nil {
2420		objectMap["id"] = agspp.ID
2421	}
2422	return json.Marshal(objectMap)
2423}
2424
2425// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2426func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2427	var m map[string]*json.RawMessage
2428	err := json.Unmarshal(body, &m)
2429	if err != nil {
2430		return err
2431	}
2432	for k, v := range m {
2433		switch k {
2434		case "name":
2435			if v != nil {
2436				var name string
2437				err = json.Unmarshal(*v, &name)
2438				if err != nil {
2439					return err
2440				}
2441				agspp.Name = &name
2442			}
2443		case "properties":
2444			if v != nil {
2445				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2446				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2447				if err != nil {
2448					return err
2449				}
2450				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2451			}
2452		case "id":
2453			if v != nil {
2454				var ID string
2455				err = json.Unmarshal(*v, &ID)
2456				if err != nil {
2457					return err
2458				}
2459				agspp.ID = &ID
2460			}
2461		}
2462	}
2463
2464	return nil
2465}
2466
2467// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2468// ApplicationGatewaySslPredefinedPolicy
2469type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2470	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2471	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2472	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2473	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2474}
2475
2476// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2477// long-running operation.
2478type ApplicationGatewaysStartFuture struct {
2479	azure.FutureAPI
2480	// Result returns the result of the asynchronous operation.
2481	// If the operation has not completed it will return an error.
2482	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2483}
2484
2485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2486func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2487	var azFuture azure.Future
2488	if err := json.Unmarshal(body, &azFuture); err != nil {
2489		return err
2490	}
2491	future.FutureAPI = &azFuture
2492	future.Result = future.result
2493	return nil
2494}
2495
2496// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2497func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2498	var done bool
2499	done, err = future.DoneWithContext(context.Background(), client)
2500	if err != nil {
2501		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2502		return
2503	}
2504	if !done {
2505		ar.Response = future.Response()
2506		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2507		return
2508	}
2509	ar.Response = future.Response()
2510	return
2511}
2512
2513// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2514// operation.
2515type ApplicationGatewaysStopFuture struct {
2516	azure.FutureAPI
2517	// Result returns the result of the asynchronous operation.
2518	// If the operation has not completed it will return an error.
2519	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2520}
2521
2522// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2523func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2524	var azFuture azure.Future
2525	if err := json.Unmarshal(body, &azFuture); err != nil {
2526		return err
2527	}
2528	future.FutureAPI = &azFuture
2529	future.Result = future.result
2530	return nil
2531}
2532
2533// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2534func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2535	var done bool
2536	done, err = future.DoneWithContext(context.Background(), client)
2537	if err != nil {
2538		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2539		return
2540	}
2541	if !done {
2542		ar.Response = future.Response()
2543		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2544		return
2545	}
2546	ar.Response = future.Response()
2547	return
2548}
2549
2550// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2551// long-running operation.
2552type ApplicationGatewaysUpdateTagsFuture struct {
2553	azure.FutureAPI
2554	// Result returns the result of the asynchronous operation.
2555	// If the operation has not completed it will return an error.
2556	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2557}
2558
2559// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2560func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2561	var azFuture azure.Future
2562	if err := json.Unmarshal(body, &azFuture); err != nil {
2563		return err
2564	}
2565	future.FutureAPI = &azFuture
2566	future.Result = future.result
2567	return nil
2568}
2569
2570// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2571func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2572	var done bool
2573	done, err = future.DoneWithContext(context.Background(), client)
2574	if err != nil {
2575		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2576		return
2577	}
2578	if !done {
2579		ag.Response.Response = future.Response()
2580		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2581		return
2582	}
2583	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2584	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2585		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2586		if err != nil {
2587			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2588		}
2589	}
2590	return
2591}
2592
2593// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2594// PathBasedRouting.
2595type ApplicationGatewayURLPathMap struct {
2596	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2597	// Name - Name of the URL path map that is unique within an Application Gateway.
2598	Name *string `json:"name,omitempty"`
2599	// Etag - A unique read-only string that changes whenever the resource is updated.
2600	Etag *string `json:"etag,omitempty"`
2601	// Type - Type of the resource.
2602	Type *string `json:"type,omitempty"`
2603	// ID - Resource ID.
2604	ID *string `json:"id,omitempty"`
2605}
2606
2607// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2608func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2609	objectMap := make(map[string]interface{})
2610	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2611		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2612	}
2613	if agupm.Name != nil {
2614		objectMap["name"] = agupm.Name
2615	}
2616	if agupm.Etag != nil {
2617		objectMap["etag"] = agupm.Etag
2618	}
2619	if agupm.Type != nil {
2620		objectMap["type"] = agupm.Type
2621	}
2622	if agupm.ID != nil {
2623		objectMap["id"] = agupm.ID
2624	}
2625	return json.Marshal(objectMap)
2626}
2627
2628// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2629func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2630	var m map[string]*json.RawMessage
2631	err := json.Unmarshal(body, &m)
2632	if err != nil {
2633		return err
2634	}
2635	for k, v := range m {
2636		switch k {
2637		case "properties":
2638			if v != nil {
2639				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2640				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2641				if err != nil {
2642					return err
2643				}
2644				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2645			}
2646		case "name":
2647			if v != nil {
2648				var name string
2649				err = json.Unmarshal(*v, &name)
2650				if err != nil {
2651					return err
2652				}
2653				agupm.Name = &name
2654			}
2655		case "etag":
2656			if v != nil {
2657				var etag string
2658				err = json.Unmarshal(*v, &etag)
2659				if err != nil {
2660					return err
2661				}
2662				agupm.Etag = &etag
2663			}
2664		case "type":
2665			if v != nil {
2666				var typeVar string
2667				err = json.Unmarshal(*v, &typeVar)
2668				if err != nil {
2669					return err
2670				}
2671				agupm.Type = &typeVar
2672			}
2673		case "id":
2674			if v != nil {
2675				var ID string
2676				err = json.Unmarshal(*v, &ID)
2677				if err != nil {
2678					return err
2679				}
2680				agupm.ID = &ID
2681			}
2682		}
2683	}
2684
2685	return nil
2686}
2687
2688// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2689type ApplicationGatewayURLPathMapPropertiesFormat struct {
2690	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2691	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2692	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2693	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2694	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2695	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2696	// PathRules - Path rule of URL path map resource.
2697	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2698	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2699	ProvisioningState *string `json:"provisioningState,omitempty"`
2700}
2701
2702// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2703// configuration.
2704type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2705	// Enabled - Whether the web application firewall is enabled or not.
2706	Enabled *bool `json:"enabled,omitempty"`
2707	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2708	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2709	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2710	RuleSetType *string `json:"ruleSetType,omitempty"`
2711	// RuleSetVersion - The version of the rule set type.
2712	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2713	// DisabledRuleGroups - The disabled rule groups.
2714	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2715	// RequestBodyCheck - Whether allow WAF to check request Body.
2716	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2717	// MaxRequestBodySize - Maximum request body size for WAF.
2718	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2719}
2720
2721// ApplicationSecurityGroup an application security group in a resource group.
2722type ApplicationSecurityGroup struct {
2723	autorest.Response `json:"-"`
2724	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2725	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2726	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2727	Etag *string `json:"etag,omitempty"`
2728	// ID - Resource ID.
2729	ID *string `json:"id,omitempty"`
2730	// Name - READ-ONLY; Resource name.
2731	Name *string `json:"name,omitempty"`
2732	// Type - READ-ONLY; Resource type.
2733	Type *string `json:"type,omitempty"`
2734	// Location - Resource location.
2735	Location *string `json:"location,omitempty"`
2736	// Tags - Resource tags.
2737	Tags map[string]*string `json:"tags"`
2738}
2739
2740// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2741func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2742	objectMap := make(map[string]interface{})
2743	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2744		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2745	}
2746	if asg.ID != nil {
2747		objectMap["id"] = asg.ID
2748	}
2749	if asg.Location != nil {
2750		objectMap["location"] = asg.Location
2751	}
2752	if asg.Tags != nil {
2753		objectMap["tags"] = asg.Tags
2754	}
2755	return json.Marshal(objectMap)
2756}
2757
2758// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2759func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2760	var m map[string]*json.RawMessage
2761	err := json.Unmarshal(body, &m)
2762	if err != nil {
2763		return err
2764	}
2765	for k, v := range m {
2766		switch k {
2767		case "properties":
2768			if v != nil {
2769				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2770				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2771				if err != nil {
2772					return err
2773				}
2774				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2775			}
2776		case "etag":
2777			if v != nil {
2778				var etag string
2779				err = json.Unmarshal(*v, &etag)
2780				if err != nil {
2781					return err
2782				}
2783				asg.Etag = &etag
2784			}
2785		case "id":
2786			if v != nil {
2787				var ID string
2788				err = json.Unmarshal(*v, &ID)
2789				if err != nil {
2790					return err
2791				}
2792				asg.ID = &ID
2793			}
2794		case "name":
2795			if v != nil {
2796				var name string
2797				err = json.Unmarshal(*v, &name)
2798				if err != nil {
2799					return err
2800				}
2801				asg.Name = &name
2802			}
2803		case "type":
2804			if v != nil {
2805				var typeVar string
2806				err = json.Unmarshal(*v, &typeVar)
2807				if err != nil {
2808					return err
2809				}
2810				asg.Type = &typeVar
2811			}
2812		case "location":
2813			if v != nil {
2814				var location string
2815				err = json.Unmarshal(*v, &location)
2816				if err != nil {
2817					return err
2818				}
2819				asg.Location = &location
2820			}
2821		case "tags":
2822			if v != nil {
2823				var tags map[string]*string
2824				err = json.Unmarshal(*v, &tags)
2825				if err != nil {
2826					return err
2827				}
2828				asg.Tags = tags
2829			}
2830		}
2831	}
2832
2833	return nil
2834}
2835
2836// ApplicationSecurityGroupListResult a list of application security groups.
2837type ApplicationSecurityGroupListResult struct {
2838	autorest.Response `json:"-"`
2839	// Value - A list of application security groups.
2840	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2841	// NextLink - READ-ONLY; The URL to get the next set of results.
2842	NextLink *string `json:"nextLink,omitempty"`
2843}
2844
2845// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2846func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2847	objectMap := make(map[string]interface{})
2848	if asglr.Value != nil {
2849		objectMap["value"] = asglr.Value
2850	}
2851	return json.Marshal(objectMap)
2852}
2853
2854// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2855// ApplicationSecurityGroup values.
2856type ApplicationSecurityGroupListResultIterator struct {
2857	i    int
2858	page ApplicationSecurityGroupListResultPage
2859}
2860
2861// NextWithContext advances to the next value.  If there was an error making
2862// the request the iterator does not advance and the error is returned.
2863func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2864	if tracing.IsEnabled() {
2865		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2866		defer func() {
2867			sc := -1
2868			if iter.Response().Response.Response != nil {
2869				sc = iter.Response().Response.Response.StatusCode
2870			}
2871			tracing.EndSpan(ctx, sc, err)
2872		}()
2873	}
2874	iter.i++
2875	if iter.i < len(iter.page.Values()) {
2876		return nil
2877	}
2878	err = iter.page.NextWithContext(ctx)
2879	if err != nil {
2880		iter.i--
2881		return err
2882	}
2883	iter.i = 0
2884	return nil
2885}
2886
2887// Next advances to the next value.  If there was an error making
2888// the request the iterator does not advance and the error is returned.
2889// Deprecated: Use NextWithContext() instead.
2890func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2891	return iter.NextWithContext(context.Background())
2892}
2893
2894// NotDone returns true if the enumeration should be started or is not yet complete.
2895func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2896	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2897}
2898
2899// Response returns the raw server response from the last page request.
2900func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2901	return iter.page.Response()
2902}
2903
2904// Value returns the current value or a zero-initialized value if the
2905// iterator has advanced beyond the end of the collection.
2906func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2907	if !iter.page.NotDone() {
2908		return ApplicationSecurityGroup{}
2909	}
2910	return iter.page.Values()[iter.i]
2911}
2912
2913// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2914func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2915	return ApplicationSecurityGroupListResultIterator{page: page}
2916}
2917
2918// IsEmpty returns true if the ListResult contains no values.
2919func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2920	return asglr.Value == nil || len(*asglr.Value) == 0
2921}
2922
2923// hasNextLink returns true if the NextLink is not empty.
2924func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2925	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2926}
2927
2928// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2929// It returns nil if no more results exist.
2930func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2931	if !asglr.hasNextLink() {
2932		return nil, nil
2933	}
2934	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2935		autorest.AsJSON(),
2936		autorest.AsGet(),
2937		autorest.WithBaseURL(to.String(asglr.NextLink)))
2938}
2939
2940// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2941type ApplicationSecurityGroupListResultPage struct {
2942	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2943	asglr ApplicationSecurityGroupListResult
2944}
2945
2946// NextWithContext advances to the next page of values.  If there was an error making
2947// the request the page does not advance and the error is returned.
2948func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2949	if tracing.IsEnabled() {
2950		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2951		defer func() {
2952			sc := -1
2953			if page.Response().Response.Response != nil {
2954				sc = page.Response().Response.Response.StatusCode
2955			}
2956			tracing.EndSpan(ctx, sc, err)
2957		}()
2958	}
2959	for {
2960		next, err := page.fn(ctx, page.asglr)
2961		if err != nil {
2962			return err
2963		}
2964		page.asglr = next
2965		if !next.hasNextLink() || !next.IsEmpty() {
2966			break
2967		}
2968	}
2969	return nil
2970}
2971
2972// Next advances to the next page of values.  If there was an error making
2973// the request the page does not advance and the error is returned.
2974// Deprecated: Use NextWithContext() instead.
2975func (page *ApplicationSecurityGroupListResultPage) Next() error {
2976	return page.NextWithContext(context.Background())
2977}
2978
2979// NotDone returns true if the page enumeration should be started or is not yet complete.
2980func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2981	return !page.asglr.IsEmpty()
2982}
2983
2984// Response returns the raw server response from the last page request.
2985func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2986	return page.asglr
2987}
2988
2989// Values returns the slice of values for the current page or nil if there are no values.
2990func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2991	if page.asglr.IsEmpty() {
2992		return nil
2993	}
2994	return *page.asglr.Value
2995}
2996
2997// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2998func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2999	return ApplicationSecurityGroupListResultPage{
3000		fn:    getNextPage,
3001		asglr: cur,
3002	}
3003}
3004
3005// ApplicationSecurityGroupPropertiesFormat application security group properties.
3006type ApplicationSecurityGroupPropertiesFormat struct {
3007	// ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
3008	ResourceGUID *string `json:"resourceGuid,omitempty"`
3009	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3010	ProvisioningState *string `json:"provisioningState,omitempty"`
3011}
3012
3013// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3014func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3015	objectMap := make(map[string]interface{})
3016	return json.Marshal(objectMap)
3017}
3018
3019// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3020// of a long-running operation.
3021type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3022	azure.FutureAPI
3023	// Result returns the result of the asynchronous operation.
3024	// If the operation has not completed it will return an error.
3025	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3026}
3027
3028// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3029func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3030	var azFuture azure.Future
3031	if err := json.Unmarshal(body, &azFuture); err != nil {
3032		return err
3033	}
3034	future.FutureAPI = &azFuture
3035	future.Result = future.result
3036	return nil
3037}
3038
3039// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3040func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3041	var done bool
3042	done, err = future.DoneWithContext(context.Background(), client)
3043	if err != nil {
3044		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3045		return
3046	}
3047	if !done {
3048		asg.Response.Response = future.Response()
3049		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3050		return
3051	}
3052	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3053	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3054		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3055		if err != nil {
3056			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3057		}
3058	}
3059	return
3060}
3061
3062// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3063// long-running operation.
3064type ApplicationSecurityGroupsDeleteFuture struct {
3065	azure.FutureAPI
3066	// Result returns the result of the asynchronous operation.
3067	// If the operation has not completed it will return an error.
3068	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3069}
3070
3071// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3072func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3073	var azFuture azure.Future
3074	if err := json.Unmarshal(body, &azFuture); err != nil {
3075		return err
3076	}
3077	future.FutureAPI = &azFuture
3078	future.Result = future.result
3079	return nil
3080}
3081
3082// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3083func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3084	var done bool
3085	done, err = future.DoneWithContext(context.Background(), client)
3086	if err != nil {
3087		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3088		return
3089	}
3090	if !done {
3091		ar.Response = future.Response()
3092		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3093		return
3094	}
3095	ar.Response = future.Response()
3096	return
3097}
3098
3099// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3100// that belongs to an ExpressRouteCircuit.
3101type AuthorizationListResult struct {
3102	autorest.Response `json:"-"`
3103	// Value - The authorizations in an ExpressRoute Circuit.
3104	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3105	// NextLink - The URL to get the next set of results.
3106	NextLink *string `json:"nextLink,omitempty"`
3107}
3108
3109// AuthorizationListResultIterator provides access to a complete listing of
3110// ExpressRouteCircuitAuthorization values.
3111type AuthorizationListResultIterator struct {
3112	i    int
3113	page AuthorizationListResultPage
3114}
3115
3116// NextWithContext advances to the next value.  If there was an error making
3117// the request the iterator does not advance and the error is returned.
3118func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3119	if tracing.IsEnabled() {
3120		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3121		defer func() {
3122			sc := -1
3123			if iter.Response().Response.Response != nil {
3124				sc = iter.Response().Response.Response.StatusCode
3125			}
3126			tracing.EndSpan(ctx, sc, err)
3127		}()
3128	}
3129	iter.i++
3130	if iter.i < len(iter.page.Values()) {
3131		return nil
3132	}
3133	err = iter.page.NextWithContext(ctx)
3134	if err != nil {
3135		iter.i--
3136		return err
3137	}
3138	iter.i = 0
3139	return nil
3140}
3141
3142// Next advances to the next value.  If there was an error making
3143// the request the iterator does not advance and the error is returned.
3144// Deprecated: Use NextWithContext() instead.
3145func (iter *AuthorizationListResultIterator) Next() error {
3146	return iter.NextWithContext(context.Background())
3147}
3148
3149// NotDone returns true if the enumeration should be started or is not yet complete.
3150func (iter AuthorizationListResultIterator) NotDone() bool {
3151	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3152}
3153
3154// Response returns the raw server response from the last page request.
3155func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3156	return iter.page.Response()
3157}
3158
3159// Value returns the current value or a zero-initialized value if the
3160// iterator has advanced beyond the end of the collection.
3161func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3162	if !iter.page.NotDone() {
3163		return ExpressRouteCircuitAuthorization{}
3164	}
3165	return iter.page.Values()[iter.i]
3166}
3167
3168// Creates a new instance of the AuthorizationListResultIterator type.
3169func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3170	return AuthorizationListResultIterator{page: page}
3171}
3172
3173// IsEmpty returns true if the ListResult contains no values.
3174func (alr AuthorizationListResult) IsEmpty() bool {
3175	return alr.Value == nil || len(*alr.Value) == 0
3176}
3177
3178// hasNextLink returns true if the NextLink is not empty.
3179func (alr AuthorizationListResult) hasNextLink() bool {
3180	return alr.NextLink != nil && len(*alr.NextLink) != 0
3181}
3182
3183// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3184// It returns nil if no more results exist.
3185func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3186	if !alr.hasNextLink() {
3187		return nil, nil
3188	}
3189	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3190		autorest.AsJSON(),
3191		autorest.AsGet(),
3192		autorest.WithBaseURL(to.String(alr.NextLink)))
3193}
3194
3195// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3196type AuthorizationListResultPage struct {
3197	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3198	alr AuthorizationListResult
3199}
3200
3201// NextWithContext advances to the next page of values.  If there was an error making
3202// the request the page does not advance and the error is returned.
3203func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3204	if tracing.IsEnabled() {
3205		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3206		defer func() {
3207			sc := -1
3208			if page.Response().Response.Response != nil {
3209				sc = page.Response().Response.Response.StatusCode
3210			}
3211			tracing.EndSpan(ctx, sc, err)
3212		}()
3213	}
3214	for {
3215		next, err := page.fn(ctx, page.alr)
3216		if err != nil {
3217			return err
3218		}
3219		page.alr = next
3220		if !next.hasNextLink() || !next.IsEmpty() {
3221			break
3222		}
3223	}
3224	return nil
3225}
3226
3227// Next advances to the next page of values.  If there was an error making
3228// the request the page does not advance and the error is returned.
3229// Deprecated: Use NextWithContext() instead.
3230func (page *AuthorizationListResultPage) Next() error {
3231	return page.NextWithContext(context.Background())
3232}
3233
3234// NotDone returns true if the page enumeration should be started or is not yet complete.
3235func (page AuthorizationListResultPage) NotDone() bool {
3236	return !page.alr.IsEmpty()
3237}
3238
3239// Response returns the raw server response from the last page request.
3240func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3241	return page.alr
3242}
3243
3244// Values returns the slice of values for the current page or nil if there are no values.
3245func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3246	if page.alr.IsEmpty() {
3247		return nil
3248	}
3249	return *page.alr.Value
3250}
3251
3252// Creates a new instance of the AuthorizationListResultPage type.
3253func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3254	return AuthorizationListResultPage{
3255		fn:  getNextPage,
3256		alr: cur,
3257	}
3258}
3259
3260// AuthorizationPropertiesFormat ...
3261type AuthorizationPropertiesFormat struct {
3262	// AuthorizationKey - The authorization key.
3263	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3264	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3265	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3266	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3267	ProvisioningState *string `json:"provisioningState,omitempty"`
3268}
3269
3270// Availability availability of the metric.
3271type Availability struct {
3272	// TimeGrain - The time grain of the availability.
3273	TimeGrain *string `json:"timeGrain,omitempty"`
3274	// Retention - The retention of the availability.
3275	Retention *string `json:"retention,omitempty"`
3276	// BlobDuration - Duration of the availability blob.
3277	BlobDuration *string `json:"blobDuration,omitempty"`
3278}
3279
3280// AvailableProvidersList list of available countries with details.
3281type AvailableProvidersList struct {
3282	autorest.Response `json:"-"`
3283	// Countries - List of available countries.
3284	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3285}
3286
3287// AvailableProvidersListCity city or town details.
3288type AvailableProvidersListCity struct {
3289	// CityName - The city or town name.
3290	CityName *string `json:"cityName,omitempty"`
3291	// Providers - A list of Internet service providers.
3292	Providers *[]string `json:"providers,omitempty"`
3293}
3294
3295// AvailableProvidersListCountry country details.
3296type AvailableProvidersListCountry struct {
3297	// CountryName - The country name.
3298	CountryName *string `json:"countryName,omitempty"`
3299	// Providers - A list of Internet service providers.
3300	Providers *[]string `json:"providers,omitempty"`
3301	// States - List of available states in the country.
3302	States *[]AvailableProvidersListState `json:"states,omitempty"`
3303}
3304
3305// AvailableProvidersListParameters constraints that determine the list of available Internet service
3306// providers.
3307type AvailableProvidersListParameters struct {
3308	// AzureLocations - A list of Azure regions.
3309	AzureLocations *[]string `json:"azureLocations,omitempty"`
3310	// Country - The country for available providers list.
3311	Country *string `json:"country,omitempty"`
3312	// State - The state for available providers list.
3313	State *string `json:"state,omitempty"`
3314	// City - The city or town for available providers list.
3315	City *string `json:"city,omitempty"`
3316}
3317
3318// AvailableProvidersListState state details.
3319type AvailableProvidersListState struct {
3320	// StateName - The state name.
3321	StateName *string `json:"stateName,omitempty"`
3322	// Providers - A list of Internet service providers.
3323	Providers *[]string `json:"providers,omitempty"`
3324	// Cities - List of available cities or towns in the state.
3325	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3326}
3327
3328// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3329// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3330// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3331// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3332// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3333// and error information regarding the failure.
3334type AzureAsyncOperationResult struct {
3335	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3336	Status OperationStatus `json:"status,omitempty"`
3337	Error  *Error          `json:"error,omitempty"`
3338}
3339
3340// AzureFirewall azure Firewall resource
3341type AzureFirewall struct {
3342	autorest.Response              `json:"-"`
3343	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3344	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3345	Etag *string `json:"etag,omitempty"`
3346	// ID - Resource ID.
3347	ID *string `json:"id,omitempty"`
3348	// Name - READ-ONLY; Resource name.
3349	Name *string `json:"name,omitempty"`
3350	// Type - READ-ONLY; Resource type.
3351	Type *string `json:"type,omitempty"`
3352	// Location - Resource location.
3353	Location *string `json:"location,omitempty"`
3354	// Tags - Resource tags.
3355	Tags map[string]*string `json:"tags"`
3356}
3357
3358// MarshalJSON is the custom marshaler for AzureFirewall.
3359func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3360	objectMap := make(map[string]interface{})
3361	if af.AzureFirewallPropertiesFormat != nil {
3362		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3363	}
3364	if af.ID != nil {
3365		objectMap["id"] = af.ID
3366	}
3367	if af.Location != nil {
3368		objectMap["location"] = af.Location
3369	}
3370	if af.Tags != nil {
3371		objectMap["tags"] = af.Tags
3372	}
3373	return json.Marshal(objectMap)
3374}
3375
3376// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3377func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3378	var m map[string]*json.RawMessage
3379	err := json.Unmarshal(body, &m)
3380	if err != nil {
3381		return err
3382	}
3383	for k, v := range m {
3384		switch k {
3385		case "properties":
3386			if v != nil {
3387				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3388				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3389				if err != nil {
3390					return err
3391				}
3392				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3393			}
3394		case "etag":
3395			if v != nil {
3396				var etag string
3397				err = json.Unmarshal(*v, &etag)
3398				if err != nil {
3399					return err
3400				}
3401				af.Etag = &etag
3402			}
3403		case "id":
3404			if v != nil {
3405				var ID string
3406				err = json.Unmarshal(*v, &ID)
3407				if err != nil {
3408					return err
3409				}
3410				af.ID = &ID
3411			}
3412		case "name":
3413			if v != nil {
3414				var name string
3415				err = json.Unmarshal(*v, &name)
3416				if err != nil {
3417					return err
3418				}
3419				af.Name = &name
3420			}
3421		case "type":
3422			if v != nil {
3423				var typeVar string
3424				err = json.Unmarshal(*v, &typeVar)
3425				if err != nil {
3426					return err
3427				}
3428				af.Type = &typeVar
3429			}
3430		case "location":
3431			if v != nil {
3432				var location string
3433				err = json.Unmarshal(*v, &location)
3434				if err != nil {
3435					return err
3436				}
3437				af.Location = &location
3438			}
3439		case "tags":
3440			if v != nil {
3441				var tags map[string]*string
3442				err = json.Unmarshal(*v, &tags)
3443				if err != nil {
3444					return err
3445				}
3446				af.Tags = tags
3447			}
3448		}
3449	}
3450
3451	return nil
3452}
3453
3454// AzureFirewallApplicationRule properties of an application rule.
3455type AzureFirewallApplicationRule struct {
3456	// Name - Name of the application rule.
3457	Name *string `json:"name,omitempty"`
3458	// Description - Description of the rule.
3459	Description *string `json:"description,omitempty"`
3460	// SourceAddresses - List of source IP addresses for this rule.
3461	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3462	// Protocols - Array of ApplicationRuleProtocols.
3463	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3464	// TargetUrls - List of URLs for this rule.
3465	TargetUrls *[]string `json:"targetUrls,omitempty"`
3466}
3467
3468// AzureFirewallApplicationRuleCollection application rule collection resource
3469type AzureFirewallApplicationRuleCollection struct {
3470	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3471	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3472	Name *string `json:"name,omitempty"`
3473	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3474	Etag *string `json:"etag,omitempty"`
3475	// ID - Resource ID.
3476	ID *string `json:"id,omitempty"`
3477}
3478
3479// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3480func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3481	objectMap := make(map[string]interface{})
3482	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3483		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3484	}
3485	if afarc.Name != nil {
3486		objectMap["name"] = afarc.Name
3487	}
3488	if afarc.ID != nil {
3489		objectMap["id"] = afarc.ID
3490	}
3491	return json.Marshal(objectMap)
3492}
3493
3494// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3495func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3496	var m map[string]*json.RawMessage
3497	err := json.Unmarshal(body, &m)
3498	if err != nil {
3499		return err
3500	}
3501	for k, v := range m {
3502		switch k {
3503		case "properties":
3504			if v != nil {
3505				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3506				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3507				if err != nil {
3508					return err
3509				}
3510				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3511			}
3512		case "name":
3513			if v != nil {
3514				var name string
3515				err = json.Unmarshal(*v, &name)
3516				if err != nil {
3517					return err
3518				}
3519				afarc.Name = &name
3520			}
3521		case "etag":
3522			if v != nil {
3523				var etag string
3524				err = json.Unmarshal(*v, &etag)
3525				if err != nil {
3526					return err
3527				}
3528				afarc.Etag = &etag
3529			}
3530		case "id":
3531			if v != nil {
3532				var ID string
3533				err = json.Unmarshal(*v, &ID)
3534				if err != nil {
3535					return err
3536				}
3537				afarc.ID = &ID
3538			}
3539		}
3540	}
3541
3542	return nil
3543}
3544
3545// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
3546type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
3547	// Priority - Priority of the application rule collection resource.
3548	Priority *int32 `json:"priority,omitempty"`
3549	// Action - The action type of a rule collection
3550	Action *AzureFirewallRCAction `json:"action,omitempty"`
3551	// Rules - Collection of rules used by a application rule collection.
3552	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
3553	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3554	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3555}
3556
3557// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
3558type AzureFirewallApplicationRuleProtocol struct {
3559	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
3560	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
3561	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
3562	Port *int32 `json:"port,omitempty"`
3563}
3564
3565// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
3566type AzureFirewallIPConfiguration struct {
3567	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
3568	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
3569	Name *string `json:"name,omitempty"`
3570	// Etag - A unique read-only string that changes whenever the resource is updated.
3571	Etag *string `json:"etag,omitempty"`
3572	// ID - Resource ID.
3573	ID *string `json:"id,omitempty"`
3574}
3575
3576// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
3577func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
3578	objectMap := make(map[string]interface{})
3579	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
3580		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
3581	}
3582	if afic.Name != nil {
3583		objectMap["name"] = afic.Name
3584	}
3585	if afic.Etag != nil {
3586		objectMap["etag"] = afic.Etag
3587	}
3588	if afic.ID != nil {
3589		objectMap["id"] = afic.ID
3590	}
3591	return json.Marshal(objectMap)
3592}
3593
3594// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
3595func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
3596	var m map[string]*json.RawMessage
3597	err := json.Unmarshal(body, &m)
3598	if err != nil {
3599		return err
3600	}
3601	for k, v := range m {
3602		switch k {
3603		case "properties":
3604			if v != nil {
3605				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
3606				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
3607				if err != nil {
3608					return err
3609				}
3610				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
3611			}
3612		case "name":
3613			if v != nil {
3614				var name string
3615				err = json.Unmarshal(*v, &name)
3616				if err != nil {
3617					return err
3618				}
3619				afic.Name = &name
3620			}
3621		case "etag":
3622			if v != nil {
3623				var etag string
3624				err = json.Unmarshal(*v, &etag)
3625				if err != nil {
3626					return err
3627				}
3628				afic.Etag = &etag
3629			}
3630		case "id":
3631			if v != nil {
3632				var ID string
3633				err = json.Unmarshal(*v, &ID)
3634				if err != nil {
3635					return err
3636				}
3637				afic.ID = &ID
3638			}
3639		}
3640	}
3641
3642	return nil
3643}
3644
3645// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
3646type AzureFirewallIPConfigurationPropertiesFormat struct {
3647	// PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
3648	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
3649	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
3650	Subnet *SubResource `json:"subnet,omitempty"`
3651	// InternalPublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input.
3652	InternalPublicIPAddress *SubResource `json:"internalPublicIpAddress,omitempty"`
3653	// PublicIPAddress - Reference of the PublicIP resource. This field is populated in the output.
3654	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
3655	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3656	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3657}
3658
3659// AzureFirewallListResult response for ListAzureFirewalls API service call.
3660type AzureFirewallListResult struct {
3661	autorest.Response `json:"-"`
3662	// Value - List of a Azure Firewalls in a resource group.
3663	Value *[]AzureFirewall `json:"value,omitempty"`
3664	// NextLink - URL to get the next set of results.
3665	NextLink *string `json:"nextLink,omitempty"`
3666}
3667
3668// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
3669type AzureFirewallListResultIterator struct {
3670	i    int
3671	page AzureFirewallListResultPage
3672}
3673
3674// NextWithContext advances to the next value.  If there was an error making
3675// the request the iterator does not advance and the error is returned.
3676func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
3677	if tracing.IsEnabled() {
3678		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
3679		defer func() {
3680			sc := -1
3681			if iter.Response().Response.Response != nil {
3682				sc = iter.Response().Response.Response.StatusCode
3683			}
3684			tracing.EndSpan(ctx, sc, err)
3685		}()
3686	}
3687	iter.i++
3688	if iter.i < len(iter.page.Values()) {
3689		return nil
3690	}
3691	err = iter.page.NextWithContext(ctx)
3692	if err != nil {
3693		iter.i--
3694		return err
3695	}
3696	iter.i = 0
3697	return nil
3698}
3699
3700// Next advances to the next value.  If there was an error making
3701// the request the iterator does not advance and the error is returned.
3702// Deprecated: Use NextWithContext() instead.
3703func (iter *AzureFirewallListResultIterator) Next() error {
3704	return iter.NextWithContext(context.Background())
3705}
3706
3707// NotDone returns true if the enumeration should be started or is not yet complete.
3708func (iter AzureFirewallListResultIterator) NotDone() bool {
3709	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3710}
3711
3712// Response returns the raw server response from the last page request.
3713func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
3714	return iter.page.Response()
3715}
3716
3717// Value returns the current value or a zero-initialized value if the
3718// iterator has advanced beyond the end of the collection.
3719func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
3720	if !iter.page.NotDone() {
3721		return AzureFirewall{}
3722	}
3723	return iter.page.Values()[iter.i]
3724}
3725
3726// Creates a new instance of the AzureFirewallListResultIterator type.
3727func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
3728	return AzureFirewallListResultIterator{page: page}
3729}
3730
3731// IsEmpty returns true if the ListResult contains no values.
3732func (aflr AzureFirewallListResult) IsEmpty() bool {
3733	return aflr.Value == nil || len(*aflr.Value) == 0
3734}
3735
3736// hasNextLink returns true if the NextLink is not empty.
3737func (aflr AzureFirewallListResult) hasNextLink() bool {
3738	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
3739}
3740
3741// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
3742// It returns nil if no more results exist.
3743func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
3744	if !aflr.hasNextLink() {
3745		return nil, nil
3746	}
3747	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3748		autorest.AsJSON(),
3749		autorest.AsGet(),
3750		autorest.WithBaseURL(to.String(aflr.NextLink)))
3751}
3752
3753// AzureFirewallListResultPage contains a page of AzureFirewall values.
3754type AzureFirewallListResultPage struct {
3755	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
3756	aflr AzureFirewallListResult
3757}
3758
3759// NextWithContext advances to the next page of values.  If there was an error making
3760// the request the page does not advance and the error is returned.
3761func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
3762	if tracing.IsEnabled() {
3763		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
3764		defer func() {
3765			sc := -1
3766			if page.Response().Response.Response != nil {
3767				sc = page.Response().Response.Response.StatusCode
3768			}
3769			tracing.EndSpan(ctx, sc, err)
3770		}()
3771	}
3772	for {
3773		next, err := page.fn(ctx, page.aflr)
3774		if err != nil {
3775			return err
3776		}
3777		page.aflr = next
3778		if !next.hasNextLink() || !next.IsEmpty() {
3779			break
3780		}
3781	}
3782	return nil
3783}
3784
3785// Next advances to the next page of values.  If there was an error making
3786// the request the page does not advance and the error is returned.
3787// Deprecated: Use NextWithContext() instead.
3788func (page *AzureFirewallListResultPage) Next() error {
3789	return page.NextWithContext(context.Background())
3790}
3791
3792// NotDone returns true if the page enumeration should be started or is not yet complete.
3793func (page AzureFirewallListResultPage) NotDone() bool {
3794	return !page.aflr.IsEmpty()
3795}
3796
3797// Response returns the raw server response from the last page request.
3798func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
3799	return page.aflr
3800}
3801
3802// Values returns the slice of values for the current page or nil if there are no values.
3803func (page AzureFirewallListResultPage) Values() []AzureFirewall {
3804	if page.aflr.IsEmpty() {
3805		return nil
3806	}
3807	return *page.aflr.Value
3808}
3809
3810// Creates a new instance of the AzureFirewallListResultPage type.
3811func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
3812	return AzureFirewallListResultPage{
3813		fn:   getNextPage,
3814		aflr: cur,
3815	}
3816}
3817
3818// AzureFirewallNetworkRule properties of the network rule.
3819type AzureFirewallNetworkRule struct {
3820	// Name - Name of the network rule.
3821	Name *string `json:"name,omitempty"`
3822	// Description - Description of the rule.
3823	Description *string `json:"description,omitempty"`
3824	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
3825	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
3826	// SourceAddresses - List of source IP addresses for this rule.
3827	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3828	// DestinationAddresses - List of destination IP addresses.
3829	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3830	// DestinationPorts - List of destination ports.
3831	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
3832}
3833
3834// AzureFirewallNetworkRuleCollection network rule collection resource
3835type AzureFirewallNetworkRuleCollection struct {
3836	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3837	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3838	Name *string `json:"name,omitempty"`
3839	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3840	Etag *string `json:"etag,omitempty"`
3841	// ID - Resource ID.
3842	ID *string `json:"id,omitempty"`
3843}
3844
3845// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
3846func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
3847	objectMap := make(map[string]interface{})
3848	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
3849		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
3850	}
3851	if afnrc.Name != nil {
3852		objectMap["name"] = afnrc.Name
3853	}
3854	if afnrc.ID != nil {
3855		objectMap["id"] = afnrc.ID
3856	}
3857	return json.Marshal(objectMap)
3858}
3859
3860// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
3861func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
3862	var m map[string]*json.RawMessage
3863	err := json.Unmarshal(body, &m)
3864	if err != nil {
3865		return err
3866	}
3867	for k, v := range m {
3868		switch k {
3869		case "properties":
3870			if v != nil {
3871				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
3872				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
3873				if err != nil {
3874					return err
3875				}
3876				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
3877			}
3878		case "name":
3879			if v != nil {
3880				var name string
3881				err = json.Unmarshal(*v, &name)
3882				if err != nil {
3883					return err
3884				}
3885				afnrc.Name = &name
3886			}
3887		case "etag":
3888			if v != nil {
3889				var etag string
3890				err = json.Unmarshal(*v, &etag)
3891				if err != nil {
3892					return err
3893				}
3894				afnrc.Etag = &etag
3895			}
3896		case "id":
3897			if v != nil {
3898				var ID string
3899				err = json.Unmarshal(*v, &ID)
3900				if err != nil {
3901					return err
3902				}
3903				afnrc.ID = &ID
3904			}
3905		}
3906	}
3907
3908	return nil
3909}
3910
3911// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
3912type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
3913	// Priority - Priority of the network rule collection resource.
3914	Priority *int32 `json:"priority,omitempty"`
3915	// Action - The action type of a rule collection
3916	Action *AzureFirewallRCAction `json:"action,omitempty"`
3917	// Rules - Collection of rules used by a network rule collection.
3918	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
3919	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3920	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3921}
3922
3923// AzureFirewallPropertiesFormat properties of the Azure Firewall.
3924type AzureFirewallPropertiesFormat struct {
3925	// ApplicationRuleCollections - Collection of application rule collections used by a Azure Firewall.
3926	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
3927	// NetworkRuleCollections - Collection of network rule collections used by a Azure Firewall.
3928	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
3929	// IPConfigurations - IP configuration of the Azure Firewall resource.
3930	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
3931	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3932	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3933}
3934
3935// AzureFirewallRCAction properties of the AzureFirewallRCAction.
3936type AzureFirewallRCAction struct {
3937	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
3938	Type AzureFirewallRCActionType `json:"type,omitempty"`
3939}
3940
3941// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3942// long-running operation.
3943type AzureFirewallsCreateOrUpdateFuture struct {
3944	azure.FutureAPI
3945	// Result returns the result of the asynchronous operation.
3946	// If the operation has not completed it will return an error.
3947	Result func(AzureFirewallsClient) (AzureFirewall, error)
3948}
3949
3950// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3951func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3952	var azFuture azure.Future
3953	if err := json.Unmarshal(body, &azFuture); err != nil {
3954		return err
3955	}
3956	future.FutureAPI = &azFuture
3957	future.Result = future.result
3958	return nil
3959}
3960
3961// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
3962func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
3963	var done bool
3964	done, err = future.DoneWithContext(context.Background(), client)
3965	if err != nil {
3966		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3967		return
3968	}
3969	if !done {
3970		af.Response.Response = future.Response()
3971		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
3972		return
3973	}
3974	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3975	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
3976		af, err = client.CreateOrUpdateResponder(af.Response.Response)
3977		if err != nil {
3978			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
3979		}
3980	}
3981	return
3982}
3983
3984// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3985// operation.
3986type AzureFirewallsDeleteFuture struct {
3987	azure.FutureAPI
3988	// Result returns the result of the asynchronous operation.
3989	// If the operation has not completed it will return an error.
3990	Result func(AzureFirewallsClient) (autorest.Response, error)
3991}
3992
3993// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3994func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
3995	var azFuture azure.Future
3996	if err := json.Unmarshal(body, &azFuture); err != nil {
3997		return err
3998	}
3999	future.FutureAPI = &azFuture
4000	future.Result = future.result
4001	return nil
4002}
4003
4004// result is the default implementation for AzureFirewallsDeleteFuture.Result.
4005func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
4006	var done bool
4007	done, err = future.DoneWithContext(context.Background(), client)
4008	if err != nil {
4009		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
4010		return
4011	}
4012	if !done {
4013		ar.Response = future.Response()
4014		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
4015		return
4016	}
4017	ar.Response = future.Response()
4018	return
4019}
4020
4021// AzureReachabilityReport azure reachability report details.
4022type AzureReachabilityReport struct {
4023	autorest.Response `json:"-"`
4024	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4025	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4026	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4027	// ReachabilityReport - List of Azure reachability report items.
4028	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4029}
4030
4031// AzureReachabilityReportItem azure reachability report details for a given provider location.
4032type AzureReachabilityReportItem struct {
4033	// Provider - The Internet service provider.
4034	Provider *string `json:"provider,omitempty"`
4035	// AzureLocation - The Azure region.
4036	AzureLocation *string `json:"azureLocation,omitempty"`
4037	// Latencies - List of latency details for each of the time series.
4038	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4039}
4040
4041// AzureReachabilityReportLatencyInfo details on latency for a time series.
4042type AzureReachabilityReportLatencyInfo struct {
4043	// TimeStamp - The time stamp.
4044	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4045	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4046	Score *int32 `json:"score,omitempty"`
4047}
4048
4049// AzureReachabilityReportLocation parameters that define a geographic location.
4050type AzureReachabilityReportLocation struct {
4051	// Country - The name of the country.
4052	Country *string `json:"country,omitempty"`
4053	// State - The name of the state.
4054	State *string `json:"state,omitempty"`
4055	// City - The name of the city or town.
4056	City *string `json:"city,omitempty"`
4057}
4058
4059// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4060type AzureReachabilityReportParameters struct {
4061	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4062	// Providers - List of Internet service providers.
4063	Providers *[]string `json:"providers,omitempty"`
4064	// AzureLocations - Optional Azure regions to scope the query to.
4065	AzureLocations *[]string `json:"azureLocations,omitempty"`
4066	// StartTime - The start time for the Azure reachability report.
4067	StartTime *date.Time `json:"startTime,omitempty"`
4068	// EndTime - The end time for the Azure reachability report.
4069	EndTime *date.Time `json:"endTime,omitempty"`
4070}
4071
4072// BackendAddressPool pool of backend IP addresses.
4073type BackendAddressPool struct {
4074	autorest.Response `json:"-"`
4075	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
4076	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
4077	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4078	Name *string `json:"name,omitempty"`
4079	// Etag - A unique read-only string that changes whenever the resource is updated.
4080	Etag *string `json:"etag,omitempty"`
4081	// ID - Resource ID.
4082	ID *string `json:"id,omitempty"`
4083}
4084
4085// MarshalJSON is the custom marshaler for BackendAddressPool.
4086func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
4087	objectMap := make(map[string]interface{})
4088	if bap.BackendAddressPoolPropertiesFormat != nil {
4089		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
4090	}
4091	if bap.Name != nil {
4092		objectMap["name"] = bap.Name
4093	}
4094	if bap.Etag != nil {
4095		objectMap["etag"] = bap.Etag
4096	}
4097	if bap.ID != nil {
4098		objectMap["id"] = bap.ID
4099	}
4100	return json.Marshal(objectMap)
4101}
4102
4103// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
4104func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
4105	var m map[string]*json.RawMessage
4106	err := json.Unmarshal(body, &m)
4107	if err != nil {
4108		return err
4109	}
4110	for k, v := range m {
4111		switch k {
4112		case "properties":
4113			if v != nil {
4114				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
4115				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
4116				if err != nil {
4117					return err
4118				}
4119				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
4120			}
4121		case "name":
4122			if v != nil {
4123				var name string
4124				err = json.Unmarshal(*v, &name)
4125				if err != nil {
4126					return err
4127				}
4128				bap.Name = &name
4129			}
4130		case "etag":
4131			if v != nil {
4132				var etag string
4133				err = json.Unmarshal(*v, &etag)
4134				if err != nil {
4135					return err
4136				}
4137				bap.Etag = &etag
4138			}
4139		case "id":
4140			if v != nil {
4141				var ID string
4142				err = json.Unmarshal(*v, &ID)
4143				if err != nil {
4144					return err
4145				}
4146				bap.ID = &ID
4147			}
4148		}
4149	}
4150
4151	return nil
4152}
4153
4154// BackendAddressPoolPropertiesFormat properties of the backend address pool.
4155type BackendAddressPoolPropertiesFormat struct {
4156	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
4157	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
4158	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
4159	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
4160	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
4161	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
4162	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4163	ProvisioningState *string `json:"provisioningState,omitempty"`
4164}
4165
4166// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
4167func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
4168	objectMap := make(map[string]interface{})
4169	if bappf.ProvisioningState != nil {
4170		objectMap["provisioningState"] = bappf.ProvisioningState
4171	}
4172	return json.Marshal(objectMap)
4173}
4174
4175// BGPCommunity contains bgp community information offered in Service Community resources.
4176type BGPCommunity struct {
4177	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
4178	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
4179	// CommunityName - The name of the bgp community. e.g. Skype.
4180	CommunityName *string `json:"communityName,omitempty"`
4181	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
4182	CommunityValue *string `json:"communityValue,omitempty"`
4183	// CommunityPrefixes - The prefixes that the bgp community contains.
4184	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
4185	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
4186	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
4187	// ServiceGroup - The service group of the bgp community contains.
4188	ServiceGroup *string `json:"serviceGroup,omitempty"`
4189}
4190
4191// BgpPeerStatus BGP peer status details
4192type BgpPeerStatus struct {
4193	// LocalAddress - READ-ONLY; The virtual network gateway's local address
4194	LocalAddress *string `json:"localAddress,omitempty"`
4195	// Neighbor - READ-ONLY; The remote BGP peer
4196	Neighbor *string `json:"neighbor,omitempty"`
4197	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
4198	Asn *int32 `json:"asn,omitempty"`
4199	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
4200	State BgpPeerState `json:"state,omitempty"`
4201	// ConnectedDuration - READ-ONLY; For how long the peering has been up
4202	ConnectedDuration *string `json:"connectedDuration,omitempty"`
4203	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
4204	RoutesReceived *int64 `json:"routesReceived,omitempty"`
4205	// MessagesSent - READ-ONLY; The number of BGP messages sent
4206	MessagesSent *int64 `json:"messagesSent,omitempty"`
4207	// MessagesReceived - READ-ONLY; The number of BGP messages received
4208	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
4209}
4210
4211// MarshalJSON is the custom marshaler for BgpPeerStatus.
4212func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
4213	objectMap := make(map[string]interface{})
4214	return json.Marshal(objectMap)
4215}
4216
4217// BgpPeerStatusListResult response for list BGP peer status API service call
4218type BgpPeerStatusListResult struct {
4219	autorest.Response `json:"-"`
4220	// Value - List of BGP peers
4221	Value *[]BgpPeerStatus `json:"value,omitempty"`
4222}
4223
4224// BgpServiceCommunity service Community Properties.
4225type BgpServiceCommunity struct {
4226	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
4227	// ID - Resource ID.
4228	ID *string `json:"id,omitempty"`
4229	// Name - READ-ONLY; Resource name.
4230	Name *string `json:"name,omitempty"`
4231	// Type - READ-ONLY; Resource type.
4232	Type *string `json:"type,omitempty"`
4233	// Location - Resource location.
4234	Location *string `json:"location,omitempty"`
4235	// Tags - Resource tags.
4236	Tags map[string]*string `json:"tags"`
4237}
4238
4239// MarshalJSON is the custom marshaler for BgpServiceCommunity.
4240func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
4241	objectMap := make(map[string]interface{})
4242	if bsc.BgpServiceCommunityPropertiesFormat != nil {
4243		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
4244	}
4245	if bsc.ID != nil {
4246		objectMap["id"] = bsc.ID
4247	}
4248	if bsc.Location != nil {
4249		objectMap["location"] = bsc.Location
4250	}
4251	if bsc.Tags != nil {
4252		objectMap["tags"] = bsc.Tags
4253	}
4254	return json.Marshal(objectMap)
4255}
4256
4257// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
4258func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
4259	var m map[string]*json.RawMessage
4260	err := json.Unmarshal(body, &m)
4261	if err != nil {
4262		return err
4263	}
4264	for k, v := range m {
4265		switch k {
4266		case "properties":
4267			if v != nil {
4268				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
4269				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
4270				if err != nil {
4271					return err
4272				}
4273				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
4274			}
4275		case "id":
4276			if v != nil {
4277				var ID string
4278				err = json.Unmarshal(*v, &ID)
4279				if err != nil {
4280					return err
4281				}
4282				bsc.ID = &ID
4283			}
4284		case "name":
4285			if v != nil {
4286				var name string
4287				err = json.Unmarshal(*v, &name)
4288				if err != nil {
4289					return err
4290				}
4291				bsc.Name = &name
4292			}
4293		case "type":
4294			if v != nil {
4295				var typeVar string
4296				err = json.Unmarshal(*v, &typeVar)
4297				if err != nil {
4298					return err
4299				}
4300				bsc.Type = &typeVar
4301			}
4302		case "location":
4303			if v != nil {
4304				var location string
4305				err = json.Unmarshal(*v, &location)
4306				if err != nil {
4307					return err
4308				}
4309				bsc.Location = &location
4310			}
4311		case "tags":
4312			if v != nil {
4313				var tags map[string]*string
4314				err = json.Unmarshal(*v, &tags)
4315				if err != nil {
4316					return err
4317				}
4318				bsc.Tags = tags
4319			}
4320		}
4321	}
4322
4323	return nil
4324}
4325
4326// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
4327type BgpServiceCommunityListResult struct {
4328	autorest.Response `json:"-"`
4329	// Value - A list of service community resources.
4330	Value *[]BgpServiceCommunity `json:"value,omitempty"`
4331	// NextLink - The URL to get the next set of results.
4332	NextLink *string `json:"nextLink,omitempty"`
4333}
4334
4335// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
4336// values.
4337type BgpServiceCommunityListResultIterator struct {
4338	i    int
4339	page BgpServiceCommunityListResultPage
4340}
4341
4342// NextWithContext advances to the next value.  If there was an error making
4343// the request the iterator does not advance and the error is returned.
4344func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
4345	if tracing.IsEnabled() {
4346		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
4347		defer func() {
4348			sc := -1
4349			if iter.Response().Response.Response != nil {
4350				sc = iter.Response().Response.Response.StatusCode
4351			}
4352			tracing.EndSpan(ctx, sc, err)
4353		}()
4354	}
4355	iter.i++
4356	if iter.i < len(iter.page.Values()) {
4357		return nil
4358	}
4359	err = iter.page.NextWithContext(ctx)
4360	if err != nil {
4361		iter.i--
4362		return err
4363	}
4364	iter.i = 0
4365	return nil
4366}
4367
4368// Next advances to the next value.  If there was an error making
4369// the request the iterator does not advance and the error is returned.
4370// Deprecated: Use NextWithContext() instead.
4371func (iter *BgpServiceCommunityListResultIterator) Next() error {
4372	return iter.NextWithContext(context.Background())
4373}
4374
4375// NotDone returns true if the enumeration should be started or is not yet complete.
4376func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
4377	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4378}
4379
4380// Response returns the raw server response from the last page request.
4381func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
4382	return iter.page.Response()
4383}
4384
4385// Value returns the current value or a zero-initialized value if the
4386// iterator has advanced beyond the end of the collection.
4387func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
4388	if !iter.page.NotDone() {
4389		return BgpServiceCommunity{}
4390	}
4391	return iter.page.Values()[iter.i]
4392}
4393
4394// Creates a new instance of the BgpServiceCommunityListResultIterator type.
4395func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
4396	return BgpServiceCommunityListResultIterator{page: page}
4397}
4398
4399// IsEmpty returns true if the ListResult contains no values.
4400func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
4401	return bsclr.Value == nil || len(*bsclr.Value) == 0
4402}
4403
4404// hasNextLink returns true if the NextLink is not empty.
4405func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
4406	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
4407}
4408
4409// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
4410// It returns nil if no more results exist.
4411func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
4412	if !bsclr.hasNextLink() {
4413		return nil, nil
4414	}
4415	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4416		autorest.AsJSON(),
4417		autorest.AsGet(),
4418		autorest.WithBaseURL(to.String(bsclr.NextLink)))
4419}
4420
4421// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
4422type BgpServiceCommunityListResultPage struct {
4423	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
4424	bsclr BgpServiceCommunityListResult
4425}
4426
4427// NextWithContext advances to the next page of values.  If there was an error making
4428// the request the page does not advance and the error is returned.
4429func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
4430	if tracing.IsEnabled() {
4431		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
4432		defer func() {
4433			sc := -1
4434			if page.Response().Response.Response != nil {
4435				sc = page.Response().Response.Response.StatusCode
4436			}
4437			tracing.EndSpan(ctx, sc, err)
4438		}()
4439	}
4440	for {
4441		next, err := page.fn(ctx, page.bsclr)
4442		if err != nil {
4443			return err
4444		}
4445		page.bsclr = next
4446		if !next.hasNextLink() || !next.IsEmpty() {
4447			break
4448		}
4449	}
4450	return nil
4451}
4452
4453// Next advances to the next page of values.  If there was an error making
4454// the request the page does not advance and the error is returned.
4455// Deprecated: Use NextWithContext() instead.
4456func (page *BgpServiceCommunityListResultPage) Next() error {
4457	return page.NextWithContext(context.Background())
4458}
4459
4460// NotDone returns true if the page enumeration should be started or is not yet complete.
4461func (page BgpServiceCommunityListResultPage) NotDone() bool {
4462	return !page.bsclr.IsEmpty()
4463}
4464
4465// Response returns the raw server response from the last page request.
4466func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
4467	return page.bsclr
4468}
4469
4470// Values returns the slice of values for the current page or nil if there are no values.
4471func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
4472	if page.bsclr.IsEmpty() {
4473		return nil
4474	}
4475	return *page.bsclr.Value
4476}
4477
4478// Creates a new instance of the BgpServiceCommunityListResultPage type.
4479func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
4480	return BgpServiceCommunityListResultPage{
4481		fn:    getNextPage,
4482		bsclr: cur,
4483	}
4484}
4485
4486// BgpServiceCommunityPropertiesFormat properties of Service Community.
4487type BgpServiceCommunityPropertiesFormat struct {
4488	// ServiceName - The name of the bgp community. e.g. Skype.
4489	ServiceName *string `json:"serviceName,omitempty"`
4490	// BgpCommunities - Get a list of bgp communities.
4491	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
4492}
4493
4494// BgpSettings BGP settings details
4495type BgpSettings struct {
4496	// Asn - The BGP speaker's ASN.
4497	Asn *int64 `json:"asn,omitempty"`
4498	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
4499	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
4500	// PeerWeight - The weight added to routes learned from this BGP speaker.
4501	PeerWeight *int32 `json:"peerWeight,omitempty"`
4502}
4503
4504// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
4505type ConfigurationDiagnosticParameters struct {
4506	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
4507	TargetResourceID *string `json:"targetResourceId,omitempty"`
4508	// Queries - List of traffic queries.
4509	Queries *[]TrafficQuery `json:"queries,omitempty"`
4510}
4511
4512// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
4513type ConfigurationDiagnosticResponse struct {
4514	autorest.Response `json:"-"`
4515	// Results - READ-ONLY; List of network configuration diagnostic results.
4516	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
4517}
4518
4519// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
4520func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
4521	objectMap := make(map[string]interface{})
4522	return json.Marshal(objectMap)
4523}
4524
4525// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
4526// query.
4527type ConfigurationDiagnosticResult struct {
4528	TrafficQuery               *TrafficQuery        `json:"trafficQuery,omitempty"`
4529	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
4530}
4531
4532// ConnectionMonitor parameters that define the operation to create a connection monitor.
4533type ConnectionMonitor struct {
4534	// Location - Connection monitor location.
4535	Location *string `json:"location,omitempty"`
4536	// Tags - Connection monitor tags.
4537	Tags                         map[string]*string `json:"tags"`
4538	*ConnectionMonitorParameters `json:"properties,omitempty"`
4539}
4540
4541// MarshalJSON is the custom marshaler for ConnectionMonitor.
4542func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
4543	objectMap := make(map[string]interface{})
4544	if cm.Location != nil {
4545		objectMap["location"] = cm.Location
4546	}
4547	if cm.Tags != nil {
4548		objectMap["tags"] = cm.Tags
4549	}
4550	if cm.ConnectionMonitorParameters != nil {
4551		objectMap["properties"] = cm.ConnectionMonitorParameters
4552	}
4553	return json.Marshal(objectMap)
4554}
4555
4556// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
4557func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
4558	var m map[string]*json.RawMessage
4559	err := json.Unmarshal(body, &m)
4560	if err != nil {
4561		return err
4562	}
4563	for k, v := range m {
4564		switch k {
4565		case "location":
4566			if v != nil {
4567				var location string
4568				err = json.Unmarshal(*v, &location)
4569				if err != nil {
4570					return err
4571				}
4572				cm.Location = &location
4573			}
4574		case "tags":
4575			if v != nil {
4576				var tags map[string]*string
4577				err = json.Unmarshal(*v, &tags)
4578				if err != nil {
4579					return err
4580				}
4581				cm.Tags = tags
4582			}
4583		case "properties":
4584			if v != nil {
4585				var connectionMonitorParameters ConnectionMonitorParameters
4586				err = json.Unmarshal(*v, &connectionMonitorParameters)
4587				if err != nil {
4588					return err
4589				}
4590				cm.ConnectionMonitorParameters = &connectionMonitorParameters
4591			}
4592		}
4593	}
4594
4595	return nil
4596}
4597
4598// ConnectionMonitorDestination describes the destination of connection monitor.
4599type ConnectionMonitorDestination struct {
4600	// ResourceID - The ID of the resource used as the destination by connection monitor.
4601	ResourceID *string `json:"resourceId,omitempty"`
4602	// Address - Address of the connection monitor destination (IP or domain name).
4603	Address *string `json:"address,omitempty"`
4604	// Port - The destination port used by connection monitor.
4605	Port *int32 `json:"port,omitempty"`
4606}
4607
4608// ConnectionMonitorListResult list of connection monitors.
4609type ConnectionMonitorListResult struct {
4610	autorest.Response `json:"-"`
4611	// Value - Information about connection monitors.
4612	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
4613}
4614
4615// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
4616type ConnectionMonitorParameters struct {
4617	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
4618	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
4619	// AutoStart - Determines if the connection monitor will start automatically once created.
4620	AutoStart *bool `json:"autoStart,omitempty"`
4621	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4622	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4623}
4624
4625// ConnectionMonitorQueryResult list of connection states snapshots.
4626type ConnectionMonitorQueryResult struct {
4627	autorest.Response `json:"-"`
4628	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
4629	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
4630	// States - Information about connection states.
4631	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
4632}
4633
4634// ConnectionMonitorResult information about the connection monitor.
4635type ConnectionMonitorResult struct {
4636	autorest.Response `json:"-"`
4637	// Name - READ-ONLY; Name of the connection monitor.
4638	Name *string `json:"name,omitempty"`
4639	// ID - READ-ONLY; ID of the connection monitor.
4640	ID   *string `json:"id,omitempty"`
4641	Etag *string `json:"etag,omitempty"`
4642	// Type - READ-ONLY; Connection monitor type.
4643	Type *string `json:"type,omitempty"`
4644	// Location - Connection monitor location.
4645	Location *string `json:"location,omitempty"`
4646	// Tags - Connection monitor tags.
4647	Tags                               map[string]*string `json:"tags"`
4648	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
4649}
4650
4651// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
4652func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
4653	objectMap := make(map[string]interface{})
4654	if cmr.Etag != nil {
4655		objectMap["etag"] = cmr.Etag
4656	}
4657	if cmr.Location != nil {
4658		objectMap["location"] = cmr.Location
4659	}
4660	if cmr.Tags != nil {
4661		objectMap["tags"] = cmr.Tags
4662	}
4663	if cmr.ConnectionMonitorResultProperties != nil {
4664		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
4665	}
4666	return json.Marshal(objectMap)
4667}
4668
4669// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
4670func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
4671	var m map[string]*json.RawMessage
4672	err := json.Unmarshal(body, &m)
4673	if err != nil {
4674		return err
4675	}
4676	for k, v := range m {
4677		switch k {
4678		case "name":
4679			if v != nil {
4680				var name string
4681				err = json.Unmarshal(*v, &name)
4682				if err != nil {
4683					return err
4684				}
4685				cmr.Name = &name
4686			}
4687		case "id":
4688			if v != nil {
4689				var ID string
4690				err = json.Unmarshal(*v, &ID)
4691				if err != nil {
4692					return err
4693				}
4694				cmr.ID = &ID
4695			}
4696		case "etag":
4697			if v != nil {
4698				var etag string
4699				err = json.Unmarshal(*v, &etag)
4700				if err != nil {
4701					return err
4702				}
4703				cmr.Etag = &etag
4704			}
4705		case "type":
4706			if v != nil {
4707				var typeVar string
4708				err = json.Unmarshal(*v, &typeVar)
4709				if err != nil {
4710					return err
4711				}
4712				cmr.Type = &typeVar
4713			}
4714		case "location":
4715			if v != nil {
4716				var location string
4717				err = json.Unmarshal(*v, &location)
4718				if err != nil {
4719					return err
4720				}
4721				cmr.Location = &location
4722			}
4723		case "tags":
4724			if v != nil {
4725				var tags map[string]*string
4726				err = json.Unmarshal(*v, &tags)
4727				if err != nil {
4728					return err
4729				}
4730				cmr.Tags = tags
4731			}
4732		case "properties":
4733			if v != nil {
4734				var connectionMonitorResultProperties ConnectionMonitorResultProperties
4735				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
4736				if err != nil {
4737					return err
4738				}
4739				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
4740			}
4741		}
4742	}
4743
4744	return nil
4745}
4746
4747// ConnectionMonitorResultProperties describes the properties of a connection monitor.
4748type ConnectionMonitorResultProperties struct {
4749	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4750	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4751	// StartTime - The date and time when the connection monitor was started.
4752	StartTime *date.Time `json:"startTime,omitempty"`
4753	// MonitoringStatus - The monitoring status of the connection monitor.
4754	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4755	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4756	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4757	// AutoStart - Determines if the connection monitor will start automatically once created.
4758	AutoStart *bool `json:"autoStart,omitempty"`
4759	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4760	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4761}
4762
4763// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4764// long-running operation.
4765type ConnectionMonitorsCreateOrUpdateFuture struct {
4766	azure.FutureAPI
4767	// Result returns the result of the asynchronous operation.
4768	// If the operation has not completed it will return an error.
4769	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4770}
4771
4772// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4773func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4774	var azFuture azure.Future
4775	if err := json.Unmarshal(body, &azFuture); err != nil {
4776		return err
4777	}
4778	future.FutureAPI = &azFuture
4779	future.Result = future.result
4780	return nil
4781}
4782
4783// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
4784func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
4785	var done bool
4786	done, err = future.DoneWithContext(context.Background(), client)
4787	if err != nil {
4788		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4789		return
4790	}
4791	if !done {
4792		cmr.Response.Response = future.Response()
4793		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
4794		return
4795	}
4796	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4797	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
4798		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
4799		if err != nil {
4800			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
4801		}
4802	}
4803	return
4804}
4805
4806// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4807// long-running operation.
4808type ConnectionMonitorsDeleteFuture struct {
4809	azure.FutureAPI
4810	// Result returns the result of the asynchronous operation.
4811	// If the operation has not completed it will return an error.
4812	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4813}
4814
4815// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4816func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
4817	var azFuture azure.Future
4818	if err := json.Unmarshal(body, &azFuture); err != nil {
4819		return err
4820	}
4821	future.FutureAPI = &azFuture
4822	future.Result = future.result
4823	return nil
4824}
4825
4826// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
4827func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4828	var done bool
4829	done, err = future.DoneWithContext(context.Background(), client)
4830	if err != nil {
4831		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
4832		return
4833	}
4834	if !done {
4835		ar.Response = future.Response()
4836		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
4837		return
4838	}
4839	ar.Response = future.Response()
4840	return
4841}
4842
4843// ConnectionMonitorSource describes the source of connection monitor.
4844type ConnectionMonitorSource struct {
4845	// ResourceID - The ID of the resource used as the source by connection monitor.
4846	ResourceID *string `json:"resourceId,omitempty"`
4847	// Port - The source port used by connection monitor.
4848	Port *int32 `json:"port,omitempty"`
4849}
4850
4851// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4852// operation.
4853type ConnectionMonitorsQueryFuture struct {
4854	azure.FutureAPI
4855	// Result returns the result of the asynchronous operation.
4856	// If the operation has not completed it will return an error.
4857	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4858}
4859
4860// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4861func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
4862	var azFuture azure.Future
4863	if err := json.Unmarshal(body, &azFuture); err != nil {
4864		return err
4865	}
4866	future.FutureAPI = &azFuture
4867	future.Result = future.result
4868	return nil
4869}
4870
4871// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
4872func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
4873	var done bool
4874	done, err = future.DoneWithContext(context.Background(), client)
4875	if err != nil {
4876		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
4877		return
4878	}
4879	if !done {
4880		cmqr.Response.Response = future.Response()
4881		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
4882		return
4883	}
4884	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4885	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
4886		cmqr, err = client.QueryResponder(cmqr.Response.Response)
4887		if err != nil {
4888			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
4889		}
4890	}
4891	return
4892}
4893
4894// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4895// operation.
4896type ConnectionMonitorsStartFuture struct {
4897	azure.FutureAPI
4898	// Result returns the result of the asynchronous operation.
4899	// If the operation has not completed it will return an error.
4900	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4901}
4902
4903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4904func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
4905	var azFuture azure.Future
4906	if err := json.Unmarshal(body, &azFuture); err != nil {
4907		return err
4908	}
4909	future.FutureAPI = &azFuture
4910	future.Result = future.result
4911	return nil
4912}
4913
4914// result is the default implementation for ConnectionMonitorsStartFuture.Result.
4915func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4916	var done bool
4917	done, err = future.DoneWithContext(context.Background(), client)
4918	if err != nil {
4919		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
4920		return
4921	}
4922	if !done {
4923		ar.Response = future.Response()
4924		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
4925		return
4926	}
4927	ar.Response = future.Response()
4928	return
4929}
4930
4931// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4932// operation.
4933type ConnectionMonitorsStopFuture struct {
4934	azure.FutureAPI
4935	// Result returns the result of the asynchronous operation.
4936	// If the operation has not completed it will return an error.
4937	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4938}
4939
4940// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4941func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
4942	var azFuture azure.Future
4943	if err := json.Unmarshal(body, &azFuture); err != nil {
4944		return err
4945	}
4946	future.FutureAPI = &azFuture
4947	future.Result = future.result
4948	return nil
4949}
4950
4951// result is the default implementation for ConnectionMonitorsStopFuture.Result.
4952func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
4953	var done bool
4954	done, err = future.DoneWithContext(context.Background(), client)
4955	if err != nil {
4956		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
4957		return
4958	}
4959	if !done {
4960		ar.Response = future.Response()
4961		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
4962		return
4963	}
4964	ar.Response = future.Response()
4965	return
4966}
4967
4968// ConnectionResetSharedKey the virtual network connection reset shared key
4969type ConnectionResetSharedKey struct {
4970	autorest.Response `json:"-"`
4971	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4972	KeyLength *int32 `json:"keyLength,omitempty"`
4973}
4974
4975// ConnectionSharedKey response for GetConnectionSharedKey API service call
4976type ConnectionSharedKey struct {
4977	autorest.Response `json:"-"`
4978	// Value - The virtual network connection shared key value.
4979	Value *string `json:"value,omitempty"`
4980	// ID - Resource ID.
4981	ID *string `json:"id,omitempty"`
4982}
4983
4984// ConnectionStateSnapshot connection state snapshot.
4985type ConnectionStateSnapshot struct {
4986	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4987	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4988	// StartTime - The start time of the connection snapshot.
4989	StartTime *date.Time `json:"startTime,omitempty"`
4990	// EndTime - The end time of the connection snapshot.
4991	EndTime *date.Time `json:"endTime,omitempty"`
4992	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4993	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4994	// AvgLatencyInMs - Average latency in ms.
4995	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4996	// MinLatencyInMs - Minimum latency in ms.
4997	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4998	// MaxLatencyInMs - Maximum latency in ms.
4999	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5000	// ProbesSent - The number of sent probes.
5001	ProbesSent *int32 `json:"probesSent,omitempty"`
5002	// ProbesFailed - The number of failed probes.
5003	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5004	// Hops - READ-ONLY; List of hops between the source and the destination.
5005	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5006}
5007
5008// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5009func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5010	objectMap := make(map[string]interface{})
5011	if CSS.ConnectionState != "" {
5012		objectMap["connectionState"] = CSS.ConnectionState
5013	}
5014	if CSS.StartTime != nil {
5015		objectMap["startTime"] = CSS.StartTime
5016	}
5017	if CSS.EndTime != nil {
5018		objectMap["endTime"] = CSS.EndTime
5019	}
5020	if CSS.EvaluationState != "" {
5021		objectMap["evaluationState"] = CSS.EvaluationState
5022	}
5023	if CSS.AvgLatencyInMs != nil {
5024		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5025	}
5026	if CSS.MinLatencyInMs != nil {
5027		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5028	}
5029	if CSS.MaxLatencyInMs != nil {
5030		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5031	}
5032	if CSS.ProbesSent != nil {
5033		objectMap["probesSent"] = CSS.ProbesSent
5034	}
5035	if CSS.ProbesFailed != nil {
5036		objectMap["probesFailed"] = CSS.ProbesFailed
5037	}
5038	return json.Marshal(objectMap)
5039}
5040
5041// ConnectivityDestination parameters that define destination of connection.
5042type ConnectivityDestination struct {
5043	// ResourceID - The ID of the resource to which a connection attempt will be made.
5044	ResourceID *string `json:"resourceId,omitempty"`
5045	// Address - The IP address or URI the resource to which a connection attempt will be made.
5046	Address *string `json:"address,omitempty"`
5047	// Port - Port on which check connectivity will be performed.
5048	Port *int32 `json:"port,omitempty"`
5049}
5050
5051// ConnectivityHop information about a hop between the source and the destination.
5052type ConnectivityHop struct {
5053	// Type - READ-ONLY; The type of the hop.
5054	Type *string `json:"type,omitempty"`
5055	// ID - READ-ONLY; The ID of the hop.
5056	ID *string `json:"id,omitempty"`
5057	// Address - READ-ONLY; The IP address of the hop.
5058	Address *string `json:"address,omitempty"`
5059	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
5060	ResourceID *string `json:"resourceId,omitempty"`
5061	// NextHopIds - READ-ONLY; List of next hop identifiers.
5062	NextHopIds *[]string `json:"nextHopIds,omitempty"`
5063	// Issues - READ-ONLY; List of issues.
5064	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
5065}
5066
5067// MarshalJSON is the custom marshaler for ConnectivityHop.
5068func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
5069	objectMap := make(map[string]interface{})
5070	return json.Marshal(objectMap)
5071}
5072
5073// ConnectivityInformation information on the connectivity status.
5074type ConnectivityInformation struct {
5075	autorest.Response `json:"-"`
5076	// Hops - READ-ONLY; List of hops between the source and the destination.
5077	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5078	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
5079	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
5080	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
5081	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5082	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
5083	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5084	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
5085	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5086	// ProbesSent - READ-ONLY; Total number of probes sent.
5087	ProbesSent *int32 `json:"probesSent,omitempty"`
5088	// ProbesFailed - READ-ONLY; Number of failed probes.
5089	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5090}
5091
5092// MarshalJSON is the custom marshaler for ConnectivityInformation.
5093func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
5094	objectMap := make(map[string]interface{})
5095	return json.Marshal(objectMap)
5096}
5097
5098// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
5099type ConnectivityIssue struct {
5100	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
5101	Origin Origin `json:"origin,omitempty"`
5102	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
5103	Severity Severity `json:"severity,omitempty"`
5104	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
5105	Type IssueType `json:"type,omitempty"`
5106	// Context - READ-ONLY; Provides additional context on the issue.
5107	Context *[]map[string]*string `json:"context,omitempty"`
5108}
5109
5110// MarshalJSON is the custom marshaler for ConnectivityIssue.
5111func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
5112	objectMap := make(map[string]interface{})
5113	return json.Marshal(objectMap)
5114}
5115
5116// ConnectivityParameters parameters that determine how the connectivity check will be performed.
5117type ConnectivityParameters struct {
5118	Source      *ConnectivitySource      `json:"source,omitempty"`
5119	Destination *ConnectivityDestination `json:"destination,omitempty"`
5120	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
5121	Protocol              Protocol               `json:"protocol,omitempty"`
5122	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
5123}
5124
5125// ConnectivitySource parameters that define the source of the connection.
5126type ConnectivitySource struct {
5127	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
5128	ResourceID *string `json:"resourceId,omitempty"`
5129	// Port - The source port from which a connectivity check will be performed.
5130	Port *int32 `json:"port,omitempty"`
5131}
5132
5133// DdosProtectionPlan a DDoS protection plan in a resource group.
5134type DdosProtectionPlan struct {
5135	autorest.Response `json:"-"`
5136	// ID - READ-ONLY; Resource ID.
5137	ID *string `json:"id,omitempty"`
5138	// Name - READ-ONLY; Resource name.
5139	Name *string `json:"name,omitempty"`
5140	// Type - READ-ONLY; Resource type.
5141	Type *string `json:"type,omitempty"`
5142	// Location - Resource location.
5143	Location *string `json:"location,omitempty"`
5144	// Tags - Resource tags.
5145	Tags map[string]*string `json:"tags"`
5146	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
5147	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
5148	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5149	Etag *string `json:"etag,omitempty"`
5150}
5151
5152// MarshalJSON is the custom marshaler for DdosProtectionPlan.
5153func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
5154	objectMap := make(map[string]interface{})
5155	if dpp.Location != nil {
5156		objectMap["location"] = dpp.Location
5157	}
5158	if dpp.Tags != nil {
5159		objectMap["tags"] = dpp.Tags
5160	}
5161	if dpp.DdosProtectionPlanPropertiesFormat != nil {
5162		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
5163	}
5164	return json.Marshal(objectMap)
5165}
5166
5167// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
5168func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
5169	var m map[string]*json.RawMessage
5170	err := json.Unmarshal(body, &m)
5171	if err != nil {
5172		return err
5173	}
5174	for k, v := range m {
5175		switch k {
5176		case "id":
5177			if v != nil {
5178				var ID string
5179				err = json.Unmarshal(*v, &ID)
5180				if err != nil {
5181					return err
5182				}
5183				dpp.ID = &ID
5184			}
5185		case "name":
5186			if v != nil {
5187				var name string
5188				err = json.Unmarshal(*v, &name)
5189				if err != nil {
5190					return err
5191				}
5192				dpp.Name = &name
5193			}
5194		case "type":
5195			if v != nil {
5196				var typeVar string
5197				err = json.Unmarshal(*v, &typeVar)
5198				if err != nil {
5199					return err
5200				}
5201				dpp.Type = &typeVar
5202			}
5203		case "location":
5204			if v != nil {
5205				var location string
5206				err = json.Unmarshal(*v, &location)
5207				if err != nil {
5208					return err
5209				}
5210				dpp.Location = &location
5211			}
5212		case "tags":
5213			if v != nil {
5214				var tags map[string]*string
5215				err = json.Unmarshal(*v, &tags)
5216				if err != nil {
5217					return err
5218				}
5219				dpp.Tags = tags
5220			}
5221		case "properties":
5222			if v != nil {
5223				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
5224				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
5225				if err != nil {
5226					return err
5227				}
5228				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
5229			}
5230		case "etag":
5231			if v != nil {
5232				var etag string
5233				err = json.Unmarshal(*v, &etag)
5234				if err != nil {
5235					return err
5236				}
5237				dpp.Etag = &etag
5238			}
5239		}
5240	}
5241
5242	return nil
5243}
5244
5245// DdosProtectionPlanListResult a list of DDoS protection plans.
5246type DdosProtectionPlanListResult struct {
5247	autorest.Response `json:"-"`
5248	// Value - A list of DDoS protection plans.
5249	Value *[]DdosProtectionPlan `json:"value,omitempty"`
5250	// NextLink - READ-ONLY; The URL to get the next set of results.
5251	NextLink *string `json:"nextLink,omitempty"`
5252}
5253
5254// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
5255func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
5256	objectMap := make(map[string]interface{})
5257	if dpplr.Value != nil {
5258		objectMap["value"] = dpplr.Value
5259	}
5260	return json.Marshal(objectMap)
5261}
5262
5263// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
5264type DdosProtectionPlanListResultIterator struct {
5265	i    int
5266	page DdosProtectionPlanListResultPage
5267}
5268
5269// NextWithContext advances to the next value.  If there was an error making
5270// the request the iterator does not advance and the error is returned.
5271func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
5272	if tracing.IsEnabled() {
5273		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
5274		defer func() {
5275			sc := -1
5276			if iter.Response().Response.Response != nil {
5277				sc = iter.Response().Response.Response.StatusCode
5278			}
5279			tracing.EndSpan(ctx, sc, err)
5280		}()
5281	}
5282	iter.i++
5283	if iter.i < len(iter.page.Values()) {
5284		return nil
5285	}
5286	err = iter.page.NextWithContext(ctx)
5287	if err != nil {
5288		iter.i--
5289		return err
5290	}
5291	iter.i = 0
5292	return nil
5293}
5294
5295// Next advances to the next value.  If there was an error making
5296// the request the iterator does not advance and the error is returned.
5297// Deprecated: Use NextWithContext() instead.
5298func (iter *DdosProtectionPlanListResultIterator) Next() error {
5299	return iter.NextWithContext(context.Background())
5300}
5301
5302// NotDone returns true if the enumeration should be started or is not yet complete.
5303func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
5304	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5305}
5306
5307// Response returns the raw server response from the last page request.
5308func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
5309	return iter.page.Response()
5310}
5311
5312// Value returns the current value or a zero-initialized value if the
5313// iterator has advanced beyond the end of the collection.
5314func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
5315	if !iter.page.NotDone() {
5316		return DdosProtectionPlan{}
5317	}
5318	return iter.page.Values()[iter.i]
5319}
5320
5321// Creates a new instance of the DdosProtectionPlanListResultIterator type.
5322func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
5323	return DdosProtectionPlanListResultIterator{page: page}
5324}
5325
5326// IsEmpty returns true if the ListResult contains no values.
5327func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
5328	return dpplr.Value == nil || len(*dpplr.Value) == 0
5329}
5330
5331// hasNextLink returns true if the NextLink is not empty.
5332func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
5333	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
5334}
5335
5336// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
5337// It returns nil if no more results exist.
5338func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
5339	if !dpplr.hasNextLink() {
5340		return nil, nil
5341	}
5342	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5343		autorest.AsJSON(),
5344		autorest.AsGet(),
5345		autorest.WithBaseURL(to.String(dpplr.NextLink)))
5346}
5347
5348// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
5349type DdosProtectionPlanListResultPage struct {
5350	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
5351	dpplr DdosProtectionPlanListResult
5352}
5353
5354// NextWithContext advances to the next page of values.  If there was an error making
5355// the request the page does not advance and the error is returned.
5356func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
5357	if tracing.IsEnabled() {
5358		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
5359		defer func() {
5360			sc := -1
5361			if page.Response().Response.Response != nil {
5362				sc = page.Response().Response.Response.StatusCode
5363			}
5364			tracing.EndSpan(ctx, sc, err)
5365		}()
5366	}
5367	for {
5368		next, err := page.fn(ctx, page.dpplr)
5369		if err != nil {
5370			return err
5371		}
5372		page.dpplr = next
5373		if !next.hasNextLink() || !next.IsEmpty() {
5374			break
5375		}
5376	}
5377	return nil
5378}
5379
5380// Next advances to the next page of values.  If there was an error making
5381// the request the page does not advance and the error is returned.
5382// Deprecated: Use NextWithContext() instead.
5383func (page *DdosProtectionPlanListResultPage) Next() error {
5384	return page.NextWithContext(context.Background())
5385}
5386
5387// NotDone returns true if the page enumeration should be started or is not yet complete.
5388func (page DdosProtectionPlanListResultPage) NotDone() bool {
5389	return !page.dpplr.IsEmpty()
5390}
5391
5392// Response returns the raw server response from the last page request.
5393func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
5394	return page.dpplr
5395}
5396
5397// Values returns the slice of values for the current page or nil if there are no values.
5398func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
5399	if page.dpplr.IsEmpty() {
5400		return nil
5401	}
5402	return *page.dpplr.Value
5403}
5404
5405// Creates a new instance of the DdosProtectionPlanListResultPage type.
5406func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
5407	return DdosProtectionPlanListResultPage{
5408		fn:    getNextPage,
5409		dpplr: cur,
5410	}
5411}
5412
5413// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
5414type DdosProtectionPlanPropertiesFormat struct {
5415	// ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
5416	ResourceGUID *string `json:"resourceGuid,omitempty"`
5417	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
5418	ProvisioningState *string `json:"provisioningState,omitempty"`
5419	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
5420	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
5421}
5422
5423// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
5424func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
5425	objectMap := make(map[string]interface{})
5426	return json.Marshal(objectMap)
5427}
5428
5429// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5430// long-running operation.
5431type DdosProtectionPlansCreateOrUpdateFuture struct {
5432	azure.FutureAPI
5433	// Result returns the result of the asynchronous operation.
5434	// If the operation has not completed it will return an error.
5435	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
5436}
5437
5438// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5439func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5440	var azFuture azure.Future
5441	if err := json.Unmarshal(body, &azFuture); err != nil {
5442		return err
5443	}
5444	future.FutureAPI = &azFuture
5445	future.Result = future.result
5446	return nil
5447}
5448
5449// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
5450func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
5451	var done bool
5452	done, err = future.DoneWithContext(context.Background(), client)
5453	if err != nil {
5454		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5455		return
5456	}
5457	if !done {
5458		dpp.Response.Response = future.Response()
5459		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
5460		return
5461	}
5462	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5463	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
5464		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
5465		if err != nil {
5466			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
5467		}
5468	}
5469	return
5470}
5471
5472// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
5473// long-running operation.
5474type DdosProtectionPlansDeleteFuture struct {
5475	azure.FutureAPI
5476	// Result returns the result of the asynchronous operation.
5477	// If the operation has not completed it will return an error.
5478	Result func(DdosProtectionPlansClient) (autorest.Response, error)
5479}
5480
5481// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5482func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
5483	var azFuture azure.Future
5484	if err := json.Unmarshal(body, &azFuture); err != nil {
5485		return err
5486	}
5487	future.FutureAPI = &azFuture
5488	future.Result = future.result
5489	return nil
5490}
5491
5492// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
5493func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
5494	var done bool
5495	done, err = future.DoneWithContext(context.Background(), client)
5496	if err != nil {
5497		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
5498		return
5499	}
5500	if !done {
5501		ar.Response = future.Response()
5502		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
5503		return
5504	}
5505	ar.Response = future.Response()
5506	return
5507}
5508
5509// DeviceProperties list of properties of the device.
5510type DeviceProperties struct {
5511	// DeviceVendor - Name of the device Vendor.
5512	DeviceVendor *string `json:"deviceVendor,omitempty"`
5513	// DeviceModel - Model of the device.
5514	DeviceModel *string `json:"deviceModel,omitempty"`
5515	// LinkSpeedInMbps - Link speed.
5516	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
5517}
5518
5519// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
5520// network. Standard DHCP option for a subnet overrides VNET DHCP options.
5521type DhcpOptions struct {
5522	// DNSServers - The list of DNS servers IP addresses.
5523	DNSServers *[]string `json:"dnsServers,omitempty"`
5524}
5525
5526// Dimension dimension of the metric.
5527type Dimension struct {
5528	// Name - The name of the dimension.
5529	Name *string `json:"name,omitempty"`
5530	// DisplayName - The display name of the dimension.
5531	DisplayName *string `json:"displayName,omitempty"`
5532	// InternalName - The internal name of the dimension.
5533	InternalName *string `json:"internalName,omitempty"`
5534}
5535
5536// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
5537type DNSNameAvailabilityResult struct {
5538	autorest.Response `json:"-"`
5539	// Available - Domain availability (True/False).
5540	Available *bool `json:"available,omitempty"`
5541}
5542
5543// EffectiveNetworkSecurityGroup effective network security group.
5544type EffectiveNetworkSecurityGroup struct {
5545	// NetworkSecurityGroup - The ID of network security group that is applied.
5546	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
5547	// Association - Associated resources.
5548	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
5549	// EffectiveSecurityRules - A collection of effective security rules.
5550	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
5551	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
5552	TagMap map[string][]string `json:"tagMap"`
5553}
5554
5555// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
5556func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
5557	objectMap := make(map[string]interface{})
5558	if ensg.NetworkSecurityGroup != nil {
5559		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
5560	}
5561	if ensg.Association != nil {
5562		objectMap["association"] = ensg.Association
5563	}
5564	if ensg.EffectiveSecurityRules != nil {
5565		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
5566	}
5567	if ensg.TagMap != nil {
5568		objectMap["tagMap"] = ensg.TagMap
5569	}
5570	return json.Marshal(objectMap)
5571}
5572
5573// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
5574type EffectiveNetworkSecurityGroupAssociation struct {
5575	// Subnet - The ID of the subnet if assigned.
5576	Subnet *SubResource `json:"subnet,omitempty"`
5577	// NetworkInterface - The ID of the network interface if assigned.
5578	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
5579}
5580
5581// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
5582// call.
5583type EffectiveNetworkSecurityGroupListResult struct {
5584	autorest.Response `json:"-"`
5585	// Value - A list of effective network security groups.
5586	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
5587	// NextLink - READ-ONLY; The URL to get the next set of results.
5588	NextLink *string `json:"nextLink,omitempty"`
5589}
5590
5591// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
5592func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
5593	objectMap := make(map[string]interface{})
5594	if ensglr.Value != nil {
5595		objectMap["value"] = ensglr.Value
5596	}
5597	return json.Marshal(objectMap)
5598}
5599
5600// EffectiveNetworkSecurityRule effective network security rules.
5601type EffectiveNetworkSecurityRule struct {
5602	// Name - The name of the security rule specified by the user (if created by the user).
5603	Name *string `json:"name,omitempty"`
5604	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
5605	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
5606	// SourcePortRange - The source port or range.
5607	SourcePortRange *string `json:"sourcePortRange,omitempty"`
5608	// DestinationPortRange - The destination port or range.
5609	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
5610	// SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
5611	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
5612	// DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*)
5613	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
5614	// SourceAddressPrefix - The source address prefix.
5615	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
5616	// DestinationAddressPrefix - The destination address prefix.
5617	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
5618	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
5619	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
5620	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
5621	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
5622	// ExpandedSourceAddressPrefix - The expanded source address prefix.
5623	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
5624	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
5625	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
5626	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
5627	Access SecurityRuleAccess `json:"access,omitempty"`
5628	// Priority - The priority of the rule.
5629	Priority *int32 `json:"priority,omitempty"`
5630	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
5631	Direction SecurityRuleDirection `json:"direction,omitempty"`
5632}
5633
5634// EffectiveRoute effective Route
5635type EffectiveRoute struct {
5636	// Name - The name of the user defined route. This is optional.
5637	Name *string `json:"name,omitempty"`
5638	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
5639	Source EffectiveRouteSource `json:"source,omitempty"`
5640	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
5641	State EffectiveRouteState `json:"state,omitempty"`
5642	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
5643	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
5644	// NextHopIPAddress - The IP address of the next hop of the effective route.
5645	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
5646	// 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'
5647	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
5648}
5649
5650// EffectiveRouteListResult response for list effective route API service call.
5651type EffectiveRouteListResult struct {
5652	autorest.Response `json:"-"`
5653	// Value - A list of effective routes.
5654	Value *[]EffectiveRoute `json:"value,omitempty"`
5655	// NextLink - READ-ONLY; The URL to get the next set of results.
5656	NextLink *string `json:"nextLink,omitempty"`
5657}
5658
5659// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
5660func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
5661	objectMap := make(map[string]interface{})
5662	if erlr.Value != nil {
5663		objectMap["value"] = erlr.Value
5664	}
5665	return json.Marshal(objectMap)
5666}
5667
5668// EndpointServiceResult endpoint service.
5669type EndpointServiceResult struct {
5670	// Name - READ-ONLY; Name of the endpoint service.
5671	Name *string `json:"name,omitempty"`
5672	// Type - READ-ONLY; Type of the endpoint service.
5673	Type *string `json:"type,omitempty"`
5674	// ID - Resource ID.
5675	ID *string `json:"id,omitempty"`
5676}
5677
5678// MarshalJSON is the custom marshaler for EndpointServiceResult.
5679func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
5680	objectMap := make(map[string]interface{})
5681	if esr.ID != nil {
5682		objectMap["id"] = esr.ID
5683	}
5684	return json.Marshal(objectMap)
5685}
5686
5687// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
5688type EndpointServicesListResult struct {
5689	autorest.Response `json:"-"`
5690	// Value - List of available endpoint services in a region.
5691	Value *[]EndpointServiceResult `json:"value,omitempty"`
5692	// NextLink - The URL to get the next set of results.
5693	NextLink *string `json:"nextLink,omitempty"`
5694}
5695
5696// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
5697// values.
5698type EndpointServicesListResultIterator struct {
5699	i    int
5700	page EndpointServicesListResultPage
5701}
5702
5703// NextWithContext advances to the next value.  If there was an error making
5704// the request the iterator does not advance and the error is returned.
5705func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
5706	if tracing.IsEnabled() {
5707		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
5708		defer func() {
5709			sc := -1
5710			if iter.Response().Response.Response != nil {
5711				sc = iter.Response().Response.Response.StatusCode
5712			}
5713			tracing.EndSpan(ctx, sc, err)
5714		}()
5715	}
5716	iter.i++
5717	if iter.i < len(iter.page.Values()) {
5718		return nil
5719	}
5720	err = iter.page.NextWithContext(ctx)
5721	if err != nil {
5722		iter.i--
5723		return err
5724	}
5725	iter.i = 0
5726	return nil
5727}
5728
5729// Next advances to the next value.  If there was an error making
5730// the request the iterator does not advance and the error is returned.
5731// Deprecated: Use NextWithContext() instead.
5732func (iter *EndpointServicesListResultIterator) Next() error {
5733	return iter.NextWithContext(context.Background())
5734}
5735
5736// NotDone returns true if the enumeration should be started or is not yet complete.
5737func (iter EndpointServicesListResultIterator) NotDone() bool {
5738	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5739}
5740
5741// Response returns the raw server response from the last page request.
5742func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
5743	return iter.page.Response()
5744}
5745
5746// Value returns the current value or a zero-initialized value if the
5747// iterator has advanced beyond the end of the collection.
5748func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
5749	if !iter.page.NotDone() {
5750		return EndpointServiceResult{}
5751	}
5752	return iter.page.Values()[iter.i]
5753}
5754
5755// Creates a new instance of the EndpointServicesListResultIterator type.
5756func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
5757	return EndpointServicesListResultIterator{page: page}
5758}
5759
5760// IsEmpty returns true if the ListResult contains no values.
5761func (eslr EndpointServicesListResult) IsEmpty() bool {
5762	return eslr.Value == nil || len(*eslr.Value) == 0
5763}
5764
5765// hasNextLink returns true if the NextLink is not empty.
5766func (eslr EndpointServicesListResult) hasNextLink() bool {
5767	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
5768}
5769
5770// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
5771// It returns nil if no more results exist.
5772func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
5773	if !eslr.hasNextLink() {
5774		return nil, nil
5775	}
5776	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5777		autorest.AsJSON(),
5778		autorest.AsGet(),
5779		autorest.WithBaseURL(to.String(eslr.NextLink)))
5780}
5781
5782// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
5783type EndpointServicesListResultPage struct {
5784	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
5785	eslr EndpointServicesListResult
5786}
5787
5788// NextWithContext advances to the next page of values.  If there was an error making
5789// the request the page does not advance and the error is returned.
5790func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
5791	if tracing.IsEnabled() {
5792		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
5793		defer func() {
5794			sc := -1
5795			if page.Response().Response.Response != nil {
5796				sc = page.Response().Response.Response.StatusCode
5797			}
5798			tracing.EndSpan(ctx, sc, err)
5799		}()
5800	}
5801	for {
5802		next, err := page.fn(ctx, page.eslr)
5803		if err != nil {
5804			return err
5805		}
5806		page.eslr = next
5807		if !next.hasNextLink() || !next.IsEmpty() {
5808			break
5809		}
5810	}
5811	return nil
5812}
5813
5814// Next advances to the next page of values.  If there was an error making
5815// the request the page does not advance and the error is returned.
5816// Deprecated: Use NextWithContext() instead.
5817func (page *EndpointServicesListResultPage) Next() error {
5818	return page.NextWithContext(context.Background())
5819}
5820
5821// NotDone returns true if the page enumeration should be started or is not yet complete.
5822func (page EndpointServicesListResultPage) NotDone() bool {
5823	return !page.eslr.IsEmpty()
5824}
5825
5826// Response returns the raw server response from the last page request.
5827func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
5828	return page.eslr
5829}
5830
5831// Values returns the slice of values for the current page or nil if there are no values.
5832func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
5833	if page.eslr.IsEmpty() {
5834		return nil
5835	}
5836	return *page.eslr.Value
5837}
5838
5839// Creates a new instance of the EndpointServicesListResultPage type.
5840func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
5841	return EndpointServicesListResultPage{
5842		fn:   getNextPage,
5843		eslr: cur,
5844	}
5845}
5846
5847// Error ...
5848type Error struct {
5849	Code       *string         `json:"code,omitempty"`
5850	Message    *string         `json:"message,omitempty"`
5851	Target     *string         `json:"target,omitempty"`
5852	Details    *[]ErrorDetails `json:"details,omitempty"`
5853	InnerError *string         `json:"innerError,omitempty"`
5854}
5855
5856// ErrorDetails ...
5857type ErrorDetails struct {
5858	Code    *string `json:"code,omitempty"`
5859	Target  *string `json:"target,omitempty"`
5860	Message *string `json:"message,omitempty"`
5861}
5862
5863// ErrorResponse the error object.
5864type ErrorResponse struct {
5865	Error *ErrorDetails `json:"error,omitempty"`
5866}
5867
5868// EvaluatedNetworkSecurityGroup results of network security group evaluation.
5869type EvaluatedNetworkSecurityGroup struct {
5870	// NetworkSecurityGroupID - Network security group ID.
5871	NetworkSecurityGroupID *string      `json:"networkSecurityGroupId,omitempty"`
5872	MatchedRule            *MatchedRule `json:"matchedRule,omitempty"`
5873	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
5874	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
5875}
5876
5877// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
5878func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
5879	objectMap := make(map[string]interface{})
5880	if ensg.NetworkSecurityGroupID != nil {
5881		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
5882	}
5883	if ensg.MatchedRule != nil {
5884		objectMap["matchedRule"] = ensg.MatchedRule
5885	}
5886	return json.Marshal(objectMap)
5887}
5888
5889// ExpressRouteCircuit expressRouteCircuit resource
5890type ExpressRouteCircuit struct {
5891	autorest.Response `json:"-"`
5892	// Sku - The SKU.
5893	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
5894	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
5895	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5896	Etag *string `json:"etag,omitempty"`
5897	// ID - Resource ID.
5898	ID *string `json:"id,omitempty"`
5899	// Name - READ-ONLY; Resource name.
5900	Name *string `json:"name,omitempty"`
5901	// Type - READ-ONLY; Resource type.
5902	Type *string `json:"type,omitempty"`
5903	// Location - Resource location.
5904	Location *string `json:"location,omitempty"`
5905	// Tags - Resource tags.
5906	Tags map[string]*string `json:"tags"`
5907}
5908
5909// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
5910func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
5911	objectMap := make(map[string]interface{})
5912	if erc.Sku != nil {
5913		objectMap["sku"] = erc.Sku
5914	}
5915	if erc.ExpressRouteCircuitPropertiesFormat != nil {
5916		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
5917	}
5918	if erc.ID != nil {
5919		objectMap["id"] = erc.ID
5920	}
5921	if erc.Location != nil {
5922		objectMap["location"] = erc.Location
5923	}
5924	if erc.Tags != nil {
5925		objectMap["tags"] = erc.Tags
5926	}
5927	return json.Marshal(objectMap)
5928}
5929
5930// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
5931func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
5932	var m map[string]*json.RawMessage
5933	err := json.Unmarshal(body, &m)
5934	if err != nil {
5935		return err
5936	}
5937	for k, v := range m {
5938		switch k {
5939		case "sku":
5940			if v != nil {
5941				var sku ExpressRouteCircuitSku
5942				err = json.Unmarshal(*v, &sku)
5943				if err != nil {
5944					return err
5945				}
5946				erc.Sku = &sku
5947			}
5948		case "properties":
5949			if v != nil {
5950				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
5951				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
5952				if err != nil {
5953					return err
5954				}
5955				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
5956			}
5957		case "etag":
5958			if v != nil {
5959				var etag string
5960				err = json.Unmarshal(*v, &etag)
5961				if err != nil {
5962					return err
5963				}
5964				erc.Etag = &etag
5965			}
5966		case "id":
5967			if v != nil {
5968				var ID string
5969				err = json.Unmarshal(*v, &ID)
5970				if err != nil {
5971					return err
5972				}
5973				erc.ID = &ID
5974			}
5975		case "name":
5976			if v != nil {
5977				var name string
5978				err = json.Unmarshal(*v, &name)
5979				if err != nil {
5980					return err
5981				}
5982				erc.Name = &name
5983			}
5984		case "type":
5985			if v != nil {
5986				var typeVar string
5987				err = json.Unmarshal(*v, &typeVar)
5988				if err != nil {
5989					return err
5990				}
5991				erc.Type = &typeVar
5992			}
5993		case "location":
5994			if v != nil {
5995				var location string
5996				err = json.Unmarshal(*v, &location)
5997				if err != nil {
5998					return err
5999				}
6000				erc.Location = &location
6001			}
6002		case "tags":
6003			if v != nil {
6004				var tags map[string]*string
6005				err = json.Unmarshal(*v, &tags)
6006				if err != nil {
6007					return err
6008				}
6009				erc.Tags = tags
6010			}
6011		}
6012	}
6013
6014	return nil
6015}
6016
6017// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
6018type ExpressRouteCircuitArpTable struct {
6019	// Age - Entry age in minutes
6020	Age *int32 `json:"age,omitempty"`
6021	// Interface - Interface address
6022	Interface *string `json:"interface,omitempty"`
6023	// IPAddress - The IP address.
6024	IPAddress *string `json:"ipAddress,omitempty"`
6025	// MacAddress - The MAC address.
6026	MacAddress *string `json:"macAddress,omitempty"`
6027}
6028
6029// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
6030type ExpressRouteCircuitAuthorization struct {
6031	autorest.Response              `json:"-"`
6032	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
6033	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6034	Name *string `json:"name,omitempty"`
6035	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6036	Etag *string `json:"etag,omitempty"`
6037	// ID - Resource ID.
6038	ID *string `json:"id,omitempty"`
6039}
6040
6041// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
6042func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
6043	objectMap := make(map[string]interface{})
6044	if erca.AuthorizationPropertiesFormat != nil {
6045		objectMap["properties"] = erca.AuthorizationPropertiesFormat
6046	}
6047	if erca.Name != nil {
6048		objectMap["name"] = erca.Name
6049	}
6050	if erca.ID != nil {
6051		objectMap["id"] = erca.ID
6052	}
6053	return json.Marshal(objectMap)
6054}
6055
6056// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
6057func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
6058	var m map[string]*json.RawMessage
6059	err := json.Unmarshal(body, &m)
6060	if err != nil {
6061		return err
6062	}
6063	for k, v := range m {
6064		switch k {
6065		case "properties":
6066			if v != nil {
6067				var authorizationPropertiesFormat AuthorizationPropertiesFormat
6068				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
6069				if err != nil {
6070					return err
6071				}
6072				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
6073			}
6074		case "name":
6075			if v != nil {
6076				var name string
6077				err = json.Unmarshal(*v, &name)
6078				if err != nil {
6079					return err
6080				}
6081				erca.Name = &name
6082			}
6083		case "etag":
6084			if v != nil {
6085				var etag string
6086				err = json.Unmarshal(*v, &etag)
6087				if err != nil {
6088					return err
6089				}
6090				erca.Etag = &etag
6091			}
6092		case "id":
6093			if v != nil {
6094				var ID string
6095				err = json.Unmarshal(*v, &ID)
6096				if err != nil {
6097					return err
6098				}
6099				erca.ID = &ID
6100			}
6101		}
6102	}
6103
6104	return nil
6105}
6106
6107// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
6108// results of a long-running operation.
6109type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
6110	azure.FutureAPI
6111	// Result returns the result of the asynchronous operation.
6112	// If the operation has not completed it will return an error.
6113	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
6114}
6115
6116// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6117func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6118	var azFuture azure.Future
6119	if err := json.Unmarshal(body, &azFuture); err != nil {
6120		return err
6121	}
6122	future.FutureAPI = &azFuture
6123	future.Result = future.result
6124	return nil
6125}
6126
6127// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
6128func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
6129	var done bool
6130	done, err = future.DoneWithContext(context.Background(), client)
6131	if err != nil {
6132		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6133		return
6134	}
6135	if !done {
6136		erca.Response.Response = future.Response()
6137		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
6138		return
6139	}
6140	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6141	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
6142		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
6143		if err != nil {
6144			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
6145		}
6146	}
6147	return
6148}
6149
6150// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
6151// of a long-running operation.
6152type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
6153	azure.FutureAPI
6154	// Result returns the result of the asynchronous operation.
6155	// If the operation has not completed it will return an error.
6156	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
6157}
6158
6159// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6160func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
6161	var azFuture azure.Future
6162	if err := json.Unmarshal(body, &azFuture); err != nil {
6163		return err
6164	}
6165	future.FutureAPI = &azFuture
6166	future.Result = future.result
6167	return nil
6168}
6169
6170// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
6171func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
6172	var done bool
6173	done, err = future.DoneWithContext(context.Background(), client)
6174	if err != nil {
6175		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
6176		return
6177	}
6178	if !done {
6179		ar.Response = future.Response()
6180		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
6181		return
6182	}
6183	ar.Response = future.Response()
6184	return
6185}
6186
6187// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
6188// resource.
6189type ExpressRouteCircuitConnection struct {
6190	autorest.Response                              `json:"-"`
6191	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
6192	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6193	Name *string `json:"name,omitempty"`
6194	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6195	Etag *string `json:"etag,omitempty"`
6196	// ID - Resource ID.
6197	ID *string `json:"id,omitempty"`
6198}
6199
6200// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
6201func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
6202	objectMap := make(map[string]interface{})
6203	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
6204		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
6205	}
6206	if ercc.Name != nil {
6207		objectMap["name"] = ercc.Name
6208	}
6209	if ercc.ID != nil {
6210		objectMap["id"] = ercc.ID
6211	}
6212	return json.Marshal(objectMap)
6213}
6214
6215// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
6216func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
6217	var m map[string]*json.RawMessage
6218	err := json.Unmarshal(body, &m)
6219	if err != nil {
6220		return err
6221	}
6222	for k, v := range m {
6223		switch k {
6224		case "properties":
6225			if v != nil {
6226				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
6227				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
6228				if err != nil {
6229					return err
6230				}
6231				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
6232			}
6233		case "name":
6234			if v != nil {
6235				var name string
6236				err = json.Unmarshal(*v, &name)
6237				if err != nil {
6238					return err
6239				}
6240				ercc.Name = &name
6241			}
6242		case "etag":
6243			if v != nil {
6244				var etag string
6245				err = json.Unmarshal(*v, &etag)
6246				if err != nil {
6247					return err
6248				}
6249				ercc.Etag = &etag
6250			}
6251		case "id":
6252			if v != nil {
6253				var ID string
6254				err = json.Unmarshal(*v, &ID)
6255				if err != nil {
6256					return err
6257				}
6258				ercc.ID = &ID
6259			}
6260		}
6261	}
6262
6263	return nil
6264}
6265
6266// ExpressRouteCircuitConnectionPropertiesFormat ...
6267type ExpressRouteCircuitConnectionPropertiesFormat struct {
6268	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
6269	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
6270	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
6271	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
6272	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
6273	AddressPrefix *string `json:"addressPrefix,omitempty"`
6274	// AuthorizationKey - The authorization key.
6275	AuthorizationKey *string `json:"authorizationKey,omitempty"`
6276	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
6277	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
6278	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6279	ProvisioningState *string `json:"provisioningState,omitempty"`
6280}
6281
6282// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
6283func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
6284	objectMap := make(map[string]interface{})
6285	if erccpf.ExpressRouteCircuitPeering != nil {
6286		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
6287	}
6288	if erccpf.PeerExpressRouteCircuitPeering != nil {
6289		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
6290	}
6291	if erccpf.AddressPrefix != nil {
6292		objectMap["addressPrefix"] = erccpf.AddressPrefix
6293	}
6294	if erccpf.AuthorizationKey != nil {
6295		objectMap["authorizationKey"] = erccpf.AuthorizationKey
6296	}
6297	return json.Marshal(objectMap)
6298}
6299
6300// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
6301// results of a long-running operation.
6302type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
6303	azure.FutureAPI
6304	// Result returns the result of the asynchronous operation.
6305	// If the operation has not completed it will return an error.
6306	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
6307}
6308
6309// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6310func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6311	var azFuture azure.Future
6312	if err := json.Unmarshal(body, &azFuture); err != nil {
6313		return err
6314	}
6315	future.FutureAPI = &azFuture
6316	future.Result = future.result
6317	return nil
6318}
6319
6320// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
6321func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
6322	var done bool
6323	done, err = future.DoneWithContext(context.Background(), client)
6324	if err != nil {
6325		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6326		return
6327	}
6328	if !done {
6329		ercc.Response.Response = future.Response()
6330		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
6331		return
6332	}
6333	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6334	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
6335		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
6336		if err != nil {
6337			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
6338		}
6339	}
6340	return
6341}
6342
6343// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
6344// long-running operation.
6345type ExpressRouteCircuitConnectionsDeleteFuture struct {
6346	azure.FutureAPI
6347	// Result returns the result of the asynchronous operation.
6348	// If the operation has not completed it will return an error.
6349	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
6350}
6351
6352// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6353func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
6354	var azFuture azure.Future
6355	if err := json.Unmarshal(body, &azFuture); err != nil {
6356		return err
6357	}
6358	future.FutureAPI = &azFuture
6359	future.Result = future.result
6360	return nil
6361}
6362
6363// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
6364func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
6365	var done bool
6366	done, err = future.DoneWithContext(context.Background(), client)
6367	if err != nil {
6368		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
6369		return
6370	}
6371	if !done {
6372		ar.Response = future.Response()
6373		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
6374		return
6375	}
6376	ar.Response = future.Response()
6377	return
6378}
6379
6380// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
6381type ExpressRouteCircuitListResult struct {
6382	autorest.Response `json:"-"`
6383	// Value - A list of ExpressRouteCircuits in a resource group.
6384	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
6385	// NextLink - The URL to get the next set of results.
6386	NextLink *string `json:"nextLink,omitempty"`
6387}
6388
6389// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
6390// values.
6391type ExpressRouteCircuitListResultIterator struct {
6392	i    int
6393	page ExpressRouteCircuitListResultPage
6394}
6395
6396// NextWithContext advances to the next value.  If there was an error making
6397// the request the iterator does not advance and the error is returned.
6398func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
6399	if tracing.IsEnabled() {
6400		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
6401		defer func() {
6402			sc := -1
6403			if iter.Response().Response.Response != nil {
6404				sc = iter.Response().Response.Response.StatusCode
6405			}
6406			tracing.EndSpan(ctx, sc, err)
6407		}()
6408	}
6409	iter.i++
6410	if iter.i < len(iter.page.Values()) {
6411		return nil
6412	}
6413	err = iter.page.NextWithContext(ctx)
6414	if err != nil {
6415		iter.i--
6416		return err
6417	}
6418	iter.i = 0
6419	return nil
6420}
6421
6422// Next advances to the next value.  If there was an error making
6423// the request the iterator does not advance and the error is returned.
6424// Deprecated: Use NextWithContext() instead.
6425func (iter *ExpressRouteCircuitListResultIterator) Next() error {
6426	return iter.NextWithContext(context.Background())
6427}
6428
6429// NotDone returns true if the enumeration should be started or is not yet complete.
6430func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
6431	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6432}
6433
6434// Response returns the raw server response from the last page request.
6435func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
6436	return iter.page.Response()
6437}
6438
6439// Value returns the current value or a zero-initialized value if the
6440// iterator has advanced beyond the end of the collection.
6441func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
6442	if !iter.page.NotDone() {
6443		return ExpressRouteCircuit{}
6444	}
6445	return iter.page.Values()[iter.i]
6446}
6447
6448// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
6449func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
6450	return ExpressRouteCircuitListResultIterator{page: page}
6451}
6452
6453// IsEmpty returns true if the ListResult contains no values.
6454func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
6455	return erclr.Value == nil || len(*erclr.Value) == 0
6456}
6457
6458// hasNextLink returns true if the NextLink is not empty.
6459func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
6460	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
6461}
6462
6463// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
6464// It returns nil if no more results exist.
6465func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
6466	if !erclr.hasNextLink() {
6467		return nil, nil
6468	}
6469	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6470		autorest.AsJSON(),
6471		autorest.AsGet(),
6472		autorest.WithBaseURL(to.String(erclr.NextLink)))
6473}
6474
6475// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
6476type ExpressRouteCircuitListResultPage struct {
6477	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
6478	erclr ExpressRouteCircuitListResult
6479}
6480
6481// NextWithContext advances to the next page of values.  If there was an error making
6482// the request the page does not advance and the error is returned.
6483func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
6484	if tracing.IsEnabled() {
6485		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
6486		defer func() {
6487			sc := -1
6488			if page.Response().Response.Response != nil {
6489				sc = page.Response().Response.Response.StatusCode
6490			}
6491			tracing.EndSpan(ctx, sc, err)
6492		}()
6493	}
6494	for {
6495		next, err := page.fn(ctx, page.erclr)
6496		if err != nil {
6497			return err
6498		}
6499		page.erclr = next
6500		if !next.hasNextLink() || !next.IsEmpty() {
6501			break
6502		}
6503	}
6504	return nil
6505}
6506
6507// Next advances to the next page of values.  If there was an error making
6508// the request the page does not advance and the error is returned.
6509// Deprecated: Use NextWithContext() instead.
6510func (page *ExpressRouteCircuitListResultPage) Next() error {
6511	return page.NextWithContext(context.Background())
6512}
6513
6514// NotDone returns true if the page enumeration should be started or is not yet complete.
6515func (page ExpressRouteCircuitListResultPage) NotDone() bool {
6516	return !page.erclr.IsEmpty()
6517}
6518
6519// Response returns the raw server response from the last page request.
6520func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
6521	return page.erclr
6522}
6523
6524// Values returns the slice of values for the current page or nil if there are no values.
6525func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
6526	if page.erclr.IsEmpty() {
6527		return nil
6528	}
6529	return *page.erclr.Value
6530}
6531
6532// Creates a new instance of the ExpressRouteCircuitListResultPage type.
6533func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
6534	return ExpressRouteCircuitListResultPage{
6535		fn:    getNextPage,
6536		erclr: cur,
6537	}
6538}
6539
6540// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
6541type ExpressRouteCircuitPeering struct {
6542	autorest.Response                           `json:"-"`
6543	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
6544	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6545	Name *string `json:"name,omitempty"`
6546	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6547	Etag *string `json:"etag,omitempty"`
6548	// ID - Resource ID.
6549	ID *string `json:"id,omitempty"`
6550}
6551
6552// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
6553func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
6554	objectMap := make(map[string]interface{})
6555	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
6556		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
6557	}
6558	if ercp.Name != nil {
6559		objectMap["name"] = ercp.Name
6560	}
6561	if ercp.ID != nil {
6562		objectMap["id"] = ercp.ID
6563	}
6564	return json.Marshal(objectMap)
6565}
6566
6567// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
6568func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
6569	var m map[string]*json.RawMessage
6570	err := json.Unmarshal(body, &m)
6571	if err != nil {
6572		return err
6573	}
6574	for k, v := range m {
6575		switch k {
6576		case "properties":
6577			if v != nil {
6578				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
6579				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
6580				if err != nil {
6581					return err
6582				}
6583				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
6584			}
6585		case "name":
6586			if v != nil {
6587				var name string
6588				err = json.Unmarshal(*v, &name)
6589				if err != nil {
6590					return err
6591				}
6592				ercp.Name = &name
6593			}
6594		case "etag":
6595			if v != nil {
6596				var etag string
6597				err = json.Unmarshal(*v, &etag)
6598				if err != nil {
6599					return err
6600				}
6601				ercp.Etag = &etag
6602			}
6603		case "id":
6604			if v != nil {
6605				var ID string
6606				err = json.Unmarshal(*v, &ID)
6607				if err != nil {
6608					return err
6609				}
6610				ercp.ID = &ID
6611			}
6612		}
6613	}
6614
6615	return nil
6616}
6617
6618// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
6619type ExpressRouteCircuitPeeringConfig struct {
6620	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
6621	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
6622	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
6623	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
6624	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
6625	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
6626	// LegacyMode - The legacy mode of the peering.
6627	LegacyMode *int32 `json:"legacyMode,omitempty"`
6628	// CustomerASN - The CustomerASN of the peering.
6629	CustomerASN *int32 `json:"customerASN,omitempty"`
6630	// RoutingRegistryName - The RoutingRegistryName of the configuration.
6631	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
6632}
6633
6634// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
6635// that belong to an ExpressRouteCircuit.
6636type ExpressRouteCircuitPeeringListResult struct {
6637	autorest.Response `json:"-"`
6638	// Value - The peerings in an express route circuit.
6639	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
6640	// NextLink - The URL to get the next set of results.
6641	NextLink *string `json:"nextLink,omitempty"`
6642}
6643
6644// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
6645// ExpressRouteCircuitPeering values.
6646type ExpressRouteCircuitPeeringListResultIterator struct {
6647	i    int
6648	page ExpressRouteCircuitPeeringListResultPage
6649}
6650
6651// NextWithContext advances to the next value.  If there was an error making
6652// the request the iterator does not advance and the error is returned.
6653func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
6654	if tracing.IsEnabled() {
6655		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
6656		defer func() {
6657			sc := -1
6658			if iter.Response().Response.Response != nil {
6659				sc = iter.Response().Response.Response.StatusCode
6660			}
6661			tracing.EndSpan(ctx, sc, err)
6662		}()
6663	}
6664	iter.i++
6665	if iter.i < len(iter.page.Values()) {
6666		return nil
6667	}
6668	err = iter.page.NextWithContext(ctx)
6669	if err != nil {
6670		iter.i--
6671		return err
6672	}
6673	iter.i = 0
6674	return nil
6675}
6676
6677// Next advances to the next value.  If there was an error making
6678// the request the iterator does not advance and the error is returned.
6679// Deprecated: Use NextWithContext() instead.
6680func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
6681	return iter.NextWithContext(context.Background())
6682}
6683
6684// NotDone returns true if the enumeration should be started or is not yet complete.
6685func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
6686	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6687}
6688
6689// Response returns the raw server response from the last page request.
6690func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
6691	return iter.page.Response()
6692}
6693
6694// Value returns the current value or a zero-initialized value if the
6695// iterator has advanced beyond the end of the collection.
6696func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
6697	if !iter.page.NotDone() {
6698		return ExpressRouteCircuitPeering{}
6699	}
6700	return iter.page.Values()[iter.i]
6701}
6702
6703// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
6704func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
6705	return ExpressRouteCircuitPeeringListResultIterator{page: page}
6706}
6707
6708// IsEmpty returns true if the ListResult contains no values.
6709func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
6710	return ercplr.Value == nil || len(*ercplr.Value) == 0
6711}
6712
6713// hasNextLink returns true if the NextLink is not empty.
6714func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
6715	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
6716}
6717
6718// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
6719// It returns nil if no more results exist.
6720func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
6721	if !ercplr.hasNextLink() {
6722		return nil, nil
6723	}
6724	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6725		autorest.AsJSON(),
6726		autorest.AsGet(),
6727		autorest.WithBaseURL(to.String(ercplr.NextLink)))
6728}
6729
6730// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
6731type ExpressRouteCircuitPeeringListResultPage struct {
6732	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
6733	ercplr ExpressRouteCircuitPeeringListResult
6734}
6735
6736// NextWithContext advances to the next page of values.  If there was an error making
6737// the request the page does not advance and the error is returned.
6738func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
6739	if tracing.IsEnabled() {
6740		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
6741		defer func() {
6742			sc := -1
6743			if page.Response().Response.Response != nil {
6744				sc = page.Response().Response.Response.StatusCode
6745			}
6746			tracing.EndSpan(ctx, sc, err)
6747		}()
6748	}
6749	for {
6750		next, err := page.fn(ctx, page.ercplr)
6751		if err != nil {
6752			return err
6753		}
6754		page.ercplr = next
6755		if !next.hasNextLink() || !next.IsEmpty() {
6756			break
6757		}
6758	}
6759	return nil
6760}
6761
6762// Next advances to the next page of values.  If there was an error making
6763// the request the page does not advance and the error is returned.
6764// Deprecated: Use NextWithContext() instead.
6765func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
6766	return page.NextWithContext(context.Background())
6767}
6768
6769// NotDone returns true if the page enumeration should be started or is not yet complete.
6770func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
6771	return !page.ercplr.IsEmpty()
6772}
6773
6774// Response returns the raw server response from the last page request.
6775func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
6776	return page.ercplr
6777}
6778
6779// Values returns the slice of values for the current page or nil if there are no values.
6780func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
6781	if page.ercplr.IsEmpty() {
6782		return nil
6783	}
6784	return *page.ercplr.Value
6785}
6786
6787// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
6788func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
6789	return ExpressRouteCircuitPeeringListResultPage{
6790		fn:     getNextPage,
6791		ercplr: cur,
6792	}
6793}
6794
6795// ExpressRouteCircuitPeeringPropertiesFormat ...
6796type ExpressRouteCircuitPeeringPropertiesFormat struct {
6797	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
6798	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
6799	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
6800	State ExpressRoutePeeringState `json:"state,omitempty"`
6801	// AzureASN - The Azure ASN.
6802	AzureASN *int32 `json:"azureASN,omitempty"`
6803	// PeerASN - The peer ASN.
6804	PeerASN *int64 `json:"peerASN,omitempty"`
6805	// PrimaryPeerAddressPrefix - The primary address prefix.
6806	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
6807	// SecondaryPeerAddressPrefix - The secondary address prefix.
6808	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6809	// PrimaryAzurePort - The primary port.
6810	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
6811	// SecondaryAzurePort - The secondary port.
6812	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
6813	// SharedKey - The shared key.
6814	SharedKey *string `json:"sharedKey,omitempty"`
6815	// VlanID - The VLAN ID.
6816	VlanID *int32 `json:"vlanId,omitempty"`
6817	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6818	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6819	// Stats - Gets peering stats.
6820	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
6821	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6822	ProvisioningState *string `json:"provisioningState,omitempty"`
6823	// GatewayManagerEtag - The GatewayManager Etag.
6824	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6825	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
6826	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
6827	// RouteFilter - The reference of the RouteFilter resource.
6828	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
6829	// Ipv6PeeringConfig - The IPv6 peering configuration.
6830	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
6831	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
6832	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
6833}
6834
6835// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
6836// of a long-running operation.
6837type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
6838	azure.FutureAPI
6839	// Result returns the result of the asynchronous operation.
6840	// If the operation has not completed it will return an error.
6841	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
6842}
6843
6844// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6845func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6846	var azFuture azure.Future
6847	if err := json.Unmarshal(body, &azFuture); err != nil {
6848		return err
6849	}
6850	future.FutureAPI = &azFuture
6851	future.Result = future.result
6852	return nil
6853}
6854
6855// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
6856func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
6857	var done bool
6858	done, err = future.DoneWithContext(context.Background(), client)
6859	if err != nil {
6860		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6861		return
6862	}
6863	if !done {
6864		ercp.Response.Response = future.Response()
6865		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
6866		return
6867	}
6868	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6869	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
6870		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
6871		if err != nil {
6872			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
6873		}
6874	}
6875	return
6876}
6877
6878// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
6879// long-running operation.
6880type ExpressRouteCircuitPeeringsDeleteFuture struct {
6881	azure.FutureAPI
6882	// Result returns the result of the asynchronous operation.
6883	// If the operation has not completed it will return an error.
6884	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
6885}
6886
6887// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6888func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
6889	var azFuture azure.Future
6890	if err := json.Unmarshal(body, &azFuture); err != nil {
6891		return err
6892	}
6893	future.FutureAPI = &azFuture
6894	future.Result = future.result
6895	return nil
6896}
6897
6898// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
6899func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
6900	var done bool
6901	done, err = future.DoneWithContext(context.Background(), client)
6902	if err != nil {
6903		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
6904		return
6905	}
6906	if !done {
6907		ar.Response = future.Response()
6908		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
6909		return
6910	}
6911	ar.Response = future.Response()
6912	return
6913}
6914
6915// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
6916type ExpressRouteCircuitPropertiesFormat struct {
6917	// AllowClassicOperations - Allow classic operations
6918	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
6919	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
6920	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
6921	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
6922	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
6923	// Authorizations - The list of authorizations.
6924	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
6925	// Peerings - The list of peerings.
6926	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
6927	// ServiceKey - The ServiceKey.
6928	ServiceKey *string `json:"serviceKey,omitempty"`
6929	// ServiceProviderNotes - The ServiceProviderNotes.
6930	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
6931	// ServiceProviderProperties - The ServiceProviderProperties.
6932	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
6933	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6934	ProvisioningState *string `json:"provisioningState,omitempty"`
6935	// GatewayManagerEtag - The GatewayManager Etag.
6936	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6937}
6938
6939// ExpressRouteCircuitReference ...
6940type ExpressRouteCircuitReference struct {
6941	// ID - Corresponding Express Route Circuit Id.
6942	ID *string `json:"id,omitempty"`
6943}
6944
6945// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
6946type ExpressRouteCircuitRoutesTable struct {
6947	// NetworkProperty - IP address of a network entity
6948	NetworkProperty *string `json:"network,omitempty"`
6949	// NextHop - NextHop address
6950	NextHop *string `json:"nextHop,omitempty"`
6951	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
6952	LocPrf *string `json:"locPrf,omitempty"`
6953	// Weight - Route Weight.
6954	Weight *int32 `json:"weight,omitempty"`
6955	// Path - Autonomous system paths to the destination network.
6956	Path *string `json:"path,omitempty"`
6957}
6958
6959// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
6960type ExpressRouteCircuitRoutesTableSummary struct {
6961	// Neighbor - IP address of the neighbor.
6962	Neighbor *string `json:"neighbor,omitempty"`
6963	// V - BGP version number spoken to the neighbor.
6964	V *int32 `json:"v,omitempty"`
6965	// As - Autonomous system number.
6966	As *int32 `json:"as,omitempty"`
6967	// UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
6968	UpDown *string `json:"upDown,omitempty"`
6969	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
6970	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
6971}
6972
6973// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
6974// Circuits API.
6975type ExpressRouteCircuitsArpTableListResult struct {
6976	autorest.Response `json:"-"`
6977	// Value - Gets list of the ARP table.
6978	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
6979	// NextLink - The URL to get the next set of results.
6980	NextLink *string `json:"nextLink,omitempty"`
6981}
6982
6983// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6984// long-running operation.
6985type ExpressRouteCircuitsCreateOrUpdateFuture struct {
6986	azure.FutureAPI
6987	// Result returns the result of the asynchronous operation.
6988	// If the operation has not completed it will return an error.
6989	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
6990}
6991
6992// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6993func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6994	var azFuture azure.Future
6995	if err := json.Unmarshal(body, &azFuture); err != nil {
6996		return err
6997	}
6998	future.FutureAPI = &azFuture
6999	future.Result = future.result
7000	return nil
7001}
7002
7003// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
7004func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
7005	var done bool
7006	done, err = future.DoneWithContext(context.Background(), client)
7007	if err != nil {
7008		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7009		return
7010	}
7011	if !done {
7012		erc.Response.Response = future.Response()
7013		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
7014		return
7015	}
7016	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7017	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
7018		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
7019		if err != nil {
7020			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
7021		}
7022	}
7023	return
7024}
7025
7026// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
7027// long-running operation.
7028type ExpressRouteCircuitsDeleteFuture struct {
7029	azure.FutureAPI
7030	// Result returns the result of the asynchronous operation.
7031	// If the operation has not completed it will return an error.
7032	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
7033}
7034
7035// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7036func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
7037	var azFuture azure.Future
7038	if err := json.Unmarshal(body, &azFuture); err != nil {
7039		return err
7040	}
7041	future.FutureAPI = &azFuture
7042	future.Result = future.result
7043	return nil
7044}
7045
7046// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
7047func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
7048	var done bool
7049	done, err = future.DoneWithContext(context.Background(), client)
7050	if err != nil {
7051		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
7052		return
7053	}
7054	if !done {
7055		ar.Response = future.Response()
7056		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
7057		return
7058	}
7059	ar.Response = future.Response()
7060	return
7061}
7062
7063// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
7064// ExpressRouteCircuit.
7065type ExpressRouteCircuitServiceProviderProperties struct {
7066	// ServiceProviderName - The serviceProviderName.
7067	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
7068	// PeeringLocation - The peering location.
7069	PeeringLocation *string `json:"peeringLocation,omitempty"`
7070	// BandwidthInMbps - The BandwidthInMbps.
7071	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
7072}
7073
7074// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
7075type ExpressRouteCircuitSku struct {
7076	// Name - The name of the SKU.
7077	Name *string `json:"name,omitempty"`
7078	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'
7079	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
7080	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
7081	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
7082}
7083
7084// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
7085// long-running operation.
7086type ExpressRouteCircuitsListArpTableFuture struct {
7087	azure.FutureAPI
7088	// Result returns the result of the asynchronous operation.
7089	// If the operation has not completed it will return an error.
7090	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
7091}
7092
7093// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7094func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
7095	var azFuture azure.Future
7096	if err := json.Unmarshal(body, &azFuture); err != nil {
7097		return err
7098	}
7099	future.FutureAPI = &azFuture
7100	future.Result = future.result
7101	return nil
7102}
7103
7104// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
7105func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
7106	var done bool
7107	done, err = future.DoneWithContext(context.Background(), client)
7108	if err != nil {
7109		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
7110		return
7111	}
7112	if !done {
7113		ercatlr.Response.Response = future.Response()
7114		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
7115		return
7116	}
7117	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7118	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
7119		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
7120		if err != nil {
7121			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
7122		}
7123	}
7124	return
7125}
7126
7127// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
7128// long-running operation.
7129type ExpressRouteCircuitsListRoutesTableFuture struct {
7130	azure.FutureAPI
7131	// Result returns the result of the asynchronous operation.
7132	// If the operation has not completed it will return an error.
7133	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
7134}
7135
7136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7137func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
7138	var azFuture azure.Future
7139	if err := json.Unmarshal(body, &azFuture); err != nil {
7140		return err
7141	}
7142	future.FutureAPI = &azFuture
7143	future.Result = future.result
7144	return nil
7145}
7146
7147// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
7148func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
7149	var done bool
7150	done, err = future.DoneWithContext(context.Background(), client)
7151	if err != nil {
7152		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
7153		return
7154	}
7155	if !done {
7156		ercrtlr.Response.Response = future.Response()
7157		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
7158		return
7159	}
7160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7161	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
7162		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
7163		if err != nil {
7164			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
7165		}
7166	}
7167	return
7168}
7169
7170// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
7171// results of a long-running operation.
7172type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
7173	azure.FutureAPI
7174	// Result returns the result of the asynchronous operation.
7175	// If the operation has not completed it will return an error.
7176	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
7177}
7178
7179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7180func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
7181	var azFuture azure.Future
7182	if err := json.Unmarshal(body, &azFuture); err != nil {
7183		return err
7184	}
7185	future.FutureAPI = &azFuture
7186	future.Result = future.result
7187	return nil
7188}
7189
7190// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
7191func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
7192	var done bool
7193	done, err = future.DoneWithContext(context.Background(), client)
7194	if err != nil {
7195		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
7196		return
7197	}
7198	if !done {
7199		ercrtslr.Response.Response = future.Response()
7200		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
7201		return
7202	}
7203	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7204	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
7205		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
7206		if err != nil {
7207			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
7208		}
7209	}
7210	return
7211}
7212
7213// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
7214// Circuits API.
7215type ExpressRouteCircuitsRoutesTableListResult struct {
7216	autorest.Response `json:"-"`
7217	// Value - The list of routes table.
7218	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
7219	// NextLink - The URL to get the next set of results.
7220	NextLink *string `json:"nextLink,omitempty"`
7221}
7222
7223// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
7224// Express Route Circuits API.
7225type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
7226	autorest.Response `json:"-"`
7227	// Value - A list of the routes table.
7228	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
7229	// NextLink - The URL to get the next set of results.
7230	NextLink *string `json:"nextLink,omitempty"`
7231}
7232
7233// ExpressRouteCircuitStats contains stats associated with the peering.
7234type ExpressRouteCircuitStats struct {
7235	autorest.Response `json:"-"`
7236	// PrimarybytesIn - Gets BytesIn of the peering.
7237	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
7238	// PrimarybytesOut - Gets BytesOut of the peering.
7239	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
7240	// SecondarybytesIn - Gets BytesIn of the peering.
7241	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
7242	// SecondarybytesOut - Gets BytesOut of the peering.
7243	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
7244}
7245
7246// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7247// long-running operation.
7248type ExpressRouteCircuitsUpdateTagsFuture struct {
7249	azure.FutureAPI
7250	// Result returns the result of the asynchronous operation.
7251	// If the operation has not completed it will return an error.
7252	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
7253}
7254
7255// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7256func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7257	var azFuture azure.Future
7258	if err := json.Unmarshal(body, &azFuture); err != nil {
7259		return err
7260	}
7261	future.FutureAPI = &azFuture
7262	future.Result = future.result
7263	return nil
7264}
7265
7266// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
7267func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
7268	var done bool
7269	done, err = future.DoneWithContext(context.Background(), client)
7270	if err != nil {
7271		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7272		return
7273	}
7274	if !done {
7275		erc.Response.Response = future.Response()
7276		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
7277		return
7278	}
7279	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7280	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
7281		erc, err = client.UpdateTagsResponder(erc.Response.Response)
7282		if err != nil {
7283			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
7284		}
7285	}
7286	return
7287}
7288
7289// ExpressRouteCrossConnection expressRouteCrossConnection resource
7290type ExpressRouteCrossConnection struct {
7291	autorest.Response                      `json:"-"`
7292	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
7293	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7294	Etag *string `json:"etag,omitempty"`
7295	// ID - Resource ID.
7296	ID *string `json:"id,omitempty"`
7297	// Name - READ-ONLY; Resource name.
7298	Name *string `json:"name,omitempty"`
7299	// Type - READ-ONLY; Resource type.
7300	Type *string `json:"type,omitempty"`
7301	// Location - Resource location.
7302	Location *string `json:"location,omitempty"`
7303	// Tags - Resource tags.
7304	Tags map[string]*string `json:"tags"`
7305}
7306
7307// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
7308func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
7309	objectMap := make(map[string]interface{})
7310	if ercc.ExpressRouteCrossConnectionProperties != nil {
7311		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
7312	}
7313	if ercc.ID != nil {
7314		objectMap["id"] = ercc.ID
7315	}
7316	if ercc.Location != nil {
7317		objectMap["location"] = ercc.Location
7318	}
7319	if ercc.Tags != nil {
7320		objectMap["tags"] = ercc.Tags
7321	}
7322	return json.Marshal(objectMap)
7323}
7324
7325// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
7326func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
7327	var m map[string]*json.RawMessage
7328	err := json.Unmarshal(body, &m)
7329	if err != nil {
7330		return err
7331	}
7332	for k, v := range m {
7333		switch k {
7334		case "properties":
7335			if v != nil {
7336				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
7337				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
7338				if err != nil {
7339					return err
7340				}
7341				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
7342			}
7343		case "etag":
7344			if v != nil {
7345				var etag string
7346				err = json.Unmarshal(*v, &etag)
7347				if err != nil {
7348					return err
7349				}
7350				ercc.Etag = &etag
7351			}
7352		case "id":
7353			if v != nil {
7354				var ID string
7355				err = json.Unmarshal(*v, &ID)
7356				if err != nil {
7357					return err
7358				}
7359				ercc.ID = &ID
7360			}
7361		case "name":
7362			if v != nil {
7363				var name string
7364				err = json.Unmarshal(*v, &name)
7365				if err != nil {
7366					return err
7367				}
7368				ercc.Name = &name
7369			}
7370		case "type":
7371			if v != nil {
7372				var typeVar string
7373				err = json.Unmarshal(*v, &typeVar)
7374				if err != nil {
7375					return err
7376				}
7377				ercc.Type = &typeVar
7378			}
7379		case "location":
7380			if v != nil {
7381				var location string
7382				err = json.Unmarshal(*v, &location)
7383				if err != nil {
7384					return err
7385				}
7386				ercc.Location = &location
7387			}
7388		case "tags":
7389			if v != nil {
7390				var tags map[string]*string
7391				err = json.Unmarshal(*v, &tags)
7392				if err != nil {
7393					return err
7394				}
7395				ercc.Tags = tags
7396			}
7397		}
7398	}
7399
7400	return nil
7401}
7402
7403// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
7404type ExpressRouteCrossConnectionListResult struct {
7405	autorest.Response `json:"-"`
7406	// Value - A list of ExpressRouteCrossConnection resources.
7407	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
7408	// NextLink - READ-ONLY; The URL to get the next set of results.
7409	NextLink *string `json:"nextLink,omitempty"`
7410}
7411
7412// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
7413func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
7414	objectMap := make(map[string]interface{})
7415	if ercclr.Value != nil {
7416		objectMap["value"] = ercclr.Value
7417	}
7418	return json.Marshal(objectMap)
7419}
7420
7421// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
7422// ExpressRouteCrossConnection values.
7423type ExpressRouteCrossConnectionListResultIterator struct {
7424	i    int
7425	page ExpressRouteCrossConnectionListResultPage
7426}
7427
7428// NextWithContext advances to the next value.  If there was an error making
7429// the request the iterator does not advance and the error is returned.
7430func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7431	if tracing.IsEnabled() {
7432		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
7433		defer func() {
7434			sc := -1
7435			if iter.Response().Response.Response != nil {
7436				sc = iter.Response().Response.Response.StatusCode
7437			}
7438			tracing.EndSpan(ctx, sc, err)
7439		}()
7440	}
7441	iter.i++
7442	if iter.i < len(iter.page.Values()) {
7443		return nil
7444	}
7445	err = iter.page.NextWithContext(ctx)
7446	if err != nil {
7447		iter.i--
7448		return err
7449	}
7450	iter.i = 0
7451	return nil
7452}
7453
7454// Next advances to the next value.  If there was an error making
7455// the request the iterator does not advance and the error is returned.
7456// Deprecated: Use NextWithContext() instead.
7457func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
7458	return iter.NextWithContext(context.Background())
7459}
7460
7461// NotDone returns true if the enumeration should be started or is not yet complete.
7462func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
7463	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7464}
7465
7466// Response returns the raw server response from the last page request.
7467func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
7468	return iter.page.Response()
7469}
7470
7471// Value returns the current value or a zero-initialized value if the
7472// iterator has advanced beyond the end of the collection.
7473func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
7474	if !iter.page.NotDone() {
7475		return ExpressRouteCrossConnection{}
7476	}
7477	return iter.page.Values()[iter.i]
7478}
7479
7480// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
7481func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
7482	return ExpressRouteCrossConnectionListResultIterator{page: page}
7483}
7484
7485// IsEmpty returns true if the ListResult contains no values.
7486func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
7487	return ercclr.Value == nil || len(*ercclr.Value) == 0
7488}
7489
7490// hasNextLink returns true if the NextLink is not empty.
7491func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
7492	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
7493}
7494
7495// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
7496// It returns nil if no more results exist.
7497func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
7498	if !ercclr.hasNextLink() {
7499		return nil, nil
7500	}
7501	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7502		autorest.AsJSON(),
7503		autorest.AsGet(),
7504		autorest.WithBaseURL(to.String(ercclr.NextLink)))
7505}
7506
7507// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
7508type ExpressRouteCrossConnectionListResultPage struct {
7509	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
7510	ercclr ExpressRouteCrossConnectionListResult
7511}
7512
7513// NextWithContext advances to the next page of values.  If there was an error making
7514// the request the page does not advance and the error is returned.
7515func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
7516	if tracing.IsEnabled() {
7517		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
7518		defer func() {
7519			sc := -1
7520			if page.Response().Response.Response != nil {
7521				sc = page.Response().Response.Response.StatusCode
7522			}
7523			tracing.EndSpan(ctx, sc, err)
7524		}()
7525	}
7526	for {
7527		next, err := page.fn(ctx, page.ercclr)
7528		if err != nil {
7529			return err
7530		}
7531		page.ercclr = next
7532		if !next.hasNextLink() || !next.IsEmpty() {
7533			break
7534		}
7535	}
7536	return nil
7537}
7538
7539// Next advances to the next page of values.  If there was an error making
7540// the request the page does not advance and the error is returned.
7541// Deprecated: Use NextWithContext() instead.
7542func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
7543	return page.NextWithContext(context.Background())
7544}
7545
7546// NotDone returns true if the page enumeration should be started or is not yet complete.
7547func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
7548	return !page.ercclr.IsEmpty()
7549}
7550
7551// Response returns the raw server response from the last page request.
7552func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
7553	return page.ercclr
7554}
7555
7556// Values returns the slice of values for the current page or nil if there are no values.
7557func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
7558	if page.ercclr.IsEmpty() {
7559		return nil
7560	}
7561	return *page.ercclr.Value
7562}
7563
7564// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
7565func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
7566	return ExpressRouteCrossConnectionListResultPage{
7567		fn:     getNextPage,
7568		ercclr: cur,
7569	}
7570}
7571
7572// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
7573type ExpressRouteCrossConnectionPeering struct {
7574	autorest.Response                             `json:"-"`
7575	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
7576	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7577	Name *string `json:"name,omitempty"`
7578	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7579	Etag *string `json:"etag,omitempty"`
7580	// ID - Resource ID.
7581	ID *string `json:"id,omitempty"`
7582}
7583
7584// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
7585func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
7586	objectMap := make(map[string]interface{})
7587	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
7588		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
7589	}
7590	if erccp.Name != nil {
7591		objectMap["name"] = erccp.Name
7592	}
7593	if erccp.ID != nil {
7594		objectMap["id"] = erccp.ID
7595	}
7596	return json.Marshal(objectMap)
7597}
7598
7599// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
7600func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
7601	var m map[string]*json.RawMessage
7602	err := json.Unmarshal(body, &m)
7603	if err != nil {
7604		return err
7605	}
7606	for k, v := range m {
7607		switch k {
7608		case "properties":
7609			if v != nil {
7610				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
7611				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
7612				if err != nil {
7613					return err
7614				}
7615				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
7616			}
7617		case "name":
7618			if v != nil {
7619				var name string
7620				err = json.Unmarshal(*v, &name)
7621				if err != nil {
7622					return err
7623				}
7624				erccp.Name = &name
7625			}
7626		case "etag":
7627			if v != nil {
7628				var etag string
7629				err = json.Unmarshal(*v, &etag)
7630				if err != nil {
7631					return err
7632				}
7633				erccp.Etag = &etag
7634			}
7635		case "id":
7636			if v != nil {
7637				var ID string
7638				err = json.Unmarshal(*v, &ID)
7639				if err != nil {
7640					return err
7641				}
7642				erccp.ID = &ID
7643			}
7644		}
7645	}
7646
7647	return nil
7648}
7649
7650// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
7651// that belong to an ExpressRouteCrossConnection.
7652type ExpressRouteCrossConnectionPeeringList struct {
7653	autorest.Response `json:"-"`
7654	// Value - The peerings in an express route cross connection.
7655	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
7656	// NextLink - READ-ONLY; The URL to get the next set of results.
7657	NextLink *string `json:"nextLink,omitempty"`
7658}
7659
7660// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
7661func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
7662	objectMap := make(map[string]interface{})
7663	if erccpl.Value != nil {
7664		objectMap["value"] = erccpl.Value
7665	}
7666	return json.Marshal(objectMap)
7667}
7668
7669// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
7670// ExpressRouteCrossConnectionPeering values.
7671type ExpressRouteCrossConnectionPeeringListIterator struct {
7672	i    int
7673	page ExpressRouteCrossConnectionPeeringListPage
7674}
7675
7676// NextWithContext advances to the next value.  If there was an error making
7677// the request the iterator does not advance and the error is returned.
7678func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
7679	if tracing.IsEnabled() {
7680		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
7681		defer func() {
7682			sc := -1
7683			if iter.Response().Response.Response != nil {
7684				sc = iter.Response().Response.Response.StatusCode
7685			}
7686			tracing.EndSpan(ctx, sc, err)
7687		}()
7688	}
7689	iter.i++
7690	if iter.i < len(iter.page.Values()) {
7691		return nil
7692	}
7693	err = iter.page.NextWithContext(ctx)
7694	if err != nil {
7695		iter.i--
7696		return err
7697	}
7698	iter.i = 0
7699	return nil
7700}
7701
7702// Next advances to the next value.  If there was an error making
7703// the request the iterator does not advance and the error is returned.
7704// Deprecated: Use NextWithContext() instead.
7705func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
7706	return iter.NextWithContext(context.Background())
7707}
7708
7709// NotDone returns true if the enumeration should be started or is not yet complete.
7710func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
7711	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7712}
7713
7714// Response returns the raw server response from the last page request.
7715func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
7716	return iter.page.Response()
7717}
7718
7719// Value returns the current value or a zero-initialized value if the
7720// iterator has advanced beyond the end of the collection.
7721func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
7722	if !iter.page.NotDone() {
7723		return ExpressRouteCrossConnectionPeering{}
7724	}
7725	return iter.page.Values()[iter.i]
7726}
7727
7728// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
7729func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
7730	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
7731}
7732
7733// IsEmpty returns true if the ListResult contains no values.
7734func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
7735	return erccpl.Value == nil || len(*erccpl.Value) == 0
7736}
7737
7738// hasNextLink returns true if the NextLink is not empty.
7739func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
7740	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
7741}
7742
7743// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
7744// It returns nil if no more results exist.
7745func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
7746	if !erccpl.hasNextLink() {
7747		return nil, nil
7748	}
7749	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7750		autorest.AsJSON(),
7751		autorest.AsGet(),
7752		autorest.WithBaseURL(to.String(erccpl.NextLink)))
7753}
7754
7755// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
7756type ExpressRouteCrossConnectionPeeringListPage struct {
7757	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
7758	erccpl ExpressRouteCrossConnectionPeeringList
7759}
7760
7761// NextWithContext advances to the next page of values.  If there was an error making
7762// the request the page does not advance and the error is returned.
7763func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
7764	if tracing.IsEnabled() {
7765		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
7766		defer func() {
7767			sc := -1
7768			if page.Response().Response.Response != nil {
7769				sc = page.Response().Response.Response.StatusCode
7770			}
7771			tracing.EndSpan(ctx, sc, err)
7772		}()
7773	}
7774	for {
7775		next, err := page.fn(ctx, page.erccpl)
7776		if err != nil {
7777			return err
7778		}
7779		page.erccpl = next
7780		if !next.hasNextLink() || !next.IsEmpty() {
7781			break
7782		}
7783	}
7784	return nil
7785}
7786
7787// Next advances to the next page of values.  If there was an error making
7788// the request the page does not advance and the error is returned.
7789// Deprecated: Use NextWithContext() instead.
7790func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
7791	return page.NextWithContext(context.Background())
7792}
7793
7794// NotDone returns true if the page enumeration should be started or is not yet complete.
7795func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
7796	return !page.erccpl.IsEmpty()
7797}
7798
7799// Response returns the raw server response from the last page request.
7800func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
7801	return page.erccpl
7802}
7803
7804// Values returns the slice of values for the current page or nil if there are no values.
7805func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
7806	if page.erccpl.IsEmpty() {
7807		return nil
7808	}
7809	return *page.erccpl.Value
7810}
7811
7812// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
7813func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
7814	return ExpressRouteCrossConnectionPeeringListPage{
7815		fn:     getNextPage,
7816		erccpl: cur,
7817	}
7818}
7819
7820// ExpressRouteCrossConnectionPeeringProperties ...
7821type ExpressRouteCrossConnectionPeeringProperties struct {
7822	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7823	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7824	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7825	State ExpressRoutePeeringState `json:"state,omitempty"`
7826	// AzureASN - READ-ONLY; The Azure ASN.
7827	AzureASN *int32 `json:"azureASN,omitempty"`
7828	// PeerASN - The peer ASN.
7829	PeerASN *int64 `json:"peerASN,omitempty"`
7830	// PrimaryPeerAddressPrefix - The primary address prefix.
7831	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7832	// SecondaryPeerAddressPrefix - The secondary address prefix.
7833	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7834	// PrimaryAzurePort - READ-ONLY; The primary port.
7835	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7836	// SecondaryAzurePort - READ-ONLY; The secondary port.
7837	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7838	// SharedKey - The shared key.
7839	SharedKey *string `json:"sharedKey,omitempty"`
7840	// VlanID - The VLAN ID.
7841	VlanID *int32 `json:"vlanId,omitempty"`
7842	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7843	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7844	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7845	ProvisioningState *string `json:"provisioningState,omitempty"`
7846	// GatewayManagerEtag - The GatewayManager Etag.
7847	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7848	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7849	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7850	// Ipv6PeeringConfig - The IPv6 peering configuration.
7851	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7852}
7853
7854// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
7855func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
7856	objectMap := make(map[string]interface{})
7857	if erccpp.PeeringType != "" {
7858		objectMap["peeringType"] = erccpp.PeeringType
7859	}
7860	if erccpp.State != "" {
7861		objectMap["state"] = erccpp.State
7862	}
7863	if erccpp.PeerASN != nil {
7864		objectMap["peerASN"] = erccpp.PeerASN
7865	}
7866	if erccpp.PrimaryPeerAddressPrefix != nil {
7867		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
7868	}
7869	if erccpp.SecondaryPeerAddressPrefix != nil {
7870		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
7871	}
7872	if erccpp.SharedKey != nil {
7873		objectMap["sharedKey"] = erccpp.SharedKey
7874	}
7875	if erccpp.VlanID != nil {
7876		objectMap["vlanId"] = erccpp.VlanID
7877	}
7878	if erccpp.MicrosoftPeeringConfig != nil {
7879		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
7880	}
7881	if erccpp.GatewayManagerEtag != nil {
7882		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
7883	}
7884	if erccpp.LastModifiedBy != nil {
7885		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
7886	}
7887	if erccpp.Ipv6PeeringConfig != nil {
7888		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
7889	}
7890	return json.Marshal(objectMap)
7891}
7892
7893// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7894// results of a long-running operation.
7895type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
7896	azure.FutureAPI
7897	// Result returns the result of the asynchronous operation.
7898	// If the operation has not completed it will return an error.
7899	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
7900}
7901
7902// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7903func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7904	var azFuture azure.Future
7905	if err := json.Unmarshal(body, &azFuture); err != nil {
7906		return err
7907	}
7908	future.FutureAPI = &azFuture
7909	future.Result = future.result
7910	return nil
7911}
7912
7913// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
7914func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
7915	var done bool
7916	done, err = future.DoneWithContext(context.Background(), client)
7917	if err != nil {
7918		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7919		return
7920	}
7921	if !done {
7922		erccp.Response.Response = future.Response()
7923		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
7924		return
7925	}
7926	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7927	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
7928		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
7929		if err != nil {
7930			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
7931		}
7932	}
7933	return
7934}
7935
7936// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
7937// of a long-running operation.
7938type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
7939	azure.FutureAPI
7940	// Result returns the result of the asynchronous operation.
7941	// If the operation has not completed it will return an error.
7942	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
7943}
7944
7945// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7946func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
7947	var azFuture azure.Future
7948	if err := json.Unmarshal(body, &azFuture); err != nil {
7949		return err
7950	}
7951	future.FutureAPI = &azFuture
7952	future.Result = future.result
7953	return nil
7954}
7955
7956// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
7957func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
7958	var done bool
7959	done, err = future.DoneWithContext(context.Background(), client)
7960	if err != nil {
7961		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
7962		return
7963	}
7964	if !done {
7965		ar.Response = future.Response()
7966		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
7967		return
7968	}
7969	ar.Response = future.Response()
7970	return
7971}
7972
7973// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
7974type ExpressRouteCrossConnectionProperties struct {
7975	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
7976	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7977	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
7978	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7979	// STag - READ-ONLY; The identifier of the circuit traffic.
7980	STag *int32 `json:"sTag,omitempty"`
7981	// PeeringLocation - The peering location of the ExpressRoute circuit.
7982	PeeringLocation *string `json:"peeringLocation,omitempty"`
7983	// BandwidthInMbps - The circuit bandwidth In Mbps.
7984	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
7985	// ExpressRouteCircuit - The ExpressRouteCircuit
7986	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
7987	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
7988	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
7989	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
7990	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
7991	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7992	ProvisioningState *string `json:"provisioningState,omitempty"`
7993	// Peerings - The list of peerings.
7994	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
7995}
7996
7997// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
7998func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
7999	objectMap := make(map[string]interface{})
8000	if erccp.PeeringLocation != nil {
8001		objectMap["peeringLocation"] = erccp.PeeringLocation
8002	}
8003	if erccp.BandwidthInMbps != nil {
8004		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
8005	}
8006	if erccp.ExpressRouteCircuit != nil {
8007		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
8008	}
8009	if erccp.ServiceProviderProvisioningState != "" {
8010		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
8011	}
8012	if erccp.ServiceProviderNotes != nil {
8013		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
8014	}
8015	if erccp.Peerings != nil {
8016		objectMap["peerings"] = erccp.Peerings
8017	}
8018	return json.Marshal(objectMap)
8019}
8020
8021// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8022type ExpressRouteCrossConnectionRoutesTableSummary struct {
8023	// Neighbor - IP address of Neighbor router
8024	Neighbor *string `json:"neighbor,omitempty"`
8025	// Asn - Autonomous system number.
8026	Asn *int32 `json:"asn,omitempty"`
8027	// UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state.
8028	UpDown *string `json:"upDown,omitempty"`
8029	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8030	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
8031}
8032
8033// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8034// results of a long-running operation.
8035type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
8036	azure.FutureAPI
8037	// Result returns the result of the asynchronous operation.
8038	// If the operation has not completed it will return an error.
8039	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
8040}
8041
8042// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8043func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8044	var azFuture azure.Future
8045	if err := json.Unmarshal(body, &azFuture); err != nil {
8046		return err
8047	}
8048	future.FutureAPI = &azFuture
8049	future.Result = future.result
8050	return nil
8051}
8052
8053// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
8054func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8055	var done bool
8056	done, err = future.DoneWithContext(context.Background(), client)
8057	if err != nil {
8058		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8059		return
8060	}
8061	if !done {
8062		ercc.Response.Response = future.Response()
8063		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
8064		return
8065	}
8066	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8067	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8068		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8069		if err != nil {
8070			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8071		}
8072	}
8073	return
8074}
8075
8076// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
8077// of a long-running operation.
8078type ExpressRouteCrossConnectionsListArpTableFuture struct {
8079	azure.FutureAPI
8080	// Result returns the result of the asynchronous operation.
8081	// If the operation has not completed it will return an error.
8082	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
8083}
8084
8085// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8086func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
8087	var azFuture azure.Future
8088	if err := json.Unmarshal(body, &azFuture); err != nil {
8089		return err
8090	}
8091	future.FutureAPI = &azFuture
8092	future.Result = future.result
8093	return nil
8094}
8095
8096// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
8097func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
8098	var done bool
8099	done, err = future.DoneWithContext(context.Background(), client)
8100	if err != nil {
8101		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
8102		return
8103	}
8104	if !done {
8105		ercatlr.Response.Response = future.Response()
8106		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
8107		return
8108	}
8109	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8110	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
8111		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
8112		if err != nil {
8113			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
8114		}
8115	}
8116	return
8117}
8118
8119// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
8120// results of a long-running operation.
8121type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
8122	azure.FutureAPI
8123	// Result returns the result of the asynchronous operation.
8124	// If the operation has not completed it will return an error.
8125	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8126}
8127
8128// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8129func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
8130	var azFuture azure.Future
8131	if err := json.Unmarshal(body, &azFuture); err != nil {
8132		return err
8133	}
8134	future.FutureAPI = &azFuture
8135	future.Result = future.result
8136	return nil
8137}
8138
8139// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
8140func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
8141	var done bool
8142	done, err = future.DoneWithContext(context.Background(), client)
8143	if err != nil {
8144		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
8145		return
8146	}
8147	if !done {
8148		ercrtlr.Response.Response = future.Response()
8149		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
8150		return
8151	}
8152	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8153	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
8154		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
8155		if err != nil {
8156			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
8157		}
8158	}
8159	return
8160}
8161
8162// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
8163// the results of a long-running operation.
8164type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
8165	azure.FutureAPI
8166	// Result returns the result of the asynchronous operation.
8167	// If the operation has not completed it will return an error.
8168	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
8169}
8170
8171// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8172func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
8173	var azFuture azure.Future
8174	if err := json.Unmarshal(body, &azFuture); err != nil {
8175		return err
8176	}
8177	future.FutureAPI = &azFuture
8178	future.Result = future.result
8179	return nil
8180}
8181
8182// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
8183func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
8184	var done bool
8185	done, err = future.DoneWithContext(context.Background(), client)
8186	if err != nil {
8187		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
8188		return
8189	}
8190	if !done {
8191		erccrtslr.Response.Response = future.Response()
8192		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
8193		return
8194	}
8195	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8196	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
8197		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
8198		if err != nil {
8199			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
8200		}
8201	}
8202	return
8203}
8204
8205// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
8206// the Express Route Cross Connections.
8207type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
8208	autorest.Response `json:"-"`
8209	// Value - A list of the routes table.
8210	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
8211	// NextLink - READ-ONLY; The URL to get the next set of results.
8212	NextLink *string `json:"nextLink,omitempty"`
8213}
8214
8215// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
8216func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
8217	objectMap := make(map[string]interface{})
8218	if erccrtslr.Value != nil {
8219		objectMap["value"] = erccrtslr.Value
8220	}
8221	return json.Marshal(objectMap)
8222}
8223
8224// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
8225// a long-running operation.
8226type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
8227	azure.FutureAPI
8228	// Result returns the result of the asynchronous operation.
8229	// If the operation has not completed it will return an error.
8230	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
8231}
8232
8233// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8234func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8235	var azFuture azure.Future
8236	if err := json.Unmarshal(body, &azFuture); err != nil {
8237		return err
8238	}
8239	future.FutureAPI = &azFuture
8240	future.Result = future.result
8241	return nil
8242}
8243
8244// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
8245func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
8246	var done bool
8247	done, err = future.DoneWithContext(context.Background(), client)
8248	if err != nil {
8249		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8250		return
8251	}
8252	if !done {
8253		ercc.Response.Response = future.Response()
8254		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
8255		return
8256	}
8257	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8258	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8259		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
8260		if err != nil {
8261			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
8262		}
8263	}
8264	return
8265}
8266
8267// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
8268type ExpressRouteServiceProvider struct {
8269	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
8270	// ID - Resource ID.
8271	ID *string `json:"id,omitempty"`
8272	// Name - READ-ONLY; Resource name.
8273	Name *string `json:"name,omitempty"`
8274	// Type - READ-ONLY; Resource type.
8275	Type *string `json:"type,omitempty"`
8276	// Location - Resource location.
8277	Location *string `json:"location,omitempty"`
8278	// Tags - Resource tags.
8279	Tags map[string]*string `json:"tags"`
8280}
8281
8282// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
8283func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
8284	objectMap := make(map[string]interface{})
8285	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
8286		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
8287	}
8288	if ersp.ID != nil {
8289		objectMap["id"] = ersp.ID
8290	}
8291	if ersp.Location != nil {
8292		objectMap["location"] = ersp.Location
8293	}
8294	if ersp.Tags != nil {
8295		objectMap["tags"] = ersp.Tags
8296	}
8297	return json.Marshal(objectMap)
8298}
8299
8300// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
8301func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
8302	var m map[string]*json.RawMessage
8303	err := json.Unmarshal(body, &m)
8304	if err != nil {
8305		return err
8306	}
8307	for k, v := range m {
8308		switch k {
8309		case "properties":
8310			if v != nil {
8311				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
8312				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
8313				if err != nil {
8314					return err
8315				}
8316				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
8317			}
8318		case "id":
8319			if v != nil {
8320				var ID string
8321				err = json.Unmarshal(*v, &ID)
8322				if err != nil {
8323					return err
8324				}
8325				ersp.ID = &ID
8326			}
8327		case "name":
8328			if v != nil {
8329				var name string
8330				err = json.Unmarshal(*v, &name)
8331				if err != nil {
8332					return err
8333				}
8334				ersp.Name = &name
8335			}
8336		case "type":
8337			if v != nil {
8338				var typeVar string
8339				err = json.Unmarshal(*v, &typeVar)
8340				if err != nil {
8341					return err
8342				}
8343				ersp.Type = &typeVar
8344			}
8345		case "location":
8346			if v != nil {
8347				var location string
8348				err = json.Unmarshal(*v, &location)
8349				if err != nil {
8350					return err
8351				}
8352				ersp.Location = &location
8353			}
8354		case "tags":
8355			if v != nil {
8356				var tags map[string]*string
8357				err = json.Unmarshal(*v, &tags)
8358				if err != nil {
8359					return err
8360				}
8361				ersp.Tags = tags
8362			}
8363		}
8364	}
8365
8366	return nil
8367}
8368
8369// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
8370// resources.
8371type ExpressRouteServiceProviderBandwidthsOffered struct {
8372	// OfferName - The OfferName.
8373	OfferName *string `json:"offerName,omitempty"`
8374	// ValueInMbps - The ValueInMbps.
8375	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
8376}
8377
8378// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
8379type ExpressRouteServiceProviderListResult struct {
8380	autorest.Response `json:"-"`
8381	// Value - A list of ExpressRouteResourceProvider resources.
8382	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
8383	// NextLink - The URL to get the next set of results.
8384	NextLink *string `json:"nextLink,omitempty"`
8385}
8386
8387// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
8388// ExpressRouteServiceProvider values.
8389type ExpressRouteServiceProviderListResultIterator struct {
8390	i    int
8391	page ExpressRouteServiceProviderListResultPage
8392}
8393
8394// NextWithContext advances to the next value.  If there was an error making
8395// the request the iterator does not advance and the error is returned.
8396func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
8397	if tracing.IsEnabled() {
8398		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
8399		defer func() {
8400			sc := -1
8401			if iter.Response().Response.Response != nil {
8402				sc = iter.Response().Response.Response.StatusCode
8403			}
8404			tracing.EndSpan(ctx, sc, err)
8405		}()
8406	}
8407	iter.i++
8408	if iter.i < len(iter.page.Values()) {
8409		return nil
8410	}
8411	err = iter.page.NextWithContext(ctx)
8412	if err != nil {
8413		iter.i--
8414		return err
8415	}
8416	iter.i = 0
8417	return nil
8418}
8419
8420// Next advances to the next value.  If there was an error making
8421// the request the iterator does not advance and the error is returned.
8422// Deprecated: Use NextWithContext() instead.
8423func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
8424	return iter.NextWithContext(context.Background())
8425}
8426
8427// NotDone returns true if the enumeration should be started or is not yet complete.
8428func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
8429	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8430}
8431
8432// Response returns the raw server response from the last page request.
8433func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
8434	return iter.page.Response()
8435}
8436
8437// Value returns the current value or a zero-initialized value if the
8438// iterator has advanced beyond the end of the collection.
8439func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
8440	if !iter.page.NotDone() {
8441		return ExpressRouteServiceProvider{}
8442	}
8443	return iter.page.Values()[iter.i]
8444}
8445
8446// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
8447func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
8448	return ExpressRouteServiceProviderListResultIterator{page: page}
8449}
8450
8451// IsEmpty returns true if the ListResult contains no values.
8452func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
8453	return ersplr.Value == nil || len(*ersplr.Value) == 0
8454}
8455
8456// hasNextLink returns true if the NextLink is not empty.
8457func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
8458	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
8459}
8460
8461// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
8462// It returns nil if no more results exist.
8463func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
8464	if !ersplr.hasNextLink() {
8465		return nil, nil
8466	}
8467	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8468		autorest.AsJSON(),
8469		autorest.AsGet(),
8470		autorest.WithBaseURL(to.String(ersplr.NextLink)))
8471}
8472
8473// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
8474type ExpressRouteServiceProviderListResultPage struct {
8475	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
8476	ersplr ExpressRouteServiceProviderListResult
8477}
8478
8479// NextWithContext advances to the next page of values.  If there was an error making
8480// the request the page does not advance and the error is returned.
8481func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
8482	if tracing.IsEnabled() {
8483		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
8484		defer func() {
8485			sc := -1
8486			if page.Response().Response.Response != nil {
8487				sc = page.Response().Response.Response.StatusCode
8488			}
8489			tracing.EndSpan(ctx, sc, err)
8490		}()
8491	}
8492	for {
8493		next, err := page.fn(ctx, page.ersplr)
8494		if err != nil {
8495			return err
8496		}
8497		page.ersplr = next
8498		if !next.hasNextLink() || !next.IsEmpty() {
8499			break
8500		}
8501	}
8502	return nil
8503}
8504
8505// Next advances to the next page of values.  If there was an error making
8506// the request the page does not advance and the error is returned.
8507// Deprecated: Use NextWithContext() instead.
8508func (page *ExpressRouteServiceProviderListResultPage) Next() error {
8509	return page.NextWithContext(context.Background())
8510}
8511
8512// NotDone returns true if the page enumeration should be started or is not yet complete.
8513func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
8514	return !page.ersplr.IsEmpty()
8515}
8516
8517// Response returns the raw server response from the last page request.
8518func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
8519	return page.ersplr
8520}
8521
8522// Values returns the slice of values for the current page or nil if there are no values.
8523func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
8524	if page.ersplr.IsEmpty() {
8525		return nil
8526	}
8527	return *page.ersplr.Value
8528}
8529
8530// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
8531func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
8532	return ExpressRouteServiceProviderListResultPage{
8533		fn:     getNextPage,
8534		ersplr: cur,
8535	}
8536}
8537
8538// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
8539type ExpressRouteServiceProviderPropertiesFormat struct {
8540	// PeeringLocations - Get a list of peering locations.
8541	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
8542	// BandwidthsOffered - Gets bandwidths offered.
8543	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
8544	// ProvisioningState - Gets the provisioning state of the resource.
8545	ProvisioningState *string `json:"provisioningState,omitempty"`
8546}
8547
8548// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
8549type FlowLogInformation struct {
8550	autorest.Response `json:"-"`
8551	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
8552	TargetResourceID           *string `json:"targetResourceId,omitempty"`
8553	*FlowLogProperties         `json:"properties,omitempty"`
8554	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
8555}
8556
8557// MarshalJSON is the custom marshaler for FlowLogInformation.
8558func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
8559	objectMap := make(map[string]interface{})
8560	if fli.TargetResourceID != nil {
8561		objectMap["targetResourceId"] = fli.TargetResourceID
8562	}
8563	if fli.FlowLogProperties != nil {
8564		objectMap["properties"] = fli.FlowLogProperties
8565	}
8566	if fli.FlowAnalyticsConfiguration != nil {
8567		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
8568	}
8569	return json.Marshal(objectMap)
8570}
8571
8572// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
8573func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
8574	var m map[string]*json.RawMessage
8575	err := json.Unmarshal(body, &m)
8576	if err != nil {
8577		return err
8578	}
8579	for k, v := range m {
8580		switch k {
8581		case "targetResourceId":
8582			if v != nil {
8583				var targetResourceID string
8584				err = json.Unmarshal(*v, &targetResourceID)
8585				if err != nil {
8586					return err
8587				}
8588				fli.TargetResourceID = &targetResourceID
8589			}
8590		case "properties":
8591			if v != nil {
8592				var flowLogProperties FlowLogProperties
8593				err = json.Unmarshal(*v, &flowLogProperties)
8594				if err != nil {
8595					return err
8596				}
8597				fli.FlowLogProperties = &flowLogProperties
8598			}
8599		case "flowAnalyticsConfiguration":
8600			if v != nil {
8601				var flowAnalyticsConfiguration TrafficAnalyticsProperties
8602				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
8603				if err != nil {
8604					return err
8605				}
8606				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
8607			}
8608		}
8609	}
8610
8611	return nil
8612}
8613
8614// FlowLogProperties parameters that define the configuration of flow log.
8615type FlowLogProperties struct {
8616	// StorageID - ID of the storage account which is used to store the flow log.
8617	StorageID *string `json:"storageId,omitempty"`
8618	// Enabled - Flag to enable/disable flow logging.
8619	Enabled         *bool                      `json:"enabled,omitempty"`
8620	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
8621}
8622
8623// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
8624// (optional) status.
8625type FlowLogStatusParameters struct {
8626	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
8627	TargetResourceID *string `json:"targetResourceId,omitempty"`
8628}
8629
8630// FrontendIPConfiguration frontend IP address of the load balancer.
8631type FrontendIPConfiguration struct {
8632	autorest.Response `json:"-"`
8633	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
8634	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8635	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8636	Name *string `json:"name,omitempty"`
8637	// Etag - A unique read-only string that changes whenever the resource is updated.
8638	Etag *string `json:"etag,omitempty"`
8639	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
8640	Zones *[]string `json:"zones,omitempty"`
8641	// ID - Resource ID.
8642	ID *string `json:"id,omitempty"`
8643}
8644
8645// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
8646func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
8647	objectMap := make(map[string]interface{})
8648	if fic.FrontendIPConfigurationPropertiesFormat != nil {
8649		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
8650	}
8651	if fic.Name != nil {
8652		objectMap["name"] = fic.Name
8653	}
8654	if fic.Etag != nil {
8655		objectMap["etag"] = fic.Etag
8656	}
8657	if fic.Zones != nil {
8658		objectMap["zones"] = fic.Zones
8659	}
8660	if fic.ID != nil {
8661		objectMap["id"] = fic.ID
8662	}
8663	return json.Marshal(objectMap)
8664}
8665
8666// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
8667func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
8668	var m map[string]*json.RawMessage
8669	err := json.Unmarshal(body, &m)
8670	if err != nil {
8671		return err
8672	}
8673	for k, v := range m {
8674		switch k {
8675		case "properties":
8676			if v != nil {
8677				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
8678				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
8679				if err != nil {
8680					return err
8681				}
8682				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
8683			}
8684		case "name":
8685			if v != nil {
8686				var name string
8687				err = json.Unmarshal(*v, &name)
8688				if err != nil {
8689					return err
8690				}
8691				fic.Name = &name
8692			}
8693		case "etag":
8694			if v != nil {
8695				var etag string
8696				err = json.Unmarshal(*v, &etag)
8697				if err != nil {
8698					return err
8699				}
8700				fic.Etag = &etag
8701			}
8702		case "zones":
8703			if v != nil {
8704				var zones []string
8705				err = json.Unmarshal(*v, &zones)
8706				if err != nil {
8707					return err
8708				}
8709				fic.Zones = &zones
8710			}
8711		case "id":
8712			if v != nil {
8713				var ID string
8714				err = json.Unmarshal(*v, &ID)
8715				if err != nil {
8716					return err
8717				}
8718				fic.ID = &ID
8719			}
8720		}
8721	}
8722
8723	return nil
8724}
8725
8726// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
8727type FrontendIPConfigurationPropertiesFormat struct {
8728	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
8729	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
8730	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
8731	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
8732	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
8733	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
8734	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
8735	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
8736	// PrivateIPAddress - The private IP address of the IP configuration.
8737	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
8738	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
8739	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8740	// Subnet - The reference of the subnet resource.
8741	Subnet *Subnet `json:"subnet,omitempty"`
8742	// PublicIPAddress - The reference of the Public IP resource.
8743	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
8744	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8745	ProvisioningState *string `json:"provisioningState,omitempty"`
8746}
8747
8748// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
8749func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
8750	objectMap := make(map[string]interface{})
8751	if ficpf.PrivateIPAddress != nil {
8752		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
8753	}
8754	if ficpf.PrivateIPAllocationMethod != "" {
8755		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
8756	}
8757	if ficpf.Subnet != nil {
8758		objectMap["subnet"] = ficpf.Subnet
8759	}
8760	if ficpf.PublicIPAddress != nil {
8761		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
8762	}
8763	if ficpf.ProvisioningState != nil {
8764		objectMap["provisioningState"] = ficpf.ProvisioningState
8765	}
8766	return json.Marshal(objectMap)
8767}
8768
8769// GatewayRoute gateway routing details
8770type GatewayRoute struct {
8771	// LocalAddress - READ-ONLY; The gateway's local address
8772	LocalAddress *string `json:"localAddress,omitempty"`
8773	// NetworkProperty - READ-ONLY; The route's network prefix
8774	NetworkProperty *string `json:"network,omitempty"`
8775	// NextHop - READ-ONLY; The route's next hop
8776	NextHop *string `json:"nextHop,omitempty"`
8777	// SourcePeer - READ-ONLY; The peer this route was learned from
8778	SourcePeer *string `json:"sourcePeer,omitempty"`
8779	// Origin - READ-ONLY; The source this route was learned from
8780	Origin *string `json:"origin,omitempty"`
8781	// AsPath - READ-ONLY; The route's AS path sequence
8782	AsPath *string `json:"asPath,omitempty"`
8783	// Weight - READ-ONLY; The route's weight
8784	Weight *int32 `json:"weight,omitempty"`
8785}
8786
8787// MarshalJSON is the custom marshaler for GatewayRoute.
8788func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
8789	objectMap := make(map[string]interface{})
8790	return json.Marshal(objectMap)
8791}
8792
8793// GatewayRouteListResult list of virtual network gateway routes
8794type GatewayRouteListResult struct {
8795	autorest.Response `json:"-"`
8796	// Value - List of gateway routes
8797	Value *[]GatewayRoute `json:"value,omitempty"`
8798}
8799
8800// GetVpnSitesConfigurationRequest list of Vpn-Sites
8801type GetVpnSitesConfigurationRequest struct {
8802	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
8803	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
8804	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
8805	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
8806}
8807
8808// HTTPConfiguration HTTP configuration of the connectivity check.
8809type HTTPConfiguration struct {
8810	// Method - HTTP method. Possible values include: 'Get'
8811	Method HTTPMethod `json:"method,omitempty"`
8812	// Headers - List of HTTP headers.
8813	Headers *[]HTTPHeader `json:"headers,omitempty"`
8814	// ValidStatusCodes - Valid status codes.
8815	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
8816}
8817
8818// HTTPHeader describes the HTTP header.
8819type HTTPHeader struct {
8820	// Name - The name in HTTP header.
8821	Name *string `json:"name,omitempty"`
8822	// Value - The value in HTTP header.
8823	Value *string `json:"value,omitempty"`
8824}
8825
8826// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
8827type HubVirtualNetworkConnection struct {
8828	autorest.Response                      `json:"-"`
8829	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
8830	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8831	Etag *string `json:"etag,omitempty"`
8832	// ID - Resource ID.
8833	ID *string `json:"id,omitempty"`
8834	// Name - READ-ONLY; Resource name.
8835	Name *string `json:"name,omitempty"`
8836	// Type - READ-ONLY; Resource type.
8837	Type *string `json:"type,omitempty"`
8838	// Location - Resource location.
8839	Location *string `json:"location,omitempty"`
8840	// Tags - Resource tags.
8841	Tags map[string]*string `json:"tags"`
8842}
8843
8844// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
8845func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
8846	objectMap := make(map[string]interface{})
8847	if hvnc.HubVirtualNetworkConnectionProperties != nil {
8848		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
8849	}
8850	if hvnc.ID != nil {
8851		objectMap["id"] = hvnc.ID
8852	}
8853	if hvnc.Location != nil {
8854		objectMap["location"] = hvnc.Location
8855	}
8856	if hvnc.Tags != nil {
8857		objectMap["tags"] = hvnc.Tags
8858	}
8859	return json.Marshal(objectMap)
8860}
8861
8862// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
8863func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
8864	var m map[string]*json.RawMessage
8865	err := json.Unmarshal(body, &m)
8866	if err != nil {
8867		return err
8868	}
8869	for k, v := range m {
8870		switch k {
8871		case "properties":
8872			if v != nil {
8873				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
8874				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
8875				if err != nil {
8876					return err
8877				}
8878				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
8879			}
8880		case "etag":
8881			if v != nil {
8882				var etag string
8883				err = json.Unmarshal(*v, &etag)
8884				if err != nil {
8885					return err
8886				}
8887				hvnc.Etag = &etag
8888			}
8889		case "id":
8890			if v != nil {
8891				var ID string
8892				err = json.Unmarshal(*v, &ID)
8893				if err != nil {
8894					return err
8895				}
8896				hvnc.ID = &ID
8897			}
8898		case "name":
8899			if v != nil {
8900				var name string
8901				err = json.Unmarshal(*v, &name)
8902				if err != nil {
8903					return err
8904				}
8905				hvnc.Name = &name
8906			}
8907		case "type":
8908			if v != nil {
8909				var typeVar string
8910				err = json.Unmarshal(*v, &typeVar)
8911				if err != nil {
8912					return err
8913				}
8914				hvnc.Type = &typeVar
8915			}
8916		case "location":
8917			if v != nil {
8918				var location string
8919				err = json.Unmarshal(*v, &location)
8920				if err != nil {
8921					return err
8922				}
8923				hvnc.Location = &location
8924			}
8925		case "tags":
8926			if v != nil {
8927				var tags map[string]*string
8928				err = json.Unmarshal(*v, &tags)
8929				if err != nil {
8930					return err
8931				}
8932				hvnc.Tags = tags
8933			}
8934		}
8935	}
8936
8937	return nil
8938}
8939
8940// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
8941type HubVirtualNetworkConnectionProperties struct {
8942	// RemoteVirtualNetwork - Reference to the remote virtual network.
8943	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
8944	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
8945	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
8946	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
8947	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
8948	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8949	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8950}
8951
8952// InboundNatPool inbound NAT pool of the load balancer.
8953type InboundNatPool struct {
8954	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
8955	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
8956	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8957	Name *string `json:"name,omitempty"`
8958	// Etag - A unique read-only string that changes whenever the resource is updated.
8959	Etag *string `json:"etag,omitempty"`
8960	// ID - Resource ID.
8961	ID *string `json:"id,omitempty"`
8962}
8963
8964// MarshalJSON is the custom marshaler for InboundNatPool.
8965func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
8966	objectMap := make(map[string]interface{})
8967	if inp.InboundNatPoolPropertiesFormat != nil {
8968		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
8969	}
8970	if inp.Name != nil {
8971		objectMap["name"] = inp.Name
8972	}
8973	if inp.Etag != nil {
8974		objectMap["etag"] = inp.Etag
8975	}
8976	if inp.ID != nil {
8977		objectMap["id"] = inp.ID
8978	}
8979	return json.Marshal(objectMap)
8980}
8981
8982// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
8983func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
8984	var m map[string]*json.RawMessage
8985	err := json.Unmarshal(body, &m)
8986	if err != nil {
8987		return err
8988	}
8989	for k, v := range m {
8990		switch k {
8991		case "properties":
8992			if v != nil {
8993				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
8994				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
8995				if err != nil {
8996					return err
8997				}
8998				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
8999			}
9000		case "name":
9001			if v != nil {
9002				var name string
9003				err = json.Unmarshal(*v, &name)
9004				if err != nil {
9005					return err
9006				}
9007				inp.Name = &name
9008			}
9009		case "etag":
9010			if v != nil {
9011				var etag string
9012				err = json.Unmarshal(*v, &etag)
9013				if err != nil {
9014					return err
9015				}
9016				inp.Etag = &etag
9017			}
9018		case "id":
9019			if v != nil {
9020				var ID string
9021				err = json.Unmarshal(*v, &ID)
9022				if err != nil {
9023					return err
9024				}
9025				inp.ID = &ID
9026			}
9027		}
9028	}
9029
9030	return nil
9031}
9032
9033// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
9034type InboundNatPoolPropertiesFormat struct {
9035	// FrontendIPConfiguration - A reference to frontend IP addresses.
9036	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9037	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9038	Protocol TransportProtocol `json:"protocol,omitempty"`
9039	// 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.
9040	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
9041	// 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.
9042	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
9043	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
9044	BackendPort *int32 `json:"backendPort,omitempty"`
9045	// 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.
9046	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9047	// 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.
9048	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9049	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9050	ProvisioningState *string `json:"provisioningState,omitempty"`
9051}
9052
9053// InboundNatRule inbound NAT rule of the load balancer.
9054type InboundNatRule struct {
9055	autorest.Response `json:"-"`
9056	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
9057	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
9058	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9059	Name *string `json:"name,omitempty"`
9060	// Etag - A unique read-only string that changes whenever the resource is updated.
9061	Etag *string `json:"etag,omitempty"`
9062	// ID - Resource ID.
9063	ID *string `json:"id,omitempty"`
9064}
9065
9066// MarshalJSON is the custom marshaler for InboundNatRule.
9067func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
9068	objectMap := make(map[string]interface{})
9069	if inr.InboundNatRulePropertiesFormat != nil {
9070		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
9071	}
9072	if inr.Name != nil {
9073		objectMap["name"] = inr.Name
9074	}
9075	if inr.Etag != nil {
9076		objectMap["etag"] = inr.Etag
9077	}
9078	if inr.ID != nil {
9079		objectMap["id"] = inr.ID
9080	}
9081	return json.Marshal(objectMap)
9082}
9083
9084// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
9085func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
9086	var m map[string]*json.RawMessage
9087	err := json.Unmarshal(body, &m)
9088	if err != nil {
9089		return err
9090	}
9091	for k, v := range m {
9092		switch k {
9093		case "properties":
9094			if v != nil {
9095				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
9096				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
9097				if err != nil {
9098					return err
9099				}
9100				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
9101			}
9102		case "name":
9103			if v != nil {
9104				var name string
9105				err = json.Unmarshal(*v, &name)
9106				if err != nil {
9107					return err
9108				}
9109				inr.Name = &name
9110			}
9111		case "etag":
9112			if v != nil {
9113				var etag string
9114				err = json.Unmarshal(*v, &etag)
9115				if err != nil {
9116					return err
9117				}
9118				inr.Etag = &etag
9119			}
9120		case "id":
9121			if v != nil {
9122				var ID string
9123				err = json.Unmarshal(*v, &ID)
9124				if err != nil {
9125					return err
9126				}
9127				inr.ID = &ID
9128			}
9129		}
9130	}
9131
9132	return nil
9133}
9134
9135// InboundNatRuleListResult response for ListInboundNatRule API service call.
9136type InboundNatRuleListResult struct {
9137	autorest.Response `json:"-"`
9138	// Value - A list of inbound nat rules in a load balancer.
9139	Value *[]InboundNatRule `json:"value,omitempty"`
9140	// NextLink - READ-ONLY; The URL to get the next set of results.
9141	NextLink *string `json:"nextLink,omitempty"`
9142}
9143
9144// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
9145func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
9146	objectMap := make(map[string]interface{})
9147	if inrlr.Value != nil {
9148		objectMap["value"] = inrlr.Value
9149	}
9150	return json.Marshal(objectMap)
9151}
9152
9153// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
9154type InboundNatRuleListResultIterator struct {
9155	i    int
9156	page InboundNatRuleListResultPage
9157}
9158
9159// NextWithContext advances to the next value.  If there was an error making
9160// the request the iterator does not advance and the error is returned.
9161func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
9162	if tracing.IsEnabled() {
9163		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
9164		defer func() {
9165			sc := -1
9166			if iter.Response().Response.Response != nil {
9167				sc = iter.Response().Response.Response.StatusCode
9168			}
9169			tracing.EndSpan(ctx, sc, err)
9170		}()
9171	}
9172	iter.i++
9173	if iter.i < len(iter.page.Values()) {
9174		return nil
9175	}
9176	err = iter.page.NextWithContext(ctx)
9177	if err != nil {
9178		iter.i--
9179		return err
9180	}
9181	iter.i = 0
9182	return nil
9183}
9184
9185// Next advances to the next value.  If there was an error making
9186// the request the iterator does not advance and the error is returned.
9187// Deprecated: Use NextWithContext() instead.
9188func (iter *InboundNatRuleListResultIterator) Next() error {
9189	return iter.NextWithContext(context.Background())
9190}
9191
9192// NotDone returns true if the enumeration should be started or is not yet complete.
9193func (iter InboundNatRuleListResultIterator) NotDone() bool {
9194	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9195}
9196
9197// Response returns the raw server response from the last page request.
9198func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
9199	return iter.page.Response()
9200}
9201
9202// Value returns the current value or a zero-initialized value if the
9203// iterator has advanced beyond the end of the collection.
9204func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
9205	if !iter.page.NotDone() {
9206		return InboundNatRule{}
9207	}
9208	return iter.page.Values()[iter.i]
9209}
9210
9211// Creates a new instance of the InboundNatRuleListResultIterator type.
9212func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
9213	return InboundNatRuleListResultIterator{page: page}
9214}
9215
9216// IsEmpty returns true if the ListResult contains no values.
9217func (inrlr InboundNatRuleListResult) IsEmpty() bool {
9218	return inrlr.Value == nil || len(*inrlr.Value) == 0
9219}
9220
9221// hasNextLink returns true if the NextLink is not empty.
9222func (inrlr InboundNatRuleListResult) hasNextLink() bool {
9223	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
9224}
9225
9226// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
9227// It returns nil if no more results exist.
9228func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
9229	if !inrlr.hasNextLink() {
9230		return nil, nil
9231	}
9232	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9233		autorest.AsJSON(),
9234		autorest.AsGet(),
9235		autorest.WithBaseURL(to.String(inrlr.NextLink)))
9236}
9237
9238// InboundNatRuleListResultPage contains a page of InboundNatRule values.
9239type InboundNatRuleListResultPage struct {
9240	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
9241	inrlr InboundNatRuleListResult
9242}
9243
9244// NextWithContext advances to the next page of values.  If there was an error making
9245// the request the page does not advance and the error is returned.
9246func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
9247	if tracing.IsEnabled() {
9248		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
9249		defer func() {
9250			sc := -1
9251			if page.Response().Response.Response != nil {
9252				sc = page.Response().Response.Response.StatusCode
9253			}
9254			tracing.EndSpan(ctx, sc, err)
9255		}()
9256	}
9257	for {
9258		next, err := page.fn(ctx, page.inrlr)
9259		if err != nil {
9260			return err
9261		}
9262		page.inrlr = next
9263		if !next.hasNextLink() || !next.IsEmpty() {
9264			break
9265		}
9266	}
9267	return nil
9268}
9269
9270// Next advances to the next page of values.  If there was an error making
9271// the request the page does not advance and the error is returned.
9272// Deprecated: Use NextWithContext() instead.
9273func (page *InboundNatRuleListResultPage) Next() error {
9274	return page.NextWithContext(context.Background())
9275}
9276
9277// NotDone returns true if the page enumeration should be started or is not yet complete.
9278func (page InboundNatRuleListResultPage) NotDone() bool {
9279	return !page.inrlr.IsEmpty()
9280}
9281
9282// Response returns the raw server response from the last page request.
9283func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
9284	return page.inrlr
9285}
9286
9287// Values returns the slice of values for the current page or nil if there are no values.
9288func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
9289	if page.inrlr.IsEmpty() {
9290		return nil
9291	}
9292	return *page.inrlr.Value
9293}
9294
9295// Creates a new instance of the InboundNatRuleListResultPage type.
9296func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
9297	return InboundNatRuleListResultPage{
9298		fn:    getNextPage,
9299		inrlr: cur,
9300	}
9301}
9302
9303// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
9304type InboundNatRulePropertiesFormat struct {
9305	// FrontendIPConfiguration - A reference to frontend IP addresses.
9306	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
9307	// BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP.
9308	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
9309	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
9310	Protocol TransportProtocol `json:"protocol,omitempty"`
9311	// 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.
9312	FrontendPort *int32 `json:"frontendPort,omitempty"`
9313	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
9314	BackendPort *int32 `json:"backendPort,omitempty"`
9315	// 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.
9316	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9317	// 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.
9318	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
9319	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9320	ProvisioningState *string `json:"provisioningState,omitempty"`
9321}
9322
9323// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
9324func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
9325	objectMap := make(map[string]interface{})
9326	if inrpf.FrontendIPConfiguration != nil {
9327		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
9328	}
9329	if inrpf.Protocol != "" {
9330		objectMap["protocol"] = inrpf.Protocol
9331	}
9332	if inrpf.FrontendPort != nil {
9333		objectMap["frontendPort"] = inrpf.FrontendPort
9334	}
9335	if inrpf.BackendPort != nil {
9336		objectMap["backendPort"] = inrpf.BackendPort
9337	}
9338	if inrpf.IdleTimeoutInMinutes != nil {
9339		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
9340	}
9341	if inrpf.EnableFloatingIP != nil {
9342		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
9343	}
9344	if inrpf.ProvisioningState != nil {
9345		objectMap["provisioningState"] = inrpf.ProvisioningState
9346	}
9347	return json.Marshal(objectMap)
9348}
9349
9350// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9351// long-running operation.
9352type InboundNatRulesCreateOrUpdateFuture struct {
9353	azure.FutureAPI
9354	// Result returns the result of the asynchronous operation.
9355	// If the operation has not completed it will return an error.
9356	Result func(InboundNatRulesClient) (InboundNatRule, error)
9357}
9358
9359// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9360func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9361	var azFuture azure.Future
9362	if err := json.Unmarshal(body, &azFuture); err != nil {
9363		return err
9364	}
9365	future.FutureAPI = &azFuture
9366	future.Result = future.result
9367	return nil
9368}
9369
9370// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
9371func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
9372	var done bool
9373	done, err = future.DoneWithContext(context.Background(), client)
9374	if err != nil {
9375		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9376		return
9377	}
9378	if !done {
9379		inr.Response.Response = future.Response()
9380		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
9381		return
9382	}
9383	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9384	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
9385		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
9386		if err != nil {
9387			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
9388		}
9389	}
9390	return
9391}
9392
9393// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9394// operation.
9395type InboundNatRulesDeleteFuture struct {
9396	azure.FutureAPI
9397	// Result returns the result of the asynchronous operation.
9398	// If the operation has not completed it will return an error.
9399	Result func(InboundNatRulesClient) (autorest.Response, error)
9400}
9401
9402// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9403func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
9404	var azFuture azure.Future
9405	if err := json.Unmarshal(body, &azFuture); err != nil {
9406		return err
9407	}
9408	future.FutureAPI = &azFuture
9409	future.Result = future.result
9410	return nil
9411}
9412
9413// result is the default implementation for InboundNatRulesDeleteFuture.Result.
9414func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
9415	var done bool
9416	done, err = future.DoneWithContext(context.Background(), client)
9417	if err != nil {
9418		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
9419		return
9420	}
9421	if !done {
9422		ar.Response = future.Response()
9423		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
9424		return
9425	}
9426	ar.Response = future.Response()
9427	return
9428}
9429
9430// Interface a network interface in a resource group.
9431type Interface struct {
9432	autorest.Response `json:"-"`
9433	// InterfacePropertiesFormat - Properties of the network interface.
9434	*InterfacePropertiesFormat `json:"properties,omitempty"`
9435	// Etag - A unique read-only string that changes whenever the resource is updated.
9436	Etag *string `json:"etag,omitempty"`
9437	// ID - Resource ID.
9438	ID *string `json:"id,omitempty"`
9439	// Name - READ-ONLY; Resource name.
9440	Name *string `json:"name,omitempty"`
9441	// Type - READ-ONLY; Resource type.
9442	Type *string `json:"type,omitempty"`
9443	// Location - Resource location.
9444	Location *string `json:"location,omitempty"`
9445	// Tags - Resource tags.
9446	Tags map[string]*string `json:"tags"`
9447}
9448
9449// MarshalJSON is the custom marshaler for Interface.
9450func (i Interface) MarshalJSON() ([]byte, error) {
9451	objectMap := make(map[string]interface{})
9452	if i.InterfacePropertiesFormat != nil {
9453		objectMap["properties"] = i.InterfacePropertiesFormat
9454	}
9455	if i.Etag != nil {
9456		objectMap["etag"] = i.Etag
9457	}
9458	if i.ID != nil {
9459		objectMap["id"] = i.ID
9460	}
9461	if i.Location != nil {
9462		objectMap["location"] = i.Location
9463	}
9464	if i.Tags != nil {
9465		objectMap["tags"] = i.Tags
9466	}
9467	return json.Marshal(objectMap)
9468}
9469
9470// UnmarshalJSON is the custom unmarshaler for Interface struct.
9471func (i *Interface) UnmarshalJSON(body []byte) error {
9472	var m map[string]*json.RawMessage
9473	err := json.Unmarshal(body, &m)
9474	if err != nil {
9475		return err
9476	}
9477	for k, v := range m {
9478		switch k {
9479		case "properties":
9480			if v != nil {
9481				var interfacePropertiesFormat InterfacePropertiesFormat
9482				err = json.Unmarshal(*v, &interfacePropertiesFormat)
9483				if err != nil {
9484					return err
9485				}
9486				i.InterfacePropertiesFormat = &interfacePropertiesFormat
9487			}
9488		case "etag":
9489			if v != nil {
9490				var etag string
9491				err = json.Unmarshal(*v, &etag)
9492				if err != nil {
9493					return err
9494				}
9495				i.Etag = &etag
9496			}
9497		case "id":
9498			if v != nil {
9499				var ID string
9500				err = json.Unmarshal(*v, &ID)
9501				if err != nil {
9502					return err
9503				}
9504				i.ID = &ID
9505			}
9506		case "name":
9507			if v != nil {
9508				var name string
9509				err = json.Unmarshal(*v, &name)
9510				if err != nil {
9511					return err
9512				}
9513				i.Name = &name
9514			}
9515		case "type":
9516			if v != nil {
9517				var typeVar string
9518				err = json.Unmarshal(*v, &typeVar)
9519				if err != nil {
9520					return err
9521				}
9522				i.Type = &typeVar
9523			}
9524		case "location":
9525			if v != nil {
9526				var location string
9527				err = json.Unmarshal(*v, &location)
9528				if err != nil {
9529					return err
9530				}
9531				i.Location = &location
9532			}
9533		case "tags":
9534			if v != nil {
9535				var tags map[string]*string
9536				err = json.Unmarshal(*v, &tags)
9537				if err != nil {
9538					return err
9539				}
9540				i.Tags = tags
9541			}
9542		}
9543	}
9544
9545	return nil
9546}
9547
9548// InterfaceAssociation network interface and its custom security rules.
9549type InterfaceAssociation struct {
9550	// ID - READ-ONLY; Network interface ID.
9551	ID *string `json:"id,omitempty"`
9552	// SecurityRules - Collection of custom security rules.
9553	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
9554}
9555
9556// MarshalJSON is the custom marshaler for InterfaceAssociation.
9557func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
9558	objectMap := make(map[string]interface{})
9559	if ia.SecurityRules != nil {
9560		objectMap["securityRules"] = ia.SecurityRules
9561	}
9562	return json.Marshal(objectMap)
9563}
9564
9565// InterfaceDNSSettings DNS settings of a network interface.
9566type InterfaceDNSSettings struct {
9567	// 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.
9568	DNSServers *[]string `json:"dnsServers,omitempty"`
9569	// 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.
9570	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
9571	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
9572	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
9573	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
9574	InternalFqdn *string `json:"internalFqdn,omitempty"`
9575	// InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix.
9576	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
9577}
9578
9579// InterfaceIPConfiguration iPConfiguration in a network interface.
9580type InterfaceIPConfiguration struct {
9581	autorest.Response `json:"-"`
9582	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
9583	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
9584	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9585	Name *string `json:"name,omitempty"`
9586	// Etag - A unique read-only string that changes whenever the resource is updated.
9587	Etag *string `json:"etag,omitempty"`
9588	// ID - Resource ID.
9589	ID *string `json:"id,omitempty"`
9590}
9591
9592// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
9593func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
9594	objectMap := make(map[string]interface{})
9595	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
9596		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
9597	}
9598	if iic.Name != nil {
9599		objectMap["name"] = iic.Name
9600	}
9601	if iic.Etag != nil {
9602		objectMap["etag"] = iic.Etag
9603	}
9604	if iic.ID != nil {
9605		objectMap["id"] = iic.ID
9606	}
9607	return json.Marshal(objectMap)
9608}
9609
9610// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
9611func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
9612	var m map[string]*json.RawMessage
9613	err := json.Unmarshal(body, &m)
9614	if err != nil {
9615		return err
9616	}
9617	for k, v := range m {
9618		switch k {
9619		case "properties":
9620			if v != nil {
9621				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
9622				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
9623				if err != nil {
9624					return err
9625				}
9626				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
9627			}
9628		case "name":
9629			if v != nil {
9630				var name string
9631				err = json.Unmarshal(*v, &name)
9632				if err != nil {
9633					return err
9634				}
9635				iic.Name = &name
9636			}
9637		case "etag":
9638			if v != nil {
9639				var etag string
9640				err = json.Unmarshal(*v, &etag)
9641				if err != nil {
9642					return err
9643				}
9644				iic.Etag = &etag
9645			}
9646		case "id":
9647			if v != nil {
9648				var ID string
9649				err = json.Unmarshal(*v, &ID)
9650				if err != nil {
9651					return err
9652				}
9653				iic.ID = &ID
9654			}
9655		}
9656	}
9657
9658	return nil
9659}
9660
9661// InterfaceIPConfigurationListResult response for list ip configurations API service call.
9662type InterfaceIPConfigurationListResult struct {
9663	autorest.Response `json:"-"`
9664	// Value - A list of ip configurations.
9665	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
9666	// NextLink - READ-ONLY; The URL to get the next set of results.
9667	NextLink *string `json:"nextLink,omitempty"`
9668}
9669
9670// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
9671func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
9672	objectMap := make(map[string]interface{})
9673	if iiclr.Value != nil {
9674		objectMap["value"] = iiclr.Value
9675	}
9676	return json.Marshal(objectMap)
9677}
9678
9679// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
9680// InterfaceIPConfiguration values.
9681type InterfaceIPConfigurationListResultIterator struct {
9682	i    int
9683	page InterfaceIPConfigurationListResultPage
9684}
9685
9686// NextWithContext advances to the next value.  If there was an error making
9687// the request the iterator does not advance and the error is returned.
9688func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9689	if tracing.IsEnabled() {
9690		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
9691		defer func() {
9692			sc := -1
9693			if iter.Response().Response.Response != nil {
9694				sc = iter.Response().Response.Response.StatusCode
9695			}
9696			tracing.EndSpan(ctx, sc, err)
9697		}()
9698	}
9699	iter.i++
9700	if iter.i < len(iter.page.Values()) {
9701		return nil
9702	}
9703	err = iter.page.NextWithContext(ctx)
9704	if err != nil {
9705		iter.i--
9706		return err
9707	}
9708	iter.i = 0
9709	return nil
9710}
9711
9712// Next advances to the next value.  If there was an error making
9713// the request the iterator does not advance and the error is returned.
9714// Deprecated: Use NextWithContext() instead.
9715func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
9716	return iter.NextWithContext(context.Background())
9717}
9718
9719// NotDone returns true if the enumeration should be started or is not yet complete.
9720func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
9721	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9722}
9723
9724// Response returns the raw server response from the last page request.
9725func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
9726	return iter.page.Response()
9727}
9728
9729// Value returns the current value or a zero-initialized value if the
9730// iterator has advanced beyond the end of the collection.
9731func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
9732	if !iter.page.NotDone() {
9733		return InterfaceIPConfiguration{}
9734	}
9735	return iter.page.Values()[iter.i]
9736}
9737
9738// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
9739func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
9740	return InterfaceIPConfigurationListResultIterator{page: page}
9741}
9742
9743// IsEmpty returns true if the ListResult contains no values.
9744func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
9745	return iiclr.Value == nil || len(*iiclr.Value) == 0
9746}
9747
9748// hasNextLink returns true if the NextLink is not empty.
9749func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
9750	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
9751}
9752
9753// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
9754// It returns nil if no more results exist.
9755func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
9756	if !iiclr.hasNextLink() {
9757		return nil, nil
9758	}
9759	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9760		autorest.AsJSON(),
9761		autorest.AsGet(),
9762		autorest.WithBaseURL(to.String(iiclr.NextLink)))
9763}
9764
9765// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
9766type InterfaceIPConfigurationListResultPage struct {
9767	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
9768	iiclr InterfaceIPConfigurationListResult
9769}
9770
9771// NextWithContext advances to the next page of values.  If there was an error making
9772// the request the page does not advance and the error is returned.
9773func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
9774	if tracing.IsEnabled() {
9775		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
9776		defer func() {
9777			sc := -1
9778			if page.Response().Response.Response != nil {
9779				sc = page.Response().Response.Response.StatusCode
9780			}
9781			tracing.EndSpan(ctx, sc, err)
9782		}()
9783	}
9784	for {
9785		next, err := page.fn(ctx, page.iiclr)
9786		if err != nil {
9787			return err
9788		}
9789		page.iiclr = next
9790		if !next.hasNextLink() || !next.IsEmpty() {
9791			break
9792		}
9793	}
9794	return nil
9795}
9796
9797// Next advances to the next page of values.  If there was an error making
9798// the request the page does not advance and the error is returned.
9799// Deprecated: Use NextWithContext() instead.
9800func (page *InterfaceIPConfigurationListResultPage) Next() error {
9801	return page.NextWithContext(context.Background())
9802}
9803
9804// NotDone returns true if the page enumeration should be started or is not yet complete.
9805func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
9806	return !page.iiclr.IsEmpty()
9807}
9808
9809// Response returns the raw server response from the last page request.
9810func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
9811	return page.iiclr
9812}
9813
9814// Values returns the slice of values for the current page or nil if there are no values.
9815func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
9816	if page.iiclr.IsEmpty() {
9817		return nil
9818	}
9819	return *page.iiclr.Value
9820}
9821
9822// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
9823func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
9824	return InterfaceIPConfigurationListResultPage{
9825		fn:    getNextPage,
9826		iiclr: cur,
9827	}
9828}
9829
9830// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
9831type InterfaceIPConfigurationPropertiesFormat struct {
9832	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
9833	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
9834	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
9835	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
9836	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
9837	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
9838	// PrivateIPAddress - Private IP address of the IP configuration.
9839	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9840	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9841	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
9842	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
9843	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
9844	// Subnet - Subnet bound to the IP configuration.
9845	Subnet *Subnet `json:"subnet,omitempty"`
9846	// Primary - Gets whether this is a primary customer address on the network interface.
9847	Primary *bool `json:"primary,omitempty"`
9848	// PublicIPAddress - Public IP address bound to the IP configuration.
9849	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
9850	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
9851	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
9852	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9853	ProvisioningState *string `json:"provisioningState,omitempty"`
9854}
9855
9856// InterfaceListResult response for the ListNetworkInterface API service call.
9857type InterfaceListResult struct {
9858	autorest.Response `json:"-"`
9859	// Value - A list of network interfaces in a resource group.
9860	Value *[]Interface `json:"value,omitempty"`
9861	// NextLink - READ-ONLY; The URL to get the next set of results.
9862	NextLink *string `json:"nextLink,omitempty"`
9863}
9864
9865// MarshalJSON is the custom marshaler for InterfaceListResult.
9866func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
9867	objectMap := make(map[string]interface{})
9868	if ilr.Value != nil {
9869		objectMap["value"] = ilr.Value
9870	}
9871	return json.Marshal(objectMap)
9872}
9873
9874// InterfaceListResultIterator provides access to a complete listing of Interface values.
9875type InterfaceListResultIterator struct {
9876	i    int
9877	page InterfaceListResultPage
9878}
9879
9880// NextWithContext advances to the next value.  If there was an error making
9881// the request the iterator does not advance and the error is returned.
9882func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
9883	if tracing.IsEnabled() {
9884		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
9885		defer func() {
9886			sc := -1
9887			if iter.Response().Response.Response != nil {
9888				sc = iter.Response().Response.Response.StatusCode
9889			}
9890			tracing.EndSpan(ctx, sc, err)
9891		}()
9892	}
9893	iter.i++
9894	if iter.i < len(iter.page.Values()) {
9895		return nil
9896	}
9897	err = iter.page.NextWithContext(ctx)
9898	if err != nil {
9899		iter.i--
9900		return err
9901	}
9902	iter.i = 0
9903	return nil
9904}
9905
9906// Next advances to the next value.  If there was an error making
9907// the request the iterator does not advance and the error is returned.
9908// Deprecated: Use NextWithContext() instead.
9909func (iter *InterfaceListResultIterator) Next() error {
9910	return iter.NextWithContext(context.Background())
9911}
9912
9913// NotDone returns true if the enumeration should be started or is not yet complete.
9914func (iter InterfaceListResultIterator) NotDone() bool {
9915	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9916}
9917
9918// Response returns the raw server response from the last page request.
9919func (iter InterfaceListResultIterator) Response() InterfaceListResult {
9920	return iter.page.Response()
9921}
9922
9923// Value returns the current value or a zero-initialized value if the
9924// iterator has advanced beyond the end of the collection.
9925func (iter InterfaceListResultIterator) Value() Interface {
9926	if !iter.page.NotDone() {
9927		return Interface{}
9928	}
9929	return iter.page.Values()[iter.i]
9930}
9931
9932// Creates a new instance of the InterfaceListResultIterator type.
9933func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
9934	return InterfaceListResultIterator{page: page}
9935}
9936
9937// IsEmpty returns true if the ListResult contains no values.
9938func (ilr InterfaceListResult) IsEmpty() bool {
9939	return ilr.Value == nil || len(*ilr.Value) == 0
9940}
9941
9942// hasNextLink returns true if the NextLink is not empty.
9943func (ilr InterfaceListResult) hasNextLink() bool {
9944	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
9945}
9946
9947// interfaceListResultPreparer prepares a request to retrieve the next set of results.
9948// It returns nil if no more results exist.
9949func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
9950	if !ilr.hasNextLink() {
9951		return nil, nil
9952	}
9953	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9954		autorest.AsJSON(),
9955		autorest.AsGet(),
9956		autorest.WithBaseURL(to.String(ilr.NextLink)))
9957}
9958
9959// InterfaceListResultPage contains a page of Interface values.
9960type InterfaceListResultPage struct {
9961	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
9962	ilr InterfaceListResult
9963}
9964
9965// NextWithContext advances to the next page of values.  If there was an error making
9966// the request the page does not advance and the error is returned.
9967func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
9968	if tracing.IsEnabled() {
9969		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
9970		defer func() {
9971			sc := -1
9972			if page.Response().Response.Response != nil {
9973				sc = page.Response().Response.Response.StatusCode
9974			}
9975			tracing.EndSpan(ctx, sc, err)
9976		}()
9977	}
9978	for {
9979		next, err := page.fn(ctx, page.ilr)
9980		if err != nil {
9981			return err
9982		}
9983		page.ilr = next
9984		if !next.hasNextLink() || !next.IsEmpty() {
9985			break
9986		}
9987	}
9988	return nil
9989}
9990
9991// Next advances to the next page of values.  If there was an error making
9992// the request the page does not advance and the error is returned.
9993// Deprecated: Use NextWithContext() instead.
9994func (page *InterfaceListResultPage) Next() error {
9995	return page.NextWithContext(context.Background())
9996}
9997
9998// NotDone returns true if the page enumeration should be started or is not yet complete.
9999func (page InterfaceListResultPage) NotDone() bool {
10000	return !page.ilr.IsEmpty()
10001}
10002
10003// Response returns the raw server response from the last page request.
10004func (page InterfaceListResultPage) Response() InterfaceListResult {
10005	return page.ilr
10006}
10007
10008// Values returns the slice of values for the current page or nil if there are no values.
10009func (page InterfaceListResultPage) Values() []Interface {
10010	if page.ilr.IsEmpty() {
10011		return nil
10012	}
10013	return *page.ilr.Value
10014}
10015
10016// Creates a new instance of the InterfaceListResultPage type.
10017func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
10018	return InterfaceListResultPage{
10019		fn:  getNextPage,
10020		ilr: cur,
10021	}
10022}
10023
10024// InterfaceLoadBalancerListResult response for list ip configurations API service call.
10025type InterfaceLoadBalancerListResult struct {
10026	autorest.Response `json:"-"`
10027	// Value - A list of load balancers.
10028	Value *[]LoadBalancer `json:"value,omitempty"`
10029	// NextLink - READ-ONLY; The URL to get the next set of results.
10030	NextLink *string `json:"nextLink,omitempty"`
10031}
10032
10033// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
10034func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
10035	objectMap := make(map[string]interface{})
10036	if ilblr.Value != nil {
10037		objectMap["value"] = ilblr.Value
10038	}
10039	return json.Marshal(objectMap)
10040}
10041
10042// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
10043type InterfaceLoadBalancerListResultIterator struct {
10044	i    int
10045	page InterfaceLoadBalancerListResultPage
10046}
10047
10048// NextWithContext advances to the next value.  If there was an error making
10049// the request the iterator does not advance and the error is returned.
10050func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
10051	if tracing.IsEnabled() {
10052		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
10053		defer func() {
10054			sc := -1
10055			if iter.Response().Response.Response != nil {
10056				sc = iter.Response().Response.Response.StatusCode
10057			}
10058			tracing.EndSpan(ctx, sc, err)
10059		}()
10060	}
10061	iter.i++
10062	if iter.i < len(iter.page.Values()) {
10063		return nil
10064	}
10065	err = iter.page.NextWithContext(ctx)
10066	if err != nil {
10067		iter.i--
10068		return err
10069	}
10070	iter.i = 0
10071	return nil
10072}
10073
10074// Next advances to the next value.  If there was an error making
10075// the request the iterator does not advance and the error is returned.
10076// Deprecated: Use NextWithContext() instead.
10077func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
10078	return iter.NextWithContext(context.Background())
10079}
10080
10081// NotDone returns true if the enumeration should be started or is not yet complete.
10082func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
10083	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10084}
10085
10086// Response returns the raw server response from the last page request.
10087func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
10088	return iter.page.Response()
10089}
10090
10091// Value returns the current value or a zero-initialized value if the
10092// iterator has advanced beyond the end of the collection.
10093func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
10094	if !iter.page.NotDone() {
10095		return LoadBalancer{}
10096	}
10097	return iter.page.Values()[iter.i]
10098}
10099
10100// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
10101func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
10102	return InterfaceLoadBalancerListResultIterator{page: page}
10103}
10104
10105// IsEmpty returns true if the ListResult contains no values.
10106func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
10107	return ilblr.Value == nil || len(*ilblr.Value) == 0
10108}
10109
10110// hasNextLink returns true if the NextLink is not empty.
10111func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
10112	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
10113}
10114
10115// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
10116// It returns nil if no more results exist.
10117func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
10118	if !ilblr.hasNextLink() {
10119		return nil, nil
10120	}
10121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10122		autorest.AsJSON(),
10123		autorest.AsGet(),
10124		autorest.WithBaseURL(to.String(ilblr.NextLink)))
10125}
10126
10127// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
10128type InterfaceLoadBalancerListResultPage struct {
10129	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
10130	ilblr InterfaceLoadBalancerListResult
10131}
10132
10133// NextWithContext advances to the next page of values.  If there was an error making
10134// the request the page does not advance and the error is returned.
10135func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
10136	if tracing.IsEnabled() {
10137		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
10138		defer func() {
10139			sc := -1
10140			if page.Response().Response.Response != nil {
10141				sc = page.Response().Response.Response.StatusCode
10142			}
10143			tracing.EndSpan(ctx, sc, err)
10144		}()
10145	}
10146	for {
10147		next, err := page.fn(ctx, page.ilblr)
10148		if err != nil {
10149			return err
10150		}
10151		page.ilblr = next
10152		if !next.hasNextLink() || !next.IsEmpty() {
10153			break
10154		}
10155	}
10156	return nil
10157}
10158
10159// Next advances to the next page of values.  If there was an error making
10160// the request the page does not advance and the error is returned.
10161// Deprecated: Use NextWithContext() instead.
10162func (page *InterfaceLoadBalancerListResultPage) Next() error {
10163	return page.NextWithContext(context.Background())
10164}
10165
10166// NotDone returns true if the page enumeration should be started or is not yet complete.
10167func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
10168	return !page.ilblr.IsEmpty()
10169}
10170
10171// Response returns the raw server response from the last page request.
10172func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
10173	return page.ilblr
10174}
10175
10176// Values returns the slice of values for the current page or nil if there are no values.
10177func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
10178	if page.ilblr.IsEmpty() {
10179		return nil
10180	}
10181	return *page.ilblr.Value
10182}
10183
10184// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
10185func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
10186	return InterfaceLoadBalancerListResultPage{
10187		fn:    getNextPage,
10188		ilblr: cur,
10189	}
10190}
10191
10192// InterfacePropertiesFormat networkInterface properties.
10193type InterfacePropertiesFormat struct {
10194	// VirtualMachine - The reference of a virtual machine.
10195	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
10196	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
10197	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
10198	// IPConfigurations - A list of IPConfigurations of the network interface.
10199	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
10200	// DNSSettings - The DNS settings in network interface.
10201	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
10202	// MacAddress - The MAC address of the network interface.
10203	MacAddress *string `json:"macAddress,omitempty"`
10204	// Primary - Gets whether this is a primary network interface on a virtual machine.
10205	Primary *bool `json:"primary,omitempty"`
10206	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
10207	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
10208	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
10209	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
10210	// ResourceGUID - The resource GUID property of the network interface resource.
10211	ResourceGUID *string `json:"resourceGuid,omitempty"`
10212	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10213	ProvisioningState *string `json:"provisioningState,omitempty"`
10214}
10215
10216// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10217// long-running operation.
10218type InterfacesCreateOrUpdateFuture struct {
10219	azure.FutureAPI
10220	// Result returns the result of the asynchronous operation.
10221	// If the operation has not completed it will return an error.
10222	Result func(InterfacesClient) (Interface, error)
10223}
10224
10225// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10226func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10227	var azFuture azure.Future
10228	if err := json.Unmarshal(body, &azFuture); err != nil {
10229		return err
10230	}
10231	future.FutureAPI = &azFuture
10232	future.Result = future.result
10233	return nil
10234}
10235
10236// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
10237func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
10238	var done bool
10239	done, err = future.DoneWithContext(context.Background(), client)
10240	if err != nil {
10241		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10242		return
10243	}
10244	if !done {
10245		i.Response.Response = future.Response()
10246		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
10247		return
10248	}
10249	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10250	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10251		i, err = client.CreateOrUpdateResponder(i.Response.Response)
10252		if err != nil {
10253			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
10254		}
10255	}
10256	return
10257}
10258
10259// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10260// operation.
10261type InterfacesDeleteFuture struct {
10262	azure.FutureAPI
10263	// Result returns the result of the asynchronous operation.
10264	// If the operation has not completed it will return an error.
10265	Result func(InterfacesClient) (autorest.Response, error)
10266}
10267
10268// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10269func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
10270	var azFuture azure.Future
10271	if err := json.Unmarshal(body, &azFuture); err != nil {
10272		return err
10273	}
10274	future.FutureAPI = &azFuture
10275	future.Result = future.result
10276	return nil
10277}
10278
10279// result is the default implementation for InterfacesDeleteFuture.Result.
10280func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
10281	var done bool
10282	done, err = future.DoneWithContext(context.Background(), client)
10283	if err != nil {
10284		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
10285		return
10286	}
10287	if !done {
10288		ar.Response = future.Response()
10289		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
10290		return
10291	}
10292	ar.Response = future.Response()
10293	return
10294}
10295
10296// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
10297// long-running operation.
10298type InterfacesGetEffectiveRouteTableFuture struct {
10299	azure.FutureAPI
10300	// Result returns the result of the asynchronous operation.
10301	// If the operation has not completed it will return an error.
10302	Result func(InterfacesClient) (EffectiveRouteListResult, error)
10303}
10304
10305// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10306func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
10307	var azFuture azure.Future
10308	if err := json.Unmarshal(body, &azFuture); err != nil {
10309		return err
10310	}
10311	future.FutureAPI = &azFuture
10312	future.Result = future.result
10313	return nil
10314}
10315
10316// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
10317func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
10318	var done bool
10319	done, err = future.DoneWithContext(context.Background(), client)
10320	if err != nil {
10321		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
10322		return
10323	}
10324	if !done {
10325		erlr.Response.Response = future.Response()
10326		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
10327		return
10328	}
10329	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10330	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
10331		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
10332		if err != nil {
10333			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
10334		}
10335	}
10336	return
10337}
10338
10339// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
10340// results of a long-running operation.
10341type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
10342	azure.FutureAPI
10343	// Result returns the result of the asynchronous operation.
10344	// If the operation has not completed it will return an error.
10345	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
10346}
10347
10348// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10349func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
10350	var azFuture azure.Future
10351	if err := json.Unmarshal(body, &azFuture); err != nil {
10352		return err
10353	}
10354	future.FutureAPI = &azFuture
10355	future.Result = future.result
10356	return nil
10357}
10358
10359// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
10360func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
10361	var done bool
10362	done, err = future.DoneWithContext(context.Background(), client)
10363	if err != nil {
10364		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
10365		return
10366	}
10367	if !done {
10368		ensglr.Response.Response = future.Response()
10369		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
10370		return
10371	}
10372	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10373	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
10374		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
10375		if err != nil {
10376			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
10377		}
10378	}
10379	return
10380}
10381
10382// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
10383// operation.
10384type InterfacesUpdateTagsFuture struct {
10385	azure.FutureAPI
10386	// Result returns the result of the asynchronous operation.
10387	// If the operation has not completed it will return an error.
10388	Result func(InterfacesClient) (Interface, error)
10389}
10390
10391// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10392func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10393	var azFuture azure.Future
10394	if err := json.Unmarshal(body, &azFuture); err != nil {
10395		return err
10396	}
10397	future.FutureAPI = &azFuture
10398	future.Result = future.result
10399	return nil
10400}
10401
10402// result is the default implementation for InterfacesUpdateTagsFuture.Result.
10403func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
10404	var done bool
10405	done, err = future.DoneWithContext(context.Background(), client)
10406	if err != nil {
10407		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10408		return
10409	}
10410	if !done {
10411		i.Response.Response = future.Response()
10412		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
10413		return
10414	}
10415	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10416	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
10417		i, err = client.UpdateTagsResponder(i.Response.Response)
10418		if err != nil {
10419			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
10420		}
10421	}
10422	return
10423}
10424
10425// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
10426type IPAddressAvailabilityResult struct {
10427	autorest.Response `json:"-"`
10428	// Available - Private IP address availability.
10429	Available *bool `json:"available,omitempty"`
10430	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
10431	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
10432}
10433
10434// IPConfiguration IP configuration
10435type IPConfiguration struct {
10436	// IPConfigurationPropertiesFormat - Properties of the IP configuration
10437	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
10438	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10439	Name *string `json:"name,omitempty"`
10440	// Etag - A unique read-only string that changes whenever the resource is updated.
10441	Etag *string `json:"etag,omitempty"`
10442	// ID - Resource ID.
10443	ID *string `json:"id,omitempty"`
10444}
10445
10446// MarshalJSON is the custom marshaler for IPConfiguration.
10447func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
10448	objectMap := make(map[string]interface{})
10449	if ic.IPConfigurationPropertiesFormat != nil {
10450		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
10451	}
10452	if ic.Name != nil {
10453		objectMap["name"] = ic.Name
10454	}
10455	if ic.Etag != nil {
10456		objectMap["etag"] = ic.Etag
10457	}
10458	if ic.ID != nil {
10459		objectMap["id"] = ic.ID
10460	}
10461	return json.Marshal(objectMap)
10462}
10463
10464// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
10465func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
10466	var m map[string]*json.RawMessage
10467	err := json.Unmarshal(body, &m)
10468	if err != nil {
10469		return err
10470	}
10471	for k, v := range m {
10472		switch k {
10473		case "properties":
10474			if v != nil {
10475				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
10476				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
10477				if err != nil {
10478					return err
10479				}
10480				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
10481			}
10482		case "name":
10483			if v != nil {
10484				var name string
10485				err = json.Unmarshal(*v, &name)
10486				if err != nil {
10487					return err
10488				}
10489				ic.Name = &name
10490			}
10491		case "etag":
10492			if v != nil {
10493				var etag string
10494				err = json.Unmarshal(*v, &etag)
10495				if err != nil {
10496					return err
10497				}
10498				ic.Etag = &etag
10499			}
10500		case "id":
10501			if v != nil {
10502				var ID string
10503				err = json.Unmarshal(*v, &ID)
10504				if err != nil {
10505					return err
10506				}
10507				ic.ID = &ID
10508			}
10509		}
10510	}
10511
10512	return nil
10513}
10514
10515// IPConfigurationPropertiesFormat properties of IP configuration.
10516type IPConfigurationPropertiesFormat struct {
10517	// PrivateIPAddress - The private IP address of the IP configuration.
10518	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10519	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10520	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10521	// Subnet - The reference of the subnet resource.
10522	Subnet *Subnet `json:"subnet,omitempty"`
10523	// PublicIPAddress - The reference of the public IP resource.
10524	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10525	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10526	ProvisioningState *string `json:"provisioningState,omitempty"`
10527}
10528
10529// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
10530type IpsecPolicy struct {
10531	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
10532	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
10533	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
10534	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
10535	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
10536	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
10537	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
10538	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
10539	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
10540	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
10541	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
10542	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
10543	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
10544	DhGroup DhGroup `json:"dhGroup,omitempty"`
10545	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
10546	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
10547}
10548
10549// IPTag contains the IpTag associated with the public IP address
10550type IPTag struct {
10551	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
10552	IPTagType *string `json:"ipTagType,omitempty"`
10553	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
10554	Tag *string `json:"tag,omitempty"`
10555}
10556
10557// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
10558type Ipv6ExpressRouteCircuitPeeringConfig struct {
10559	// PrimaryPeerAddressPrefix - The primary address prefix.
10560	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
10561	// SecondaryPeerAddressPrefix - The secondary address prefix.
10562	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
10563	// MicrosoftPeeringConfig - The Microsoft peering configuration.
10564	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
10565	// RouteFilter - The reference of the RouteFilter resource.
10566	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
10567	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
10568	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
10569}
10570
10571// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
10572// the next set of results.
10573type ListHubVirtualNetworkConnectionsResult struct {
10574	autorest.Response `json:"-"`
10575	// Value - List of HubVirtualNetworkConnections.
10576	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
10577	// NextLink - URL to get the next set of operation list results if there are any.
10578	NextLink *string `json:"nextLink,omitempty"`
10579}
10580
10581// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
10582// HubVirtualNetworkConnection values.
10583type ListHubVirtualNetworkConnectionsResultIterator struct {
10584	i    int
10585	page ListHubVirtualNetworkConnectionsResultPage
10586}
10587
10588// NextWithContext advances to the next value.  If there was an error making
10589// the request the iterator does not advance and the error is returned.
10590func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
10591	if tracing.IsEnabled() {
10592		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
10593		defer func() {
10594			sc := -1
10595			if iter.Response().Response.Response != nil {
10596				sc = iter.Response().Response.Response.StatusCode
10597			}
10598			tracing.EndSpan(ctx, sc, err)
10599		}()
10600	}
10601	iter.i++
10602	if iter.i < len(iter.page.Values()) {
10603		return nil
10604	}
10605	err = iter.page.NextWithContext(ctx)
10606	if err != nil {
10607		iter.i--
10608		return err
10609	}
10610	iter.i = 0
10611	return nil
10612}
10613
10614// Next advances to the next value.  If there was an error making
10615// the request the iterator does not advance and the error is returned.
10616// Deprecated: Use NextWithContext() instead.
10617func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
10618	return iter.NextWithContext(context.Background())
10619}
10620
10621// NotDone returns true if the enumeration should be started or is not yet complete.
10622func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
10623	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10624}
10625
10626// Response returns the raw server response from the last page request.
10627func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
10628	return iter.page.Response()
10629}
10630
10631// Value returns the current value or a zero-initialized value if the
10632// iterator has advanced beyond the end of the collection.
10633func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
10634	if !iter.page.NotDone() {
10635		return HubVirtualNetworkConnection{}
10636	}
10637	return iter.page.Values()[iter.i]
10638}
10639
10640// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
10641func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
10642	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
10643}
10644
10645// IsEmpty returns true if the ListResult contains no values.
10646func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
10647	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
10648}
10649
10650// hasNextLink returns true if the NextLink is not empty.
10651func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
10652	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
10653}
10654
10655// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
10656// It returns nil if no more results exist.
10657func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
10658	if !lhvncr.hasNextLink() {
10659		return nil, nil
10660	}
10661	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10662		autorest.AsJSON(),
10663		autorest.AsGet(),
10664		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
10665}
10666
10667// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
10668type ListHubVirtualNetworkConnectionsResultPage struct {
10669	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
10670	lhvncr ListHubVirtualNetworkConnectionsResult
10671}
10672
10673// NextWithContext advances to the next page of values.  If there was an error making
10674// the request the page does not advance and the error is returned.
10675func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
10676	if tracing.IsEnabled() {
10677		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
10678		defer func() {
10679			sc := -1
10680			if page.Response().Response.Response != nil {
10681				sc = page.Response().Response.Response.StatusCode
10682			}
10683			tracing.EndSpan(ctx, sc, err)
10684		}()
10685	}
10686	for {
10687		next, err := page.fn(ctx, page.lhvncr)
10688		if err != nil {
10689			return err
10690		}
10691		page.lhvncr = next
10692		if !next.hasNextLink() || !next.IsEmpty() {
10693			break
10694		}
10695	}
10696	return nil
10697}
10698
10699// Next advances to the next page of values.  If there was an error making
10700// the request the page does not advance and the error is returned.
10701// Deprecated: Use NextWithContext() instead.
10702func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
10703	return page.NextWithContext(context.Background())
10704}
10705
10706// NotDone returns true if the page enumeration should be started or is not yet complete.
10707func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
10708	return !page.lhvncr.IsEmpty()
10709}
10710
10711// Response returns the raw server response from the last page request.
10712func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
10713	return page.lhvncr
10714}
10715
10716// Values returns the slice of values for the current page or nil if there are no values.
10717func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
10718	if page.lhvncr.IsEmpty() {
10719		return nil
10720	}
10721	return *page.lhvncr.Value
10722}
10723
10724// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
10725func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
10726	return ListHubVirtualNetworkConnectionsResultPage{
10727		fn:     getNextPage,
10728		lhvncr: cur,
10729	}
10730}
10731
10732// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
10733// URL nextLink to get the next set of results.
10734type ListVirtualHubsResult struct {
10735	autorest.Response `json:"-"`
10736	// Value - List of VirtualHubs.
10737	Value *[]VirtualHub `json:"value,omitempty"`
10738	// NextLink - URL to get the next set of operation list results if there are any.
10739	NextLink *string `json:"nextLink,omitempty"`
10740}
10741
10742// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
10743type ListVirtualHubsResultIterator struct {
10744	i    int
10745	page ListVirtualHubsResultPage
10746}
10747
10748// NextWithContext advances to the next value.  If there was an error making
10749// the request the iterator does not advance and the error is returned.
10750func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
10751	if tracing.IsEnabled() {
10752		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
10753		defer func() {
10754			sc := -1
10755			if iter.Response().Response.Response != nil {
10756				sc = iter.Response().Response.Response.StatusCode
10757			}
10758			tracing.EndSpan(ctx, sc, err)
10759		}()
10760	}
10761	iter.i++
10762	if iter.i < len(iter.page.Values()) {
10763		return nil
10764	}
10765	err = iter.page.NextWithContext(ctx)
10766	if err != nil {
10767		iter.i--
10768		return err
10769	}
10770	iter.i = 0
10771	return nil
10772}
10773
10774// Next advances to the next value.  If there was an error making
10775// the request the iterator does not advance and the error is returned.
10776// Deprecated: Use NextWithContext() instead.
10777func (iter *ListVirtualHubsResultIterator) Next() error {
10778	return iter.NextWithContext(context.Background())
10779}
10780
10781// NotDone returns true if the enumeration should be started or is not yet complete.
10782func (iter ListVirtualHubsResultIterator) NotDone() bool {
10783	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10784}
10785
10786// Response returns the raw server response from the last page request.
10787func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
10788	return iter.page.Response()
10789}
10790
10791// Value returns the current value or a zero-initialized value if the
10792// iterator has advanced beyond the end of the collection.
10793func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
10794	if !iter.page.NotDone() {
10795		return VirtualHub{}
10796	}
10797	return iter.page.Values()[iter.i]
10798}
10799
10800// Creates a new instance of the ListVirtualHubsResultIterator type.
10801func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
10802	return ListVirtualHubsResultIterator{page: page}
10803}
10804
10805// IsEmpty returns true if the ListResult contains no values.
10806func (lvhr ListVirtualHubsResult) IsEmpty() bool {
10807	return lvhr.Value == nil || len(*lvhr.Value) == 0
10808}
10809
10810// hasNextLink returns true if the NextLink is not empty.
10811func (lvhr ListVirtualHubsResult) hasNextLink() bool {
10812	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
10813}
10814
10815// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
10816// It returns nil if no more results exist.
10817func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
10818	if !lvhr.hasNextLink() {
10819		return nil, nil
10820	}
10821	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10822		autorest.AsJSON(),
10823		autorest.AsGet(),
10824		autorest.WithBaseURL(to.String(lvhr.NextLink)))
10825}
10826
10827// ListVirtualHubsResultPage contains a page of VirtualHub values.
10828type ListVirtualHubsResultPage struct {
10829	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
10830	lvhr ListVirtualHubsResult
10831}
10832
10833// NextWithContext advances to the next page of values.  If there was an error making
10834// the request the page does not advance and the error is returned.
10835func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
10836	if tracing.IsEnabled() {
10837		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
10838		defer func() {
10839			sc := -1
10840			if page.Response().Response.Response != nil {
10841				sc = page.Response().Response.Response.StatusCode
10842			}
10843			tracing.EndSpan(ctx, sc, err)
10844		}()
10845	}
10846	for {
10847		next, err := page.fn(ctx, page.lvhr)
10848		if err != nil {
10849			return err
10850		}
10851		page.lvhr = next
10852		if !next.hasNextLink() || !next.IsEmpty() {
10853			break
10854		}
10855	}
10856	return nil
10857}
10858
10859// Next advances to the next page of values.  If there was an error making
10860// the request the page does not advance and the error is returned.
10861// Deprecated: Use NextWithContext() instead.
10862func (page *ListVirtualHubsResultPage) Next() error {
10863	return page.NextWithContext(context.Background())
10864}
10865
10866// NotDone returns true if the page enumeration should be started or is not yet complete.
10867func (page ListVirtualHubsResultPage) NotDone() bool {
10868	return !page.lvhr.IsEmpty()
10869}
10870
10871// Response returns the raw server response from the last page request.
10872func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
10873	return page.lvhr
10874}
10875
10876// Values returns the slice of values for the current page or nil if there are no values.
10877func (page ListVirtualHubsResultPage) Values() []VirtualHub {
10878	if page.lvhr.IsEmpty() {
10879		return nil
10880	}
10881	return *page.lvhr.Value
10882}
10883
10884// Creates a new instance of the ListVirtualHubsResultPage type.
10885func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
10886	return ListVirtualHubsResultPage{
10887		fn:   getNextPage,
10888		lvhr: cur,
10889	}
10890}
10891
10892// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
10893// URL nextLink to get the next set of results.
10894type ListVirtualWANsResult struct {
10895	autorest.Response `json:"-"`
10896	// Value - List of VirtualWANs.
10897	Value *[]VirtualWAN `json:"value,omitempty"`
10898	// NextLink - URL to get the next set of operation list results if there are any.
10899	NextLink *string `json:"nextLink,omitempty"`
10900}
10901
10902// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
10903type ListVirtualWANsResultIterator struct {
10904	i    int
10905	page ListVirtualWANsResultPage
10906}
10907
10908// NextWithContext advances to the next value.  If there was an error making
10909// the request the iterator does not advance and the error is returned.
10910func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
10911	if tracing.IsEnabled() {
10912		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
10913		defer func() {
10914			sc := -1
10915			if iter.Response().Response.Response != nil {
10916				sc = iter.Response().Response.Response.StatusCode
10917			}
10918			tracing.EndSpan(ctx, sc, err)
10919		}()
10920	}
10921	iter.i++
10922	if iter.i < len(iter.page.Values()) {
10923		return nil
10924	}
10925	err = iter.page.NextWithContext(ctx)
10926	if err != nil {
10927		iter.i--
10928		return err
10929	}
10930	iter.i = 0
10931	return nil
10932}
10933
10934// Next advances to the next value.  If there was an error making
10935// the request the iterator does not advance and the error is returned.
10936// Deprecated: Use NextWithContext() instead.
10937func (iter *ListVirtualWANsResultIterator) Next() error {
10938	return iter.NextWithContext(context.Background())
10939}
10940
10941// NotDone returns true if the enumeration should be started or is not yet complete.
10942func (iter ListVirtualWANsResultIterator) NotDone() bool {
10943	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10944}
10945
10946// Response returns the raw server response from the last page request.
10947func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
10948	return iter.page.Response()
10949}
10950
10951// Value returns the current value or a zero-initialized value if the
10952// iterator has advanced beyond the end of the collection.
10953func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
10954	if !iter.page.NotDone() {
10955		return VirtualWAN{}
10956	}
10957	return iter.page.Values()[iter.i]
10958}
10959
10960// Creates a new instance of the ListVirtualWANsResultIterator type.
10961func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
10962	return ListVirtualWANsResultIterator{page: page}
10963}
10964
10965// IsEmpty returns true if the ListResult contains no values.
10966func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
10967	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
10968}
10969
10970// hasNextLink returns true if the NextLink is not empty.
10971func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
10972	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
10973}
10974
10975// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
10976// It returns nil if no more results exist.
10977func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
10978	if !lvwnr.hasNextLink() {
10979		return nil, nil
10980	}
10981	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10982		autorest.AsJSON(),
10983		autorest.AsGet(),
10984		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
10985}
10986
10987// ListVirtualWANsResultPage contains a page of VirtualWAN values.
10988type ListVirtualWANsResultPage struct {
10989	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
10990	lvwnr ListVirtualWANsResult
10991}
10992
10993// NextWithContext advances to the next page of values.  If there was an error making
10994// the request the page does not advance and the error is returned.
10995func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
10996	if tracing.IsEnabled() {
10997		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
10998		defer func() {
10999			sc := -1
11000			if page.Response().Response.Response != nil {
11001				sc = page.Response().Response.Response.StatusCode
11002			}
11003			tracing.EndSpan(ctx, sc, err)
11004		}()
11005	}
11006	for {
11007		next, err := page.fn(ctx, page.lvwnr)
11008		if err != nil {
11009			return err
11010		}
11011		page.lvwnr = next
11012		if !next.hasNextLink() || !next.IsEmpty() {
11013			break
11014		}
11015	}
11016	return nil
11017}
11018
11019// Next advances to the next page of values.  If there was an error making
11020// the request the page does not advance and the error is returned.
11021// Deprecated: Use NextWithContext() instead.
11022func (page *ListVirtualWANsResultPage) Next() error {
11023	return page.NextWithContext(context.Background())
11024}
11025
11026// NotDone returns true if the page enumeration should be started or is not yet complete.
11027func (page ListVirtualWANsResultPage) NotDone() bool {
11028	return !page.lvwnr.IsEmpty()
11029}
11030
11031// Response returns the raw server response from the last page request.
11032func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
11033	return page.lvwnr
11034}
11035
11036// Values returns the slice of values for the current page or nil if there are no values.
11037func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
11038	if page.lvwnr.IsEmpty() {
11039		return nil
11040	}
11041	return *page.lvwnr.Value
11042}
11043
11044// Creates a new instance of the ListVirtualWANsResultPage type.
11045func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
11046	return ListVirtualWANsResultPage{
11047		fn:    getNextPage,
11048		lvwnr: cur,
11049	}
11050}
11051
11052// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
11053// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
11054type ListVpnConnectionsResult struct {
11055	autorest.Response `json:"-"`
11056	// Value - List of Vpn Connections.
11057	Value *[]VpnConnection `json:"value,omitempty"`
11058	// NextLink - URL to get the next set of operation list results if there are any.
11059	NextLink *string `json:"nextLink,omitempty"`
11060}
11061
11062// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
11063type ListVpnConnectionsResultIterator struct {
11064	i    int
11065	page ListVpnConnectionsResultPage
11066}
11067
11068// NextWithContext advances to the next value.  If there was an error making
11069// the request the iterator does not advance and the error is returned.
11070func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
11071	if tracing.IsEnabled() {
11072		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
11073		defer func() {
11074			sc := -1
11075			if iter.Response().Response.Response != nil {
11076				sc = iter.Response().Response.Response.StatusCode
11077			}
11078			tracing.EndSpan(ctx, sc, err)
11079		}()
11080	}
11081	iter.i++
11082	if iter.i < len(iter.page.Values()) {
11083		return nil
11084	}
11085	err = iter.page.NextWithContext(ctx)
11086	if err != nil {
11087		iter.i--
11088		return err
11089	}
11090	iter.i = 0
11091	return nil
11092}
11093
11094// Next advances to the next value.  If there was an error making
11095// the request the iterator does not advance and the error is returned.
11096// Deprecated: Use NextWithContext() instead.
11097func (iter *ListVpnConnectionsResultIterator) Next() error {
11098	return iter.NextWithContext(context.Background())
11099}
11100
11101// NotDone returns true if the enumeration should be started or is not yet complete.
11102func (iter ListVpnConnectionsResultIterator) NotDone() bool {
11103	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11104}
11105
11106// Response returns the raw server response from the last page request.
11107func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
11108	return iter.page.Response()
11109}
11110
11111// Value returns the current value or a zero-initialized value if the
11112// iterator has advanced beyond the end of the collection.
11113func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
11114	if !iter.page.NotDone() {
11115		return VpnConnection{}
11116	}
11117	return iter.page.Values()[iter.i]
11118}
11119
11120// Creates a new instance of the ListVpnConnectionsResultIterator type.
11121func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
11122	return ListVpnConnectionsResultIterator{page: page}
11123}
11124
11125// IsEmpty returns true if the ListResult contains no values.
11126func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
11127	return lvcr.Value == nil || len(*lvcr.Value) == 0
11128}
11129
11130// hasNextLink returns true if the NextLink is not empty.
11131func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
11132	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
11133}
11134
11135// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
11136// It returns nil if no more results exist.
11137func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
11138	if !lvcr.hasNextLink() {
11139		return nil, nil
11140	}
11141	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11142		autorest.AsJSON(),
11143		autorest.AsGet(),
11144		autorest.WithBaseURL(to.String(lvcr.NextLink)))
11145}
11146
11147// ListVpnConnectionsResultPage contains a page of VpnConnection values.
11148type ListVpnConnectionsResultPage struct {
11149	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
11150	lvcr ListVpnConnectionsResult
11151}
11152
11153// NextWithContext advances to the next page of values.  If there was an error making
11154// the request the page does not advance and the error is returned.
11155func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
11156	if tracing.IsEnabled() {
11157		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
11158		defer func() {
11159			sc := -1
11160			if page.Response().Response.Response != nil {
11161				sc = page.Response().Response.Response.StatusCode
11162			}
11163			tracing.EndSpan(ctx, sc, err)
11164		}()
11165	}
11166	for {
11167		next, err := page.fn(ctx, page.lvcr)
11168		if err != nil {
11169			return err
11170		}
11171		page.lvcr = next
11172		if !next.hasNextLink() || !next.IsEmpty() {
11173			break
11174		}
11175	}
11176	return nil
11177}
11178
11179// Next advances to the next page of values.  If there was an error making
11180// the request the page does not advance and the error is returned.
11181// Deprecated: Use NextWithContext() instead.
11182func (page *ListVpnConnectionsResultPage) Next() error {
11183	return page.NextWithContext(context.Background())
11184}
11185
11186// NotDone returns true if the page enumeration should be started or is not yet complete.
11187func (page ListVpnConnectionsResultPage) NotDone() bool {
11188	return !page.lvcr.IsEmpty()
11189}
11190
11191// Response returns the raw server response from the last page request.
11192func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
11193	return page.lvcr
11194}
11195
11196// Values returns the slice of values for the current page or nil if there are no values.
11197func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
11198	if page.lvcr.IsEmpty() {
11199		return nil
11200	}
11201	return *page.lvcr.Value
11202}
11203
11204// Creates a new instance of the ListVpnConnectionsResultPage type.
11205func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
11206	return ListVpnConnectionsResultPage{
11207		fn:   getNextPage,
11208		lvcr: cur,
11209	}
11210}
11211
11212// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
11213// URL nextLink to get the next set of results.
11214type ListVpnGatewaysResult struct {
11215	autorest.Response `json:"-"`
11216	// Value - List of VpnGateways.
11217	Value *[]VpnGateway `json:"value,omitempty"`
11218	// NextLink - URL to get the next set of operation list results if there are any.
11219	NextLink *string `json:"nextLink,omitempty"`
11220}
11221
11222// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
11223type ListVpnGatewaysResultIterator struct {
11224	i    int
11225	page ListVpnGatewaysResultPage
11226}
11227
11228// NextWithContext advances to the next value.  If there was an error making
11229// the request the iterator does not advance and the error is returned.
11230func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
11231	if tracing.IsEnabled() {
11232		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
11233		defer func() {
11234			sc := -1
11235			if iter.Response().Response.Response != nil {
11236				sc = iter.Response().Response.Response.StatusCode
11237			}
11238			tracing.EndSpan(ctx, sc, err)
11239		}()
11240	}
11241	iter.i++
11242	if iter.i < len(iter.page.Values()) {
11243		return nil
11244	}
11245	err = iter.page.NextWithContext(ctx)
11246	if err != nil {
11247		iter.i--
11248		return err
11249	}
11250	iter.i = 0
11251	return nil
11252}
11253
11254// Next advances to the next value.  If there was an error making
11255// the request the iterator does not advance and the error is returned.
11256// Deprecated: Use NextWithContext() instead.
11257func (iter *ListVpnGatewaysResultIterator) Next() error {
11258	return iter.NextWithContext(context.Background())
11259}
11260
11261// NotDone returns true if the enumeration should be started or is not yet complete.
11262func (iter ListVpnGatewaysResultIterator) NotDone() bool {
11263	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11264}
11265
11266// Response returns the raw server response from the last page request.
11267func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
11268	return iter.page.Response()
11269}
11270
11271// Value returns the current value or a zero-initialized value if the
11272// iterator has advanced beyond the end of the collection.
11273func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
11274	if !iter.page.NotDone() {
11275		return VpnGateway{}
11276	}
11277	return iter.page.Values()[iter.i]
11278}
11279
11280// Creates a new instance of the ListVpnGatewaysResultIterator type.
11281func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
11282	return ListVpnGatewaysResultIterator{page: page}
11283}
11284
11285// IsEmpty returns true if the ListResult contains no values.
11286func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
11287	return lvgr.Value == nil || len(*lvgr.Value) == 0
11288}
11289
11290// hasNextLink returns true if the NextLink is not empty.
11291func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
11292	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
11293}
11294
11295// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
11296// It returns nil if no more results exist.
11297func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
11298	if !lvgr.hasNextLink() {
11299		return nil, nil
11300	}
11301	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11302		autorest.AsJSON(),
11303		autorest.AsGet(),
11304		autorest.WithBaseURL(to.String(lvgr.NextLink)))
11305}
11306
11307// ListVpnGatewaysResultPage contains a page of VpnGateway values.
11308type ListVpnGatewaysResultPage struct {
11309	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
11310	lvgr ListVpnGatewaysResult
11311}
11312
11313// NextWithContext advances to the next page of values.  If there was an error making
11314// the request the page does not advance and the error is returned.
11315func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
11316	if tracing.IsEnabled() {
11317		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
11318		defer func() {
11319			sc := -1
11320			if page.Response().Response.Response != nil {
11321				sc = page.Response().Response.Response.StatusCode
11322			}
11323			tracing.EndSpan(ctx, sc, err)
11324		}()
11325	}
11326	for {
11327		next, err := page.fn(ctx, page.lvgr)
11328		if err != nil {
11329			return err
11330		}
11331		page.lvgr = next
11332		if !next.hasNextLink() || !next.IsEmpty() {
11333			break
11334		}
11335	}
11336	return nil
11337}
11338
11339// Next advances to the next page of values.  If there was an error making
11340// the request the page does not advance and the error is returned.
11341// Deprecated: Use NextWithContext() instead.
11342func (page *ListVpnGatewaysResultPage) Next() error {
11343	return page.NextWithContext(context.Background())
11344}
11345
11346// NotDone returns true if the page enumeration should be started or is not yet complete.
11347func (page ListVpnGatewaysResultPage) NotDone() bool {
11348	return !page.lvgr.IsEmpty()
11349}
11350
11351// Response returns the raw server response from the last page request.
11352func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
11353	return page.lvgr
11354}
11355
11356// Values returns the slice of values for the current page or nil if there are no values.
11357func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
11358	if page.lvgr.IsEmpty() {
11359		return nil
11360	}
11361	return *page.lvgr.Value
11362}
11363
11364// Creates a new instance of the ListVpnGatewaysResultPage type.
11365func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
11366	return ListVpnGatewaysResultPage{
11367		fn:   getNextPage,
11368		lvgr: cur,
11369	}
11370}
11371
11372// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
11373// nextLink to get the next set of results.
11374type ListVpnSitesResult struct {
11375	autorest.Response `json:"-"`
11376	// Value - List of VpnSites.
11377	Value *[]VpnSite `json:"value,omitempty"`
11378	// NextLink - URL to get the next set of operation list results if there are any.
11379	NextLink *string `json:"nextLink,omitempty"`
11380}
11381
11382// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
11383type ListVpnSitesResultIterator struct {
11384	i    int
11385	page ListVpnSitesResultPage
11386}
11387
11388// NextWithContext advances to the next value.  If there was an error making
11389// the request the iterator does not advance and the error is returned.
11390func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
11391	if tracing.IsEnabled() {
11392		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
11393		defer func() {
11394			sc := -1
11395			if iter.Response().Response.Response != nil {
11396				sc = iter.Response().Response.Response.StatusCode
11397			}
11398			tracing.EndSpan(ctx, sc, err)
11399		}()
11400	}
11401	iter.i++
11402	if iter.i < len(iter.page.Values()) {
11403		return nil
11404	}
11405	err = iter.page.NextWithContext(ctx)
11406	if err != nil {
11407		iter.i--
11408		return err
11409	}
11410	iter.i = 0
11411	return nil
11412}
11413
11414// Next advances to the next value.  If there was an error making
11415// the request the iterator does not advance and the error is returned.
11416// Deprecated: Use NextWithContext() instead.
11417func (iter *ListVpnSitesResultIterator) Next() error {
11418	return iter.NextWithContext(context.Background())
11419}
11420
11421// NotDone returns true if the enumeration should be started or is not yet complete.
11422func (iter ListVpnSitesResultIterator) NotDone() bool {
11423	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11424}
11425
11426// Response returns the raw server response from the last page request.
11427func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
11428	return iter.page.Response()
11429}
11430
11431// Value returns the current value or a zero-initialized value if the
11432// iterator has advanced beyond the end of the collection.
11433func (iter ListVpnSitesResultIterator) Value() VpnSite {
11434	if !iter.page.NotDone() {
11435		return VpnSite{}
11436	}
11437	return iter.page.Values()[iter.i]
11438}
11439
11440// Creates a new instance of the ListVpnSitesResultIterator type.
11441func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
11442	return ListVpnSitesResultIterator{page: page}
11443}
11444
11445// IsEmpty returns true if the ListResult contains no values.
11446func (lvsr ListVpnSitesResult) IsEmpty() bool {
11447	return lvsr.Value == nil || len(*lvsr.Value) == 0
11448}
11449
11450// hasNextLink returns true if the NextLink is not empty.
11451func (lvsr ListVpnSitesResult) hasNextLink() bool {
11452	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
11453}
11454
11455// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
11456// It returns nil if no more results exist.
11457func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
11458	if !lvsr.hasNextLink() {
11459		return nil, nil
11460	}
11461	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11462		autorest.AsJSON(),
11463		autorest.AsGet(),
11464		autorest.WithBaseURL(to.String(lvsr.NextLink)))
11465}
11466
11467// ListVpnSitesResultPage contains a page of VpnSite values.
11468type ListVpnSitesResultPage struct {
11469	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
11470	lvsr ListVpnSitesResult
11471}
11472
11473// NextWithContext advances to the next page of values.  If there was an error making
11474// the request the page does not advance and the error is returned.
11475func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
11476	if tracing.IsEnabled() {
11477		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
11478		defer func() {
11479			sc := -1
11480			if page.Response().Response.Response != nil {
11481				sc = page.Response().Response.Response.StatusCode
11482			}
11483			tracing.EndSpan(ctx, sc, err)
11484		}()
11485	}
11486	for {
11487		next, err := page.fn(ctx, page.lvsr)
11488		if err != nil {
11489			return err
11490		}
11491		page.lvsr = next
11492		if !next.hasNextLink() || !next.IsEmpty() {
11493			break
11494		}
11495	}
11496	return nil
11497}
11498
11499// Next advances to the next page of values.  If there was an error making
11500// the request the page does not advance and the error is returned.
11501// Deprecated: Use NextWithContext() instead.
11502func (page *ListVpnSitesResultPage) Next() error {
11503	return page.NextWithContext(context.Background())
11504}
11505
11506// NotDone returns true if the page enumeration should be started or is not yet complete.
11507func (page ListVpnSitesResultPage) NotDone() bool {
11508	return !page.lvsr.IsEmpty()
11509}
11510
11511// Response returns the raw server response from the last page request.
11512func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
11513	return page.lvsr
11514}
11515
11516// Values returns the slice of values for the current page or nil if there are no values.
11517func (page ListVpnSitesResultPage) Values() []VpnSite {
11518	if page.lvsr.IsEmpty() {
11519		return nil
11520	}
11521	return *page.lvsr.Value
11522}
11523
11524// Creates a new instance of the ListVpnSitesResultPage type.
11525func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
11526	return ListVpnSitesResultPage{
11527		fn:   getNextPage,
11528		lvsr: cur,
11529	}
11530}
11531
11532// LoadBalancer loadBalancer resource
11533type LoadBalancer struct {
11534	autorest.Response `json:"-"`
11535	// Sku - The load balancer SKU.
11536	Sku *LoadBalancerSku `json:"sku,omitempty"`
11537	// LoadBalancerPropertiesFormat - Properties of load balancer.
11538	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
11539	// Etag - A unique read-only string that changes whenever the resource is updated.
11540	Etag *string `json:"etag,omitempty"`
11541	// ID - Resource ID.
11542	ID *string `json:"id,omitempty"`
11543	// Name - READ-ONLY; Resource name.
11544	Name *string `json:"name,omitempty"`
11545	// Type - READ-ONLY; Resource type.
11546	Type *string `json:"type,omitempty"`
11547	// Location - Resource location.
11548	Location *string `json:"location,omitempty"`
11549	// Tags - Resource tags.
11550	Tags map[string]*string `json:"tags"`
11551}
11552
11553// MarshalJSON is the custom marshaler for LoadBalancer.
11554func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
11555	objectMap := make(map[string]interface{})
11556	if lb.Sku != nil {
11557		objectMap["sku"] = lb.Sku
11558	}
11559	if lb.LoadBalancerPropertiesFormat != nil {
11560		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
11561	}
11562	if lb.Etag != nil {
11563		objectMap["etag"] = lb.Etag
11564	}
11565	if lb.ID != nil {
11566		objectMap["id"] = lb.ID
11567	}
11568	if lb.Location != nil {
11569		objectMap["location"] = lb.Location
11570	}
11571	if lb.Tags != nil {
11572		objectMap["tags"] = lb.Tags
11573	}
11574	return json.Marshal(objectMap)
11575}
11576
11577// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
11578func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
11579	var m map[string]*json.RawMessage
11580	err := json.Unmarshal(body, &m)
11581	if err != nil {
11582		return err
11583	}
11584	for k, v := range m {
11585		switch k {
11586		case "sku":
11587			if v != nil {
11588				var sku LoadBalancerSku
11589				err = json.Unmarshal(*v, &sku)
11590				if err != nil {
11591					return err
11592				}
11593				lb.Sku = &sku
11594			}
11595		case "properties":
11596			if v != nil {
11597				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
11598				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
11599				if err != nil {
11600					return err
11601				}
11602				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
11603			}
11604		case "etag":
11605			if v != nil {
11606				var etag string
11607				err = json.Unmarshal(*v, &etag)
11608				if err != nil {
11609					return err
11610				}
11611				lb.Etag = &etag
11612			}
11613		case "id":
11614			if v != nil {
11615				var ID string
11616				err = json.Unmarshal(*v, &ID)
11617				if err != nil {
11618					return err
11619				}
11620				lb.ID = &ID
11621			}
11622		case "name":
11623			if v != nil {
11624				var name string
11625				err = json.Unmarshal(*v, &name)
11626				if err != nil {
11627					return err
11628				}
11629				lb.Name = &name
11630			}
11631		case "type":
11632			if v != nil {
11633				var typeVar string
11634				err = json.Unmarshal(*v, &typeVar)
11635				if err != nil {
11636					return err
11637				}
11638				lb.Type = &typeVar
11639			}
11640		case "location":
11641			if v != nil {
11642				var location string
11643				err = json.Unmarshal(*v, &location)
11644				if err != nil {
11645					return err
11646				}
11647				lb.Location = &location
11648			}
11649		case "tags":
11650			if v != nil {
11651				var tags map[string]*string
11652				err = json.Unmarshal(*v, &tags)
11653				if err != nil {
11654					return err
11655				}
11656				lb.Tags = tags
11657			}
11658		}
11659	}
11660
11661	return nil
11662}
11663
11664// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
11665type LoadBalancerBackendAddressPoolListResult struct {
11666	autorest.Response `json:"-"`
11667	// Value - A list of backend address pools in a load balancer.
11668	Value *[]BackendAddressPool `json:"value,omitempty"`
11669	// NextLink - READ-ONLY; The URL to get the next set of results.
11670	NextLink *string `json:"nextLink,omitempty"`
11671}
11672
11673// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
11674func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
11675	objectMap := make(map[string]interface{})
11676	if lbbaplr.Value != nil {
11677		objectMap["value"] = lbbaplr.Value
11678	}
11679	return json.Marshal(objectMap)
11680}
11681
11682// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
11683// BackendAddressPool values.
11684type LoadBalancerBackendAddressPoolListResultIterator struct {
11685	i    int
11686	page LoadBalancerBackendAddressPoolListResultPage
11687}
11688
11689// NextWithContext advances to the next value.  If there was an error making
11690// the request the iterator does not advance and the error is returned.
11691func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
11692	if tracing.IsEnabled() {
11693		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
11694		defer func() {
11695			sc := -1
11696			if iter.Response().Response.Response != nil {
11697				sc = iter.Response().Response.Response.StatusCode
11698			}
11699			tracing.EndSpan(ctx, sc, err)
11700		}()
11701	}
11702	iter.i++
11703	if iter.i < len(iter.page.Values()) {
11704		return nil
11705	}
11706	err = iter.page.NextWithContext(ctx)
11707	if err != nil {
11708		iter.i--
11709		return err
11710	}
11711	iter.i = 0
11712	return nil
11713}
11714
11715// Next advances to the next value.  If there was an error making
11716// the request the iterator does not advance and the error is returned.
11717// Deprecated: Use NextWithContext() instead.
11718func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
11719	return iter.NextWithContext(context.Background())
11720}
11721
11722// NotDone returns true if the enumeration should be started or is not yet complete.
11723func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
11724	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11725}
11726
11727// Response returns the raw server response from the last page request.
11728func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
11729	return iter.page.Response()
11730}
11731
11732// Value returns the current value or a zero-initialized value if the
11733// iterator has advanced beyond the end of the collection.
11734func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
11735	if !iter.page.NotDone() {
11736		return BackendAddressPool{}
11737	}
11738	return iter.page.Values()[iter.i]
11739}
11740
11741// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
11742func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
11743	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
11744}
11745
11746// IsEmpty returns true if the ListResult contains no values.
11747func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
11748	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
11749}
11750
11751// hasNextLink returns true if the NextLink is not empty.
11752func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
11753	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
11754}
11755
11756// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
11757// It returns nil if no more results exist.
11758func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
11759	if !lbbaplr.hasNextLink() {
11760		return nil, nil
11761	}
11762	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11763		autorest.AsJSON(),
11764		autorest.AsGet(),
11765		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
11766}
11767
11768// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
11769type LoadBalancerBackendAddressPoolListResultPage struct {
11770	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
11771	lbbaplr LoadBalancerBackendAddressPoolListResult
11772}
11773
11774// NextWithContext advances to the next page of values.  If there was an error making
11775// the request the page does not advance and the error is returned.
11776func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
11777	if tracing.IsEnabled() {
11778		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
11779		defer func() {
11780			sc := -1
11781			if page.Response().Response.Response != nil {
11782				sc = page.Response().Response.Response.StatusCode
11783			}
11784			tracing.EndSpan(ctx, sc, err)
11785		}()
11786	}
11787	for {
11788		next, err := page.fn(ctx, page.lbbaplr)
11789		if err != nil {
11790			return err
11791		}
11792		page.lbbaplr = next
11793		if !next.hasNextLink() || !next.IsEmpty() {
11794			break
11795		}
11796	}
11797	return nil
11798}
11799
11800// Next advances to the next page of values.  If there was an error making
11801// the request the page does not advance and the error is returned.
11802// Deprecated: Use NextWithContext() instead.
11803func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
11804	return page.NextWithContext(context.Background())
11805}
11806
11807// NotDone returns true if the page enumeration should be started or is not yet complete.
11808func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
11809	return !page.lbbaplr.IsEmpty()
11810}
11811
11812// Response returns the raw server response from the last page request.
11813func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
11814	return page.lbbaplr
11815}
11816
11817// Values returns the slice of values for the current page or nil if there are no values.
11818func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
11819	if page.lbbaplr.IsEmpty() {
11820		return nil
11821	}
11822	return *page.lbbaplr.Value
11823}
11824
11825// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
11826func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
11827	return LoadBalancerBackendAddressPoolListResultPage{
11828		fn:      getNextPage,
11829		lbbaplr: cur,
11830	}
11831}
11832
11833// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
11834type LoadBalancerFrontendIPConfigurationListResult struct {
11835	autorest.Response `json:"-"`
11836	// Value - A list of frontend IP configurations in a load balancer.
11837	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
11838	// NextLink - READ-ONLY; The URL to get the next set of results.
11839	NextLink *string `json:"nextLink,omitempty"`
11840}
11841
11842// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
11843func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
11844	objectMap := make(map[string]interface{})
11845	if lbficlr.Value != nil {
11846		objectMap["value"] = lbficlr.Value
11847	}
11848	return json.Marshal(objectMap)
11849}
11850
11851// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
11852// FrontendIPConfiguration values.
11853type LoadBalancerFrontendIPConfigurationListResultIterator struct {
11854	i    int
11855	page LoadBalancerFrontendIPConfigurationListResultPage
11856}
11857
11858// NextWithContext advances to the next value.  If there was an error making
11859// the request the iterator does not advance and the error is returned.
11860func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11861	if tracing.IsEnabled() {
11862		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
11863		defer func() {
11864			sc := -1
11865			if iter.Response().Response.Response != nil {
11866				sc = iter.Response().Response.Response.StatusCode
11867			}
11868			tracing.EndSpan(ctx, sc, err)
11869		}()
11870	}
11871	iter.i++
11872	if iter.i < len(iter.page.Values()) {
11873		return nil
11874	}
11875	err = iter.page.NextWithContext(ctx)
11876	if err != nil {
11877		iter.i--
11878		return err
11879	}
11880	iter.i = 0
11881	return nil
11882}
11883
11884// Next advances to the next value.  If there was an error making
11885// the request the iterator does not advance and the error is returned.
11886// Deprecated: Use NextWithContext() instead.
11887func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
11888	return iter.NextWithContext(context.Background())
11889}
11890
11891// NotDone returns true if the enumeration should be started or is not yet complete.
11892func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
11893	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11894}
11895
11896// Response returns the raw server response from the last page request.
11897func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
11898	return iter.page.Response()
11899}
11900
11901// Value returns the current value or a zero-initialized value if the
11902// iterator has advanced beyond the end of the collection.
11903func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
11904	if !iter.page.NotDone() {
11905		return FrontendIPConfiguration{}
11906	}
11907	return iter.page.Values()[iter.i]
11908}
11909
11910// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
11911func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
11912	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
11913}
11914
11915// IsEmpty returns true if the ListResult contains no values.
11916func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
11917	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
11918}
11919
11920// hasNextLink returns true if the NextLink is not empty.
11921func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
11922	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
11923}
11924
11925// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
11926// It returns nil if no more results exist.
11927func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
11928	if !lbficlr.hasNextLink() {
11929		return nil, nil
11930	}
11931	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11932		autorest.AsJSON(),
11933		autorest.AsGet(),
11934		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
11935}
11936
11937// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
11938type LoadBalancerFrontendIPConfigurationListResultPage struct {
11939	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
11940	lbficlr LoadBalancerFrontendIPConfigurationListResult
11941}
11942
11943// NextWithContext advances to the next page of values.  If there was an error making
11944// the request the page does not advance and the error is returned.
11945func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
11946	if tracing.IsEnabled() {
11947		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
11948		defer func() {
11949			sc := -1
11950			if page.Response().Response.Response != nil {
11951				sc = page.Response().Response.Response.StatusCode
11952			}
11953			tracing.EndSpan(ctx, sc, err)
11954		}()
11955	}
11956	for {
11957		next, err := page.fn(ctx, page.lbficlr)
11958		if err != nil {
11959			return err
11960		}
11961		page.lbficlr = next
11962		if !next.hasNextLink() || !next.IsEmpty() {
11963			break
11964		}
11965	}
11966	return nil
11967}
11968
11969// Next advances to the next page of values.  If there was an error making
11970// the request the page does not advance and the error is returned.
11971// Deprecated: Use NextWithContext() instead.
11972func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
11973	return page.NextWithContext(context.Background())
11974}
11975
11976// NotDone returns true if the page enumeration should be started or is not yet complete.
11977func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
11978	return !page.lbficlr.IsEmpty()
11979}
11980
11981// Response returns the raw server response from the last page request.
11982func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
11983	return page.lbficlr
11984}
11985
11986// Values returns the slice of values for the current page or nil if there are no values.
11987func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
11988	if page.lbficlr.IsEmpty() {
11989		return nil
11990	}
11991	return *page.lbficlr.Value
11992}
11993
11994// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
11995func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
11996	return LoadBalancerFrontendIPConfigurationListResultPage{
11997		fn:      getNextPage,
11998		lbficlr: cur,
11999	}
12000}
12001
12002// LoadBalancerListResult response for ListLoadBalancers API service call.
12003type LoadBalancerListResult struct {
12004	autorest.Response `json:"-"`
12005	// Value - A list of load balancers in a resource group.
12006	Value *[]LoadBalancer `json:"value,omitempty"`
12007	// NextLink - READ-ONLY; The URL to get the next set of results.
12008	NextLink *string `json:"nextLink,omitempty"`
12009}
12010
12011// MarshalJSON is the custom marshaler for LoadBalancerListResult.
12012func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
12013	objectMap := make(map[string]interface{})
12014	if lblr.Value != nil {
12015		objectMap["value"] = lblr.Value
12016	}
12017	return json.Marshal(objectMap)
12018}
12019
12020// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
12021type LoadBalancerListResultIterator struct {
12022	i    int
12023	page LoadBalancerListResultPage
12024}
12025
12026// NextWithContext advances to the next value.  If there was an error making
12027// the request the iterator does not advance and the error is returned.
12028func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
12029	if tracing.IsEnabled() {
12030		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
12031		defer func() {
12032			sc := -1
12033			if iter.Response().Response.Response != nil {
12034				sc = iter.Response().Response.Response.StatusCode
12035			}
12036			tracing.EndSpan(ctx, sc, err)
12037		}()
12038	}
12039	iter.i++
12040	if iter.i < len(iter.page.Values()) {
12041		return nil
12042	}
12043	err = iter.page.NextWithContext(ctx)
12044	if err != nil {
12045		iter.i--
12046		return err
12047	}
12048	iter.i = 0
12049	return nil
12050}
12051
12052// Next advances to the next value.  If there was an error making
12053// the request the iterator does not advance and the error is returned.
12054// Deprecated: Use NextWithContext() instead.
12055func (iter *LoadBalancerListResultIterator) Next() error {
12056	return iter.NextWithContext(context.Background())
12057}
12058
12059// NotDone returns true if the enumeration should be started or is not yet complete.
12060func (iter LoadBalancerListResultIterator) NotDone() bool {
12061	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12062}
12063
12064// Response returns the raw server response from the last page request.
12065func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
12066	return iter.page.Response()
12067}
12068
12069// Value returns the current value or a zero-initialized value if the
12070// iterator has advanced beyond the end of the collection.
12071func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
12072	if !iter.page.NotDone() {
12073		return LoadBalancer{}
12074	}
12075	return iter.page.Values()[iter.i]
12076}
12077
12078// Creates a new instance of the LoadBalancerListResultIterator type.
12079func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
12080	return LoadBalancerListResultIterator{page: page}
12081}
12082
12083// IsEmpty returns true if the ListResult contains no values.
12084func (lblr LoadBalancerListResult) IsEmpty() bool {
12085	return lblr.Value == nil || len(*lblr.Value) == 0
12086}
12087
12088// hasNextLink returns true if the NextLink is not empty.
12089func (lblr LoadBalancerListResult) hasNextLink() bool {
12090	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
12091}
12092
12093// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
12094// It returns nil if no more results exist.
12095func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
12096	if !lblr.hasNextLink() {
12097		return nil, nil
12098	}
12099	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12100		autorest.AsJSON(),
12101		autorest.AsGet(),
12102		autorest.WithBaseURL(to.String(lblr.NextLink)))
12103}
12104
12105// LoadBalancerListResultPage contains a page of LoadBalancer values.
12106type LoadBalancerListResultPage struct {
12107	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
12108	lblr LoadBalancerListResult
12109}
12110
12111// NextWithContext advances to the next page of values.  If there was an error making
12112// the request the page does not advance and the error is returned.
12113func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
12114	if tracing.IsEnabled() {
12115		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
12116		defer func() {
12117			sc := -1
12118			if page.Response().Response.Response != nil {
12119				sc = page.Response().Response.Response.StatusCode
12120			}
12121			tracing.EndSpan(ctx, sc, err)
12122		}()
12123	}
12124	for {
12125		next, err := page.fn(ctx, page.lblr)
12126		if err != nil {
12127			return err
12128		}
12129		page.lblr = next
12130		if !next.hasNextLink() || !next.IsEmpty() {
12131			break
12132		}
12133	}
12134	return nil
12135}
12136
12137// Next advances to the next page of values.  If there was an error making
12138// the request the page does not advance and the error is returned.
12139// Deprecated: Use NextWithContext() instead.
12140func (page *LoadBalancerListResultPage) Next() error {
12141	return page.NextWithContext(context.Background())
12142}
12143
12144// NotDone returns true if the page enumeration should be started or is not yet complete.
12145func (page LoadBalancerListResultPage) NotDone() bool {
12146	return !page.lblr.IsEmpty()
12147}
12148
12149// Response returns the raw server response from the last page request.
12150func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
12151	return page.lblr
12152}
12153
12154// Values returns the slice of values for the current page or nil if there are no values.
12155func (page LoadBalancerListResultPage) Values() []LoadBalancer {
12156	if page.lblr.IsEmpty() {
12157		return nil
12158	}
12159	return *page.lblr.Value
12160}
12161
12162// Creates a new instance of the LoadBalancerListResultPage type.
12163func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
12164	return LoadBalancerListResultPage{
12165		fn:   getNextPage,
12166		lblr: cur,
12167	}
12168}
12169
12170// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
12171type LoadBalancerLoadBalancingRuleListResult struct {
12172	autorest.Response `json:"-"`
12173	// Value - A list of load balancing rules in a load balancer.
12174	Value *[]LoadBalancingRule `json:"value,omitempty"`
12175	// NextLink - READ-ONLY; The URL to get the next set of results.
12176	NextLink *string `json:"nextLink,omitempty"`
12177}
12178
12179// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
12180func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
12181	objectMap := make(map[string]interface{})
12182	if lblbrlr.Value != nil {
12183		objectMap["value"] = lblbrlr.Value
12184	}
12185	return json.Marshal(objectMap)
12186}
12187
12188// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
12189// LoadBalancingRule values.
12190type LoadBalancerLoadBalancingRuleListResultIterator struct {
12191	i    int
12192	page LoadBalancerLoadBalancingRuleListResultPage
12193}
12194
12195// NextWithContext advances to the next value.  If there was an error making
12196// the request the iterator does not advance and the error is returned.
12197func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12198	if tracing.IsEnabled() {
12199		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
12200		defer func() {
12201			sc := -1
12202			if iter.Response().Response.Response != nil {
12203				sc = iter.Response().Response.Response.StatusCode
12204			}
12205			tracing.EndSpan(ctx, sc, err)
12206		}()
12207	}
12208	iter.i++
12209	if iter.i < len(iter.page.Values()) {
12210		return nil
12211	}
12212	err = iter.page.NextWithContext(ctx)
12213	if err != nil {
12214		iter.i--
12215		return err
12216	}
12217	iter.i = 0
12218	return nil
12219}
12220
12221// Next advances to the next value.  If there was an error making
12222// the request the iterator does not advance and the error is returned.
12223// Deprecated: Use NextWithContext() instead.
12224func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
12225	return iter.NextWithContext(context.Background())
12226}
12227
12228// NotDone returns true if the enumeration should be started or is not yet complete.
12229func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
12230	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12231}
12232
12233// Response returns the raw server response from the last page request.
12234func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
12235	return iter.page.Response()
12236}
12237
12238// Value returns the current value or a zero-initialized value if the
12239// iterator has advanced beyond the end of the collection.
12240func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
12241	if !iter.page.NotDone() {
12242		return LoadBalancingRule{}
12243	}
12244	return iter.page.Values()[iter.i]
12245}
12246
12247// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
12248func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
12249	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
12250}
12251
12252// IsEmpty returns true if the ListResult contains no values.
12253func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
12254	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
12255}
12256
12257// hasNextLink returns true if the NextLink is not empty.
12258func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
12259	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
12260}
12261
12262// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
12263// It returns nil if no more results exist.
12264func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12265	if !lblbrlr.hasNextLink() {
12266		return nil, nil
12267	}
12268	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12269		autorest.AsJSON(),
12270		autorest.AsGet(),
12271		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
12272}
12273
12274// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
12275type LoadBalancerLoadBalancingRuleListResultPage struct {
12276	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
12277	lblbrlr LoadBalancerLoadBalancingRuleListResult
12278}
12279
12280// NextWithContext advances to the next page of values.  If there was an error making
12281// the request the page does not advance and the error is returned.
12282func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12283	if tracing.IsEnabled() {
12284		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
12285		defer func() {
12286			sc := -1
12287			if page.Response().Response.Response != nil {
12288				sc = page.Response().Response.Response.StatusCode
12289			}
12290			tracing.EndSpan(ctx, sc, err)
12291		}()
12292	}
12293	for {
12294		next, err := page.fn(ctx, page.lblbrlr)
12295		if err != nil {
12296			return err
12297		}
12298		page.lblbrlr = next
12299		if !next.hasNextLink() || !next.IsEmpty() {
12300			break
12301		}
12302	}
12303	return nil
12304}
12305
12306// Next advances to the next page of values.  If there was an error making
12307// the request the page does not advance and the error is returned.
12308// Deprecated: Use NextWithContext() instead.
12309func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
12310	return page.NextWithContext(context.Background())
12311}
12312
12313// NotDone returns true if the page enumeration should be started or is not yet complete.
12314func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
12315	return !page.lblbrlr.IsEmpty()
12316}
12317
12318// Response returns the raw server response from the last page request.
12319func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
12320	return page.lblbrlr
12321}
12322
12323// Values returns the slice of values for the current page or nil if there are no values.
12324func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
12325	if page.lblbrlr.IsEmpty() {
12326		return nil
12327	}
12328	return *page.lblbrlr.Value
12329}
12330
12331// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
12332func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
12333	return LoadBalancerLoadBalancingRuleListResultPage{
12334		fn:      getNextPage,
12335		lblbrlr: cur,
12336	}
12337}
12338
12339// LoadBalancerProbeListResult response for ListProbe API service call.
12340type LoadBalancerProbeListResult struct {
12341	autorest.Response `json:"-"`
12342	// Value - A list of probes in a load balancer.
12343	Value *[]Probe `json:"value,omitempty"`
12344	// NextLink - READ-ONLY; The URL to get the next set of results.
12345	NextLink *string `json:"nextLink,omitempty"`
12346}
12347
12348// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
12349func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
12350	objectMap := make(map[string]interface{})
12351	if lbplr.Value != nil {
12352		objectMap["value"] = lbplr.Value
12353	}
12354	return json.Marshal(objectMap)
12355}
12356
12357// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
12358type LoadBalancerProbeListResultIterator struct {
12359	i    int
12360	page LoadBalancerProbeListResultPage
12361}
12362
12363// NextWithContext advances to the next value.  If there was an error making
12364// the request the iterator does not advance and the error is returned.
12365func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
12366	if tracing.IsEnabled() {
12367		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
12368		defer func() {
12369			sc := -1
12370			if iter.Response().Response.Response != nil {
12371				sc = iter.Response().Response.Response.StatusCode
12372			}
12373			tracing.EndSpan(ctx, sc, err)
12374		}()
12375	}
12376	iter.i++
12377	if iter.i < len(iter.page.Values()) {
12378		return nil
12379	}
12380	err = iter.page.NextWithContext(ctx)
12381	if err != nil {
12382		iter.i--
12383		return err
12384	}
12385	iter.i = 0
12386	return nil
12387}
12388
12389// Next advances to the next value.  If there was an error making
12390// the request the iterator does not advance and the error is returned.
12391// Deprecated: Use NextWithContext() instead.
12392func (iter *LoadBalancerProbeListResultIterator) Next() error {
12393	return iter.NextWithContext(context.Background())
12394}
12395
12396// NotDone returns true if the enumeration should be started or is not yet complete.
12397func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
12398	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12399}
12400
12401// Response returns the raw server response from the last page request.
12402func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
12403	return iter.page.Response()
12404}
12405
12406// Value returns the current value or a zero-initialized value if the
12407// iterator has advanced beyond the end of the collection.
12408func (iter LoadBalancerProbeListResultIterator) Value() Probe {
12409	if !iter.page.NotDone() {
12410		return Probe{}
12411	}
12412	return iter.page.Values()[iter.i]
12413}
12414
12415// Creates a new instance of the LoadBalancerProbeListResultIterator type.
12416func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
12417	return LoadBalancerProbeListResultIterator{page: page}
12418}
12419
12420// IsEmpty returns true if the ListResult contains no values.
12421func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
12422	return lbplr.Value == nil || len(*lbplr.Value) == 0
12423}
12424
12425// hasNextLink returns true if the NextLink is not empty.
12426func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
12427	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
12428}
12429
12430// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
12431// It returns nil if no more results exist.
12432func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
12433	if !lbplr.hasNextLink() {
12434		return nil, nil
12435	}
12436	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12437		autorest.AsJSON(),
12438		autorest.AsGet(),
12439		autorest.WithBaseURL(to.String(lbplr.NextLink)))
12440}
12441
12442// LoadBalancerProbeListResultPage contains a page of Probe values.
12443type LoadBalancerProbeListResultPage struct {
12444	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
12445	lbplr LoadBalancerProbeListResult
12446}
12447
12448// NextWithContext advances to the next page of values.  If there was an error making
12449// the request the page does not advance and the error is returned.
12450func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
12451	if tracing.IsEnabled() {
12452		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
12453		defer func() {
12454			sc := -1
12455			if page.Response().Response.Response != nil {
12456				sc = page.Response().Response.Response.StatusCode
12457			}
12458			tracing.EndSpan(ctx, sc, err)
12459		}()
12460	}
12461	for {
12462		next, err := page.fn(ctx, page.lbplr)
12463		if err != nil {
12464			return err
12465		}
12466		page.lbplr = next
12467		if !next.hasNextLink() || !next.IsEmpty() {
12468			break
12469		}
12470	}
12471	return nil
12472}
12473
12474// Next advances to the next page of values.  If there was an error making
12475// the request the page does not advance and the error is returned.
12476// Deprecated: Use NextWithContext() instead.
12477func (page *LoadBalancerProbeListResultPage) Next() error {
12478	return page.NextWithContext(context.Background())
12479}
12480
12481// NotDone returns true if the page enumeration should be started or is not yet complete.
12482func (page LoadBalancerProbeListResultPage) NotDone() bool {
12483	return !page.lbplr.IsEmpty()
12484}
12485
12486// Response returns the raw server response from the last page request.
12487func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
12488	return page.lbplr
12489}
12490
12491// Values returns the slice of values for the current page or nil if there are no values.
12492func (page LoadBalancerProbeListResultPage) Values() []Probe {
12493	if page.lbplr.IsEmpty() {
12494		return nil
12495	}
12496	return *page.lbplr.Value
12497}
12498
12499// Creates a new instance of the LoadBalancerProbeListResultPage type.
12500func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
12501	return LoadBalancerProbeListResultPage{
12502		fn:    getNextPage,
12503		lbplr: cur,
12504	}
12505}
12506
12507// LoadBalancerPropertiesFormat properties of the load balancer.
12508type LoadBalancerPropertiesFormat struct {
12509	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
12510	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
12511	// BackendAddressPools - Collection of backend address pools used by a load balancer
12512	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
12513	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
12514	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
12515	// Probes - Collection of probe objects used in the load balancer
12516	Probes *[]Probe `json:"probes,omitempty"`
12517	// 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.
12518	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
12519	// 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.
12520	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
12521	// OutboundNatRules - The outbound NAT rules.
12522	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
12523	// ResourceGUID - The resource GUID property of the load balancer resource.
12524	ResourceGUID *string `json:"resourceGuid,omitempty"`
12525	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12526	ProvisioningState *string `json:"provisioningState,omitempty"`
12527}
12528
12529// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12530// long-running operation.
12531type LoadBalancersCreateOrUpdateFuture struct {
12532	azure.FutureAPI
12533	// Result returns the result of the asynchronous operation.
12534	// If the operation has not completed it will return an error.
12535	Result func(LoadBalancersClient) (LoadBalancer, error)
12536}
12537
12538// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12539func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12540	var azFuture azure.Future
12541	if err := json.Unmarshal(body, &azFuture); err != nil {
12542		return err
12543	}
12544	future.FutureAPI = &azFuture
12545	future.Result = future.result
12546	return nil
12547}
12548
12549// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
12550func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12551	var done bool
12552	done, err = future.DoneWithContext(context.Background(), client)
12553	if err != nil {
12554		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12555		return
12556	}
12557	if !done {
12558		lb.Response.Response = future.Response()
12559		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
12560		return
12561	}
12562	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12563	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12564		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
12565		if err != nil {
12566			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
12567		}
12568	}
12569	return
12570}
12571
12572// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12573// operation.
12574type LoadBalancersDeleteFuture struct {
12575	azure.FutureAPI
12576	// Result returns the result of the asynchronous operation.
12577	// If the operation has not completed it will return an error.
12578	Result func(LoadBalancersClient) (autorest.Response, error)
12579}
12580
12581// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12582func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
12583	var azFuture azure.Future
12584	if err := json.Unmarshal(body, &azFuture); err != nil {
12585		return err
12586	}
12587	future.FutureAPI = &azFuture
12588	future.Result = future.result
12589	return nil
12590}
12591
12592// result is the default implementation for LoadBalancersDeleteFuture.Result.
12593func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
12594	var done bool
12595	done, err = future.DoneWithContext(context.Background(), client)
12596	if err != nil {
12597		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
12598		return
12599	}
12600	if !done {
12601		ar.Response = future.Response()
12602		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
12603		return
12604	}
12605	ar.Response = future.Response()
12606	return
12607}
12608
12609// LoadBalancerSku SKU of a load balancer
12610type LoadBalancerSku struct {
12611	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
12612	Name LoadBalancerSkuName `json:"name,omitempty"`
12613}
12614
12615// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12616// operation.
12617type LoadBalancersUpdateTagsFuture struct {
12618	azure.FutureAPI
12619	// Result returns the result of the asynchronous operation.
12620	// If the operation has not completed it will return an error.
12621	Result func(LoadBalancersClient) (LoadBalancer, error)
12622}
12623
12624// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12625func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
12626	var azFuture azure.Future
12627	if err := json.Unmarshal(body, &azFuture); err != nil {
12628		return err
12629	}
12630	future.FutureAPI = &azFuture
12631	future.Result = future.result
12632	return nil
12633}
12634
12635// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
12636func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
12637	var done bool
12638	done, err = future.DoneWithContext(context.Background(), client)
12639	if err != nil {
12640		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
12641		return
12642	}
12643	if !done {
12644		lb.Response.Response = future.Response()
12645		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
12646		return
12647	}
12648	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12649	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
12650		lb, err = client.UpdateTagsResponder(lb.Response.Response)
12651		if err != nil {
12652			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
12653		}
12654	}
12655	return
12656}
12657
12658// LoadBalancingRule a load balancing rule for a load balancer.
12659type LoadBalancingRule struct {
12660	autorest.Response `json:"-"`
12661	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
12662	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
12663	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12664	Name *string `json:"name,omitempty"`
12665	// Etag - A unique read-only string that changes whenever the resource is updated.
12666	Etag *string `json:"etag,omitempty"`
12667	// ID - Resource ID.
12668	ID *string `json:"id,omitempty"`
12669}
12670
12671// MarshalJSON is the custom marshaler for LoadBalancingRule.
12672func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
12673	objectMap := make(map[string]interface{})
12674	if lbr.LoadBalancingRulePropertiesFormat != nil {
12675		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
12676	}
12677	if lbr.Name != nil {
12678		objectMap["name"] = lbr.Name
12679	}
12680	if lbr.Etag != nil {
12681		objectMap["etag"] = lbr.Etag
12682	}
12683	if lbr.ID != nil {
12684		objectMap["id"] = lbr.ID
12685	}
12686	return json.Marshal(objectMap)
12687}
12688
12689// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
12690func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
12691	var m map[string]*json.RawMessage
12692	err := json.Unmarshal(body, &m)
12693	if err != nil {
12694		return err
12695	}
12696	for k, v := range m {
12697		switch k {
12698		case "properties":
12699			if v != nil {
12700				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
12701				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
12702				if err != nil {
12703					return err
12704				}
12705				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
12706			}
12707		case "name":
12708			if v != nil {
12709				var name string
12710				err = json.Unmarshal(*v, &name)
12711				if err != nil {
12712					return err
12713				}
12714				lbr.Name = &name
12715			}
12716		case "etag":
12717			if v != nil {
12718				var etag string
12719				err = json.Unmarshal(*v, &etag)
12720				if err != nil {
12721					return err
12722				}
12723				lbr.Etag = &etag
12724			}
12725		case "id":
12726			if v != nil {
12727				var ID string
12728				err = json.Unmarshal(*v, &ID)
12729				if err != nil {
12730					return err
12731				}
12732				lbr.ID = &ID
12733			}
12734		}
12735	}
12736
12737	return nil
12738}
12739
12740// LoadBalancingRulePropertiesFormat properties of the load balancer.
12741type LoadBalancingRulePropertiesFormat struct {
12742	// FrontendIPConfiguration - A reference to frontend IP addresses.
12743	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12744	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
12745	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
12746	// Probe - The reference of the load balancer probe used by the load balancing rule.
12747	Probe *SubResource `json:"probe,omitempty"`
12748	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12749	Protocol TransportProtocol `json:"protocol,omitempty"`
12750	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
12751	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
12752	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
12753	FrontendPort *int32 `json:"frontendPort,omitempty"`
12754	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
12755	BackendPort *int32 `json:"backendPort,omitempty"`
12756	// 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.
12757	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12758	// 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.
12759	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12760	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
12761	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
12762	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12763	ProvisioningState *string `json:"provisioningState,omitempty"`
12764}
12765
12766// LocalNetworkGateway a common class for general resource information
12767type LocalNetworkGateway struct {
12768	autorest.Response `json:"-"`
12769	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
12770	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
12771	// Etag - A unique read-only string that changes whenever the resource is updated.
12772	Etag *string `json:"etag,omitempty"`
12773	// ID - Resource ID.
12774	ID *string `json:"id,omitempty"`
12775	// Name - READ-ONLY; Resource name.
12776	Name *string `json:"name,omitempty"`
12777	// Type - READ-ONLY; Resource type.
12778	Type *string `json:"type,omitempty"`
12779	// Location - Resource location.
12780	Location *string `json:"location,omitempty"`
12781	// Tags - Resource tags.
12782	Tags map[string]*string `json:"tags"`
12783}
12784
12785// MarshalJSON is the custom marshaler for LocalNetworkGateway.
12786func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
12787	objectMap := make(map[string]interface{})
12788	if lng.LocalNetworkGatewayPropertiesFormat != nil {
12789		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
12790	}
12791	if lng.Etag != nil {
12792		objectMap["etag"] = lng.Etag
12793	}
12794	if lng.ID != nil {
12795		objectMap["id"] = lng.ID
12796	}
12797	if lng.Location != nil {
12798		objectMap["location"] = lng.Location
12799	}
12800	if lng.Tags != nil {
12801		objectMap["tags"] = lng.Tags
12802	}
12803	return json.Marshal(objectMap)
12804}
12805
12806// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
12807func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
12808	var m map[string]*json.RawMessage
12809	err := json.Unmarshal(body, &m)
12810	if err != nil {
12811		return err
12812	}
12813	for k, v := range m {
12814		switch k {
12815		case "properties":
12816			if v != nil {
12817				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
12818				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
12819				if err != nil {
12820					return err
12821				}
12822				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
12823			}
12824		case "etag":
12825			if v != nil {
12826				var etag string
12827				err = json.Unmarshal(*v, &etag)
12828				if err != nil {
12829					return err
12830				}
12831				lng.Etag = &etag
12832			}
12833		case "id":
12834			if v != nil {
12835				var ID string
12836				err = json.Unmarshal(*v, &ID)
12837				if err != nil {
12838					return err
12839				}
12840				lng.ID = &ID
12841			}
12842		case "name":
12843			if v != nil {
12844				var name string
12845				err = json.Unmarshal(*v, &name)
12846				if err != nil {
12847					return err
12848				}
12849				lng.Name = &name
12850			}
12851		case "type":
12852			if v != nil {
12853				var typeVar string
12854				err = json.Unmarshal(*v, &typeVar)
12855				if err != nil {
12856					return err
12857				}
12858				lng.Type = &typeVar
12859			}
12860		case "location":
12861			if v != nil {
12862				var location string
12863				err = json.Unmarshal(*v, &location)
12864				if err != nil {
12865					return err
12866				}
12867				lng.Location = &location
12868			}
12869		case "tags":
12870			if v != nil {
12871				var tags map[string]*string
12872				err = json.Unmarshal(*v, &tags)
12873				if err != nil {
12874					return err
12875				}
12876				lng.Tags = tags
12877			}
12878		}
12879	}
12880
12881	return nil
12882}
12883
12884// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
12885type LocalNetworkGatewayListResult struct {
12886	autorest.Response `json:"-"`
12887	// Value - A list of local network gateways that exists in a resource group.
12888	Value *[]LocalNetworkGateway `json:"value,omitempty"`
12889	// NextLink - READ-ONLY; The URL to get the next set of results.
12890	NextLink *string `json:"nextLink,omitempty"`
12891}
12892
12893// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
12894func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
12895	objectMap := make(map[string]interface{})
12896	if lnglr.Value != nil {
12897		objectMap["value"] = lnglr.Value
12898	}
12899	return json.Marshal(objectMap)
12900}
12901
12902// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
12903// values.
12904type LocalNetworkGatewayListResultIterator struct {
12905	i    int
12906	page LocalNetworkGatewayListResultPage
12907}
12908
12909// NextWithContext advances to the next value.  If there was an error making
12910// the request the iterator does not advance and the error is returned.
12911func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
12912	if tracing.IsEnabled() {
12913		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
12914		defer func() {
12915			sc := -1
12916			if iter.Response().Response.Response != nil {
12917				sc = iter.Response().Response.Response.StatusCode
12918			}
12919			tracing.EndSpan(ctx, sc, err)
12920		}()
12921	}
12922	iter.i++
12923	if iter.i < len(iter.page.Values()) {
12924		return nil
12925	}
12926	err = iter.page.NextWithContext(ctx)
12927	if err != nil {
12928		iter.i--
12929		return err
12930	}
12931	iter.i = 0
12932	return nil
12933}
12934
12935// Next advances to the next value.  If there was an error making
12936// the request the iterator does not advance and the error is returned.
12937// Deprecated: Use NextWithContext() instead.
12938func (iter *LocalNetworkGatewayListResultIterator) Next() error {
12939	return iter.NextWithContext(context.Background())
12940}
12941
12942// NotDone returns true if the enumeration should be started or is not yet complete.
12943func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
12944	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12945}
12946
12947// Response returns the raw server response from the last page request.
12948func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
12949	return iter.page.Response()
12950}
12951
12952// Value returns the current value or a zero-initialized value if the
12953// iterator has advanced beyond the end of the collection.
12954func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
12955	if !iter.page.NotDone() {
12956		return LocalNetworkGateway{}
12957	}
12958	return iter.page.Values()[iter.i]
12959}
12960
12961// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
12962func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
12963	return LocalNetworkGatewayListResultIterator{page: page}
12964}
12965
12966// IsEmpty returns true if the ListResult contains no values.
12967func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
12968	return lnglr.Value == nil || len(*lnglr.Value) == 0
12969}
12970
12971// hasNextLink returns true if the NextLink is not empty.
12972func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
12973	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
12974}
12975
12976// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
12977// It returns nil if no more results exist.
12978func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
12979	if !lnglr.hasNextLink() {
12980		return nil, nil
12981	}
12982	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12983		autorest.AsJSON(),
12984		autorest.AsGet(),
12985		autorest.WithBaseURL(to.String(lnglr.NextLink)))
12986}
12987
12988// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
12989type LocalNetworkGatewayListResultPage struct {
12990	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
12991	lnglr LocalNetworkGatewayListResult
12992}
12993
12994// NextWithContext advances to the next page of values.  If there was an error making
12995// the request the page does not advance and the error is returned.
12996func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
12997	if tracing.IsEnabled() {
12998		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
12999		defer func() {
13000			sc := -1
13001			if page.Response().Response.Response != nil {
13002				sc = page.Response().Response.Response.StatusCode
13003			}
13004			tracing.EndSpan(ctx, sc, err)
13005		}()
13006	}
13007	for {
13008		next, err := page.fn(ctx, page.lnglr)
13009		if err != nil {
13010			return err
13011		}
13012		page.lnglr = next
13013		if !next.hasNextLink() || !next.IsEmpty() {
13014			break
13015		}
13016	}
13017	return nil
13018}
13019
13020// Next advances to the next page of values.  If there was an error making
13021// the request the page does not advance and the error is returned.
13022// Deprecated: Use NextWithContext() instead.
13023func (page *LocalNetworkGatewayListResultPage) Next() error {
13024	return page.NextWithContext(context.Background())
13025}
13026
13027// NotDone returns true if the page enumeration should be started or is not yet complete.
13028func (page LocalNetworkGatewayListResultPage) NotDone() bool {
13029	return !page.lnglr.IsEmpty()
13030}
13031
13032// Response returns the raw server response from the last page request.
13033func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
13034	return page.lnglr
13035}
13036
13037// Values returns the slice of values for the current page or nil if there are no values.
13038func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
13039	if page.lnglr.IsEmpty() {
13040		return nil
13041	}
13042	return *page.lnglr.Value
13043}
13044
13045// Creates a new instance of the LocalNetworkGatewayListResultPage type.
13046func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
13047	return LocalNetworkGatewayListResultPage{
13048		fn:    getNextPage,
13049		lnglr: cur,
13050	}
13051}
13052
13053// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
13054type LocalNetworkGatewayPropertiesFormat struct {
13055	// LocalNetworkAddressSpace - Local network site address space.
13056	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
13057	// GatewayIPAddress - IP address of local network gateway.
13058	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
13059	// BgpSettings - Local network gateway's BGP speaker settings.
13060	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
13061	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
13062	ResourceGUID *string `json:"resourceGuid,omitempty"`
13063	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13064	ProvisioningState *string `json:"provisioningState,omitempty"`
13065}
13066
13067// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
13068func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
13069	objectMap := make(map[string]interface{})
13070	if lngpf.LocalNetworkAddressSpace != nil {
13071		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
13072	}
13073	if lngpf.GatewayIPAddress != nil {
13074		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
13075	}
13076	if lngpf.BgpSettings != nil {
13077		objectMap["bgpSettings"] = lngpf.BgpSettings
13078	}
13079	if lngpf.ResourceGUID != nil {
13080		objectMap["resourceGuid"] = lngpf.ResourceGUID
13081	}
13082	return json.Marshal(objectMap)
13083}
13084
13085// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13086// long-running operation.
13087type LocalNetworkGatewaysCreateOrUpdateFuture struct {
13088	azure.FutureAPI
13089	// Result returns the result of the asynchronous operation.
13090	// If the operation has not completed it will return an error.
13091	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
13092}
13093
13094// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13095func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13096	var azFuture azure.Future
13097	if err := json.Unmarshal(body, &azFuture); err != nil {
13098		return err
13099	}
13100	future.FutureAPI = &azFuture
13101	future.Result = future.result
13102	return nil
13103}
13104
13105// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
13106func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13107	var done bool
13108	done, err = future.DoneWithContext(context.Background(), client)
13109	if err != nil {
13110		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13111		return
13112	}
13113	if !done {
13114		lng.Response.Response = future.Response()
13115		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
13116		return
13117	}
13118	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13119	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13120		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
13121		if err != nil {
13122			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
13123		}
13124	}
13125	return
13126}
13127
13128// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
13129// long-running operation.
13130type LocalNetworkGatewaysDeleteFuture struct {
13131	azure.FutureAPI
13132	// Result returns the result of the asynchronous operation.
13133	// If the operation has not completed it will return an error.
13134	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
13135}
13136
13137// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13138func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
13139	var azFuture azure.Future
13140	if err := json.Unmarshal(body, &azFuture); err != nil {
13141		return err
13142	}
13143	future.FutureAPI = &azFuture
13144	future.Result = future.result
13145	return nil
13146}
13147
13148// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
13149func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
13150	var done bool
13151	done, err = future.DoneWithContext(context.Background(), client)
13152	if err != nil {
13153		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
13154		return
13155	}
13156	if !done {
13157		ar.Response = future.Response()
13158		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
13159		return
13160	}
13161	ar.Response = future.Response()
13162	return
13163}
13164
13165// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
13166// long-running operation.
13167type LocalNetworkGatewaysUpdateTagsFuture struct {
13168	azure.FutureAPI
13169	// Result returns the result of the asynchronous operation.
13170	// If the operation has not completed it will return an error.
13171	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
13172}
13173
13174// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13175func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13176	var azFuture azure.Future
13177	if err := json.Unmarshal(body, &azFuture); err != nil {
13178		return err
13179	}
13180	future.FutureAPI = &azFuture
13181	future.Result = future.result
13182	return nil
13183}
13184
13185// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
13186func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
13187	var done bool
13188	done, err = future.DoneWithContext(context.Background(), client)
13189	if err != nil {
13190		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13191		return
13192	}
13193	if !done {
13194		lng.Response.Response = future.Response()
13195		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
13196		return
13197	}
13198	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13199	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
13200		lng, err = client.UpdateTagsResponder(lng.Response.Response)
13201		if err != nil {
13202			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
13203		}
13204	}
13205	return
13206}
13207
13208// LogSpecification description of logging specification.
13209type LogSpecification struct {
13210	// Name - The name of the specification.
13211	Name *string `json:"name,omitempty"`
13212	// DisplayName - The display name of the specification.
13213	DisplayName *string `json:"displayName,omitempty"`
13214	// BlobDuration - Duration of the blob.
13215	BlobDuration *string `json:"blobDuration,omitempty"`
13216}
13217
13218// MatchedRule matched rule.
13219type MatchedRule struct {
13220	// RuleName - Name of the matched network security rule.
13221	RuleName *string `json:"ruleName,omitempty"`
13222	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
13223	Action *string `json:"action,omitempty"`
13224}
13225
13226// MetricSpecification description of metrics specification.
13227type MetricSpecification struct {
13228	// Name - The name of the metric.
13229	Name *string `json:"name,omitempty"`
13230	// DisplayName - The display name of the metric.
13231	DisplayName *string `json:"displayName,omitempty"`
13232	// DisplayDescription - The description of the metric.
13233	DisplayDescription *string `json:"displayDescription,omitempty"`
13234	// Unit - Units the metric to be displayed in.
13235	Unit *string `json:"unit,omitempty"`
13236	// AggregationType - The aggregation type.
13237	AggregationType *string `json:"aggregationType,omitempty"`
13238	// Availabilities - List of availability.
13239	Availabilities *[]Availability `json:"availabilities,omitempty"`
13240	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
13241	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
13242	// FillGapWithZero - Whether gaps would be filled with zeros.
13243	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
13244	// MetricFilterPattern - Pattern for the filter of the metric.
13245	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
13246	// Dimensions - List of dimensions.
13247	Dimensions *[]Dimension `json:"dimensions,omitempty"`
13248	// IsInternal - Whether the metric is internal.
13249	IsInternal *bool `json:"isInternal,omitempty"`
13250	// SourceMdmAccount - The source MDM account.
13251	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
13252	// SourceMdmNamespace - The source MDM namespace.
13253	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
13254	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
13255	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
13256}
13257
13258// NextHopParameters parameters that define the source and destination endpoint.
13259type NextHopParameters struct {
13260	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
13261	TargetResourceID *string `json:"targetResourceId,omitempty"`
13262	// SourceIPAddress - The source IP address.
13263	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
13264	// DestinationIPAddress - The destination IP address.
13265	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
13266	// TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional).
13267	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
13268}
13269
13270// NextHopResult the information about next hop from the specified VM.
13271type NextHopResult struct {
13272	autorest.Response `json:"-"`
13273	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
13274	NextHopType NextHopType `json:"nextHopType,omitempty"`
13275	// NextHopIPAddress - Next hop IP Address
13276	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
13277	// RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'.
13278	RouteTableID *string `json:"routeTableId,omitempty"`
13279}
13280
13281// Operation network REST API operation definition.
13282type Operation struct {
13283	// Name - Operation name: {provider}/{resource}/{operation}
13284	Name *string `json:"name,omitempty"`
13285	// Display - Display metadata associated with the operation.
13286	Display *OperationDisplay `json:"display,omitempty"`
13287	// Origin - Origin of the operation.
13288	Origin *string `json:"origin,omitempty"`
13289	// OperationPropertiesFormat - Operation properties format.
13290	*OperationPropertiesFormat `json:"properties,omitempty"`
13291}
13292
13293// MarshalJSON is the custom marshaler for Operation.
13294func (o Operation) MarshalJSON() ([]byte, error) {
13295	objectMap := make(map[string]interface{})
13296	if o.Name != nil {
13297		objectMap["name"] = o.Name
13298	}
13299	if o.Display != nil {
13300		objectMap["display"] = o.Display
13301	}
13302	if o.Origin != nil {
13303		objectMap["origin"] = o.Origin
13304	}
13305	if o.OperationPropertiesFormat != nil {
13306		objectMap["properties"] = o.OperationPropertiesFormat
13307	}
13308	return json.Marshal(objectMap)
13309}
13310
13311// UnmarshalJSON is the custom unmarshaler for Operation struct.
13312func (o *Operation) UnmarshalJSON(body []byte) error {
13313	var m map[string]*json.RawMessage
13314	err := json.Unmarshal(body, &m)
13315	if err != nil {
13316		return err
13317	}
13318	for k, v := range m {
13319		switch k {
13320		case "name":
13321			if v != nil {
13322				var name string
13323				err = json.Unmarshal(*v, &name)
13324				if err != nil {
13325					return err
13326				}
13327				o.Name = &name
13328			}
13329		case "display":
13330			if v != nil {
13331				var display OperationDisplay
13332				err = json.Unmarshal(*v, &display)
13333				if err != nil {
13334					return err
13335				}
13336				o.Display = &display
13337			}
13338		case "origin":
13339			if v != nil {
13340				var origin string
13341				err = json.Unmarshal(*v, &origin)
13342				if err != nil {
13343					return err
13344				}
13345				o.Origin = &origin
13346			}
13347		case "properties":
13348			if v != nil {
13349				var operationPropertiesFormat OperationPropertiesFormat
13350				err = json.Unmarshal(*v, &operationPropertiesFormat)
13351				if err != nil {
13352					return err
13353				}
13354				o.OperationPropertiesFormat = &operationPropertiesFormat
13355			}
13356		}
13357	}
13358
13359	return nil
13360}
13361
13362// OperationDisplay display metadata associated with the operation.
13363type OperationDisplay struct {
13364	// Provider - Service provider: Microsoft Network.
13365	Provider *string `json:"provider,omitempty"`
13366	// Resource - Resource on which the operation is performed.
13367	Resource *string `json:"resource,omitempty"`
13368	// Operation - Type of the operation: get, read, delete, etc.
13369	Operation *string `json:"operation,omitempty"`
13370	// Description - Description of the operation.
13371	Description *string `json:"description,omitempty"`
13372}
13373
13374// OperationListResult result of the request to list Network operations. It contains a list of operations
13375// and a URL link to get the next set of results.
13376type OperationListResult struct {
13377	autorest.Response `json:"-"`
13378	// Value - List of Network operations supported by the Network resource provider.
13379	Value *[]Operation `json:"value,omitempty"`
13380	// NextLink - URL to get the next set of operation list results if there are any.
13381	NextLink *string `json:"nextLink,omitempty"`
13382}
13383
13384// OperationListResultIterator provides access to a complete listing of Operation values.
13385type OperationListResultIterator struct {
13386	i    int
13387	page OperationListResultPage
13388}
13389
13390// NextWithContext advances to the next value.  If there was an error making
13391// the request the iterator does not advance and the error is returned.
13392func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13393	if tracing.IsEnabled() {
13394		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
13395		defer func() {
13396			sc := -1
13397			if iter.Response().Response.Response != nil {
13398				sc = iter.Response().Response.Response.StatusCode
13399			}
13400			tracing.EndSpan(ctx, sc, err)
13401		}()
13402	}
13403	iter.i++
13404	if iter.i < len(iter.page.Values()) {
13405		return nil
13406	}
13407	err = iter.page.NextWithContext(ctx)
13408	if err != nil {
13409		iter.i--
13410		return err
13411	}
13412	iter.i = 0
13413	return nil
13414}
13415
13416// Next advances to the next value.  If there was an error making
13417// the request the iterator does not advance and the error is returned.
13418// Deprecated: Use NextWithContext() instead.
13419func (iter *OperationListResultIterator) Next() error {
13420	return iter.NextWithContext(context.Background())
13421}
13422
13423// NotDone returns true if the enumeration should be started or is not yet complete.
13424func (iter OperationListResultIterator) NotDone() bool {
13425	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13426}
13427
13428// Response returns the raw server response from the last page request.
13429func (iter OperationListResultIterator) Response() OperationListResult {
13430	return iter.page.Response()
13431}
13432
13433// Value returns the current value or a zero-initialized value if the
13434// iterator has advanced beyond the end of the collection.
13435func (iter OperationListResultIterator) Value() Operation {
13436	if !iter.page.NotDone() {
13437		return Operation{}
13438	}
13439	return iter.page.Values()[iter.i]
13440}
13441
13442// Creates a new instance of the OperationListResultIterator type.
13443func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
13444	return OperationListResultIterator{page: page}
13445}
13446
13447// IsEmpty returns true if the ListResult contains no values.
13448func (olr OperationListResult) IsEmpty() bool {
13449	return olr.Value == nil || len(*olr.Value) == 0
13450}
13451
13452// hasNextLink returns true if the NextLink is not empty.
13453func (olr OperationListResult) hasNextLink() bool {
13454	return olr.NextLink != nil && len(*olr.NextLink) != 0
13455}
13456
13457// operationListResultPreparer prepares a request to retrieve the next set of results.
13458// It returns nil if no more results exist.
13459func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
13460	if !olr.hasNextLink() {
13461		return nil, nil
13462	}
13463	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13464		autorest.AsJSON(),
13465		autorest.AsGet(),
13466		autorest.WithBaseURL(to.String(olr.NextLink)))
13467}
13468
13469// OperationListResultPage contains a page of Operation values.
13470type OperationListResultPage struct {
13471	fn  func(context.Context, OperationListResult) (OperationListResult, error)
13472	olr OperationListResult
13473}
13474
13475// NextWithContext advances to the next page of values.  If there was an error making
13476// the request the page does not advance and the error is returned.
13477func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
13478	if tracing.IsEnabled() {
13479		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
13480		defer func() {
13481			sc := -1
13482			if page.Response().Response.Response != nil {
13483				sc = page.Response().Response.Response.StatusCode
13484			}
13485			tracing.EndSpan(ctx, sc, err)
13486		}()
13487	}
13488	for {
13489		next, err := page.fn(ctx, page.olr)
13490		if err != nil {
13491			return err
13492		}
13493		page.olr = next
13494		if !next.hasNextLink() || !next.IsEmpty() {
13495			break
13496		}
13497	}
13498	return nil
13499}
13500
13501// Next advances to the next page of values.  If there was an error making
13502// the request the page does not advance and the error is returned.
13503// Deprecated: Use NextWithContext() instead.
13504func (page *OperationListResultPage) Next() error {
13505	return page.NextWithContext(context.Background())
13506}
13507
13508// NotDone returns true if the page enumeration should be started or is not yet complete.
13509func (page OperationListResultPage) NotDone() bool {
13510	return !page.olr.IsEmpty()
13511}
13512
13513// Response returns the raw server response from the last page request.
13514func (page OperationListResultPage) Response() OperationListResult {
13515	return page.olr
13516}
13517
13518// Values returns the slice of values for the current page or nil if there are no values.
13519func (page OperationListResultPage) Values() []Operation {
13520	if page.olr.IsEmpty() {
13521		return nil
13522	}
13523	return *page.olr.Value
13524}
13525
13526// Creates a new instance of the OperationListResultPage type.
13527func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
13528	return OperationListResultPage{
13529		fn:  getNextPage,
13530		olr: cur,
13531	}
13532}
13533
13534// OperationPropertiesFormat description of operation properties format.
13535type OperationPropertiesFormat struct {
13536	// ServiceSpecification - Specification of the service.
13537	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
13538}
13539
13540// OperationPropertiesFormatServiceSpecification specification of the service.
13541type OperationPropertiesFormatServiceSpecification struct {
13542	// MetricSpecifications - Operation service specification.
13543	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
13544	// LogSpecifications - Operation log specification.
13545	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
13546}
13547
13548// OutboundNatRule outbound NAT pool of the load balancer.
13549type OutboundNatRule struct {
13550	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
13551	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
13552	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13553	Name *string `json:"name,omitempty"`
13554	// Etag - A unique read-only string that changes whenever the resource is updated.
13555	Etag *string `json:"etag,omitempty"`
13556	// ID - Resource ID.
13557	ID *string `json:"id,omitempty"`
13558}
13559
13560// MarshalJSON is the custom marshaler for OutboundNatRule.
13561func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
13562	objectMap := make(map[string]interface{})
13563	if onr.OutboundNatRulePropertiesFormat != nil {
13564		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
13565	}
13566	if onr.Name != nil {
13567		objectMap["name"] = onr.Name
13568	}
13569	if onr.Etag != nil {
13570		objectMap["etag"] = onr.Etag
13571	}
13572	if onr.ID != nil {
13573		objectMap["id"] = onr.ID
13574	}
13575	return json.Marshal(objectMap)
13576}
13577
13578// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
13579func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
13580	var m map[string]*json.RawMessage
13581	err := json.Unmarshal(body, &m)
13582	if err != nil {
13583		return err
13584	}
13585	for k, v := range m {
13586		switch k {
13587		case "properties":
13588			if v != nil {
13589				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
13590				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
13591				if err != nil {
13592					return err
13593				}
13594				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
13595			}
13596		case "name":
13597			if v != nil {
13598				var name string
13599				err = json.Unmarshal(*v, &name)
13600				if err != nil {
13601					return err
13602				}
13603				onr.Name = &name
13604			}
13605		case "etag":
13606			if v != nil {
13607				var etag string
13608				err = json.Unmarshal(*v, &etag)
13609				if err != nil {
13610					return err
13611				}
13612				onr.Etag = &etag
13613			}
13614		case "id":
13615			if v != nil {
13616				var ID string
13617				err = json.Unmarshal(*v, &ID)
13618				if err != nil {
13619					return err
13620				}
13621				onr.ID = &ID
13622			}
13623		}
13624	}
13625
13626	return nil
13627}
13628
13629// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
13630type OutboundNatRulePropertiesFormat struct {
13631	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
13632	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
13633	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
13634	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
13635	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
13636	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
13637	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13638	ProvisioningState *string `json:"provisioningState,omitempty"`
13639}
13640
13641// PacketCapture parameters that define the create packet capture operation.
13642type PacketCapture struct {
13643	*PacketCaptureParameters `json:"properties,omitempty"`
13644}
13645
13646// MarshalJSON is the custom marshaler for PacketCapture.
13647func (pc PacketCapture) MarshalJSON() ([]byte, error) {
13648	objectMap := make(map[string]interface{})
13649	if pc.PacketCaptureParameters != nil {
13650		objectMap["properties"] = pc.PacketCaptureParameters
13651	}
13652	return json.Marshal(objectMap)
13653}
13654
13655// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
13656func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
13657	var m map[string]*json.RawMessage
13658	err := json.Unmarshal(body, &m)
13659	if err != nil {
13660		return err
13661	}
13662	for k, v := range m {
13663		switch k {
13664		case "properties":
13665			if v != nil {
13666				var packetCaptureParameters PacketCaptureParameters
13667				err = json.Unmarshal(*v, &packetCaptureParameters)
13668				if err != nil {
13669					return err
13670				}
13671				pc.PacketCaptureParameters = &packetCaptureParameters
13672			}
13673		}
13674	}
13675
13676	return nil
13677}
13678
13679// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
13680type PacketCaptureFilter struct {
13681	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
13682	Protocol PcProtocol `json:"protocol,omitempty"`
13683	// LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13684	LocalIPAddress *string `json:"localIPAddress,omitempty"`
13685	// RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13686	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
13687	// LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13688	LocalPort *string `json:"localPort,omitempty"`
13689	// RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null.
13690	RemotePort *string `json:"remotePort,omitempty"`
13691}
13692
13693// PacketCaptureListResult list of packet capture sessions.
13694type PacketCaptureListResult struct {
13695	autorest.Response `json:"-"`
13696	// Value - Information about packet capture sessions.
13697	Value *[]PacketCaptureResult `json:"value,omitempty"`
13698}
13699
13700// PacketCaptureParameters parameters that define the create packet capture operation.
13701type PacketCaptureParameters struct {
13702	// Target - The ID of the targeted resource, only VM is currently supported.
13703	Target *string `json:"target,omitempty"`
13704	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13705	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13706	// TotalBytesPerSession - Maximum size of the capture output.
13707	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13708	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13709	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13710	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13711	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13712}
13713
13714// PacketCaptureQueryStatusResult status of packet capture session.
13715type PacketCaptureQueryStatusResult struct {
13716	autorest.Response `json:"-"`
13717	// Name - The name of the packet capture resource.
13718	Name *string `json:"name,omitempty"`
13719	// ID - The ID of the packet capture resource.
13720	ID *string `json:"id,omitempty"`
13721	// CaptureStartTime - The start time of the packet capture session.
13722	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
13723	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
13724	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
13725	// StopReason - The reason the current packet capture session was stopped.
13726	StopReason *string `json:"stopReason,omitempty"`
13727	// PacketCaptureError - List of errors of packet capture session.
13728	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
13729}
13730
13731// PacketCaptureResult information about packet capture session.
13732type PacketCaptureResult struct {
13733	autorest.Response `json:"-"`
13734	// Name - READ-ONLY; Name of the packet capture session.
13735	Name *string `json:"name,omitempty"`
13736	// ID - READ-ONLY; ID of the packet capture operation.
13737	ID                             *string `json:"id,omitempty"`
13738	Etag                           *string `json:"etag,omitempty"`
13739	*PacketCaptureResultProperties `json:"properties,omitempty"`
13740}
13741
13742// MarshalJSON is the custom marshaler for PacketCaptureResult.
13743func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
13744	objectMap := make(map[string]interface{})
13745	if pcr.Etag != nil {
13746		objectMap["etag"] = pcr.Etag
13747	}
13748	if pcr.PacketCaptureResultProperties != nil {
13749		objectMap["properties"] = pcr.PacketCaptureResultProperties
13750	}
13751	return json.Marshal(objectMap)
13752}
13753
13754// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
13755func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
13756	var m map[string]*json.RawMessage
13757	err := json.Unmarshal(body, &m)
13758	if err != nil {
13759		return err
13760	}
13761	for k, v := range m {
13762		switch k {
13763		case "name":
13764			if v != nil {
13765				var name string
13766				err = json.Unmarshal(*v, &name)
13767				if err != nil {
13768					return err
13769				}
13770				pcr.Name = &name
13771			}
13772		case "id":
13773			if v != nil {
13774				var ID string
13775				err = json.Unmarshal(*v, &ID)
13776				if err != nil {
13777					return err
13778				}
13779				pcr.ID = &ID
13780			}
13781		case "etag":
13782			if v != nil {
13783				var etag string
13784				err = json.Unmarshal(*v, &etag)
13785				if err != nil {
13786					return err
13787				}
13788				pcr.Etag = &etag
13789			}
13790		case "properties":
13791			if v != nil {
13792				var packetCaptureResultProperties PacketCaptureResultProperties
13793				err = json.Unmarshal(*v, &packetCaptureResultProperties)
13794				if err != nil {
13795					return err
13796				}
13797				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
13798			}
13799		}
13800	}
13801
13802	return nil
13803}
13804
13805// PacketCaptureResultProperties describes the properties of a packet capture session.
13806type PacketCaptureResultProperties struct {
13807	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
13808	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13809	// Target - The ID of the targeted resource, only VM is currently supported.
13810	Target *string `json:"target,omitempty"`
13811	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
13812	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
13813	// TotalBytesPerSession - Maximum size of the capture output.
13814	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
13815	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
13816	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
13817	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
13818	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
13819}
13820
13821// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
13822// operation.
13823type PacketCapturesCreateFuture struct {
13824	azure.FutureAPI
13825	// Result returns the result of the asynchronous operation.
13826	// If the operation has not completed it will return an error.
13827	Result func(PacketCapturesClient) (PacketCaptureResult, error)
13828}
13829
13830// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13831func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
13832	var azFuture azure.Future
13833	if err := json.Unmarshal(body, &azFuture); err != nil {
13834		return err
13835	}
13836	future.FutureAPI = &azFuture
13837	future.Result = future.result
13838	return nil
13839}
13840
13841// result is the default implementation for PacketCapturesCreateFuture.Result.
13842func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
13843	var done bool
13844	done, err = future.DoneWithContext(context.Background(), client)
13845	if err != nil {
13846		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
13847		return
13848	}
13849	if !done {
13850		pcr.Response.Response = future.Response()
13851		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
13852		return
13853	}
13854	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13855	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
13856		pcr, err = client.CreateResponder(pcr.Response.Response)
13857		if err != nil {
13858			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
13859		}
13860	}
13861	return
13862}
13863
13864// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13865// operation.
13866type PacketCapturesDeleteFuture struct {
13867	azure.FutureAPI
13868	// Result returns the result of the asynchronous operation.
13869	// If the operation has not completed it will return an error.
13870	Result func(PacketCapturesClient) (autorest.Response, error)
13871}
13872
13873// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13874func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
13875	var azFuture azure.Future
13876	if err := json.Unmarshal(body, &azFuture); err != nil {
13877		return err
13878	}
13879	future.FutureAPI = &azFuture
13880	future.Result = future.result
13881	return nil
13882}
13883
13884// result is the default implementation for PacketCapturesDeleteFuture.Result.
13885func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
13886	var done bool
13887	done, err = future.DoneWithContext(context.Background(), client)
13888	if err != nil {
13889		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
13890		return
13891	}
13892	if !done {
13893		ar.Response = future.Response()
13894		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
13895		return
13896	}
13897	ar.Response = future.Response()
13898	return
13899}
13900
13901// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
13902// operation.
13903type PacketCapturesGetStatusFuture struct {
13904	azure.FutureAPI
13905	// Result returns the result of the asynchronous operation.
13906	// If the operation has not completed it will return an error.
13907	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
13908}
13909
13910// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13911func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
13912	var azFuture azure.Future
13913	if err := json.Unmarshal(body, &azFuture); err != nil {
13914		return err
13915	}
13916	future.FutureAPI = &azFuture
13917	future.Result = future.result
13918	return nil
13919}
13920
13921// result is the default implementation for PacketCapturesGetStatusFuture.Result.
13922func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
13923	var done bool
13924	done, err = future.DoneWithContext(context.Background(), client)
13925	if err != nil {
13926		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
13927		return
13928	}
13929	if !done {
13930		pcqsr.Response.Response = future.Response()
13931		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
13932		return
13933	}
13934	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13935	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
13936		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
13937		if err != nil {
13938			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
13939		}
13940	}
13941	return
13942}
13943
13944// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
13945// operation.
13946type PacketCapturesStopFuture struct {
13947	azure.FutureAPI
13948	// Result returns the result of the asynchronous operation.
13949	// If the operation has not completed it will return an error.
13950	Result func(PacketCapturesClient) (autorest.Response, error)
13951}
13952
13953// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13954func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
13955	var azFuture azure.Future
13956	if err := json.Unmarshal(body, &azFuture); err != nil {
13957		return err
13958	}
13959	future.FutureAPI = &azFuture
13960	future.Result = future.result
13961	return nil
13962}
13963
13964// result is the default implementation for PacketCapturesStopFuture.Result.
13965func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
13966	var done bool
13967	done, err = future.DoneWithContext(context.Background(), client)
13968	if err != nil {
13969		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
13970		return
13971	}
13972	if !done {
13973		ar.Response = future.Response()
13974		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
13975		return
13976	}
13977	ar.Response = future.Response()
13978	return
13979}
13980
13981// PacketCaptureStorageLocation describes the storage location for a packet capture session.
13982type PacketCaptureStorageLocation struct {
13983	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
13984	StorageID *string `json:"storageId,omitempty"`
13985	// StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture.
13986	StoragePath *string `json:"storagePath,omitempty"`
13987	// FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional.
13988	FilePath *string `json:"filePath,omitempty"`
13989}
13990
13991// PatchRouteFilter route Filter Resource.
13992type PatchRouteFilter struct {
13993	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
13994	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
13995	Name *string `json:"name,omitempty"`
13996	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13997	Etag *string `json:"etag,omitempty"`
13998	// Type - READ-ONLY; Resource type.
13999	Type *string `json:"type,omitempty"`
14000	// Tags - Resource tags.
14001	Tags map[string]*string `json:"tags"`
14002	// ID - Resource ID.
14003	ID *string `json:"id,omitempty"`
14004}
14005
14006// MarshalJSON is the custom marshaler for PatchRouteFilter.
14007func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
14008	objectMap := make(map[string]interface{})
14009	if prf.RouteFilterPropertiesFormat != nil {
14010		objectMap["properties"] = prf.RouteFilterPropertiesFormat
14011	}
14012	if prf.Tags != nil {
14013		objectMap["tags"] = prf.Tags
14014	}
14015	if prf.ID != nil {
14016		objectMap["id"] = prf.ID
14017	}
14018	return json.Marshal(objectMap)
14019}
14020
14021// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
14022func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
14023	var m map[string]*json.RawMessage
14024	err := json.Unmarshal(body, &m)
14025	if err != nil {
14026		return err
14027	}
14028	for k, v := range m {
14029		switch k {
14030		case "properties":
14031			if v != nil {
14032				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
14033				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
14034				if err != nil {
14035					return err
14036				}
14037				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
14038			}
14039		case "name":
14040			if v != nil {
14041				var name string
14042				err = json.Unmarshal(*v, &name)
14043				if err != nil {
14044					return err
14045				}
14046				prf.Name = &name
14047			}
14048		case "etag":
14049			if v != nil {
14050				var etag string
14051				err = json.Unmarshal(*v, &etag)
14052				if err != nil {
14053					return err
14054				}
14055				prf.Etag = &etag
14056			}
14057		case "type":
14058			if v != nil {
14059				var typeVar string
14060				err = json.Unmarshal(*v, &typeVar)
14061				if err != nil {
14062					return err
14063				}
14064				prf.Type = &typeVar
14065			}
14066		case "tags":
14067			if v != nil {
14068				var tags map[string]*string
14069				err = json.Unmarshal(*v, &tags)
14070				if err != nil {
14071					return err
14072				}
14073				prf.Tags = tags
14074			}
14075		case "id":
14076			if v != nil {
14077				var ID string
14078				err = json.Unmarshal(*v, &ID)
14079				if err != nil {
14080					return err
14081				}
14082				prf.ID = &ID
14083			}
14084		}
14085	}
14086
14087	return nil
14088}
14089
14090// PatchRouteFilterRule route Filter Rule Resource
14091type PatchRouteFilterRule struct {
14092	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
14093	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
14094	Name *string `json:"name,omitempty"`
14095	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14096	Etag *string `json:"etag,omitempty"`
14097	// ID - Resource ID.
14098	ID *string `json:"id,omitempty"`
14099}
14100
14101// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
14102func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
14103	objectMap := make(map[string]interface{})
14104	if prfr.RouteFilterRulePropertiesFormat != nil {
14105		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
14106	}
14107	if prfr.ID != nil {
14108		objectMap["id"] = prfr.ID
14109	}
14110	return json.Marshal(objectMap)
14111}
14112
14113// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
14114func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
14115	var m map[string]*json.RawMessage
14116	err := json.Unmarshal(body, &m)
14117	if err != nil {
14118		return err
14119	}
14120	for k, v := range m {
14121		switch k {
14122		case "properties":
14123			if v != nil {
14124				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
14125				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
14126				if err != nil {
14127					return err
14128				}
14129				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
14130			}
14131		case "name":
14132			if v != nil {
14133				var name string
14134				err = json.Unmarshal(*v, &name)
14135				if err != nil {
14136					return err
14137				}
14138				prfr.Name = &name
14139			}
14140		case "etag":
14141			if v != nil {
14142				var etag string
14143				err = json.Unmarshal(*v, &etag)
14144				if err != nil {
14145					return err
14146				}
14147				prfr.Etag = &etag
14148			}
14149		case "id":
14150			if v != nil {
14151				var ID string
14152				err = json.Unmarshal(*v, &ID)
14153				if err != nil {
14154					return err
14155				}
14156				prfr.ID = &ID
14157			}
14158		}
14159	}
14160
14161	return nil
14162}
14163
14164// Policies policies for vpn gateway.
14165type Policies struct {
14166	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
14167	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
14168	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
14169	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
14170}
14171
14172// Probe a load balancer probe.
14173type Probe struct {
14174	autorest.Response `json:"-"`
14175	// ProbePropertiesFormat - Properties of load balancer probe.
14176	*ProbePropertiesFormat `json:"properties,omitempty"`
14177	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
14178	Name *string `json:"name,omitempty"`
14179	// Etag - A unique read-only string that changes whenever the resource is updated.
14180	Etag *string `json:"etag,omitempty"`
14181	// ID - Resource ID.
14182	ID *string `json:"id,omitempty"`
14183}
14184
14185// MarshalJSON is the custom marshaler for Probe.
14186func (p Probe) MarshalJSON() ([]byte, error) {
14187	objectMap := make(map[string]interface{})
14188	if p.ProbePropertiesFormat != nil {
14189		objectMap["properties"] = p.ProbePropertiesFormat
14190	}
14191	if p.Name != nil {
14192		objectMap["name"] = p.Name
14193	}
14194	if p.Etag != nil {
14195		objectMap["etag"] = p.Etag
14196	}
14197	if p.ID != nil {
14198		objectMap["id"] = p.ID
14199	}
14200	return json.Marshal(objectMap)
14201}
14202
14203// UnmarshalJSON is the custom unmarshaler for Probe struct.
14204func (p *Probe) UnmarshalJSON(body []byte) error {
14205	var m map[string]*json.RawMessage
14206	err := json.Unmarshal(body, &m)
14207	if err != nil {
14208		return err
14209	}
14210	for k, v := range m {
14211		switch k {
14212		case "properties":
14213			if v != nil {
14214				var probePropertiesFormat ProbePropertiesFormat
14215				err = json.Unmarshal(*v, &probePropertiesFormat)
14216				if err != nil {
14217					return err
14218				}
14219				p.ProbePropertiesFormat = &probePropertiesFormat
14220			}
14221		case "name":
14222			if v != nil {
14223				var name string
14224				err = json.Unmarshal(*v, &name)
14225				if err != nil {
14226					return err
14227				}
14228				p.Name = &name
14229			}
14230		case "etag":
14231			if v != nil {
14232				var etag string
14233				err = json.Unmarshal(*v, &etag)
14234				if err != nil {
14235					return err
14236				}
14237				p.Etag = &etag
14238			}
14239		case "id":
14240			if v != nil {
14241				var ID string
14242				err = json.Unmarshal(*v, &ID)
14243				if err != nil {
14244					return err
14245				}
14246				p.ID = &ID
14247			}
14248		}
14249	}
14250
14251	return nil
14252}
14253
14254// ProbePropertiesFormat load balancer probe resource.
14255type ProbePropertiesFormat struct {
14256	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
14257	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
14258	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
14259	Protocol ProbeProtocol `json:"protocol,omitempty"`
14260	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
14261	Port *int32 `json:"port,omitempty"`
14262	// 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.
14263	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
14264	// 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.
14265	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
14266	// 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.
14267	RequestPath *string `json:"requestPath,omitempty"`
14268	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14269	ProvisioningState *string `json:"provisioningState,omitempty"`
14270}
14271
14272// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
14273func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
14274	objectMap := make(map[string]interface{})
14275	if ppf.Protocol != "" {
14276		objectMap["protocol"] = ppf.Protocol
14277	}
14278	if ppf.Port != nil {
14279		objectMap["port"] = ppf.Port
14280	}
14281	if ppf.IntervalInSeconds != nil {
14282		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
14283	}
14284	if ppf.NumberOfProbes != nil {
14285		objectMap["numberOfProbes"] = ppf.NumberOfProbes
14286	}
14287	if ppf.RequestPath != nil {
14288		objectMap["requestPath"] = ppf.RequestPath
14289	}
14290	if ppf.ProvisioningState != nil {
14291		objectMap["provisioningState"] = ppf.ProvisioningState
14292	}
14293	return json.Marshal(objectMap)
14294}
14295
14296// ProtocolConfiguration configuration of the protocol.
14297type ProtocolConfiguration struct {
14298	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
14299}
14300
14301// PublicIPAddress public IP address resource.
14302type PublicIPAddress struct {
14303	autorest.Response `json:"-"`
14304	// Sku - The public IP address SKU.
14305	Sku *PublicIPAddressSku `json:"sku,omitempty"`
14306	// PublicIPAddressPropertiesFormat - Public IP address properties.
14307	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
14308	// Etag - A unique read-only string that changes whenever the resource is updated.
14309	Etag *string `json:"etag,omitempty"`
14310	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
14311	Zones *[]string `json:"zones,omitempty"`
14312	// ID - Resource ID.
14313	ID *string `json:"id,omitempty"`
14314	// Name - READ-ONLY; Resource name.
14315	Name *string `json:"name,omitempty"`
14316	// Type - READ-ONLY; Resource type.
14317	Type *string `json:"type,omitempty"`
14318	// Location - Resource location.
14319	Location *string `json:"location,omitempty"`
14320	// Tags - Resource tags.
14321	Tags map[string]*string `json:"tags"`
14322}
14323
14324// MarshalJSON is the custom marshaler for PublicIPAddress.
14325func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
14326	objectMap := make(map[string]interface{})
14327	if pia.Sku != nil {
14328		objectMap["sku"] = pia.Sku
14329	}
14330	if pia.PublicIPAddressPropertiesFormat != nil {
14331		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
14332	}
14333	if pia.Etag != nil {
14334		objectMap["etag"] = pia.Etag
14335	}
14336	if pia.Zones != nil {
14337		objectMap["zones"] = pia.Zones
14338	}
14339	if pia.ID != nil {
14340		objectMap["id"] = pia.ID
14341	}
14342	if pia.Location != nil {
14343		objectMap["location"] = pia.Location
14344	}
14345	if pia.Tags != nil {
14346		objectMap["tags"] = pia.Tags
14347	}
14348	return json.Marshal(objectMap)
14349}
14350
14351// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
14352func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
14353	var m map[string]*json.RawMessage
14354	err := json.Unmarshal(body, &m)
14355	if err != nil {
14356		return err
14357	}
14358	for k, v := range m {
14359		switch k {
14360		case "sku":
14361			if v != nil {
14362				var sku PublicIPAddressSku
14363				err = json.Unmarshal(*v, &sku)
14364				if err != nil {
14365					return err
14366				}
14367				pia.Sku = &sku
14368			}
14369		case "properties":
14370			if v != nil {
14371				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
14372				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
14373				if err != nil {
14374					return err
14375				}
14376				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
14377			}
14378		case "etag":
14379			if v != nil {
14380				var etag string
14381				err = json.Unmarshal(*v, &etag)
14382				if err != nil {
14383					return err
14384				}
14385				pia.Etag = &etag
14386			}
14387		case "zones":
14388			if v != nil {
14389				var zones []string
14390				err = json.Unmarshal(*v, &zones)
14391				if err != nil {
14392					return err
14393				}
14394				pia.Zones = &zones
14395			}
14396		case "id":
14397			if v != nil {
14398				var ID string
14399				err = json.Unmarshal(*v, &ID)
14400				if err != nil {
14401					return err
14402				}
14403				pia.ID = &ID
14404			}
14405		case "name":
14406			if v != nil {
14407				var name string
14408				err = json.Unmarshal(*v, &name)
14409				if err != nil {
14410					return err
14411				}
14412				pia.Name = &name
14413			}
14414		case "type":
14415			if v != nil {
14416				var typeVar string
14417				err = json.Unmarshal(*v, &typeVar)
14418				if err != nil {
14419					return err
14420				}
14421				pia.Type = &typeVar
14422			}
14423		case "location":
14424			if v != nil {
14425				var location string
14426				err = json.Unmarshal(*v, &location)
14427				if err != nil {
14428					return err
14429				}
14430				pia.Location = &location
14431			}
14432		case "tags":
14433			if v != nil {
14434				var tags map[string]*string
14435				err = json.Unmarshal(*v, &tags)
14436				if err != nil {
14437					return err
14438				}
14439				pia.Tags = tags
14440			}
14441		}
14442	}
14443
14444	return nil
14445}
14446
14447// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
14448type PublicIPAddressDNSSettings struct {
14449	// 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.
14450	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
14451	// 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.
14452	Fqdn *string `json:"fqdn,omitempty"`
14453	// 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.
14454	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
14455}
14456
14457// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14458// long-running operation.
14459type PublicIPAddressesCreateOrUpdateFuture struct {
14460	azure.FutureAPI
14461	// Result returns the result of the asynchronous operation.
14462	// If the operation has not completed it will return an error.
14463	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
14464}
14465
14466// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14467func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14468	var azFuture azure.Future
14469	if err := json.Unmarshal(body, &azFuture); err != nil {
14470		return err
14471	}
14472	future.FutureAPI = &azFuture
14473	future.Result = future.result
14474	return nil
14475}
14476
14477// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
14478func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14479	var done bool
14480	done, err = future.DoneWithContext(context.Background(), client)
14481	if err != nil {
14482		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14483		return
14484	}
14485	if !done {
14486		pia.Response.Response = future.Response()
14487		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
14488		return
14489	}
14490	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14491	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14492		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
14493		if err != nil {
14494			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
14495		}
14496	}
14497	return
14498}
14499
14500// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14501// operation.
14502type PublicIPAddressesDeleteFuture struct {
14503	azure.FutureAPI
14504	// Result returns the result of the asynchronous operation.
14505	// If the operation has not completed it will return an error.
14506	Result func(PublicIPAddressesClient) (autorest.Response, error)
14507}
14508
14509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14510func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
14511	var azFuture azure.Future
14512	if err := json.Unmarshal(body, &azFuture); err != nil {
14513		return err
14514	}
14515	future.FutureAPI = &azFuture
14516	future.Result = future.result
14517	return nil
14518}
14519
14520// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
14521func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
14522	var done bool
14523	done, err = future.DoneWithContext(context.Background(), client)
14524	if err != nil {
14525		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
14526		return
14527	}
14528	if !done {
14529		ar.Response = future.Response()
14530		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
14531		return
14532	}
14533	ar.Response = future.Response()
14534	return
14535}
14536
14537// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14538// long-running operation.
14539type PublicIPAddressesUpdateTagsFuture struct {
14540	azure.FutureAPI
14541	// Result returns the result of the asynchronous operation.
14542	// If the operation has not completed it will return an error.
14543	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
14544}
14545
14546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14547func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14548	var azFuture azure.Future
14549	if err := json.Unmarshal(body, &azFuture); err != nil {
14550		return err
14551	}
14552	future.FutureAPI = &azFuture
14553	future.Result = future.result
14554	return nil
14555}
14556
14557// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
14558func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
14559	var done bool
14560	done, err = future.DoneWithContext(context.Background(), client)
14561	if err != nil {
14562		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14563		return
14564	}
14565	if !done {
14566		pia.Response.Response = future.Response()
14567		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
14568		return
14569	}
14570	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14571	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
14572		pia, err = client.UpdateTagsResponder(pia.Response.Response)
14573		if err != nil {
14574			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
14575		}
14576	}
14577	return
14578}
14579
14580// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
14581type PublicIPAddressListResult struct {
14582	autorest.Response `json:"-"`
14583	// Value - A list of public IP addresses that exists in a resource group.
14584	Value *[]PublicIPAddress `json:"value,omitempty"`
14585	// NextLink - The URL to get the next set of results.
14586	NextLink *string `json:"nextLink,omitempty"`
14587}
14588
14589// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
14590type PublicIPAddressListResultIterator struct {
14591	i    int
14592	page PublicIPAddressListResultPage
14593}
14594
14595// NextWithContext advances to the next value.  If there was an error making
14596// the request the iterator does not advance and the error is returned.
14597func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
14598	if tracing.IsEnabled() {
14599		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
14600		defer func() {
14601			sc := -1
14602			if iter.Response().Response.Response != nil {
14603				sc = iter.Response().Response.Response.StatusCode
14604			}
14605			tracing.EndSpan(ctx, sc, err)
14606		}()
14607	}
14608	iter.i++
14609	if iter.i < len(iter.page.Values()) {
14610		return nil
14611	}
14612	err = iter.page.NextWithContext(ctx)
14613	if err != nil {
14614		iter.i--
14615		return err
14616	}
14617	iter.i = 0
14618	return nil
14619}
14620
14621// Next advances to the next value.  If there was an error making
14622// the request the iterator does not advance and the error is returned.
14623// Deprecated: Use NextWithContext() instead.
14624func (iter *PublicIPAddressListResultIterator) Next() error {
14625	return iter.NextWithContext(context.Background())
14626}
14627
14628// NotDone returns true if the enumeration should be started or is not yet complete.
14629func (iter PublicIPAddressListResultIterator) NotDone() bool {
14630	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14631}
14632
14633// Response returns the raw server response from the last page request.
14634func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
14635	return iter.page.Response()
14636}
14637
14638// Value returns the current value or a zero-initialized value if the
14639// iterator has advanced beyond the end of the collection.
14640func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
14641	if !iter.page.NotDone() {
14642		return PublicIPAddress{}
14643	}
14644	return iter.page.Values()[iter.i]
14645}
14646
14647// Creates a new instance of the PublicIPAddressListResultIterator type.
14648func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
14649	return PublicIPAddressListResultIterator{page: page}
14650}
14651
14652// IsEmpty returns true if the ListResult contains no values.
14653func (pialr PublicIPAddressListResult) IsEmpty() bool {
14654	return pialr.Value == nil || len(*pialr.Value) == 0
14655}
14656
14657// hasNextLink returns true if the NextLink is not empty.
14658func (pialr PublicIPAddressListResult) hasNextLink() bool {
14659	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
14660}
14661
14662// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
14663// It returns nil if no more results exist.
14664func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
14665	if !pialr.hasNextLink() {
14666		return nil, nil
14667	}
14668	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14669		autorest.AsJSON(),
14670		autorest.AsGet(),
14671		autorest.WithBaseURL(to.String(pialr.NextLink)))
14672}
14673
14674// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
14675type PublicIPAddressListResultPage struct {
14676	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
14677	pialr PublicIPAddressListResult
14678}
14679
14680// NextWithContext advances to the next page of values.  If there was an error making
14681// the request the page does not advance and the error is returned.
14682func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
14683	if tracing.IsEnabled() {
14684		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
14685		defer func() {
14686			sc := -1
14687			if page.Response().Response.Response != nil {
14688				sc = page.Response().Response.Response.StatusCode
14689			}
14690			tracing.EndSpan(ctx, sc, err)
14691		}()
14692	}
14693	for {
14694		next, err := page.fn(ctx, page.pialr)
14695		if err != nil {
14696			return err
14697		}
14698		page.pialr = next
14699		if !next.hasNextLink() || !next.IsEmpty() {
14700			break
14701		}
14702	}
14703	return nil
14704}
14705
14706// Next advances to the next page of values.  If there was an error making
14707// the request the page does not advance and the error is returned.
14708// Deprecated: Use NextWithContext() instead.
14709func (page *PublicIPAddressListResultPage) Next() error {
14710	return page.NextWithContext(context.Background())
14711}
14712
14713// NotDone returns true if the page enumeration should be started or is not yet complete.
14714func (page PublicIPAddressListResultPage) NotDone() bool {
14715	return !page.pialr.IsEmpty()
14716}
14717
14718// Response returns the raw server response from the last page request.
14719func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
14720	return page.pialr
14721}
14722
14723// Values returns the slice of values for the current page or nil if there are no values.
14724func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
14725	if page.pialr.IsEmpty() {
14726		return nil
14727	}
14728	return *page.pialr.Value
14729}
14730
14731// Creates a new instance of the PublicIPAddressListResultPage type.
14732func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
14733	return PublicIPAddressListResultPage{
14734		fn:    getNextPage,
14735		pialr: cur,
14736	}
14737}
14738
14739// PublicIPAddressPropertiesFormat public IP address properties.
14740type PublicIPAddressPropertiesFormat struct {
14741	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14742	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
14743	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
14744	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
14745	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
14746	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
14747	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
14748	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
14749	// IPTags - The list of tags associated with the public IP address.
14750	IPTags *[]IPTag `json:"ipTags,omitempty"`
14751	// IPAddress - The IP address associated with the public IP address resource.
14752	IPAddress *string `json:"ipAddress,omitempty"`
14753	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
14754	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
14755	// ResourceGUID - The resource GUID property of the public IP resource.
14756	ResourceGUID *string `json:"resourceGuid,omitempty"`
14757	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14758	ProvisioningState *string `json:"provisioningState,omitempty"`
14759}
14760
14761// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
14762func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
14763	objectMap := make(map[string]interface{})
14764	if piapf.PublicIPAllocationMethod != "" {
14765		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
14766	}
14767	if piapf.PublicIPAddressVersion != "" {
14768		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
14769	}
14770	if piapf.DNSSettings != nil {
14771		objectMap["dnsSettings"] = piapf.DNSSettings
14772	}
14773	if piapf.IPTags != nil {
14774		objectMap["ipTags"] = piapf.IPTags
14775	}
14776	if piapf.IPAddress != nil {
14777		objectMap["ipAddress"] = piapf.IPAddress
14778	}
14779	if piapf.IdleTimeoutInMinutes != nil {
14780		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
14781	}
14782	if piapf.ResourceGUID != nil {
14783		objectMap["resourceGuid"] = piapf.ResourceGUID
14784	}
14785	if piapf.ProvisioningState != nil {
14786		objectMap["provisioningState"] = piapf.ProvisioningState
14787	}
14788	return json.Marshal(objectMap)
14789}
14790
14791// PublicIPAddressSku SKU of a public IP address
14792type PublicIPAddressSku struct {
14793	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
14794	Name PublicIPAddressSkuName `json:"name,omitempty"`
14795}
14796
14797// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
14798type QueryTroubleshootingParameters struct {
14799	// TargetResourceID - The target resource ID to query the troubleshooting result.
14800	TargetResourceID *string `json:"targetResourceId,omitempty"`
14801}
14802
14803// Resource common resource representation.
14804type Resource struct {
14805	// ID - Resource ID.
14806	ID *string `json:"id,omitempty"`
14807	// Name - READ-ONLY; Resource name.
14808	Name *string `json:"name,omitempty"`
14809	// Type - READ-ONLY; Resource type.
14810	Type *string `json:"type,omitempty"`
14811	// Location - Resource location.
14812	Location *string `json:"location,omitempty"`
14813	// Tags - Resource tags.
14814	Tags map[string]*string `json:"tags"`
14815}
14816
14817// MarshalJSON is the custom marshaler for Resource.
14818func (r Resource) MarshalJSON() ([]byte, error) {
14819	objectMap := make(map[string]interface{})
14820	if r.ID != nil {
14821		objectMap["id"] = r.ID
14822	}
14823	if r.Location != nil {
14824		objectMap["location"] = r.Location
14825	}
14826	if r.Tags != nil {
14827		objectMap["tags"] = r.Tags
14828	}
14829	return json.Marshal(objectMap)
14830}
14831
14832// ResourceNavigationLink resourceNavigationLink resource.
14833type ResourceNavigationLink struct {
14834	// ResourceNavigationLinkFormat - Resource navigation link properties format.
14835	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
14836	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
14837	Name *string `json:"name,omitempty"`
14838	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
14839	Etag *string `json:"etag,omitempty"`
14840	// ID - Resource ID.
14841	ID *string `json:"id,omitempty"`
14842}
14843
14844// MarshalJSON is the custom marshaler for ResourceNavigationLink.
14845func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
14846	objectMap := make(map[string]interface{})
14847	if rnl.ResourceNavigationLinkFormat != nil {
14848		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
14849	}
14850	if rnl.Name != nil {
14851		objectMap["name"] = rnl.Name
14852	}
14853	if rnl.ID != nil {
14854		objectMap["id"] = rnl.ID
14855	}
14856	return json.Marshal(objectMap)
14857}
14858
14859// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
14860func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
14861	var m map[string]*json.RawMessage
14862	err := json.Unmarshal(body, &m)
14863	if err != nil {
14864		return err
14865	}
14866	for k, v := range m {
14867		switch k {
14868		case "properties":
14869			if v != nil {
14870				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
14871				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
14872				if err != nil {
14873					return err
14874				}
14875				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
14876			}
14877		case "name":
14878			if v != nil {
14879				var name string
14880				err = json.Unmarshal(*v, &name)
14881				if err != nil {
14882					return err
14883				}
14884				rnl.Name = &name
14885			}
14886		case "etag":
14887			if v != nil {
14888				var etag string
14889				err = json.Unmarshal(*v, &etag)
14890				if err != nil {
14891					return err
14892				}
14893				rnl.Etag = &etag
14894			}
14895		case "id":
14896			if v != nil {
14897				var ID string
14898				err = json.Unmarshal(*v, &ID)
14899				if err != nil {
14900					return err
14901				}
14902				rnl.ID = &ID
14903			}
14904		}
14905	}
14906
14907	return nil
14908}
14909
14910// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
14911type ResourceNavigationLinkFormat struct {
14912	// LinkedResourceType - Resource type of the linked resource.
14913	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
14914	// Link - Link to the external resource
14915	Link *string `json:"link,omitempty"`
14916	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
14917	ProvisioningState *string `json:"provisioningState,omitempty"`
14918}
14919
14920// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
14921func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
14922	objectMap := make(map[string]interface{})
14923	if rnlf.LinkedResourceType != nil {
14924		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
14925	}
14926	if rnlf.Link != nil {
14927		objectMap["link"] = rnlf.Link
14928	}
14929	return json.Marshal(objectMap)
14930}
14931
14932// RetentionPolicyParameters parameters that define the retention policy for flow log.
14933type RetentionPolicyParameters struct {
14934	// Days - Number of days to retain flow log records.
14935	Days *int32 `json:"days,omitempty"`
14936	// Enabled - Flag to enable/disable retention.
14937	Enabled *bool `json:"enabled,omitempty"`
14938}
14939
14940// Route route resource
14941type Route struct {
14942	autorest.Response `json:"-"`
14943	// RoutePropertiesFormat - Properties of the route.
14944	*RoutePropertiesFormat `json:"properties,omitempty"`
14945	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14946	Name *string `json:"name,omitempty"`
14947	// Etag - A unique read-only string that changes whenever the resource is updated.
14948	Etag *string `json:"etag,omitempty"`
14949	// ID - Resource ID.
14950	ID *string `json:"id,omitempty"`
14951}
14952
14953// MarshalJSON is the custom marshaler for Route.
14954func (r Route) MarshalJSON() ([]byte, error) {
14955	objectMap := make(map[string]interface{})
14956	if r.RoutePropertiesFormat != nil {
14957		objectMap["properties"] = r.RoutePropertiesFormat
14958	}
14959	if r.Name != nil {
14960		objectMap["name"] = r.Name
14961	}
14962	if r.Etag != nil {
14963		objectMap["etag"] = r.Etag
14964	}
14965	if r.ID != nil {
14966		objectMap["id"] = r.ID
14967	}
14968	return json.Marshal(objectMap)
14969}
14970
14971// UnmarshalJSON is the custom unmarshaler for Route struct.
14972func (r *Route) UnmarshalJSON(body []byte) error {
14973	var m map[string]*json.RawMessage
14974	err := json.Unmarshal(body, &m)
14975	if err != nil {
14976		return err
14977	}
14978	for k, v := range m {
14979		switch k {
14980		case "properties":
14981			if v != nil {
14982				var routePropertiesFormat RoutePropertiesFormat
14983				err = json.Unmarshal(*v, &routePropertiesFormat)
14984				if err != nil {
14985					return err
14986				}
14987				r.RoutePropertiesFormat = &routePropertiesFormat
14988			}
14989		case "name":
14990			if v != nil {
14991				var name string
14992				err = json.Unmarshal(*v, &name)
14993				if err != nil {
14994					return err
14995				}
14996				r.Name = &name
14997			}
14998		case "etag":
14999			if v != nil {
15000				var etag string
15001				err = json.Unmarshal(*v, &etag)
15002				if err != nil {
15003					return err
15004				}
15005				r.Etag = &etag
15006			}
15007		case "id":
15008			if v != nil {
15009				var ID string
15010				err = json.Unmarshal(*v, &ID)
15011				if err != nil {
15012					return err
15013				}
15014				r.ID = &ID
15015			}
15016		}
15017	}
15018
15019	return nil
15020}
15021
15022// RouteFilter route Filter Resource.
15023type RouteFilter struct {
15024	autorest.Response            `json:"-"`
15025	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
15026	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
15027	Etag *string `json:"etag,omitempty"`
15028	// ID - Resource ID.
15029	ID *string `json:"id,omitempty"`
15030	// Name - READ-ONLY; Resource name.
15031	Name *string `json:"name,omitempty"`
15032	// Type - READ-ONLY; Resource type.
15033	Type *string `json:"type,omitempty"`
15034	// Location - Resource location.
15035	Location *string `json:"location,omitempty"`
15036	// Tags - Resource tags.
15037	Tags map[string]*string `json:"tags"`
15038}
15039
15040// MarshalJSON is the custom marshaler for RouteFilter.
15041func (rf RouteFilter) MarshalJSON() ([]byte, error) {
15042	objectMap := make(map[string]interface{})
15043	if rf.RouteFilterPropertiesFormat != nil {
15044		objectMap["properties"] = rf.RouteFilterPropertiesFormat
15045	}
15046	if rf.ID != nil {
15047		objectMap["id"] = rf.ID
15048	}
15049	if rf.Location != nil {
15050		objectMap["location"] = rf.Location
15051	}
15052	if rf.Tags != nil {
15053		objectMap["tags"] = rf.Tags
15054	}
15055	return json.Marshal(objectMap)
15056}
15057
15058// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
15059func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
15060	var m map[string]*json.RawMessage
15061	err := json.Unmarshal(body, &m)
15062	if err != nil {
15063		return err
15064	}
15065	for k, v := range m {
15066		switch k {
15067		case "properties":
15068			if v != nil {
15069				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
15070				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
15071				if err != nil {
15072					return err
15073				}
15074				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
15075			}
15076		case "etag":
15077			if v != nil {
15078				var etag string
15079				err = json.Unmarshal(*v, &etag)
15080				if err != nil {
15081					return err
15082				}
15083				rf.Etag = &etag
15084			}
15085		case "id":
15086			if v != nil {
15087				var ID string
15088				err = json.Unmarshal(*v, &ID)
15089				if err != nil {
15090					return err
15091				}
15092				rf.ID = &ID
15093			}
15094		case "name":
15095			if v != nil {
15096				var name string
15097				err = json.Unmarshal(*v, &name)
15098				if err != nil {
15099					return err
15100				}
15101				rf.Name = &name
15102			}
15103		case "type":
15104			if v != nil {
15105				var typeVar string
15106				err = json.Unmarshal(*v, &typeVar)
15107				if err != nil {
15108					return err
15109				}
15110				rf.Type = &typeVar
15111			}
15112		case "location":
15113			if v != nil {
15114				var location string
15115				err = json.Unmarshal(*v, &location)
15116				if err != nil {
15117					return err
15118				}
15119				rf.Location = &location
15120			}
15121		case "tags":
15122			if v != nil {
15123				var tags map[string]*string
15124				err = json.Unmarshal(*v, &tags)
15125				if err != nil {
15126					return err
15127				}
15128				rf.Tags = tags
15129			}
15130		}
15131	}
15132
15133	return nil
15134}
15135
15136// RouteFilterListResult response for the ListRouteFilters API service call.
15137type RouteFilterListResult struct {
15138	autorest.Response `json:"-"`
15139	// Value - Gets a list of route filters in a resource group.
15140	Value *[]RouteFilter `json:"value,omitempty"`
15141	// NextLink - The URL to get the next set of results.
15142	NextLink *string `json:"nextLink,omitempty"`
15143}
15144
15145// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
15146type RouteFilterListResultIterator struct {
15147	i    int
15148	page RouteFilterListResultPage
15149}
15150
15151// NextWithContext advances to the next value.  If there was an error making
15152// the request the iterator does not advance and the error is returned.
15153func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
15154	if tracing.IsEnabled() {
15155		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
15156		defer func() {
15157			sc := -1
15158			if iter.Response().Response.Response != nil {
15159				sc = iter.Response().Response.Response.StatusCode
15160			}
15161			tracing.EndSpan(ctx, sc, err)
15162		}()
15163	}
15164	iter.i++
15165	if iter.i < len(iter.page.Values()) {
15166		return nil
15167	}
15168	err = iter.page.NextWithContext(ctx)
15169	if err != nil {
15170		iter.i--
15171		return err
15172	}
15173	iter.i = 0
15174	return nil
15175}
15176
15177// Next advances to the next value.  If there was an error making
15178// the request the iterator does not advance and the error is returned.
15179// Deprecated: Use NextWithContext() instead.
15180func (iter *RouteFilterListResultIterator) Next() error {
15181	return iter.NextWithContext(context.Background())
15182}
15183
15184// NotDone returns true if the enumeration should be started or is not yet complete.
15185func (iter RouteFilterListResultIterator) NotDone() bool {
15186	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15187}
15188
15189// Response returns the raw server response from the last page request.
15190func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
15191	return iter.page.Response()
15192}
15193
15194// Value returns the current value or a zero-initialized value if the
15195// iterator has advanced beyond the end of the collection.
15196func (iter RouteFilterListResultIterator) Value() RouteFilter {
15197	if !iter.page.NotDone() {
15198		return RouteFilter{}
15199	}
15200	return iter.page.Values()[iter.i]
15201}
15202
15203// Creates a new instance of the RouteFilterListResultIterator type.
15204func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
15205	return RouteFilterListResultIterator{page: page}
15206}
15207
15208// IsEmpty returns true if the ListResult contains no values.
15209func (rflr RouteFilterListResult) IsEmpty() bool {
15210	return rflr.Value == nil || len(*rflr.Value) == 0
15211}
15212
15213// hasNextLink returns true if the NextLink is not empty.
15214func (rflr RouteFilterListResult) hasNextLink() bool {
15215	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
15216}
15217
15218// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
15219// It returns nil if no more results exist.
15220func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
15221	if !rflr.hasNextLink() {
15222		return nil, nil
15223	}
15224	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15225		autorest.AsJSON(),
15226		autorest.AsGet(),
15227		autorest.WithBaseURL(to.String(rflr.NextLink)))
15228}
15229
15230// RouteFilterListResultPage contains a page of RouteFilter values.
15231type RouteFilterListResultPage struct {
15232	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
15233	rflr RouteFilterListResult
15234}
15235
15236// NextWithContext advances to the next page of values.  If there was an error making
15237// the request the page does not advance and the error is returned.
15238func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
15239	if tracing.IsEnabled() {
15240		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
15241		defer func() {
15242			sc := -1
15243			if page.Response().Response.Response != nil {
15244				sc = page.Response().Response.Response.StatusCode
15245			}
15246			tracing.EndSpan(ctx, sc, err)
15247		}()
15248	}
15249	for {
15250		next, err := page.fn(ctx, page.rflr)
15251		if err != nil {
15252			return err
15253		}
15254		page.rflr = next
15255		if !next.hasNextLink() || !next.IsEmpty() {
15256			break
15257		}
15258	}
15259	return nil
15260}
15261
15262// Next advances to the next page of values.  If there was an error making
15263// the request the page does not advance and the error is returned.
15264// Deprecated: Use NextWithContext() instead.
15265func (page *RouteFilterListResultPage) Next() error {
15266	return page.NextWithContext(context.Background())
15267}
15268
15269// NotDone returns true if the page enumeration should be started or is not yet complete.
15270func (page RouteFilterListResultPage) NotDone() bool {
15271	return !page.rflr.IsEmpty()
15272}
15273
15274// Response returns the raw server response from the last page request.
15275func (page RouteFilterListResultPage) Response() RouteFilterListResult {
15276	return page.rflr
15277}
15278
15279// Values returns the slice of values for the current page or nil if there are no values.
15280func (page RouteFilterListResultPage) Values() []RouteFilter {
15281	if page.rflr.IsEmpty() {
15282		return nil
15283	}
15284	return *page.rflr.Value
15285}
15286
15287// Creates a new instance of the RouteFilterListResultPage type.
15288func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
15289	return RouteFilterListResultPage{
15290		fn:   getNextPage,
15291		rflr: cur,
15292	}
15293}
15294
15295// RouteFilterPropertiesFormat route Filter Resource
15296type RouteFilterPropertiesFormat struct {
15297	// Rules - Collection of RouteFilterRules contained within a route filter.
15298	Rules *[]RouteFilterRule `json:"rules,omitempty"`
15299	// Peerings - A collection of references to express route circuit peerings.
15300	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
15301	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
15302	ProvisioningState *string `json:"provisioningState,omitempty"`
15303}
15304
15305// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
15306func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
15307	objectMap := make(map[string]interface{})
15308	if rfpf.Rules != nil {
15309		objectMap["rules"] = rfpf.Rules
15310	}
15311	if rfpf.Peerings != nil {
15312		objectMap["peerings"] = rfpf.Peerings
15313	}
15314	return json.Marshal(objectMap)
15315}
15316
15317// RouteFilterRule route Filter Rule Resource
15318type RouteFilterRule struct {
15319	autorest.Response                `json:"-"`
15320	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
15321	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15322	Name *string `json:"name,omitempty"`
15323	// Location - Resource location.
15324	Location *string `json:"location,omitempty"`
15325	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
15326	Etag *string `json:"etag,omitempty"`
15327	// ID - Resource ID.
15328	ID *string `json:"id,omitempty"`
15329}
15330
15331// MarshalJSON is the custom marshaler for RouteFilterRule.
15332func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
15333	objectMap := make(map[string]interface{})
15334	if rfr.RouteFilterRulePropertiesFormat != nil {
15335		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
15336	}
15337	if rfr.Name != nil {
15338		objectMap["name"] = rfr.Name
15339	}
15340	if rfr.Location != nil {
15341		objectMap["location"] = rfr.Location
15342	}
15343	if rfr.ID != nil {
15344		objectMap["id"] = rfr.ID
15345	}
15346	return json.Marshal(objectMap)
15347}
15348
15349// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
15350func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
15351	var m map[string]*json.RawMessage
15352	err := json.Unmarshal(body, &m)
15353	if err != nil {
15354		return err
15355	}
15356	for k, v := range m {
15357		switch k {
15358		case "properties":
15359			if v != nil {
15360				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
15361				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
15362				if err != nil {
15363					return err
15364				}
15365				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
15366			}
15367		case "name":
15368			if v != nil {
15369				var name string
15370				err = json.Unmarshal(*v, &name)
15371				if err != nil {
15372					return err
15373				}
15374				rfr.Name = &name
15375			}
15376		case "location":
15377			if v != nil {
15378				var location string
15379				err = json.Unmarshal(*v, &location)
15380				if err != nil {
15381					return err
15382				}
15383				rfr.Location = &location
15384			}
15385		case "etag":
15386			if v != nil {
15387				var etag string
15388				err = json.Unmarshal(*v, &etag)
15389				if err != nil {
15390					return err
15391				}
15392				rfr.Etag = &etag
15393			}
15394		case "id":
15395			if v != nil {
15396				var ID string
15397				err = json.Unmarshal(*v, &ID)
15398				if err != nil {
15399					return err
15400				}
15401				rfr.ID = &ID
15402			}
15403		}
15404	}
15405
15406	return nil
15407}
15408
15409// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
15410type RouteFilterRuleListResult struct {
15411	autorest.Response `json:"-"`
15412	// Value - Gets a list of RouteFilterRules in a resource group.
15413	Value *[]RouteFilterRule `json:"value,omitempty"`
15414	// NextLink - The URL to get the next set of results.
15415	NextLink *string `json:"nextLink,omitempty"`
15416}
15417
15418// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
15419type RouteFilterRuleListResultIterator struct {
15420	i    int
15421	page RouteFilterRuleListResultPage
15422}
15423
15424// NextWithContext advances to the next value.  If there was an error making
15425// the request the iterator does not advance and the error is returned.
15426func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15427	if tracing.IsEnabled() {
15428		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
15429		defer func() {
15430			sc := -1
15431			if iter.Response().Response.Response != nil {
15432				sc = iter.Response().Response.Response.StatusCode
15433			}
15434			tracing.EndSpan(ctx, sc, err)
15435		}()
15436	}
15437	iter.i++
15438	if iter.i < len(iter.page.Values()) {
15439		return nil
15440	}
15441	err = iter.page.NextWithContext(ctx)
15442	if err != nil {
15443		iter.i--
15444		return err
15445	}
15446	iter.i = 0
15447	return nil
15448}
15449
15450// Next advances to the next value.  If there was an error making
15451// the request the iterator does not advance and the error is returned.
15452// Deprecated: Use NextWithContext() instead.
15453func (iter *RouteFilterRuleListResultIterator) Next() error {
15454	return iter.NextWithContext(context.Background())
15455}
15456
15457// NotDone returns true if the enumeration should be started or is not yet complete.
15458func (iter RouteFilterRuleListResultIterator) NotDone() bool {
15459	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15460}
15461
15462// Response returns the raw server response from the last page request.
15463func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
15464	return iter.page.Response()
15465}
15466
15467// Value returns the current value or a zero-initialized value if the
15468// iterator has advanced beyond the end of the collection.
15469func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
15470	if !iter.page.NotDone() {
15471		return RouteFilterRule{}
15472	}
15473	return iter.page.Values()[iter.i]
15474}
15475
15476// Creates a new instance of the RouteFilterRuleListResultIterator type.
15477func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
15478	return RouteFilterRuleListResultIterator{page: page}
15479}
15480
15481// IsEmpty returns true if the ListResult contains no values.
15482func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
15483	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
15484}
15485
15486// hasNextLink returns true if the NextLink is not empty.
15487func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
15488	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
15489}
15490
15491// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
15492// It returns nil if no more results exist.
15493func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15494	if !rfrlr.hasNextLink() {
15495		return nil, nil
15496	}
15497	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15498		autorest.AsJSON(),
15499		autorest.AsGet(),
15500		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
15501}
15502
15503// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
15504type RouteFilterRuleListResultPage struct {
15505	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
15506	rfrlr RouteFilterRuleListResult
15507}
15508
15509// NextWithContext advances to the next page of values.  If there was an error making
15510// the request the page does not advance and the error is returned.
15511func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15512	if tracing.IsEnabled() {
15513		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
15514		defer func() {
15515			sc := -1
15516			if page.Response().Response.Response != nil {
15517				sc = page.Response().Response.Response.StatusCode
15518			}
15519			tracing.EndSpan(ctx, sc, err)
15520		}()
15521	}
15522	for {
15523		next, err := page.fn(ctx, page.rfrlr)
15524		if err != nil {
15525			return err
15526		}
15527		page.rfrlr = next
15528		if !next.hasNextLink() || !next.IsEmpty() {
15529			break
15530		}
15531	}
15532	return nil
15533}
15534
15535// Next advances to the next page of values.  If there was an error making
15536// the request the page does not advance and the error is returned.
15537// Deprecated: Use NextWithContext() instead.
15538func (page *RouteFilterRuleListResultPage) Next() error {
15539	return page.NextWithContext(context.Background())
15540}
15541
15542// NotDone returns true if the page enumeration should be started or is not yet complete.
15543func (page RouteFilterRuleListResultPage) NotDone() bool {
15544	return !page.rfrlr.IsEmpty()
15545}
15546
15547// Response returns the raw server response from the last page request.
15548func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
15549	return page.rfrlr
15550}
15551
15552// Values returns the slice of values for the current page or nil if there are no values.
15553func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
15554	if page.rfrlr.IsEmpty() {
15555		return nil
15556	}
15557	return *page.rfrlr.Value
15558}
15559
15560// Creates a new instance of the RouteFilterRuleListResultPage type.
15561func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
15562	return RouteFilterRuleListResultPage{
15563		fn:    getNextPage,
15564		rfrlr: cur,
15565	}
15566}
15567
15568// RouteFilterRulePropertiesFormat route Filter Rule Resource
15569type RouteFilterRulePropertiesFormat struct {
15570	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
15571	Access Access `json:"access,omitempty"`
15572	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
15573	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
15574	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
15575	Communities *[]string `json:"communities,omitempty"`
15576	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
15577	ProvisioningState *string `json:"provisioningState,omitempty"`
15578}
15579
15580// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
15581func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
15582	objectMap := make(map[string]interface{})
15583	if rfrpf.Access != "" {
15584		objectMap["access"] = rfrpf.Access
15585	}
15586	if rfrpf.RouteFilterRuleType != nil {
15587		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
15588	}
15589	if rfrpf.Communities != nil {
15590		objectMap["communities"] = rfrpf.Communities
15591	}
15592	return json.Marshal(objectMap)
15593}
15594
15595// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15596// long-running operation.
15597type RouteFilterRulesCreateOrUpdateFuture struct {
15598	azure.FutureAPI
15599	// Result returns the result of the asynchronous operation.
15600	// If the operation has not completed it will return an error.
15601	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
15602}
15603
15604// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15605func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15606	var azFuture azure.Future
15607	if err := json.Unmarshal(body, &azFuture); err != nil {
15608		return err
15609	}
15610	future.FutureAPI = &azFuture
15611	future.Result = future.result
15612	return nil
15613}
15614
15615// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
15616func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15617	var done bool
15618	done, err = future.DoneWithContext(context.Background(), client)
15619	if err != nil {
15620		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15621		return
15622	}
15623	if !done {
15624		rfr.Response.Response = future.Response()
15625		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
15626		return
15627	}
15628	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15629	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15630		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
15631		if err != nil {
15632			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15633		}
15634	}
15635	return
15636}
15637
15638// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15639// operation.
15640type RouteFilterRulesDeleteFuture struct {
15641	azure.FutureAPI
15642	// Result returns the result of the asynchronous operation.
15643	// If the operation has not completed it will return an error.
15644	Result func(RouteFilterRulesClient) (autorest.Response, error)
15645}
15646
15647// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15648func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
15649	var azFuture azure.Future
15650	if err := json.Unmarshal(body, &azFuture); err != nil {
15651		return err
15652	}
15653	future.FutureAPI = &azFuture
15654	future.Result = future.result
15655	return nil
15656}
15657
15658// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
15659func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
15660	var done bool
15661	done, err = future.DoneWithContext(context.Background(), client)
15662	if err != nil {
15663		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
15664		return
15665	}
15666	if !done {
15667		ar.Response = future.Response()
15668		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
15669		return
15670	}
15671	ar.Response = future.Response()
15672	return
15673}
15674
15675// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15676// operation.
15677type RouteFilterRulesUpdateFuture struct {
15678	azure.FutureAPI
15679	// Result returns the result of the asynchronous operation.
15680	// If the operation has not completed it will return an error.
15681	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
15682}
15683
15684// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15685func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
15686	var azFuture azure.Future
15687	if err := json.Unmarshal(body, &azFuture); err != nil {
15688		return err
15689	}
15690	future.FutureAPI = &azFuture
15691	future.Result = future.result
15692	return nil
15693}
15694
15695// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
15696func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
15697	var done bool
15698	done, err = future.DoneWithContext(context.Background(), client)
15699	if err != nil {
15700		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
15701		return
15702	}
15703	if !done {
15704		rfr.Response.Response = future.Response()
15705		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
15706		return
15707	}
15708	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15709	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
15710		rfr, err = client.UpdateResponder(rfr.Response.Response)
15711		if err != nil {
15712			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
15713		}
15714	}
15715	return
15716}
15717
15718// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15719// long-running operation.
15720type RouteFiltersCreateOrUpdateFuture struct {
15721	azure.FutureAPI
15722	// Result returns the result of the asynchronous operation.
15723	// If the operation has not completed it will return an error.
15724	Result func(RouteFiltersClient) (RouteFilter, error)
15725}
15726
15727// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15728func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
15729	var azFuture azure.Future
15730	if err := json.Unmarshal(body, &azFuture); err != nil {
15731		return err
15732	}
15733	future.FutureAPI = &azFuture
15734	future.Result = future.result
15735	return nil
15736}
15737
15738// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
15739func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
15740	var done bool
15741	done, err = future.DoneWithContext(context.Background(), client)
15742	if err != nil {
15743		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
15744		return
15745	}
15746	if !done {
15747		rf.Response.Response = future.Response()
15748		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
15749		return
15750	}
15751	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15752	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15753		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
15754		if err != nil {
15755			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15756		}
15757	}
15758	return
15759}
15760
15761// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15762// operation.
15763type RouteFiltersDeleteFuture struct {
15764	azure.FutureAPI
15765	// Result returns the result of the asynchronous operation.
15766	// If the operation has not completed it will return an error.
15767	Result func(RouteFiltersClient) (autorest.Response, error)
15768}
15769
15770// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15771func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
15772	var azFuture azure.Future
15773	if err := json.Unmarshal(body, &azFuture); err != nil {
15774		return err
15775	}
15776	future.FutureAPI = &azFuture
15777	future.Result = future.result
15778	return nil
15779}
15780
15781// result is the default implementation for RouteFiltersDeleteFuture.Result.
15782func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
15783	var done bool
15784	done, err = future.DoneWithContext(context.Background(), client)
15785	if err != nil {
15786		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
15787		return
15788	}
15789	if !done {
15790		ar.Response = future.Response()
15791		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
15792		return
15793	}
15794	ar.Response = future.Response()
15795	return
15796}
15797
15798// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15799// operation.
15800type RouteFiltersUpdateFuture struct {
15801	azure.FutureAPI
15802	// Result returns the result of the asynchronous operation.
15803	// If the operation has not completed it will return an error.
15804	Result func(RouteFiltersClient) (RouteFilter, error)
15805}
15806
15807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
15808func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
15809	var azFuture azure.Future
15810	if err := json.Unmarshal(body, &azFuture); err != nil {
15811		return err
15812	}
15813	future.FutureAPI = &azFuture
15814	future.Result = future.result
15815	return nil
15816}
15817
15818// result is the default implementation for RouteFiltersUpdateFuture.Result.
15819func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
15820	var done bool
15821	done, err = future.DoneWithContext(context.Background(), client)
15822	if err != nil {
15823		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
15824		return
15825	}
15826	if !done {
15827		rf.Response.Response = future.Response()
15828		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
15829		return
15830	}
15831	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
15832	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
15833		rf, err = client.UpdateResponder(rf.Response.Response)
15834		if err != nil {
15835			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
15836		}
15837	}
15838	return
15839}
15840
15841// RouteListResult response for the ListRoute API service call
15842type RouteListResult struct {
15843	autorest.Response `json:"-"`
15844	// Value - Gets a list of routes in a resource group.
15845	Value *[]Route `json:"value,omitempty"`
15846	// NextLink - The URL to get the next set of results.
15847	NextLink *string `json:"nextLink,omitempty"`
15848}
15849
15850// RouteListResultIterator provides access to a complete listing of Route values.
15851type RouteListResultIterator struct {
15852	i    int
15853	page RouteListResultPage
15854}
15855
15856// NextWithContext advances to the next value.  If there was an error making
15857// the request the iterator does not advance and the error is returned.
15858func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
15859	if tracing.IsEnabled() {
15860		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
15861		defer func() {
15862			sc := -1
15863			if iter.Response().Response.Response != nil {
15864				sc = iter.Response().Response.Response.StatusCode
15865			}
15866			tracing.EndSpan(ctx, sc, err)
15867		}()
15868	}
15869	iter.i++
15870	if iter.i < len(iter.page.Values()) {
15871		return nil
15872	}
15873	err = iter.page.NextWithContext(ctx)
15874	if err != nil {
15875		iter.i--
15876		return err
15877	}
15878	iter.i = 0
15879	return nil
15880}
15881
15882// Next advances to the next value.  If there was an error making
15883// the request the iterator does not advance and the error is returned.
15884// Deprecated: Use NextWithContext() instead.
15885func (iter *RouteListResultIterator) Next() error {
15886	return iter.NextWithContext(context.Background())
15887}
15888
15889// NotDone returns true if the enumeration should be started or is not yet complete.
15890func (iter RouteListResultIterator) NotDone() bool {
15891	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15892}
15893
15894// Response returns the raw server response from the last page request.
15895func (iter RouteListResultIterator) Response() RouteListResult {
15896	return iter.page.Response()
15897}
15898
15899// Value returns the current value or a zero-initialized value if the
15900// iterator has advanced beyond the end of the collection.
15901func (iter RouteListResultIterator) Value() Route {
15902	if !iter.page.NotDone() {
15903		return Route{}
15904	}
15905	return iter.page.Values()[iter.i]
15906}
15907
15908// Creates a new instance of the RouteListResultIterator type.
15909func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
15910	return RouteListResultIterator{page: page}
15911}
15912
15913// IsEmpty returns true if the ListResult contains no values.
15914func (rlr RouteListResult) IsEmpty() bool {
15915	return rlr.Value == nil || len(*rlr.Value) == 0
15916}
15917
15918// hasNextLink returns true if the NextLink is not empty.
15919func (rlr RouteListResult) hasNextLink() bool {
15920	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
15921}
15922
15923// routeListResultPreparer prepares a request to retrieve the next set of results.
15924// It returns nil if no more results exist.
15925func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
15926	if !rlr.hasNextLink() {
15927		return nil, nil
15928	}
15929	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15930		autorest.AsJSON(),
15931		autorest.AsGet(),
15932		autorest.WithBaseURL(to.String(rlr.NextLink)))
15933}
15934
15935// RouteListResultPage contains a page of Route values.
15936type RouteListResultPage struct {
15937	fn  func(context.Context, RouteListResult) (RouteListResult, error)
15938	rlr RouteListResult
15939}
15940
15941// NextWithContext advances to the next page of values.  If there was an error making
15942// the request the page does not advance and the error is returned.
15943func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
15944	if tracing.IsEnabled() {
15945		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
15946		defer func() {
15947			sc := -1
15948			if page.Response().Response.Response != nil {
15949				sc = page.Response().Response.Response.StatusCode
15950			}
15951			tracing.EndSpan(ctx, sc, err)
15952		}()
15953	}
15954	for {
15955		next, err := page.fn(ctx, page.rlr)
15956		if err != nil {
15957			return err
15958		}
15959		page.rlr = next
15960		if !next.hasNextLink() || !next.IsEmpty() {
15961			break
15962		}
15963	}
15964	return nil
15965}
15966
15967// Next advances to the next page of values.  If there was an error making
15968// the request the page does not advance and the error is returned.
15969// Deprecated: Use NextWithContext() instead.
15970func (page *RouteListResultPage) Next() error {
15971	return page.NextWithContext(context.Background())
15972}
15973
15974// NotDone returns true if the page enumeration should be started or is not yet complete.
15975func (page RouteListResultPage) NotDone() bool {
15976	return !page.rlr.IsEmpty()
15977}
15978
15979// Response returns the raw server response from the last page request.
15980func (page RouteListResultPage) Response() RouteListResult {
15981	return page.rlr
15982}
15983
15984// Values returns the slice of values for the current page or nil if there are no values.
15985func (page RouteListResultPage) Values() []Route {
15986	if page.rlr.IsEmpty() {
15987		return nil
15988	}
15989	return *page.rlr.Value
15990}
15991
15992// Creates a new instance of the RouteListResultPage type.
15993func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
15994	return RouteListResultPage{
15995		fn:  getNextPage,
15996		rlr: cur,
15997	}
15998}
15999
16000// RoutePropertiesFormat route resource
16001type RoutePropertiesFormat struct {
16002	// AddressPrefix - The destination CIDR to which the route applies.
16003	AddressPrefix *string `json:"addressPrefix,omitempty"`
16004	// 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'
16005	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
16006	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
16007	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
16008	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16009	ProvisioningState *string `json:"provisioningState,omitempty"`
16010}
16011
16012// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
16013// operation.
16014type RoutesCreateOrUpdateFuture struct {
16015	azure.FutureAPI
16016	// Result returns the result of the asynchronous operation.
16017	// If the operation has not completed it will return an error.
16018	Result func(RoutesClient) (Route, error)
16019}
16020
16021// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16022func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16023	var azFuture azure.Future
16024	if err := json.Unmarshal(body, &azFuture); err != nil {
16025		return err
16026	}
16027	future.FutureAPI = &azFuture
16028	future.Result = future.result
16029	return nil
16030}
16031
16032// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
16033func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
16034	var done bool
16035	done, err = future.DoneWithContext(context.Background(), client)
16036	if err != nil {
16037		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16038		return
16039	}
16040	if !done {
16041		r.Response.Response = future.Response()
16042		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
16043		return
16044	}
16045	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16046	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
16047		r, err = client.CreateOrUpdateResponder(r.Response.Response)
16048		if err != nil {
16049			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
16050		}
16051	}
16052	return
16053}
16054
16055// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
16056type RoutesDeleteFuture struct {
16057	azure.FutureAPI
16058	// Result returns the result of the asynchronous operation.
16059	// If the operation has not completed it will return an error.
16060	Result func(RoutesClient) (autorest.Response, error)
16061}
16062
16063// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16064func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
16065	var azFuture azure.Future
16066	if err := json.Unmarshal(body, &azFuture); err != nil {
16067		return err
16068	}
16069	future.FutureAPI = &azFuture
16070	future.Result = future.result
16071	return nil
16072}
16073
16074// result is the default implementation for RoutesDeleteFuture.Result.
16075func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
16076	var done bool
16077	done, err = future.DoneWithContext(context.Background(), client)
16078	if err != nil {
16079		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
16080		return
16081	}
16082	if !done {
16083		ar.Response = future.Response()
16084		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
16085		return
16086	}
16087	ar.Response = future.Response()
16088	return
16089}
16090
16091// RouteTable route table resource.
16092type RouteTable struct {
16093	autorest.Response `json:"-"`
16094	// RouteTablePropertiesFormat - Properties of the route table.
16095	*RouteTablePropertiesFormat `json:"properties,omitempty"`
16096	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16097	Etag *string `json:"etag,omitempty"`
16098	// ID - Resource ID.
16099	ID *string `json:"id,omitempty"`
16100	// Name - READ-ONLY; Resource name.
16101	Name *string `json:"name,omitempty"`
16102	// Type - READ-ONLY; Resource type.
16103	Type *string `json:"type,omitempty"`
16104	// Location - Resource location.
16105	Location *string `json:"location,omitempty"`
16106	// Tags - Resource tags.
16107	Tags map[string]*string `json:"tags"`
16108}
16109
16110// MarshalJSON is the custom marshaler for RouteTable.
16111func (rt RouteTable) MarshalJSON() ([]byte, error) {
16112	objectMap := make(map[string]interface{})
16113	if rt.RouteTablePropertiesFormat != nil {
16114		objectMap["properties"] = rt.RouteTablePropertiesFormat
16115	}
16116	if rt.Etag != nil {
16117		objectMap["etag"] = rt.Etag
16118	}
16119	if rt.ID != nil {
16120		objectMap["id"] = rt.ID
16121	}
16122	if rt.Location != nil {
16123		objectMap["location"] = rt.Location
16124	}
16125	if rt.Tags != nil {
16126		objectMap["tags"] = rt.Tags
16127	}
16128	return json.Marshal(objectMap)
16129}
16130
16131// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
16132func (rt *RouteTable) UnmarshalJSON(body []byte) error {
16133	var m map[string]*json.RawMessage
16134	err := json.Unmarshal(body, &m)
16135	if err != nil {
16136		return err
16137	}
16138	for k, v := range m {
16139		switch k {
16140		case "properties":
16141			if v != nil {
16142				var routeTablePropertiesFormat RouteTablePropertiesFormat
16143				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
16144				if err != nil {
16145					return err
16146				}
16147				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
16148			}
16149		case "etag":
16150			if v != nil {
16151				var etag string
16152				err = json.Unmarshal(*v, &etag)
16153				if err != nil {
16154					return err
16155				}
16156				rt.Etag = &etag
16157			}
16158		case "id":
16159			if v != nil {
16160				var ID string
16161				err = json.Unmarshal(*v, &ID)
16162				if err != nil {
16163					return err
16164				}
16165				rt.ID = &ID
16166			}
16167		case "name":
16168			if v != nil {
16169				var name string
16170				err = json.Unmarshal(*v, &name)
16171				if err != nil {
16172					return err
16173				}
16174				rt.Name = &name
16175			}
16176		case "type":
16177			if v != nil {
16178				var typeVar string
16179				err = json.Unmarshal(*v, &typeVar)
16180				if err != nil {
16181					return err
16182				}
16183				rt.Type = &typeVar
16184			}
16185		case "location":
16186			if v != nil {
16187				var location string
16188				err = json.Unmarshal(*v, &location)
16189				if err != nil {
16190					return err
16191				}
16192				rt.Location = &location
16193			}
16194		case "tags":
16195			if v != nil {
16196				var tags map[string]*string
16197				err = json.Unmarshal(*v, &tags)
16198				if err != nil {
16199					return err
16200				}
16201				rt.Tags = tags
16202			}
16203		}
16204	}
16205
16206	return nil
16207}
16208
16209// RouteTableListResult response for the ListRouteTable API service call.
16210type RouteTableListResult struct {
16211	autorest.Response `json:"-"`
16212	// Value - Gets a list of route tables in a resource group.
16213	Value *[]RouteTable `json:"value,omitempty"`
16214	// NextLink - The URL to get the next set of results.
16215	NextLink *string `json:"nextLink,omitempty"`
16216}
16217
16218// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
16219type RouteTableListResultIterator struct {
16220	i    int
16221	page RouteTableListResultPage
16222}
16223
16224// NextWithContext advances to the next value.  If there was an error making
16225// the request the iterator does not advance and the error is returned.
16226func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
16227	if tracing.IsEnabled() {
16228		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
16229		defer func() {
16230			sc := -1
16231			if iter.Response().Response.Response != nil {
16232				sc = iter.Response().Response.Response.StatusCode
16233			}
16234			tracing.EndSpan(ctx, sc, err)
16235		}()
16236	}
16237	iter.i++
16238	if iter.i < len(iter.page.Values()) {
16239		return nil
16240	}
16241	err = iter.page.NextWithContext(ctx)
16242	if err != nil {
16243		iter.i--
16244		return err
16245	}
16246	iter.i = 0
16247	return nil
16248}
16249
16250// Next advances to the next value.  If there was an error making
16251// the request the iterator does not advance and the error is returned.
16252// Deprecated: Use NextWithContext() instead.
16253func (iter *RouteTableListResultIterator) Next() error {
16254	return iter.NextWithContext(context.Background())
16255}
16256
16257// NotDone returns true if the enumeration should be started or is not yet complete.
16258func (iter RouteTableListResultIterator) NotDone() bool {
16259	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16260}
16261
16262// Response returns the raw server response from the last page request.
16263func (iter RouteTableListResultIterator) Response() RouteTableListResult {
16264	return iter.page.Response()
16265}
16266
16267// Value returns the current value or a zero-initialized value if the
16268// iterator has advanced beyond the end of the collection.
16269func (iter RouteTableListResultIterator) Value() RouteTable {
16270	if !iter.page.NotDone() {
16271		return RouteTable{}
16272	}
16273	return iter.page.Values()[iter.i]
16274}
16275
16276// Creates a new instance of the RouteTableListResultIterator type.
16277func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
16278	return RouteTableListResultIterator{page: page}
16279}
16280
16281// IsEmpty returns true if the ListResult contains no values.
16282func (rtlr RouteTableListResult) IsEmpty() bool {
16283	return rtlr.Value == nil || len(*rtlr.Value) == 0
16284}
16285
16286// hasNextLink returns true if the NextLink is not empty.
16287func (rtlr RouteTableListResult) hasNextLink() bool {
16288	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
16289}
16290
16291// routeTableListResultPreparer prepares a request to retrieve the next set of results.
16292// It returns nil if no more results exist.
16293func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
16294	if !rtlr.hasNextLink() {
16295		return nil, nil
16296	}
16297	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16298		autorest.AsJSON(),
16299		autorest.AsGet(),
16300		autorest.WithBaseURL(to.String(rtlr.NextLink)))
16301}
16302
16303// RouteTableListResultPage contains a page of RouteTable values.
16304type RouteTableListResultPage struct {
16305	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
16306	rtlr RouteTableListResult
16307}
16308
16309// NextWithContext advances to the next page of values.  If there was an error making
16310// the request the page does not advance and the error is returned.
16311func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
16312	if tracing.IsEnabled() {
16313		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
16314		defer func() {
16315			sc := -1
16316			if page.Response().Response.Response != nil {
16317				sc = page.Response().Response.Response.StatusCode
16318			}
16319			tracing.EndSpan(ctx, sc, err)
16320		}()
16321	}
16322	for {
16323		next, err := page.fn(ctx, page.rtlr)
16324		if err != nil {
16325			return err
16326		}
16327		page.rtlr = next
16328		if !next.hasNextLink() || !next.IsEmpty() {
16329			break
16330		}
16331	}
16332	return nil
16333}
16334
16335// Next advances to the next page of values.  If there was an error making
16336// the request the page does not advance and the error is returned.
16337// Deprecated: Use NextWithContext() instead.
16338func (page *RouteTableListResultPage) Next() error {
16339	return page.NextWithContext(context.Background())
16340}
16341
16342// NotDone returns true if the page enumeration should be started or is not yet complete.
16343func (page RouteTableListResultPage) NotDone() bool {
16344	return !page.rtlr.IsEmpty()
16345}
16346
16347// Response returns the raw server response from the last page request.
16348func (page RouteTableListResultPage) Response() RouteTableListResult {
16349	return page.rtlr
16350}
16351
16352// Values returns the slice of values for the current page or nil if there are no values.
16353func (page RouteTableListResultPage) Values() []RouteTable {
16354	if page.rtlr.IsEmpty() {
16355		return nil
16356	}
16357	return *page.rtlr.Value
16358}
16359
16360// Creates a new instance of the RouteTableListResultPage type.
16361func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
16362	return RouteTableListResultPage{
16363		fn:   getNextPage,
16364		rtlr: cur,
16365	}
16366}
16367
16368// RouteTablePropertiesFormat route Table resource
16369type RouteTablePropertiesFormat struct {
16370	// Routes - Collection of routes contained within a route table.
16371	Routes *[]Route `json:"routes,omitempty"`
16372	// Subnets - READ-ONLY; A collection of references to subnets.
16373	Subnets *[]Subnet `json:"subnets,omitempty"`
16374	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
16375	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
16376	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16377	ProvisioningState *string `json:"provisioningState,omitempty"`
16378}
16379
16380// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
16381func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
16382	objectMap := make(map[string]interface{})
16383	if rtpf.Routes != nil {
16384		objectMap["routes"] = rtpf.Routes
16385	}
16386	if rtpf.DisableBgpRoutePropagation != nil {
16387		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
16388	}
16389	if rtpf.ProvisioningState != nil {
16390		objectMap["provisioningState"] = rtpf.ProvisioningState
16391	}
16392	return json.Marshal(objectMap)
16393}
16394
16395// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16396// long-running operation.
16397type RouteTablesCreateOrUpdateFuture struct {
16398	azure.FutureAPI
16399	// Result returns the result of the asynchronous operation.
16400	// If the operation has not completed it will return an error.
16401	Result func(RouteTablesClient) (RouteTable, error)
16402}
16403
16404// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16405func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16406	var azFuture azure.Future
16407	if err := json.Unmarshal(body, &azFuture); err != nil {
16408		return err
16409	}
16410	future.FutureAPI = &azFuture
16411	future.Result = future.result
16412	return nil
16413}
16414
16415// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
16416func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
16417	var done bool
16418	done, err = future.DoneWithContext(context.Background(), client)
16419	if err != nil {
16420		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16421		return
16422	}
16423	if !done {
16424		rt.Response.Response = future.Response()
16425		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
16426		return
16427	}
16428	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16429	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
16430		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
16431		if err != nil {
16432			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
16433		}
16434	}
16435	return
16436}
16437
16438// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16439// operation.
16440type RouteTablesDeleteFuture struct {
16441	azure.FutureAPI
16442	// Result returns the result of the asynchronous operation.
16443	// If the operation has not completed it will return an error.
16444	Result func(RouteTablesClient) (autorest.Response, error)
16445}
16446
16447// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16448func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
16449	var azFuture azure.Future
16450	if err := json.Unmarshal(body, &azFuture); err != nil {
16451		return err
16452	}
16453	future.FutureAPI = &azFuture
16454	future.Result = future.result
16455	return nil
16456}
16457
16458// result is the default implementation for RouteTablesDeleteFuture.Result.
16459func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
16460	var done bool
16461	done, err = future.DoneWithContext(context.Background(), client)
16462	if err != nil {
16463		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
16464		return
16465	}
16466	if !done {
16467		ar.Response = future.Response()
16468		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
16469		return
16470	}
16471	ar.Response = future.Response()
16472	return
16473}
16474
16475// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16476// operation.
16477type RouteTablesUpdateTagsFuture struct {
16478	azure.FutureAPI
16479	// Result returns the result of the asynchronous operation.
16480	// If the operation has not completed it will return an error.
16481	Result func(RouteTablesClient) (RouteTable, error)
16482}
16483
16484// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16485func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16486	var azFuture azure.Future
16487	if err := json.Unmarshal(body, &azFuture); err != nil {
16488		return err
16489	}
16490	future.FutureAPI = &azFuture
16491	future.Result = future.result
16492	return nil
16493}
16494
16495// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
16496func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
16497	var done bool
16498	done, err = future.DoneWithContext(context.Background(), client)
16499	if err != nil {
16500		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16501		return
16502	}
16503	if !done {
16504		rt.Response.Response = future.Response()
16505		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
16506		return
16507	}
16508	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16509	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
16510		rt, err = client.UpdateTagsResponder(rt.Response.Response)
16511		if err != nil {
16512			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
16513		}
16514	}
16515	return
16516}
16517
16518// SecurityGroup networkSecurityGroup resource.
16519type SecurityGroup struct {
16520	autorest.Response `json:"-"`
16521	// SecurityGroupPropertiesFormat - Properties of the network security group
16522	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
16523	// Etag - A unique read-only string that changes whenever the resource is updated.
16524	Etag *string `json:"etag,omitempty"`
16525	// ID - Resource ID.
16526	ID *string `json:"id,omitempty"`
16527	// Name - READ-ONLY; Resource name.
16528	Name *string `json:"name,omitempty"`
16529	// Type - READ-ONLY; Resource type.
16530	Type *string `json:"type,omitempty"`
16531	// Location - Resource location.
16532	Location *string `json:"location,omitempty"`
16533	// Tags - Resource tags.
16534	Tags map[string]*string `json:"tags"`
16535}
16536
16537// MarshalJSON is the custom marshaler for SecurityGroup.
16538func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
16539	objectMap := make(map[string]interface{})
16540	if sg.SecurityGroupPropertiesFormat != nil {
16541		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
16542	}
16543	if sg.Etag != nil {
16544		objectMap["etag"] = sg.Etag
16545	}
16546	if sg.ID != nil {
16547		objectMap["id"] = sg.ID
16548	}
16549	if sg.Location != nil {
16550		objectMap["location"] = sg.Location
16551	}
16552	if sg.Tags != nil {
16553		objectMap["tags"] = sg.Tags
16554	}
16555	return json.Marshal(objectMap)
16556}
16557
16558// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
16559func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
16560	var m map[string]*json.RawMessage
16561	err := json.Unmarshal(body, &m)
16562	if err != nil {
16563		return err
16564	}
16565	for k, v := range m {
16566		switch k {
16567		case "properties":
16568			if v != nil {
16569				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
16570				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
16571				if err != nil {
16572					return err
16573				}
16574				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
16575			}
16576		case "etag":
16577			if v != nil {
16578				var etag string
16579				err = json.Unmarshal(*v, &etag)
16580				if err != nil {
16581					return err
16582				}
16583				sg.Etag = &etag
16584			}
16585		case "id":
16586			if v != nil {
16587				var ID string
16588				err = json.Unmarshal(*v, &ID)
16589				if err != nil {
16590					return err
16591				}
16592				sg.ID = &ID
16593			}
16594		case "name":
16595			if v != nil {
16596				var name string
16597				err = json.Unmarshal(*v, &name)
16598				if err != nil {
16599					return err
16600				}
16601				sg.Name = &name
16602			}
16603		case "type":
16604			if v != nil {
16605				var typeVar string
16606				err = json.Unmarshal(*v, &typeVar)
16607				if err != nil {
16608					return err
16609				}
16610				sg.Type = &typeVar
16611			}
16612		case "location":
16613			if v != nil {
16614				var location string
16615				err = json.Unmarshal(*v, &location)
16616				if err != nil {
16617					return err
16618				}
16619				sg.Location = &location
16620			}
16621		case "tags":
16622			if v != nil {
16623				var tags map[string]*string
16624				err = json.Unmarshal(*v, &tags)
16625				if err != nil {
16626					return err
16627				}
16628				sg.Tags = tags
16629			}
16630		}
16631	}
16632
16633	return nil
16634}
16635
16636// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
16637type SecurityGroupListResult struct {
16638	autorest.Response `json:"-"`
16639	// Value - A list of NetworkSecurityGroup resources.
16640	Value *[]SecurityGroup `json:"value,omitempty"`
16641	// NextLink - The URL to get the next set of results.
16642	NextLink *string `json:"nextLink,omitempty"`
16643}
16644
16645// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
16646type SecurityGroupListResultIterator struct {
16647	i    int
16648	page SecurityGroupListResultPage
16649}
16650
16651// NextWithContext advances to the next value.  If there was an error making
16652// the request the iterator does not advance and the error is returned.
16653func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
16654	if tracing.IsEnabled() {
16655		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
16656		defer func() {
16657			sc := -1
16658			if iter.Response().Response.Response != nil {
16659				sc = iter.Response().Response.Response.StatusCode
16660			}
16661			tracing.EndSpan(ctx, sc, err)
16662		}()
16663	}
16664	iter.i++
16665	if iter.i < len(iter.page.Values()) {
16666		return nil
16667	}
16668	err = iter.page.NextWithContext(ctx)
16669	if err != nil {
16670		iter.i--
16671		return err
16672	}
16673	iter.i = 0
16674	return nil
16675}
16676
16677// Next advances to the next value.  If there was an error making
16678// the request the iterator does not advance and the error is returned.
16679// Deprecated: Use NextWithContext() instead.
16680func (iter *SecurityGroupListResultIterator) Next() error {
16681	return iter.NextWithContext(context.Background())
16682}
16683
16684// NotDone returns true if the enumeration should be started or is not yet complete.
16685func (iter SecurityGroupListResultIterator) NotDone() bool {
16686	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16687}
16688
16689// Response returns the raw server response from the last page request.
16690func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
16691	return iter.page.Response()
16692}
16693
16694// Value returns the current value or a zero-initialized value if the
16695// iterator has advanced beyond the end of the collection.
16696func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
16697	if !iter.page.NotDone() {
16698		return SecurityGroup{}
16699	}
16700	return iter.page.Values()[iter.i]
16701}
16702
16703// Creates a new instance of the SecurityGroupListResultIterator type.
16704func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
16705	return SecurityGroupListResultIterator{page: page}
16706}
16707
16708// IsEmpty returns true if the ListResult contains no values.
16709func (sglr SecurityGroupListResult) IsEmpty() bool {
16710	return sglr.Value == nil || len(*sglr.Value) == 0
16711}
16712
16713// hasNextLink returns true if the NextLink is not empty.
16714func (sglr SecurityGroupListResult) hasNextLink() bool {
16715	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
16716}
16717
16718// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
16719// It returns nil if no more results exist.
16720func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
16721	if !sglr.hasNextLink() {
16722		return nil, nil
16723	}
16724	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16725		autorest.AsJSON(),
16726		autorest.AsGet(),
16727		autorest.WithBaseURL(to.String(sglr.NextLink)))
16728}
16729
16730// SecurityGroupListResultPage contains a page of SecurityGroup values.
16731type SecurityGroupListResultPage struct {
16732	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
16733	sglr SecurityGroupListResult
16734}
16735
16736// NextWithContext advances to the next page of values.  If there was an error making
16737// the request the page does not advance and the error is returned.
16738func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
16739	if tracing.IsEnabled() {
16740		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
16741		defer func() {
16742			sc := -1
16743			if page.Response().Response.Response != nil {
16744				sc = page.Response().Response.Response.StatusCode
16745			}
16746			tracing.EndSpan(ctx, sc, err)
16747		}()
16748	}
16749	for {
16750		next, err := page.fn(ctx, page.sglr)
16751		if err != nil {
16752			return err
16753		}
16754		page.sglr = next
16755		if !next.hasNextLink() || !next.IsEmpty() {
16756			break
16757		}
16758	}
16759	return nil
16760}
16761
16762// Next advances to the next page of values.  If there was an error making
16763// the request the page does not advance and the error is returned.
16764// Deprecated: Use NextWithContext() instead.
16765func (page *SecurityGroupListResultPage) Next() error {
16766	return page.NextWithContext(context.Background())
16767}
16768
16769// NotDone returns true if the page enumeration should be started or is not yet complete.
16770func (page SecurityGroupListResultPage) NotDone() bool {
16771	return !page.sglr.IsEmpty()
16772}
16773
16774// Response returns the raw server response from the last page request.
16775func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
16776	return page.sglr
16777}
16778
16779// Values returns the slice of values for the current page or nil if there are no values.
16780func (page SecurityGroupListResultPage) Values() []SecurityGroup {
16781	if page.sglr.IsEmpty() {
16782		return nil
16783	}
16784	return *page.sglr.Value
16785}
16786
16787// Creates a new instance of the SecurityGroupListResultPage type.
16788func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
16789	return SecurityGroupListResultPage{
16790		fn:   getNextPage,
16791		sglr: cur,
16792	}
16793}
16794
16795// SecurityGroupNetworkInterface network interface and all its associated security rules.
16796type SecurityGroupNetworkInterface struct {
16797	// ID - ID of the network interface.
16798	ID                       *string                   `json:"id,omitempty"`
16799	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
16800}
16801
16802// SecurityGroupPropertiesFormat network Security Group resource.
16803type SecurityGroupPropertiesFormat struct {
16804	// SecurityRules - A collection of security rules of the network security group.
16805	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
16806	// DefaultSecurityRules - The default security rules of network security group.
16807	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
16808	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
16809	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
16810	// Subnets - READ-ONLY; A collection of references to subnets.
16811	Subnets *[]Subnet `json:"subnets,omitempty"`
16812	// ResourceGUID - The resource GUID property of the network security group resource.
16813	ResourceGUID *string `json:"resourceGuid,omitempty"`
16814	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16815	ProvisioningState *string `json:"provisioningState,omitempty"`
16816}
16817
16818// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
16819func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
16820	objectMap := make(map[string]interface{})
16821	if sgpf.SecurityRules != nil {
16822		objectMap["securityRules"] = sgpf.SecurityRules
16823	}
16824	if sgpf.DefaultSecurityRules != nil {
16825		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
16826	}
16827	if sgpf.ResourceGUID != nil {
16828		objectMap["resourceGuid"] = sgpf.ResourceGUID
16829	}
16830	if sgpf.ProvisioningState != nil {
16831		objectMap["provisioningState"] = sgpf.ProvisioningState
16832	}
16833	return json.Marshal(objectMap)
16834}
16835
16836// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
16837type SecurityGroupResult struct {
16838	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
16839	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
16840	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
16841	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
16842}
16843
16844// MarshalJSON is the custom marshaler for SecurityGroupResult.
16845func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
16846	objectMap := make(map[string]interface{})
16847	if sgr.SecurityRuleAccessResult != "" {
16848		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
16849	}
16850	return json.Marshal(objectMap)
16851}
16852
16853// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16854// long-running operation.
16855type SecurityGroupsCreateOrUpdateFuture struct {
16856	azure.FutureAPI
16857	// Result returns the result of the asynchronous operation.
16858	// If the operation has not completed it will return an error.
16859	Result func(SecurityGroupsClient) (SecurityGroup, error)
16860}
16861
16862// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16863func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16864	var azFuture azure.Future
16865	if err := json.Unmarshal(body, &azFuture); err != nil {
16866		return err
16867	}
16868	future.FutureAPI = &azFuture
16869	future.Result = future.result
16870	return nil
16871}
16872
16873// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
16874func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16875	var done bool
16876	done, err = future.DoneWithContext(context.Background(), client)
16877	if err != nil {
16878		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16879		return
16880	}
16881	if !done {
16882		sg.Response.Response = future.Response()
16883		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
16884		return
16885	}
16886	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16887	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16888		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
16889		if err != nil {
16890			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
16891		}
16892	}
16893	return
16894}
16895
16896// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16897// operation.
16898type SecurityGroupsDeleteFuture struct {
16899	azure.FutureAPI
16900	// Result returns the result of the asynchronous operation.
16901	// If the operation has not completed it will return an error.
16902	Result func(SecurityGroupsClient) (autorest.Response, error)
16903}
16904
16905// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16906func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
16907	var azFuture azure.Future
16908	if err := json.Unmarshal(body, &azFuture); err != nil {
16909		return err
16910	}
16911	future.FutureAPI = &azFuture
16912	future.Result = future.result
16913	return nil
16914}
16915
16916// result is the default implementation for SecurityGroupsDeleteFuture.Result.
16917func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
16918	var done bool
16919	done, err = future.DoneWithContext(context.Background(), client)
16920	if err != nil {
16921		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
16922		return
16923	}
16924	if !done {
16925		ar.Response = future.Response()
16926		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
16927		return
16928	}
16929	ar.Response = future.Response()
16930	return
16931}
16932
16933// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16934// long-running operation.
16935type SecurityGroupsUpdateTagsFuture struct {
16936	azure.FutureAPI
16937	// Result returns the result of the asynchronous operation.
16938	// If the operation has not completed it will return an error.
16939	Result func(SecurityGroupsClient) (SecurityGroup, error)
16940}
16941
16942// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16943func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16944	var azFuture azure.Future
16945	if err := json.Unmarshal(body, &azFuture); err != nil {
16946		return err
16947	}
16948	future.FutureAPI = &azFuture
16949	future.Result = future.result
16950	return nil
16951}
16952
16953// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
16954func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
16955	var done bool
16956	done, err = future.DoneWithContext(context.Background(), client)
16957	if err != nil {
16958		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16959		return
16960	}
16961	if !done {
16962		sg.Response.Response = future.Response()
16963		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
16964		return
16965	}
16966	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16967	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
16968		sg, err = client.UpdateTagsResponder(sg.Response.Response)
16969		if err != nil {
16970			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
16971		}
16972	}
16973	return
16974}
16975
16976// SecurityGroupViewParameters parameters that define the VM to check security groups for.
16977type SecurityGroupViewParameters struct {
16978	// TargetResourceID - ID of the target VM.
16979	TargetResourceID *string `json:"targetResourceId,omitempty"`
16980}
16981
16982// SecurityGroupViewResult the information about security rules applied to the specified VM.
16983type SecurityGroupViewResult struct {
16984	autorest.Response `json:"-"`
16985	// NetworkInterfaces - List of network interfaces on the specified VM.
16986	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
16987}
16988
16989// SecurityRule network security rule.
16990type SecurityRule struct {
16991	autorest.Response `json:"-"`
16992	// SecurityRulePropertiesFormat - Properties of the security rule
16993	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
16994	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16995	Name *string `json:"name,omitempty"`
16996	// Etag - A unique read-only string that changes whenever the resource is updated.
16997	Etag *string `json:"etag,omitempty"`
16998	// ID - Resource ID.
16999	ID *string `json:"id,omitempty"`
17000}
17001
17002// MarshalJSON is the custom marshaler for SecurityRule.
17003func (sr SecurityRule) MarshalJSON() ([]byte, error) {
17004	objectMap := make(map[string]interface{})
17005	if sr.SecurityRulePropertiesFormat != nil {
17006		objectMap["properties"] = sr.SecurityRulePropertiesFormat
17007	}
17008	if sr.Name != nil {
17009		objectMap["name"] = sr.Name
17010	}
17011	if sr.Etag != nil {
17012		objectMap["etag"] = sr.Etag
17013	}
17014	if sr.ID != nil {
17015		objectMap["id"] = sr.ID
17016	}
17017	return json.Marshal(objectMap)
17018}
17019
17020// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
17021func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
17022	var m map[string]*json.RawMessage
17023	err := json.Unmarshal(body, &m)
17024	if err != nil {
17025		return err
17026	}
17027	for k, v := range m {
17028		switch k {
17029		case "properties":
17030			if v != nil {
17031				var securityRulePropertiesFormat SecurityRulePropertiesFormat
17032				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
17033				if err != nil {
17034					return err
17035				}
17036				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
17037			}
17038		case "name":
17039			if v != nil {
17040				var name string
17041				err = json.Unmarshal(*v, &name)
17042				if err != nil {
17043					return err
17044				}
17045				sr.Name = &name
17046			}
17047		case "etag":
17048			if v != nil {
17049				var etag string
17050				err = json.Unmarshal(*v, &etag)
17051				if err != nil {
17052					return err
17053				}
17054				sr.Etag = &etag
17055			}
17056		case "id":
17057			if v != nil {
17058				var ID string
17059				err = json.Unmarshal(*v, &ID)
17060				if err != nil {
17061					return err
17062				}
17063				sr.ID = &ID
17064			}
17065		}
17066	}
17067
17068	return nil
17069}
17070
17071// SecurityRuleAssociations all security rules associated with the network interface.
17072type SecurityRuleAssociations struct {
17073	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
17074	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
17075	// DefaultSecurityRules - Collection of default security rules of the network security group.
17076	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
17077	// EffectiveSecurityRules - Collection of effective security rules.
17078	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
17079}
17080
17081// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
17082// belongs to a network security group.
17083type SecurityRuleListResult struct {
17084	autorest.Response `json:"-"`
17085	// Value - The security rules in a network security group.
17086	Value *[]SecurityRule `json:"value,omitempty"`
17087	// NextLink - The URL to get the next set of results.
17088	NextLink *string `json:"nextLink,omitempty"`
17089}
17090
17091// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
17092type SecurityRuleListResultIterator struct {
17093	i    int
17094	page SecurityRuleListResultPage
17095}
17096
17097// NextWithContext advances to the next value.  If there was an error making
17098// the request the iterator does not advance and the error is returned.
17099func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17100	if tracing.IsEnabled() {
17101		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
17102		defer func() {
17103			sc := -1
17104			if iter.Response().Response.Response != nil {
17105				sc = iter.Response().Response.Response.StatusCode
17106			}
17107			tracing.EndSpan(ctx, sc, err)
17108		}()
17109	}
17110	iter.i++
17111	if iter.i < len(iter.page.Values()) {
17112		return nil
17113	}
17114	err = iter.page.NextWithContext(ctx)
17115	if err != nil {
17116		iter.i--
17117		return err
17118	}
17119	iter.i = 0
17120	return nil
17121}
17122
17123// Next advances to the next value.  If there was an error making
17124// the request the iterator does not advance and the error is returned.
17125// Deprecated: Use NextWithContext() instead.
17126func (iter *SecurityRuleListResultIterator) Next() error {
17127	return iter.NextWithContext(context.Background())
17128}
17129
17130// NotDone returns true if the enumeration should be started or is not yet complete.
17131func (iter SecurityRuleListResultIterator) NotDone() bool {
17132	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17133}
17134
17135// Response returns the raw server response from the last page request.
17136func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
17137	return iter.page.Response()
17138}
17139
17140// Value returns the current value or a zero-initialized value if the
17141// iterator has advanced beyond the end of the collection.
17142func (iter SecurityRuleListResultIterator) Value() SecurityRule {
17143	if !iter.page.NotDone() {
17144		return SecurityRule{}
17145	}
17146	return iter.page.Values()[iter.i]
17147}
17148
17149// Creates a new instance of the SecurityRuleListResultIterator type.
17150func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
17151	return SecurityRuleListResultIterator{page: page}
17152}
17153
17154// IsEmpty returns true if the ListResult contains no values.
17155func (srlr SecurityRuleListResult) IsEmpty() bool {
17156	return srlr.Value == nil || len(*srlr.Value) == 0
17157}
17158
17159// hasNextLink returns true if the NextLink is not empty.
17160func (srlr SecurityRuleListResult) hasNextLink() bool {
17161	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
17162}
17163
17164// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
17165// It returns nil if no more results exist.
17166func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17167	if !srlr.hasNextLink() {
17168		return nil, nil
17169	}
17170	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17171		autorest.AsJSON(),
17172		autorest.AsGet(),
17173		autorest.WithBaseURL(to.String(srlr.NextLink)))
17174}
17175
17176// SecurityRuleListResultPage contains a page of SecurityRule values.
17177type SecurityRuleListResultPage struct {
17178	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
17179	srlr SecurityRuleListResult
17180}
17181
17182// NextWithContext advances to the next page of values.  If there was an error making
17183// the request the page does not advance and the error is returned.
17184func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17185	if tracing.IsEnabled() {
17186		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
17187		defer func() {
17188			sc := -1
17189			if page.Response().Response.Response != nil {
17190				sc = page.Response().Response.Response.StatusCode
17191			}
17192			tracing.EndSpan(ctx, sc, err)
17193		}()
17194	}
17195	for {
17196		next, err := page.fn(ctx, page.srlr)
17197		if err != nil {
17198			return err
17199		}
17200		page.srlr = next
17201		if !next.hasNextLink() || !next.IsEmpty() {
17202			break
17203		}
17204	}
17205	return nil
17206}
17207
17208// Next advances to the next page of values.  If there was an error making
17209// the request the page does not advance and the error is returned.
17210// Deprecated: Use NextWithContext() instead.
17211func (page *SecurityRuleListResultPage) Next() error {
17212	return page.NextWithContext(context.Background())
17213}
17214
17215// NotDone returns true if the page enumeration should be started or is not yet complete.
17216func (page SecurityRuleListResultPage) NotDone() bool {
17217	return !page.srlr.IsEmpty()
17218}
17219
17220// Response returns the raw server response from the last page request.
17221func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
17222	return page.srlr
17223}
17224
17225// Values returns the slice of values for the current page or nil if there are no values.
17226func (page SecurityRuleListResultPage) Values() []SecurityRule {
17227	if page.srlr.IsEmpty() {
17228		return nil
17229	}
17230	return *page.srlr.Value
17231}
17232
17233// Creates a new instance of the SecurityRuleListResultPage type.
17234func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
17235	return SecurityRuleListResultPage{
17236		fn:   getNextPage,
17237		srlr: cur,
17238	}
17239}
17240
17241// SecurityRulePropertiesFormat security rule resource.
17242type SecurityRulePropertiesFormat struct {
17243	// Description - A description for this rule. Restricted to 140 chars.
17244	Description *string `json:"description,omitempty"`
17245	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
17246	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
17247	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
17248	SourcePortRange *string `json:"sourcePortRange,omitempty"`
17249	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
17250	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
17251	// SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
17252	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
17253	// SourceAddressPrefixes - The CIDR or source IP ranges.
17254	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
17255	// SourceApplicationSecurityGroups - The application security group specified as source.
17256	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
17257	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
17258	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
17259	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
17260	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
17261	// DestinationApplicationSecurityGroups - The application security group specified as destination.
17262	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
17263	// SourcePortRanges - The source port ranges.
17264	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
17265	// DestinationPortRanges - The destination port ranges.
17266	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
17267	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
17268	Access SecurityRuleAccess `json:"access,omitempty"`
17269	// 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.
17270	Priority *int32 `json:"priority,omitempty"`
17271	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
17272	Direction SecurityRuleDirection `json:"direction,omitempty"`
17273	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17274	ProvisioningState *string `json:"provisioningState,omitempty"`
17275}
17276
17277// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17278// long-running operation.
17279type SecurityRulesCreateOrUpdateFuture struct {
17280	azure.FutureAPI
17281	// Result returns the result of the asynchronous operation.
17282	// If the operation has not completed it will return an error.
17283	Result func(SecurityRulesClient) (SecurityRule, error)
17284}
17285
17286// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17287func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17288	var azFuture azure.Future
17289	if err := json.Unmarshal(body, &azFuture); err != nil {
17290		return err
17291	}
17292	future.FutureAPI = &azFuture
17293	future.Result = future.result
17294	return nil
17295}
17296
17297// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
17298func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
17299	var done bool
17300	done, err = future.DoneWithContext(context.Background(), client)
17301	if err != nil {
17302		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17303		return
17304	}
17305	if !done {
17306		sr.Response.Response = future.Response()
17307		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
17308		return
17309	}
17310	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17311	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
17312		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
17313		if err != nil {
17314			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
17315		}
17316	}
17317	return
17318}
17319
17320// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17321// operation.
17322type SecurityRulesDeleteFuture struct {
17323	azure.FutureAPI
17324	// Result returns the result of the asynchronous operation.
17325	// If the operation has not completed it will return an error.
17326	Result func(SecurityRulesClient) (autorest.Response, error)
17327}
17328
17329// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17330func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
17331	var azFuture azure.Future
17332	if err := json.Unmarshal(body, &azFuture); err != nil {
17333		return err
17334	}
17335	future.FutureAPI = &azFuture
17336	future.Result = future.result
17337	return nil
17338}
17339
17340// result is the default implementation for SecurityRulesDeleteFuture.Result.
17341func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
17342	var done bool
17343	done, err = future.DoneWithContext(context.Background(), client)
17344	if err != nil {
17345		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
17346		return
17347	}
17348	if !done {
17349		ar.Response = future.Response()
17350		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
17351		return
17352	}
17353	ar.Response = future.Response()
17354	return
17355}
17356
17357// SecurityRulesEvaluationResult network security rules evaluation result.
17358type SecurityRulesEvaluationResult struct {
17359	// Name - Name of the network security rule.
17360	Name *string `json:"name,omitempty"`
17361	// ProtocolMatched - Value indicating whether protocol is matched.
17362	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
17363	// SourceMatched - Value indicating whether source is matched.
17364	SourceMatched *bool `json:"sourceMatched,omitempty"`
17365	// SourcePortMatched - Value indicating whether source port is matched.
17366	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
17367	// DestinationMatched - Value indicating whether destination is matched.
17368	DestinationMatched *bool `json:"destinationMatched,omitempty"`
17369	// DestinationPortMatched - Value indicating whether destination port is matched.
17370	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
17371}
17372
17373// ServiceEndpointPropertiesFormat the service endpoint properties.
17374type ServiceEndpointPropertiesFormat struct {
17375	// Service - The type of the endpoint service.
17376	Service *string `json:"service,omitempty"`
17377	// Locations - A list of locations.
17378	Locations *[]string `json:"locations,omitempty"`
17379	// ProvisioningState - The provisioning state of the resource.
17380	ProvisioningState *string `json:"provisioningState,omitempty"`
17381}
17382
17383// String ...
17384type String struct {
17385	autorest.Response `json:"-"`
17386	Value             *string `json:"value,omitempty"`
17387}
17388
17389// Subnet subnet in a virtual network resource.
17390type Subnet struct {
17391	autorest.Response `json:"-"`
17392	// SubnetPropertiesFormat - Properties of the subnet.
17393	*SubnetPropertiesFormat `json:"properties,omitempty"`
17394	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17395	Name *string `json:"name,omitempty"`
17396	// Etag - A unique read-only string that changes whenever the resource is updated.
17397	Etag *string `json:"etag,omitempty"`
17398	// ID - Resource ID.
17399	ID *string `json:"id,omitempty"`
17400}
17401
17402// MarshalJSON is the custom marshaler for Subnet.
17403func (s Subnet) MarshalJSON() ([]byte, error) {
17404	objectMap := make(map[string]interface{})
17405	if s.SubnetPropertiesFormat != nil {
17406		objectMap["properties"] = s.SubnetPropertiesFormat
17407	}
17408	if s.Name != nil {
17409		objectMap["name"] = s.Name
17410	}
17411	if s.Etag != nil {
17412		objectMap["etag"] = s.Etag
17413	}
17414	if s.ID != nil {
17415		objectMap["id"] = s.ID
17416	}
17417	return json.Marshal(objectMap)
17418}
17419
17420// UnmarshalJSON is the custom unmarshaler for Subnet struct.
17421func (s *Subnet) UnmarshalJSON(body []byte) error {
17422	var m map[string]*json.RawMessage
17423	err := json.Unmarshal(body, &m)
17424	if err != nil {
17425		return err
17426	}
17427	for k, v := range m {
17428		switch k {
17429		case "properties":
17430			if v != nil {
17431				var subnetPropertiesFormat SubnetPropertiesFormat
17432				err = json.Unmarshal(*v, &subnetPropertiesFormat)
17433				if err != nil {
17434					return err
17435				}
17436				s.SubnetPropertiesFormat = &subnetPropertiesFormat
17437			}
17438		case "name":
17439			if v != nil {
17440				var name string
17441				err = json.Unmarshal(*v, &name)
17442				if err != nil {
17443					return err
17444				}
17445				s.Name = &name
17446			}
17447		case "etag":
17448			if v != nil {
17449				var etag string
17450				err = json.Unmarshal(*v, &etag)
17451				if err != nil {
17452					return err
17453				}
17454				s.Etag = &etag
17455			}
17456		case "id":
17457			if v != nil {
17458				var ID string
17459				err = json.Unmarshal(*v, &ID)
17460				if err != nil {
17461					return err
17462				}
17463				s.ID = &ID
17464			}
17465		}
17466	}
17467
17468	return nil
17469}
17470
17471// SubnetAssociation network interface and its custom security rules.
17472type SubnetAssociation struct {
17473	// ID - READ-ONLY; Subnet ID.
17474	ID *string `json:"id,omitempty"`
17475	// SecurityRules - Collection of custom security rules.
17476	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
17477}
17478
17479// MarshalJSON is the custom marshaler for SubnetAssociation.
17480func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
17481	objectMap := make(map[string]interface{})
17482	if sa.SecurityRules != nil {
17483		objectMap["securityRules"] = sa.SecurityRules
17484	}
17485	return json.Marshal(objectMap)
17486}
17487
17488// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
17489// network
17490type SubnetListResult struct {
17491	autorest.Response `json:"-"`
17492	// Value - The subnets in a virtual network.
17493	Value *[]Subnet `json:"value,omitempty"`
17494	// NextLink - The URL to get the next set of results.
17495	NextLink *string `json:"nextLink,omitempty"`
17496}
17497
17498// SubnetListResultIterator provides access to a complete listing of Subnet values.
17499type SubnetListResultIterator struct {
17500	i    int
17501	page SubnetListResultPage
17502}
17503
17504// NextWithContext advances to the next value.  If there was an error making
17505// the request the iterator does not advance and the error is returned.
17506func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
17507	if tracing.IsEnabled() {
17508		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
17509		defer func() {
17510			sc := -1
17511			if iter.Response().Response.Response != nil {
17512				sc = iter.Response().Response.Response.StatusCode
17513			}
17514			tracing.EndSpan(ctx, sc, err)
17515		}()
17516	}
17517	iter.i++
17518	if iter.i < len(iter.page.Values()) {
17519		return nil
17520	}
17521	err = iter.page.NextWithContext(ctx)
17522	if err != nil {
17523		iter.i--
17524		return err
17525	}
17526	iter.i = 0
17527	return nil
17528}
17529
17530// Next advances to the next value.  If there was an error making
17531// the request the iterator does not advance and the error is returned.
17532// Deprecated: Use NextWithContext() instead.
17533func (iter *SubnetListResultIterator) Next() error {
17534	return iter.NextWithContext(context.Background())
17535}
17536
17537// NotDone returns true if the enumeration should be started or is not yet complete.
17538func (iter SubnetListResultIterator) NotDone() bool {
17539	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17540}
17541
17542// Response returns the raw server response from the last page request.
17543func (iter SubnetListResultIterator) Response() SubnetListResult {
17544	return iter.page.Response()
17545}
17546
17547// Value returns the current value or a zero-initialized value if the
17548// iterator has advanced beyond the end of the collection.
17549func (iter SubnetListResultIterator) Value() Subnet {
17550	if !iter.page.NotDone() {
17551		return Subnet{}
17552	}
17553	return iter.page.Values()[iter.i]
17554}
17555
17556// Creates a new instance of the SubnetListResultIterator type.
17557func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
17558	return SubnetListResultIterator{page: page}
17559}
17560
17561// IsEmpty returns true if the ListResult contains no values.
17562func (slr SubnetListResult) IsEmpty() bool {
17563	return slr.Value == nil || len(*slr.Value) == 0
17564}
17565
17566// hasNextLink returns true if the NextLink is not empty.
17567func (slr SubnetListResult) hasNextLink() bool {
17568	return slr.NextLink != nil && len(*slr.NextLink) != 0
17569}
17570
17571// subnetListResultPreparer prepares a request to retrieve the next set of results.
17572// It returns nil if no more results exist.
17573func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
17574	if !slr.hasNextLink() {
17575		return nil, nil
17576	}
17577	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17578		autorest.AsJSON(),
17579		autorest.AsGet(),
17580		autorest.WithBaseURL(to.String(slr.NextLink)))
17581}
17582
17583// SubnetListResultPage contains a page of Subnet values.
17584type SubnetListResultPage struct {
17585	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
17586	slr SubnetListResult
17587}
17588
17589// NextWithContext advances to the next page of values.  If there was an error making
17590// the request the page does not advance and the error is returned.
17591func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
17592	if tracing.IsEnabled() {
17593		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
17594		defer func() {
17595			sc := -1
17596			if page.Response().Response.Response != nil {
17597				sc = page.Response().Response.Response.StatusCode
17598			}
17599			tracing.EndSpan(ctx, sc, err)
17600		}()
17601	}
17602	for {
17603		next, err := page.fn(ctx, page.slr)
17604		if err != nil {
17605			return err
17606		}
17607		page.slr = next
17608		if !next.hasNextLink() || !next.IsEmpty() {
17609			break
17610		}
17611	}
17612	return nil
17613}
17614
17615// Next advances to the next page of values.  If there was an error making
17616// the request the page does not advance and the error is returned.
17617// Deprecated: Use NextWithContext() instead.
17618func (page *SubnetListResultPage) Next() error {
17619	return page.NextWithContext(context.Background())
17620}
17621
17622// NotDone returns true if the page enumeration should be started or is not yet complete.
17623func (page SubnetListResultPage) NotDone() bool {
17624	return !page.slr.IsEmpty()
17625}
17626
17627// Response returns the raw server response from the last page request.
17628func (page SubnetListResultPage) Response() SubnetListResult {
17629	return page.slr
17630}
17631
17632// Values returns the slice of values for the current page or nil if there are no values.
17633func (page SubnetListResultPage) Values() []Subnet {
17634	if page.slr.IsEmpty() {
17635		return nil
17636	}
17637	return *page.slr.Value
17638}
17639
17640// Creates a new instance of the SubnetListResultPage type.
17641func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
17642	return SubnetListResultPage{
17643		fn:  getNextPage,
17644		slr: cur,
17645	}
17646}
17647
17648// SubnetPropertiesFormat properties of the subnet.
17649type SubnetPropertiesFormat struct {
17650	// AddressPrefix - The address prefix for the subnet.
17651	AddressPrefix *string `json:"addressPrefix,omitempty"`
17652	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
17653	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
17654	// RouteTable - The reference of the RouteTable resource.
17655	RouteTable *RouteTable `json:"routeTable,omitempty"`
17656	// ServiceEndpoints - An array of service endpoints.
17657	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
17658	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
17659	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
17660	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
17661	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
17662	// ProvisioningState - The provisioning state of the resource.
17663	ProvisioningState *string `json:"provisioningState,omitempty"`
17664}
17665
17666// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
17667func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
17668	objectMap := make(map[string]interface{})
17669	if spf.AddressPrefix != nil {
17670		objectMap["addressPrefix"] = spf.AddressPrefix
17671	}
17672	if spf.NetworkSecurityGroup != nil {
17673		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
17674	}
17675	if spf.RouteTable != nil {
17676		objectMap["routeTable"] = spf.RouteTable
17677	}
17678	if spf.ServiceEndpoints != nil {
17679		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
17680	}
17681	if spf.ResourceNavigationLinks != nil {
17682		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
17683	}
17684	if spf.ProvisioningState != nil {
17685		objectMap["provisioningState"] = spf.ProvisioningState
17686	}
17687	return json.Marshal(objectMap)
17688}
17689
17690// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
17691// operation.
17692type SubnetsCreateOrUpdateFuture struct {
17693	azure.FutureAPI
17694	// Result returns the result of the asynchronous operation.
17695	// If the operation has not completed it will return an error.
17696	Result func(SubnetsClient) (Subnet, error)
17697}
17698
17699// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17700func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17701	var azFuture azure.Future
17702	if err := json.Unmarshal(body, &azFuture); err != nil {
17703		return err
17704	}
17705	future.FutureAPI = &azFuture
17706	future.Result = future.result
17707	return nil
17708}
17709
17710// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
17711func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
17712	var done bool
17713	done, err = future.DoneWithContext(context.Background(), client)
17714	if err != nil {
17715		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17716		return
17717	}
17718	if !done {
17719		s.Response.Response = future.Response()
17720		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
17721		return
17722	}
17723	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17724	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
17725		s, err = client.CreateOrUpdateResponder(s.Response.Response)
17726		if err != nil {
17727			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
17728		}
17729	}
17730	return
17731}
17732
17733// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17734// operation.
17735type SubnetsDeleteFuture struct {
17736	azure.FutureAPI
17737	// Result returns the result of the asynchronous operation.
17738	// If the operation has not completed it will return an error.
17739	Result func(SubnetsClient) (autorest.Response, error)
17740}
17741
17742// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17743func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
17744	var azFuture azure.Future
17745	if err := json.Unmarshal(body, &azFuture); err != nil {
17746		return err
17747	}
17748	future.FutureAPI = &azFuture
17749	future.Result = future.result
17750	return nil
17751}
17752
17753// result is the default implementation for SubnetsDeleteFuture.Result.
17754func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
17755	var done bool
17756	done, err = future.DoneWithContext(context.Background(), client)
17757	if err != nil {
17758		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
17759		return
17760	}
17761	if !done {
17762		ar.Response = future.Response()
17763		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
17764		return
17765	}
17766	ar.Response = future.Response()
17767	return
17768}
17769
17770// SubResource reference to another subresource.
17771type SubResource struct {
17772	// ID - Resource ID.
17773	ID *string `json:"id,omitempty"`
17774}
17775
17776// TagsObject tags object for patch operations.
17777type TagsObject struct {
17778	// Tags - Resource tags.
17779	Tags map[string]*string `json:"tags"`
17780}
17781
17782// MarshalJSON is the custom marshaler for TagsObject.
17783func (toVar TagsObject) MarshalJSON() ([]byte, error) {
17784	objectMap := make(map[string]interface{})
17785	if toVar.Tags != nil {
17786		objectMap["tags"] = toVar.Tags
17787	}
17788	return json.Marshal(objectMap)
17789}
17790
17791// Topology topology of the specified resource group.
17792type Topology struct {
17793	autorest.Response `json:"-"`
17794	// ID - READ-ONLY; GUID representing the operation id.
17795	ID *string `json:"id,omitempty"`
17796	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
17797	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
17798	// LastModified - READ-ONLY; The datetime when the topology was last modified.
17799	LastModified *date.Time          `json:"lastModified,omitempty"`
17800	Resources    *[]TopologyResource `json:"resources,omitempty"`
17801}
17802
17803// MarshalJSON is the custom marshaler for Topology.
17804func (t Topology) MarshalJSON() ([]byte, error) {
17805	objectMap := make(map[string]interface{})
17806	if t.Resources != nil {
17807		objectMap["resources"] = t.Resources
17808	}
17809	return json.Marshal(objectMap)
17810}
17811
17812// TopologyAssociation resources that have an association with the parent resource.
17813type TopologyAssociation struct {
17814	// Name - The name of the resource that is associated with the parent resource.
17815	Name *string `json:"name,omitempty"`
17816	// ResourceID - The ID of the resource that is associated with the parent resource.
17817	ResourceID *string `json:"resourceId,omitempty"`
17818	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
17819	AssociationType AssociationType `json:"associationType,omitempty"`
17820}
17821
17822// TopologyParameters parameters that define the representation of topology.
17823type TopologyParameters struct {
17824	// TargetResourceGroupName - The name of the target resource group to perform topology on.
17825	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
17826	// TargetVirtualNetwork - The reference of the Virtual Network resource.
17827	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
17828	// TargetSubnet - The reference of the Subnet resource.
17829	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
17830}
17831
17832// TopologyResource the network resource topology information for the given resource group.
17833type TopologyResource struct {
17834	// Name - Name of the resource.
17835	Name *string `json:"name,omitempty"`
17836	// ID - ID of the resource.
17837	ID *string `json:"id,omitempty"`
17838	// Location - Resource location.
17839	Location *string `json:"location,omitempty"`
17840	// Associations - Holds the associations the resource has with other resources in the resource group.
17841	Associations *[]TopologyAssociation `json:"associations,omitempty"`
17842}
17843
17844// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
17845type TrafficAnalyticsConfigurationProperties struct {
17846	// Enabled - Flag to enable/disable traffic analytics.
17847	Enabled *bool `json:"enabled,omitempty"`
17848	// WorkspaceID - The resource guid of the attached workspace
17849	WorkspaceID *string `json:"workspaceId,omitempty"`
17850	// WorkspaceRegion - The location of the attached workspace
17851	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
17852	// WorkspaceResourceID - Resource Id of the attached workspace
17853	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
17854}
17855
17856// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
17857type TrafficAnalyticsProperties struct {
17858	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
17859}
17860
17861// TrafficQuery parameters to compare with network configuration.
17862type TrafficQuery struct {
17863	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
17864	Direction Direction `json:"direction,omitempty"`
17865	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
17866	Protocol *string `json:"protocol,omitempty"`
17867	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
17868	Source *string `json:"source,omitempty"`
17869	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
17870	Destination *string `json:"destination,omitempty"`
17871	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
17872	DestinationPort *string `json:"destinationPort,omitempty"`
17873}
17874
17875// TroubleshootingDetails information gained from troubleshooting of specified resource.
17876type TroubleshootingDetails struct {
17877	// ID - The id of the get troubleshoot operation.
17878	ID *string `json:"id,omitempty"`
17879	// ReasonType - Reason type of failure.
17880	ReasonType *string `json:"reasonType,omitempty"`
17881	// Summary - A summary of troubleshooting.
17882	Summary *string `json:"summary,omitempty"`
17883	// Detail - Details on troubleshooting results.
17884	Detail *string `json:"detail,omitempty"`
17885	// RecommendedActions - List of recommended actions.
17886	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
17887}
17888
17889// TroubleshootingParameters parameters that define the resource to troubleshoot.
17890type TroubleshootingParameters struct {
17891	// TargetResourceID - The target resource to troubleshoot.
17892	TargetResourceID           *string `json:"targetResourceId,omitempty"`
17893	*TroubleshootingProperties `json:"properties,omitempty"`
17894}
17895
17896// MarshalJSON is the custom marshaler for TroubleshootingParameters.
17897func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
17898	objectMap := make(map[string]interface{})
17899	if tp.TargetResourceID != nil {
17900		objectMap["targetResourceId"] = tp.TargetResourceID
17901	}
17902	if tp.TroubleshootingProperties != nil {
17903		objectMap["properties"] = tp.TroubleshootingProperties
17904	}
17905	return json.Marshal(objectMap)
17906}
17907
17908// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
17909func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
17910	var m map[string]*json.RawMessage
17911	err := json.Unmarshal(body, &m)
17912	if err != nil {
17913		return err
17914	}
17915	for k, v := range m {
17916		switch k {
17917		case "targetResourceId":
17918			if v != nil {
17919				var targetResourceID string
17920				err = json.Unmarshal(*v, &targetResourceID)
17921				if err != nil {
17922					return err
17923				}
17924				tp.TargetResourceID = &targetResourceID
17925			}
17926		case "properties":
17927			if v != nil {
17928				var troubleshootingProperties TroubleshootingProperties
17929				err = json.Unmarshal(*v, &troubleshootingProperties)
17930				if err != nil {
17931					return err
17932				}
17933				tp.TroubleshootingProperties = &troubleshootingProperties
17934			}
17935		}
17936	}
17937
17938	return nil
17939}
17940
17941// TroubleshootingProperties storage location provided for troubleshoot.
17942type TroubleshootingProperties struct {
17943	// StorageID - The ID for the storage account to save the troubleshoot result.
17944	StorageID *string `json:"storageId,omitempty"`
17945	// StoragePath - The path to the blob to save the troubleshoot result in.
17946	StoragePath *string `json:"storagePath,omitempty"`
17947}
17948
17949// TroubleshootingRecommendedActions recommended actions based on discovered issues.
17950type TroubleshootingRecommendedActions struct {
17951	// ActionID - ID of the recommended action.
17952	ActionID *string `json:"actionId,omitempty"`
17953	// ActionText - Description of recommended actions.
17954	ActionText *string `json:"actionText,omitempty"`
17955	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
17956	ActionURI *string `json:"actionUri,omitempty"`
17957	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
17958	ActionURIText *string `json:"actionUriText,omitempty"`
17959}
17960
17961// TroubleshootingResult troubleshooting information gained from specified resource.
17962type TroubleshootingResult struct {
17963	autorest.Response `json:"-"`
17964	// StartTime - The start time of the troubleshooting.
17965	StartTime *date.Time `json:"startTime,omitempty"`
17966	// EndTime - The end time of the troubleshooting.
17967	EndTime *date.Time `json:"endTime,omitempty"`
17968	// Code - The result code of the troubleshooting.
17969	Code *string `json:"code,omitempty"`
17970	// Results - Information from troubleshooting.
17971	Results *[]TroubleshootingDetails `json:"results,omitempty"`
17972}
17973
17974// TunnelConnectionHealth virtualNetworkGatewayConnection properties
17975type TunnelConnectionHealth struct {
17976	// Tunnel - READ-ONLY; Tunnel name.
17977	Tunnel *string `json:"tunnel,omitempty"`
17978	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
17979	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
17980	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
17981	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
17982	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
17983	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
17984	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
17985	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
17986}
17987
17988// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
17989func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
17990	objectMap := make(map[string]interface{})
17991	return json.Marshal(objectMap)
17992}
17993
17994// Usage describes network resource usage.
17995type Usage struct {
17996	// ID - READ-ONLY; Resource identifier.
17997	ID *string `json:"id,omitempty"`
17998	// Unit - An enum describing the unit of measurement.
17999	Unit *string `json:"unit,omitempty"`
18000	// CurrentValue - The current value of the usage.
18001	CurrentValue *int64 `json:"currentValue,omitempty"`
18002	// Limit - The limit of usage.
18003	Limit *int64 `json:"limit,omitempty"`
18004	// Name - The name of the type of usage.
18005	Name *UsageName `json:"name,omitempty"`
18006}
18007
18008// MarshalJSON is the custom marshaler for Usage.
18009func (u Usage) MarshalJSON() ([]byte, error) {
18010	objectMap := make(map[string]interface{})
18011	if u.Unit != nil {
18012		objectMap["unit"] = u.Unit
18013	}
18014	if u.CurrentValue != nil {
18015		objectMap["currentValue"] = u.CurrentValue
18016	}
18017	if u.Limit != nil {
18018		objectMap["limit"] = u.Limit
18019	}
18020	if u.Name != nil {
18021		objectMap["name"] = u.Name
18022	}
18023	return json.Marshal(objectMap)
18024}
18025
18026// UsageName the usage names.
18027type UsageName struct {
18028	// Value - A string describing the resource name.
18029	Value *string `json:"value,omitempty"`
18030	// LocalizedValue - A localized string describing the resource name.
18031	LocalizedValue *string `json:"localizedValue,omitempty"`
18032}
18033
18034// UsagesListResult the list usages operation response.
18035type UsagesListResult struct {
18036	autorest.Response `json:"-"`
18037	// Value - The list network resource usages.
18038	Value *[]Usage `json:"value,omitempty"`
18039	// NextLink - URL to get the next set of results.
18040	NextLink *string `json:"nextLink,omitempty"`
18041}
18042
18043// UsagesListResultIterator provides access to a complete listing of Usage values.
18044type UsagesListResultIterator struct {
18045	i    int
18046	page UsagesListResultPage
18047}
18048
18049// NextWithContext advances to the next value.  If there was an error making
18050// the request the iterator does not advance and the error is returned.
18051func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
18052	if tracing.IsEnabled() {
18053		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
18054		defer func() {
18055			sc := -1
18056			if iter.Response().Response.Response != nil {
18057				sc = iter.Response().Response.Response.StatusCode
18058			}
18059			tracing.EndSpan(ctx, sc, err)
18060		}()
18061	}
18062	iter.i++
18063	if iter.i < len(iter.page.Values()) {
18064		return nil
18065	}
18066	err = iter.page.NextWithContext(ctx)
18067	if err != nil {
18068		iter.i--
18069		return err
18070	}
18071	iter.i = 0
18072	return nil
18073}
18074
18075// Next advances to the next value.  If there was an error making
18076// the request the iterator does not advance and the error is returned.
18077// Deprecated: Use NextWithContext() instead.
18078func (iter *UsagesListResultIterator) Next() error {
18079	return iter.NextWithContext(context.Background())
18080}
18081
18082// NotDone returns true if the enumeration should be started or is not yet complete.
18083func (iter UsagesListResultIterator) NotDone() bool {
18084	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18085}
18086
18087// Response returns the raw server response from the last page request.
18088func (iter UsagesListResultIterator) Response() UsagesListResult {
18089	return iter.page.Response()
18090}
18091
18092// Value returns the current value or a zero-initialized value if the
18093// iterator has advanced beyond the end of the collection.
18094func (iter UsagesListResultIterator) Value() Usage {
18095	if !iter.page.NotDone() {
18096		return Usage{}
18097	}
18098	return iter.page.Values()[iter.i]
18099}
18100
18101// Creates a new instance of the UsagesListResultIterator type.
18102func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
18103	return UsagesListResultIterator{page: page}
18104}
18105
18106// IsEmpty returns true if the ListResult contains no values.
18107func (ulr UsagesListResult) IsEmpty() bool {
18108	return ulr.Value == nil || len(*ulr.Value) == 0
18109}
18110
18111// hasNextLink returns true if the NextLink is not empty.
18112func (ulr UsagesListResult) hasNextLink() bool {
18113	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
18114}
18115
18116// usagesListResultPreparer prepares a request to retrieve the next set of results.
18117// It returns nil if no more results exist.
18118func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
18119	if !ulr.hasNextLink() {
18120		return nil, nil
18121	}
18122	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18123		autorest.AsJSON(),
18124		autorest.AsGet(),
18125		autorest.WithBaseURL(to.String(ulr.NextLink)))
18126}
18127
18128// UsagesListResultPage contains a page of Usage values.
18129type UsagesListResultPage struct {
18130	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
18131	ulr UsagesListResult
18132}
18133
18134// NextWithContext advances to the next page of values.  If there was an error making
18135// the request the page does not advance and the error is returned.
18136func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
18137	if tracing.IsEnabled() {
18138		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
18139		defer func() {
18140			sc := -1
18141			if page.Response().Response.Response != nil {
18142				sc = page.Response().Response.Response.StatusCode
18143			}
18144			tracing.EndSpan(ctx, sc, err)
18145		}()
18146	}
18147	for {
18148		next, err := page.fn(ctx, page.ulr)
18149		if err != nil {
18150			return err
18151		}
18152		page.ulr = next
18153		if !next.hasNextLink() || !next.IsEmpty() {
18154			break
18155		}
18156	}
18157	return nil
18158}
18159
18160// Next advances to the next page of values.  If there was an error making
18161// the request the page does not advance and the error is returned.
18162// Deprecated: Use NextWithContext() instead.
18163func (page *UsagesListResultPage) Next() error {
18164	return page.NextWithContext(context.Background())
18165}
18166
18167// NotDone returns true if the page enumeration should be started or is not yet complete.
18168func (page UsagesListResultPage) NotDone() bool {
18169	return !page.ulr.IsEmpty()
18170}
18171
18172// Response returns the raw server response from the last page request.
18173func (page UsagesListResultPage) Response() UsagesListResult {
18174	return page.ulr
18175}
18176
18177// Values returns the slice of values for the current page or nil if there are no values.
18178func (page UsagesListResultPage) Values() []Usage {
18179	if page.ulr.IsEmpty() {
18180		return nil
18181	}
18182	return *page.ulr.Value
18183}
18184
18185// Creates a new instance of the UsagesListResultPage type.
18186func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
18187	return UsagesListResultPage{
18188		fn:  getNextPage,
18189		ulr: cur,
18190	}
18191}
18192
18193// VerificationIPFlowParameters parameters that define the IP flow to be verified.
18194type VerificationIPFlowParameters struct {
18195	// TargetResourceID - The ID of the target resource to perform next-hop on.
18196	TargetResourceID *string `json:"targetResourceId,omitempty"`
18197	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
18198	Direction Direction `json:"direction,omitempty"`
18199	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
18200	Protocol IPFlowProtocol `json:"protocol,omitempty"`
18201	// LocalPort - The local port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
18202	LocalPort *string `json:"localPort,omitempty"`
18203	// RemotePort - The remote port. Acceptable values are a single integer in the range (0-65535). Support for * for the source port, which depends on the direction.
18204	RemotePort *string `json:"remotePort,omitempty"`
18205	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
18206	LocalIPAddress *string `json:"localIPAddress,omitempty"`
18207	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
18208	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
18209	// TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of them, then this parameter must be specified. Otherwise optional).
18210	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18211}
18212
18213// VerificationIPFlowResult results of IP flow verification on the target resource.
18214type VerificationIPFlowResult struct {
18215	autorest.Response `json:"-"`
18216	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
18217	Access Access `json:"access,omitempty"`
18218	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
18219	RuleName *string `json:"ruleName,omitempty"`
18220}
18221
18222// VirtualHub virtualHub Resource.
18223type VirtualHub struct {
18224	autorest.Response     `json:"-"`
18225	*VirtualHubProperties `json:"properties,omitempty"`
18226	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18227	Etag *string `json:"etag,omitempty"`
18228	// ID - Resource ID.
18229	ID *string `json:"id,omitempty"`
18230	// Name - READ-ONLY; Resource name.
18231	Name *string `json:"name,omitempty"`
18232	// Type - READ-ONLY; Resource type.
18233	Type *string `json:"type,omitempty"`
18234	// Location - Resource location.
18235	Location *string `json:"location,omitempty"`
18236	// Tags - Resource tags.
18237	Tags map[string]*string `json:"tags"`
18238}
18239
18240// MarshalJSON is the custom marshaler for VirtualHub.
18241func (vh VirtualHub) MarshalJSON() ([]byte, error) {
18242	objectMap := make(map[string]interface{})
18243	if vh.VirtualHubProperties != nil {
18244		objectMap["properties"] = vh.VirtualHubProperties
18245	}
18246	if vh.ID != nil {
18247		objectMap["id"] = vh.ID
18248	}
18249	if vh.Location != nil {
18250		objectMap["location"] = vh.Location
18251	}
18252	if vh.Tags != nil {
18253		objectMap["tags"] = vh.Tags
18254	}
18255	return json.Marshal(objectMap)
18256}
18257
18258// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
18259func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
18260	var m map[string]*json.RawMessage
18261	err := json.Unmarshal(body, &m)
18262	if err != nil {
18263		return err
18264	}
18265	for k, v := range m {
18266		switch k {
18267		case "properties":
18268			if v != nil {
18269				var virtualHubProperties VirtualHubProperties
18270				err = json.Unmarshal(*v, &virtualHubProperties)
18271				if err != nil {
18272					return err
18273				}
18274				vh.VirtualHubProperties = &virtualHubProperties
18275			}
18276		case "etag":
18277			if v != nil {
18278				var etag string
18279				err = json.Unmarshal(*v, &etag)
18280				if err != nil {
18281					return err
18282				}
18283				vh.Etag = &etag
18284			}
18285		case "id":
18286			if v != nil {
18287				var ID string
18288				err = json.Unmarshal(*v, &ID)
18289				if err != nil {
18290					return err
18291				}
18292				vh.ID = &ID
18293			}
18294		case "name":
18295			if v != nil {
18296				var name string
18297				err = json.Unmarshal(*v, &name)
18298				if err != nil {
18299					return err
18300				}
18301				vh.Name = &name
18302			}
18303		case "type":
18304			if v != nil {
18305				var typeVar string
18306				err = json.Unmarshal(*v, &typeVar)
18307				if err != nil {
18308					return err
18309				}
18310				vh.Type = &typeVar
18311			}
18312		case "location":
18313			if v != nil {
18314				var location string
18315				err = json.Unmarshal(*v, &location)
18316				if err != nil {
18317					return err
18318				}
18319				vh.Location = &location
18320			}
18321		case "tags":
18322			if v != nil {
18323				var tags map[string]*string
18324				err = json.Unmarshal(*v, &tags)
18325				if err != nil {
18326					return err
18327				}
18328				vh.Tags = tags
18329			}
18330		}
18331	}
18332
18333	return nil
18334}
18335
18336// VirtualHubProperties parameters for VirtualHub
18337type VirtualHubProperties struct {
18338	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
18339	VirtualWan *SubResource `json:"virtualWan,omitempty"`
18340	// HubVirtualNetworkConnections - list of all vnet connections with this VirtualHub.
18341	HubVirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"hubVirtualNetworkConnections,omitempty"`
18342	// AddressPrefix - Address-prefix for this VirtualHub.
18343	AddressPrefix *string `json:"addressPrefix,omitempty"`
18344	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18345	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18346}
18347
18348// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18349// long-running operation.
18350type VirtualHubsCreateOrUpdateFuture struct {
18351	azure.FutureAPI
18352	// Result returns the result of the asynchronous operation.
18353	// If the operation has not completed it will return an error.
18354	Result func(VirtualHubsClient) (VirtualHub, error)
18355}
18356
18357// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18358func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18359	var azFuture azure.Future
18360	if err := json.Unmarshal(body, &azFuture); err != nil {
18361		return err
18362	}
18363	future.FutureAPI = &azFuture
18364	future.Result = future.result
18365	return nil
18366}
18367
18368// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
18369func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
18370	var done bool
18371	done, err = future.DoneWithContext(context.Background(), client)
18372	if err != nil {
18373		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18374		return
18375	}
18376	if !done {
18377		vh.Response.Response = future.Response()
18378		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
18379		return
18380	}
18381	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18382	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
18383		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
18384		if err != nil {
18385			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
18386		}
18387	}
18388	return
18389}
18390
18391// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18392// operation.
18393type VirtualHubsDeleteFuture struct {
18394	azure.FutureAPI
18395	// Result returns the result of the asynchronous operation.
18396	// If the operation has not completed it will return an error.
18397	Result func(VirtualHubsClient) (autorest.Response, error)
18398}
18399
18400// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18401func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
18402	var azFuture azure.Future
18403	if err := json.Unmarshal(body, &azFuture); err != nil {
18404		return err
18405	}
18406	future.FutureAPI = &azFuture
18407	future.Result = future.result
18408	return nil
18409}
18410
18411// result is the default implementation for VirtualHubsDeleteFuture.Result.
18412func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
18413	var done bool
18414	done, err = future.DoneWithContext(context.Background(), client)
18415	if err != nil {
18416		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
18417		return
18418	}
18419	if !done {
18420		ar.Response = future.Response()
18421		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
18422		return
18423	}
18424	ar.Response = future.Response()
18425	return
18426}
18427
18428// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
18429// operation.
18430type VirtualHubsUpdateTagsFuture struct {
18431	azure.FutureAPI
18432	// Result returns the result of the asynchronous operation.
18433	// If the operation has not completed it will return an error.
18434	Result func(VirtualHubsClient) (VirtualHub, error)
18435}
18436
18437// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18438func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18439	var azFuture azure.Future
18440	if err := json.Unmarshal(body, &azFuture); err != nil {
18441		return err
18442	}
18443	future.FutureAPI = &azFuture
18444	future.Result = future.result
18445	return nil
18446}
18447
18448// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
18449func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
18450	var done bool
18451	done, err = future.DoneWithContext(context.Background(), client)
18452	if err != nil {
18453		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18454		return
18455	}
18456	if !done {
18457		vh.Response.Response = future.Response()
18458		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
18459		return
18460	}
18461	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18462	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
18463		vh, err = client.UpdateTagsResponder(vh.Response.Response)
18464		if err != nil {
18465			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
18466		}
18467	}
18468	return
18469}
18470
18471// VirtualNetwork virtual Network resource.
18472type VirtualNetwork struct {
18473	autorest.Response `json:"-"`
18474	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
18475	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
18476	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18477	Etag *string `json:"etag,omitempty"`
18478	// ID - Resource ID.
18479	ID *string `json:"id,omitempty"`
18480	// Name - READ-ONLY; Resource name.
18481	Name *string `json:"name,omitempty"`
18482	// Type - READ-ONLY; Resource type.
18483	Type *string `json:"type,omitempty"`
18484	// Location - Resource location.
18485	Location *string `json:"location,omitempty"`
18486	// Tags - Resource tags.
18487	Tags map[string]*string `json:"tags"`
18488}
18489
18490// MarshalJSON is the custom marshaler for VirtualNetwork.
18491func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
18492	objectMap := make(map[string]interface{})
18493	if vn.VirtualNetworkPropertiesFormat != nil {
18494		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
18495	}
18496	if vn.Etag != nil {
18497		objectMap["etag"] = vn.Etag
18498	}
18499	if vn.ID != nil {
18500		objectMap["id"] = vn.ID
18501	}
18502	if vn.Location != nil {
18503		objectMap["location"] = vn.Location
18504	}
18505	if vn.Tags != nil {
18506		objectMap["tags"] = vn.Tags
18507	}
18508	return json.Marshal(objectMap)
18509}
18510
18511// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
18512func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
18513	var m map[string]*json.RawMessage
18514	err := json.Unmarshal(body, &m)
18515	if err != nil {
18516		return err
18517	}
18518	for k, v := range m {
18519		switch k {
18520		case "properties":
18521			if v != nil {
18522				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
18523				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
18524				if err != nil {
18525					return err
18526				}
18527				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
18528			}
18529		case "etag":
18530			if v != nil {
18531				var etag string
18532				err = json.Unmarshal(*v, &etag)
18533				if err != nil {
18534					return err
18535				}
18536				vn.Etag = &etag
18537			}
18538		case "id":
18539			if v != nil {
18540				var ID string
18541				err = json.Unmarshal(*v, &ID)
18542				if err != nil {
18543					return err
18544				}
18545				vn.ID = &ID
18546			}
18547		case "name":
18548			if v != nil {
18549				var name string
18550				err = json.Unmarshal(*v, &name)
18551				if err != nil {
18552					return err
18553				}
18554				vn.Name = &name
18555			}
18556		case "type":
18557			if v != nil {
18558				var typeVar string
18559				err = json.Unmarshal(*v, &typeVar)
18560				if err != nil {
18561					return err
18562				}
18563				vn.Type = &typeVar
18564			}
18565		case "location":
18566			if v != nil {
18567				var location string
18568				err = json.Unmarshal(*v, &location)
18569				if err != nil {
18570					return err
18571				}
18572				vn.Location = &location
18573			}
18574		case "tags":
18575			if v != nil {
18576				var tags map[string]*string
18577				err = json.Unmarshal(*v, &tags)
18578				if err != nil {
18579					return err
18580				}
18581				vn.Tags = tags
18582			}
18583		}
18584	}
18585
18586	return nil
18587}
18588
18589// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
18590// resource.
18591type VirtualNetworkConnectionGatewayReference struct {
18592	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
18593	ID *string `json:"id,omitempty"`
18594}
18595
18596// VirtualNetworkGateway a common class for general resource information
18597type VirtualNetworkGateway struct {
18598	autorest.Response `json:"-"`
18599	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
18600	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
18601	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18602	Etag *string `json:"etag,omitempty"`
18603	// ID - Resource ID.
18604	ID *string `json:"id,omitempty"`
18605	// Name - READ-ONLY; Resource name.
18606	Name *string `json:"name,omitempty"`
18607	// Type - READ-ONLY; Resource type.
18608	Type *string `json:"type,omitempty"`
18609	// Location - Resource location.
18610	Location *string `json:"location,omitempty"`
18611	// Tags - Resource tags.
18612	Tags map[string]*string `json:"tags"`
18613}
18614
18615// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
18616func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
18617	objectMap := make(map[string]interface{})
18618	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
18619		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
18620	}
18621	if vng.Etag != nil {
18622		objectMap["etag"] = vng.Etag
18623	}
18624	if vng.ID != nil {
18625		objectMap["id"] = vng.ID
18626	}
18627	if vng.Location != nil {
18628		objectMap["location"] = vng.Location
18629	}
18630	if vng.Tags != nil {
18631		objectMap["tags"] = vng.Tags
18632	}
18633	return json.Marshal(objectMap)
18634}
18635
18636// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
18637func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
18638	var m map[string]*json.RawMessage
18639	err := json.Unmarshal(body, &m)
18640	if err != nil {
18641		return err
18642	}
18643	for k, v := range m {
18644		switch k {
18645		case "properties":
18646			if v != nil {
18647				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
18648				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
18649				if err != nil {
18650					return err
18651				}
18652				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
18653			}
18654		case "etag":
18655			if v != nil {
18656				var etag string
18657				err = json.Unmarshal(*v, &etag)
18658				if err != nil {
18659					return err
18660				}
18661				vng.Etag = &etag
18662			}
18663		case "id":
18664			if v != nil {
18665				var ID string
18666				err = json.Unmarshal(*v, &ID)
18667				if err != nil {
18668					return err
18669				}
18670				vng.ID = &ID
18671			}
18672		case "name":
18673			if v != nil {
18674				var name string
18675				err = json.Unmarshal(*v, &name)
18676				if err != nil {
18677					return err
18678				}
18679				vng.Name = &name
18680			}
18681		case "type":
18682			if v != nil {
18683				var typeVar string
18684				err = json.Unmarshal(*v, &typeVar)
18685				if err != nil {
18686					return err
18687				}
18688				vng.Type = &typeVar
18689			}
18690		case "location":
18691			if v != nil {
18692				var location string
18693				err = json.Unmarshal(*v, &location)
18694				if err != nil {
18695					return err
18696				}
18697				vng.Location = &location
18698			}
18699		case "tags":
18700			if v != nil {
18701				var tags map[string]*string
18702				err = json.Unmarshal(*v, &tags)
18703				if err != nil {
18704					return err
18705				}
18706				vng.Tags = tags
18707			}
18708		}
18709	}
18710
18711	return nil
18712}
18713
18714// VirtualNetworkGatewayConnection a common class for general resource information
18715type VirtualNetworkGatewayConnection struct {
18716	autorest.Response `json:"-"`
18717	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
18718	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
18719	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18720	Etag *string `json:"etag,omitempty"`
18721	// ID - Resource ID.
18722	ID *string `json:"id,omitempty"`
18723	// Name - READ-ONLY; Resource name.
18724	Name *string `json:"name,omitempty"`
18725	// Type - READ-ONLY; Resource type.
18726	Type *string `json:"type,omitempty"`
18727	// Location - Resource location.
18728	Location *string `json:"location,omitempty"`
18729	// Tags - Resource tags.
18730	Tags map[string]*string `json:"tags"`
18731}
18732
18733// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
18734func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
18735	objectMap := make(map[string]interface{})
18736	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
18737		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
18738	}
18739	if vngc.Etag != nil {
18740		objectMap["etag"] = vngc.Etag
18741	}
18742	if vngc.ID != nil {
18743		objectMap["id"] = vngc.ID
18744	}
18745	if vngc.Location != nil {
18746		objectMap["location"] = vngc.Location
18747	}
18748	if vngc.Tags != nil {
18749		objectMap["tags"] = vngc.Tags
18750	}
18751	return json.Marshal(objectMap)
18752}
18753
18754// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
18755func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
18756	var m map[string]*json.RawMessage
18757	err := json.Unmarshal(body, &m)
18758	if err != nil {
18759		return err
18760	}
18761	for k, v := range m {
18762		switch k {
18763		case "properties":
18764			if v != nil {
18765				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
18766				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
18767				if err != nil {
18768					return err
18769				}
18770				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
18771			}
18772		case "etag":
18773			if v != nil {
18774				var etag string
18775				err = json.Unmarshal(*v, &etag)
18776				if err != nil {
18777					return err
18778				}
18779				vngc.Etag = &etag
18780			}
18781		case "id":
18782			if v != nil {
18783				var ID string
18784				err = json.Unmarshal(*v, &ID)
18785				if err != nil {
18786					return err
18787				}
18788				vngc.ID = &ID
18789			}
18790		case "name":
18791			if v != nil {
18792				var name string
18793				err = json.Unmarshal(*v, &name)
18794				if err != nil {
18795					return err
18796				}
18797				vngc.Name = &name
18798			}
18799		case "type":
18800			if v != nil {
18801				var typeVar string
18802				err = json.Unmarshal(*v, &typeVar)
18803				if err != nil {
18804					return err
18805				}
18806				vngc.Type = &typeVar
18807			}
18808		case "location":
18809			if v != nil {
18810				var location string
18811				err = json.Unmarshal(*v, &location)
18812				if err != nil {
18813					return err
18814				}
18815				vngc.Location = &location
18816			}
18817		case "tags":
18818			if v != nil {
18819				var tags map[string]*string
18820				err = json.Unmarshal(*v, &tags)
18821				if err != nil {
18822					return err
18823				}
18824				vngc.Tags = tags
18825			}
18826		}
18827	}
18828
18829	return nil
18830}
18831
18832// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
18833type VirtualNetworkGatewayConnectionListEntity struct {
18834	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
18835	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
18836	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
18837	Etag *string `json:"etag,omitempty"`
18838	// ID - Resource ID.
18839	ID *string `json:"id,omitempty"`
18840	// Name - READ-ONLY; Resource name.
18841	Name *string `json:"name,omitempty"`
18842	// Type - READ-ONLY; Resource type.
18843	Type *string `json:"type,omitempty"`
18844	// Location - Resource location.
18845	Location *string `json:"location,omitempty"`
18846	// Tags - Resource tags.
18847	Tags map[string]*string `json:"tags"`
18848}
18849
18850// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
18851func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
18852	objectMap := make(map[string]interface{})
18853	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
18854		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
18855	}
18856	if vngcle.Etag != nil {
18857		objectMap["etag"] = vngcle.Etag
18858	}
18859	if vngcle.ID != nil {
18860		objectMap["id"] = vngcle.ID
18861	}
18862	if vngcle.Location != nil {
18863		objectMap["location"] = vngcle.Location
18864	}
18865	if vngcle.Tags != nil {
18866		objectMap["tags"] = vngcle.Tags
18867	}
18868	return json.Marshal(objectMap)
18869}
18870
18871// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
18872func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
18873	var m map[string]*json.RawMessage
18874	err := json.Unmarshal(body, &m)
18875	if err != nil {
18876		return err
18877	}
18878	for k, v := range m {
18879		switch k {
18880		case "properties":
18881			if v != nil {
18882				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
18883				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
18884				if err != nil {
18885					return err
18886				}
18887				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
18888			}
18889		case "etag":
18890			if v != nil {
18891				var etag string
18892				err = json.Unmarshal(*v, &etag)
18893				if err != nil {
18894					return err
18895				}
18896				vngcle.Etag = &etag
18897			}
18898		case "id":
18899			if v != nil {
18900				var ID string
18901				err = json.Unmarshal(*v, &ID)
18902				if err != nil {
18903					return err
18904				}
18905				vngcle.ID = &ID
18906			}
18907		case "name":
18908			if v != nil {
18909				var name string
18910				err = json.Unmarshal(*v, &name)
18911				if err != nil {
18912					return err
18913				}
18914				vngcle.Name = &name
18915			}
18916		case "type":
18917			if v != nil {
18918				var typeVar string
18919				err = json.Unmarshal(*v, &typeVar)
18920				if err != nil {
18921					return err
18922				}
18923				vngcle.Type = &typeVar
18924			}
18925		case "location":
18926			if v != nil {
18927				var location string
18928				err = json.Unmarshal(*v, &location)
18929				if err != nil {
18930					return err
18931				}
18932				vngcle.Location = &location
18933			}
18934		case "tags":
18935			if v != nil {
18936				var tags map[string]*string
18937				err = json.Unmarshal(*v, &tags)
18938				if err != nil {
18939					return err
18940				}
18941				vngcle.Tags = tags
18942			}
18943		}
18944	}
18945
18946	return nil
18947}
18948
18949// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
18950type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
18951	// AuthorizationKey - The authorizationKey.
18952	AuthorizationKey *string `json:"authorizationKey,omitempty"`
18953	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
18954	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
18955	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
18956	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
18957	// LocalNetworkGateway2 - The reference to local network gateway resource.
18958	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
18959	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
18960	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
18961	// RoutingWeight - The routing weight.
18962	RoutingWeight *int32 `json:"routingWeight,omitempty"`
18963	// SharedKey - The IPSec shared key.
18964	SharedKey *string `json:"sharedKey,omitempty"`
18965	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
18966	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
18967	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
18968	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
18969	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
18970	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
18971	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
18972	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
18973	// Peer - The reference to peerings resource.
18974	Peer *SubResource `json:"peer,omitempty"`
18975	// EnableBgp - EnableBgp flag
18976	EnableBgp *bool `json:"enableBgp,omitempty"`
18977	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
18978	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
18979	// IpsecPolicies - The IPSec Policies to be considered by this connection.
18980	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
18981	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
18982	ResourceGUID *string `json:"resourceGuid,omitempty"`
18983	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18984	ProvisioningState *string `json:"provisioningState,omitempty"`
18985}
18986
18987// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
18988func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
18989	objectMap := make(map[string]interface{})
18990	if vngclepf.AuthorizationKey != nil {
18991		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
18992	}
18993	if vngclepf.VirtualNetworkGateway1 != nil {
18994		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
18995	}
18996	if vngclepf.VirtualNetworkGateway2 != nil {
18997		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
18998	}
18999	if vngclepf.LocalNetworkGateway2 != nil {
19000		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
19001	}
19002	if vngclepf.ConnectionType != "" {
19003		objectMap["connectionType"] = vngclepf.ConnectionType
19004	}
19005	if vngclepf.RoutingWeight != nil {
19006		objectMap["routingWeight"] = vngclepf.RoutingWeight
19007	}
19008	if vngclepf.SharedKey != nil {
19009		objectMap["sharedKey"] = vngclepf.SharedKey
19010	}
19011	if vngclepf.Peer != nil {
19012		objectMap["peer"] = vngclepf.Peer
19013	}
19014	if vngclepf.EnableBgp != nil {
19015		objectMap["enableBgp"] = vngclepf.EnableBgp
19016	}
19017	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
19018		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
19019	}
19020	if vngclepf.IpsecPolicies != nil {
19021		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
19022	}
19023	if vngclepf.ResourceGUID != nil {
19024		objectMap["resourceGuid"] = vngclepf.ResourceGUID
19025	}
19026	return json.Marshal(objectMap)
19027}
19028
19029// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
19030// service call
19031type VirtualNetworkGatewayConnectionListResult struct {
19032	autorest.Response `json:"-"`
19033	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
19034	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
19035	// NextLink - READ-ONLY; The URL to get the next set of results.
19036	NextLink *string `json:"nextLink,omitempty"`
19037}
19038
19039// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
19040func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
19041	objectMap := make(map[string]interface{})
19042	if vngclr.Value != nil {
19043		objectMap["value"] = vngclr.Value
19044	}
19045	return json.Marshal(objectMap)
19046}
19047
19048// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
19049// VirtualNetworkGatewayConnection values.
19050type VirtualNetworkGatewayConnectionListResultIterator struct {
19051	i    int
19052	page VirtualNetworkGatewayConnectionListResultPage
19053}
19054
19055// NextWithContext advances to the next value.  If there was an error making
19056// the request the iterator does not advance and the error is returned.
19057func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
19058	if tracing.IsEnabled() {
19059		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
19060		defer func() {
19061			sc := -1
19062			if iter.Response().Response.Response != nil {
19063				sc = iter.Response().Response.Response.StatusCode
19064			}
19065			tracing.EndSpan(ctx, sc, err)
19066		}()
19067	}
19068	iter.i++
19069	if iter.i < len(iter.page.Values()) {
19070		return nil
19071	}
19072	err = iter.page.NextWithContext(ctx)
19073	if err != nil {
19074		iter.i--
19075		return err
19076	}
19077	iter.i = 0
19078	return nil
19079}
19080
19081// Next advances to the next value.  If there was an error making
19082// the request the iterator does not advance and the error is returned.
19083// Deprecated: Use NextWithContext() instead.
19084func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
19085	return iter.NextWithContext(context.Background())
19086}
19087
19088// NotDone returns true if the enumeration should be started or is not yet complete.
19089func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
19090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19091}
19092
19093// Response returns the raw server response from the last page request.
19094func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
19095	return iter.page.Response()
19096}
19097
19098// Value returns the current value or a zero-initialized value if the
19099// iterator has advanced beyond the end of the collection.
19100func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
19101	if !iter.page.NotDone() {
19102		return VirtualNetworkGatewayConnection{}
19103	}
19104	return iter.page.Values()[iter.i]
19105}
19106
19107// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
19108func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
19109	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
19110}
19111
19112// IsEmpty returns true if the ListResult contains no values.
19113func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
19114	return vngclr.Value == nil || len(*vngclr.Value) == 0
19115}
19116
19117// hasNextLink returns true if the NextLink is not empty.
19118func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
19119	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
19120}
19121
19122// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
19123// It returns nil if no more results exist.
19124func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
19125	if !vngclr.hasNextLink() {
19126		return nil, nil
19127	}
19128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19129		autorest.AsJSON(),
19130		autorest.AsGet(),
19131		autorest.WithBaseURL(to.String(vngclr.NextLink)))
19132}
19133
19134// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
19135type VirtualNetworkGatewayConnectionListResultPage struct {
19136	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
19137	vngclr VirtualNetworkGatewayConnectionListResult
19138}
19139
19140// NextWithContext advances to the next page of values.  If there was an error making
19141// the request the page does not advance and the error is returned.
19142func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
19143	if tracing.IsEnabled() {
19144		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
19145		defer func() {
19146			sc := -1
19147			if page.Response().Response.Response != nil {
19148				sc = page.Response().Response.Response.StatusCode
19149			}
19150			tracing.EndSpan(ctx, sc, err)
19151		}()
19152	}
19153	for {
19154		next, err := page.fn(ctx, page.vngclr)
19155		if err != nil {
19156			return err
19157		}
19158		page.vngclr = next
19159		if !next.hasNextLink() || !next.IsEmpty() {
19160			break
19161		}
19162	}
19163	return nil
19164}
19165
19166// Next advances to the next page of values.  If there was an error making
19167// the request the page does not advance and the error is returned.
19168// Deprecated: Use NextWithContext() instead.
19169func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
19170	return page.NextWithContext(context.Background())
19171}
19172
19173// NotDone returns true if the page enumeration should be started or is not yet complete.
19174func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
19175	return !page.vngclr.IsEmpty()
19176}
19177
19178// Response returns the raw server response from the last page request.
19179func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
19180	return page.vngclr
19181}
19182
19183// Values returns the slice of values for the current page or nil if there are no values.
19184func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
19185	if page.vngclr.IsEmpty() {
19186		return nil
19187	}
19188	return *page.vngclr.Value
19189}
19190
19191// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
19192func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
19193	return VirtualNetworkGatewayConnectionListResultPage{
19194		fn:     getNextPage,
19195		vngclr: cur,
19196	}
19197}
19198
19199// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
19200type VirtualNetworkGatewayConnectionPropertiesFormat struct {
19201	// AuthorizationKey - The authorizationKey.
19202	AuthorizationKey *string `json:"authorizationKey,omitempty"`
19203	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
19204	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
19205	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
19206	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
19207	// LocalNetworkGateway2 - The reference to local network gateway resource.
19208	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
19209	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
19210	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
19211	// RoutingWeight - The routing weight.
19212	RoutingWeight *int32 `json:"routingWeight,omitempty"`
19213	// SharedKey - The IPSec shared key.
19214	SharedKey *string `json:"sharedKey,omitempty"`
19215	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
19216	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
19217	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
19218	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
19219	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
19220	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
19221	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
19222	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
19223	// Peer - The reference to peerings resource.
19224	Peer *SubResource `json:"peer,omitempty"`
19225	// EnableBgp - EnableBgp flag
19226	EnableBgp *bool `json:"enableBgp,omitempty"`
19227	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
19228	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
19229	// IpsecPolicies - The IPSec Policies to be considered by this connection.
19230	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
19231	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
19232	ResourceGUID *string `json:"resourceGuid,omitempty"`
19233	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19234	ProvisioningState *string `json:"provisioningState,omitempty"`
19235}
19236
19237// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
19238func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
19239	objectMap := make(map[string]interface{})
19240	if vngcpf.AuthorizationKey != nil {
19241		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
19242	}
19243	if vngcpf.VirtualNetworkGateway1 != nil {
19244		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
19245	}
19246	if vngcpf.VirtualNetworkGateway2 != nil {
19247		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
19248	}
19249	if vngcpf.LocalNetworkGateway2 != nil {
19250		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
19251	}
19252	if vngcpf.ConnectionType != "" {
19253		objectMap["connectionType"] = vngcpf.ConnectionType
19254	}
19255	if vngcpf.RoutingWeight != nil {
19256		objectMap["routingWeight"] = vngcpf.RoutingWeight
19257	}
19258	if vngcpf.SharedKey != nil {
19259		objectMap["sharedKey"] = vngcpf.SharedKey
19260	}
19261	if vngcpf.Peer != nil {
19262		objectMap["peer"] = vngcpf.Peer
19263	}
19264	if vngcpf.EnableBgp != nil {
19265		objectMap["enableBgp"] = vngcpf.EnableBgp
19266	}
19267	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
19268		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
19269	}
19270	if vngcpf.IpsecPolicies != nil {
19271		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
19272	}
19273	if vngcpf.ResourceGUID != nil {
19274		objectMap["resourceGuid"] = vngcpf.ResourceGUID
19275	}
19276	return json.Marshal(objectMap)
19277}
19278
19279// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
19280// results of a long-running operation.
19281type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
19282	azure.FutureAPI
19283	// Result returns the result of the asynchronous operation.
19284	// If the operation has not completed it will return an error.
19285	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
19286}
19287
19288// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19289func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19290	var azFuture azure.Future
19291	if err := json.Unmarshal(body, &azFuture); err != nil {
19292		return err
19293	}
19294	future.FutureAPI = &azFuture
19295	future.Result = future.result
19296	return nil
19297}
19298
19299// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
19300func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
19301	var done bool
19302	done, err = future.DoneWithContext(context.Background(), client)
19303	if err != nil {
19304		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19305		return
19306	}
19307	if !done {
19308		vngc.Response.Response = future.Response()
19309		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
19310		return
19311	}
19312	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19313	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
19314		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
19315		if err != nil {
19316			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
19317		}
19318	}
19319	return
19320}
19321
19322// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
19323// a long-running operation.
19324type VirtualNetworkGatewayConnectionsDeleteFuture struct {
19325	azure.FutureAPI
19326	// Result returns the result of the asynchronous operation.
19327	// If the operation has not completed it will return an error.
19328	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
19329}
19330
19331// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19332func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
19333	var azFuture azure.Future
19334	if err := json.Unmarshal(body, &azFuture); err != nil {
19335		return err
19336	}
19337	future.FutureAPI = &azFuture
19338	future.Result = future.result
19339	return nil
19340}
19341
19342// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
19343func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
19344	var done bool
19345	done, err = future.DoneWithContext(context.Background(), client)
19346	if err != nil {
19347		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
19348		return
19349	}
19350	if !done {
19351		ar.Response = future.Response()
19352		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
19353		return
19354	}
19355	ar.Response = future.Response()
19356	return
19357}
19358
19359// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
19360// results of a long-running operation.
19361type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
19362	azure.FutureAPI
19363	// Result returns the result of the asynchronous operation.
19364	// If the operation has not completed it will return an error.
19365	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
19366}
19367
19368// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19369func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
19370	var azFuture azure.Future
19371	if err := json.Unmarshal(body, &azFuture); err != nil {
19372		return err
19373	}
19374	future.FutureAPI = &azFuture
19375	future.Result = future.result
19376	return nil
19377}
19378
19379// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
19380func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
19381	var done bool
19382	done, err = future.DoneWithContext(context.Background(), client)
19383	if err != nil {
19384		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
19385		return
19386	}
19387	if !done {
19388		crsk.Response.Response = future.Response()
19389		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
19390		return
19391	}
19392	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19393	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
19394		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
19395		if err != nil {
19396			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
19397		}
19398	}
19399	return
19400}
19401
19402// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
19403// results of a long-running operation.
19404type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
19405	azure.FutureAPI
19406	// Result returns the result of the asynchronous operation.
19407	// If the operation has not completed it will return an error.
19408	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
19409}
19410
19411// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19412func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
19413	var azFuture azure.Future
19414	if err := json.Unmarshal(body, &azFuture); err != nil {
19415		return err
19416	}
19417	future.FutureAPI = &azFuture
19418	future.Result = future.result
19419	return nil
19420}
19421
19422// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
19423func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
19424	var done bool
19425	done, err = future.DoneWithContext(context.Background(), client)
19426	if err != nil {
19427		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
19428		return
19429	}
19430	if !done {
19431		csk.Response.Response = future.Response()
19432		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
19433		return
19434	}
19435	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19436	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
19437		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
19438		if err != nil {
19439			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
19440		}
19441	}
19442	return
19443}
19444
19445// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
19446// results of a long-running operation.
19447type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
19448	azure.FutureAPI
19449	// Result returns the result of the asynchronous operation.
19450	// If the operation has not completed it will return an error.
19451	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
19452}
19453
19454// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19455func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19456	var azFuture azure.Future
19457	if err := json.Unmarshal(body, &azFuture); err != nil {
19458		return err
19459	}
19460	future.FutureAPI = &azFuture
19461	future.Result = future.result
19462	return nil
19463}
19464
19465// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
19466func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
19467	var done bool
19468	done, err = future.DoneWithContext(context.Background(), client)
19469	if err != nil {
19470		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19471		return
19472	}
19473	if !done {
19474		vngc.Response.Response = future.Response()
19475		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
19476		return
19477	}
19478	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19479	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
19480		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
19481		if err != nil {
19482			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
19483		}
19484	}
19485	return
19486}
19487
19488// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
19489type VirtualNetworkGatewayIPConfiguration struct {
19490	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
19491	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
19492	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19493	Name *string `json:"name,omitempty"`
19494	// Etag - A unique read-only string that changes whenever the resource is updated.
19495	Etag *string `json:"etag,omitempty"`
19496	// ID - Resource ID.
19497	ID *string `json:"id,omitempty"`
19498}
19499
19500// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
19501func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
19502	objectMap := make(map[string]interface{})
19503	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
19504		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
19505	}
19506	if vngic.Name != nil {
19507		objectMap["name"] = vngic.Name
19508	}
19509	if vngic.Etag != nil {
19510		objectMap["etag"] = vngic.Etag
19511	}
19512	if vngic.ID != nil {
19513		objectMap["id"] = vngic.ID
19514	}
19515	return json.Marshal(objectMap)
19516}
19517
19518// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
19519func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
19520	var m map[string]*json.RawMessage
19521	err := json.Unmarshal(body, &m)
19522	if err != nil {
19523		return err
19524	}
19525	for k, v := range m {
19526		switch k {
19527		case "properties":
19528			if v != nil {
19529				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
19530				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
19531				if err != nil {
19532					return err
19533				}
19534				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
19535			}
19536		case "name":
19537			if v != nil {
19538				var name string
19539				err = json.Unmarshal(*v, &name)
19540				if err != nil {
19541					return err
19542				}
19543				vngic.Name = &name
19544			}
19545		case "etag":
19546			if v != nil {
19547				var etag string
19548				err = json.Unmarshal(*v, &etag)
19549				if err != nil {
19550					return err
19551				}
19552				vngic.Etag = &etag
19553			}
19554		case "id":
19555			if v != nil {
19556				var ID string
19557				err = json.Unmarshal(*v, &ID)
19558				if err != nil {
19559					return err
19560				}
19561				vngic.ID = &ID
19562			}
19563		}
19564	}
19565
19566	return nil
19567}
19568
19569// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
19570type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
19571	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
19572	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
19573	// Subnet - The reference of the subnet resource.
19574	Subnet *SubResource `json:"subnet,omitempty"`
19575	// PublicIPAddress - The reference of the public IP resource.
19576	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
19577	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19578	ProvisioningState *string `json:"provisioningState,omitempty"`
19579}
19580
19581// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
19582func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
19583	objectMap := make(map[string]interface{})
19584	if vngicpf.PrivateIPAllocationMethod != "" {
19585		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
19586	}
19587	if vngicpf.Subnet != nil {
19588		objectMap["subnet"] = vngicpf.Subnet
19589	}
19590	if vngicpf.PublicIPAddress != nil {
19591		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
19592	}
19593	return json.Marshal(objectMap)
19594}
19595
19596// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
19597// service call
19598type VirtualNetworkGatewayListConnectionsResult struct {
19599	autorest.Response `json:"-"`
19600	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
19601	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
19602	// NextLink - READ-ONLY; The URL to get the next set of results.
19603	NextLink *string `json:"nextLink,omitempty"`
19604}
19605
19606// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
19607func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
19608	objectMap := make(map[string]interface{})
19609	if vnglcr.Value != nil {
19610		objectMap["value"] = vnglcr.Value
19611	}
19612	return json.Marshal(objectMap)
19613}
19614
19615// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
19616// VirtualNetworkGatewayConnectionListEntity values.
19617type VirtualNetworkGatewayListConnectionsResultIterator struct {
19618	i    int
19619	page VirtualNetworkGatewayListConnectionsResultPage
19620}
19621
19622// NextWithContext advances to the next value.  If there was an error making
19623// the request the iterator does not advance and the error is returned.
19624func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
19625	if tracing.IsEnabled() {
19626		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
19627		defer func() {
19628			sc := -1
19629			if iter.Response().Response.Response != nil {
19630				sc = iter.Response().Response.Response.StatusCode
19631			}
19632			tracing.EndSpan(ctx, sc, err)
19633		}()
19634	}
19635	iter.i++
19636	if iter.i < len(iter.page.Values()) {
19637		return nil
19638	}
19639	err = iter.page.NextWithContext(ctx)
19640	if err != nil {
19641		iter.i--
19642		return err
19643	}
19644	iter.i = 0
19645	return nil
19646}
19647
19648// Next advances to the next value.  If there was an error making
19649// the request the iterator does not advance and the error is returned.
19650// Deprecated: Use NextWithContext() instead.
19651func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
19652	return iter.NextWithContext(context.Background())
19653}
19654
19655// NotDone returns true if the enumeration should be started or is not yet complete.
19656func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
19657	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19658}
19659
19660// Response returns the raw server response from the last page request.
19661func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
19662	return iter.page.Response()
19663}
19664
19665// Value returns the current value or a zero-initialized value if the
19666// iterator has advanced beyond the end of the collection.
19667func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
19668	if !iter.page.NotDone() {
19669		return VirtualNetworkGatewayConnectionListEntity{}
19670	}
19671	return iter.page.Values()[iter.i]
19672}
19673
19674// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
19675func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
19676	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
19677}
19678
19679// IsEmpty returns true if the ListResult contains no values.
19680func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
19681	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
19682}
19683
19684// hasNextLink returns true if the NextLink is not empty.
19685func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
19686	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
19687}
19688
19689// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
19690// It returns nil if no more results exist.
19691func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
19692	if !vnglcr.hasNextLink() {
19693		return nil, nil
19694	}
19695	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19696		autorest.AsJSON(),
19697		autorest.AsGet(),
19698		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
19699}
19700
19701// VirtualNetworkGatewayListConnectionsResultPage contains a page of
19702// VirtualNetworkGatewayConnectionListEntity values.
19703type VirtualNetworkGatewayListConnectionsResultPage struct {
19704	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
19705	vnglcr VirtualNetworkGatewayListConnectionsResult
19706}
19707
19708// NextWithContext advances to the next page of values.  If there was an error making
19709// the request the page does not advance and the error is returned.
19710func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
19711	if tracing.IsEnabled() {
19712		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
19713		defer func() {
19714			sc := -1
19715			if page.Response().Response.Response != nil {
19716				sc = page.Response().Response.Response.StatusCode
19717			}
19718			tracing.EndSpan(ctx, sc, err)
19719		}()
19720	}
19721	for {
19722		next, err := page.fn(ctx, page.vnglcr)
19723		if err != nil {
19724			return err
19725		}
19726		page.vnglcr = next
19727		if !next.hasNextLink() || !next.IsEmpty() {
19728			break
19729		}
19730	}
19731	return nil
19732}
19733
19734// Next advances to the next page of values.  If there was an error making
19735// the request the page does not advance and the error is returned.
19736// Deprecated: Use NextWithContext() instead.
19737func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
19738	return page.NextWithContext(context.Background())
19739}
19740
19741// NotDone returns true if the page enumeration should be started or is not yet complete.
19742func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
19743	return !page.vnglcr.IsEmpty()
19744}
19745
19746// Response returns the raw server response from the last page request.
19747func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
19748	return page.vnglcr
19749}
19750
19751// Values returns the slice of values for the current page or nil if there are no values.
19752func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
19753	if page.vnglcr.IsEmpty() {
19754		return nil
19755	}
19756	return *page.vnglcr.Value
19757}
19758
19759// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
19760func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
19761	return VirtualNetworkGatewayListConnectionsResultPage{
19762		fn:     getNextPage,
19763		vnglcr: cur,
19764	}
19765}
19766
19767// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
19768type VirtualNetworkGatewayListResult struct {
19769	autorest.Response `json:"-"`
19770	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
19771	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
19772	// NextLink - READ-ONLY; The URL to get the next set of results.
19773	NextLink *string `json:"nextLink,omitempty"`
19774}
19775
19776// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
19777func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
19778	objectMap := make(map[string]interface{})
19779	if vnglr.Value != nil {
19780		objectMap["value"] = vnglr.Value
19781	}
19782	return json.Marshal(objectMap)
19783}
19784
19785// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
19786// values.
19787type VirtualNetworkGatewayListResultIterator struct {
19788	i    int
19789	page VirtualNetworkGatewayListResultPage
19790}
19791
19792// NextWithContext advances to the next value.  If there was an error making
19793// the request the iterator does not advance and the error is returned.
19794func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
19795	if tracing.IsEnabled() {
19796		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
19797		defer func() {
19798			sc := -1
19799			if iter.Response().Response.Response != nil {
19800				sc = iter.Response().Response.Response.StatusCode
19801			}
19802			tracing.EndSpan(ctx, sc, err)
19803		}()
19804	}
19805	iter.i++
19806	if iter.i < len(iter.page.Values()) {
19807		return nil
19808	}
19809	err = iter.page.NextWithContext(ctx)
19810	if err != nil {
19811		iter.i--
19812		return err
19813	}
19814	iter.i = 0
19815	return nil
19816}
19817
19818// Next advances to the next value.  If there was an error making
19819// the request the iterator does not advance and the error is returned.
19820// Deprecated: Use NextWithContext() instead.
19821func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
19822	return iter.NextWithContext(context.Background())
19823}
19824
19825// NotDone returns true if the enumeration should be started or is not yet complete.
19826func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
19827	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19828}
19829
19830// Response returns the raw server response from the last page request.
19831func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
19832	return iter.page.Response()
19833}
19834
19835// Value returns the current value or a zero-initialized value if the
19836// iterator has advanced beyond the end of the collection.
19837func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
19838	if !iter.page.NotDone() {
19839		return VirtualNetworkGateway{}
19840	}
19841	return iter.page.Values()[iter.i]
19842}
19843
19844// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
19845func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
19846	return VirtualNetworkGatewayListResultIterator{page: page}
19847}
19848
19849// IsEmpty returns true if the ListResult contains no values.
19850func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
19851	return vnglr.Value == nil || len(*vnglr.Value) == 0
19852}
19853
19854// hasNextLink returns true if the NextLink is not empty.
19855func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
19856	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
19857}
19858
19859// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
19860// It returns nil if no more results exist.
19861func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
19862	if !vnglr.hasNextLink() {
19863		return nil, nil
19864	}
19865	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19866		autorest.AsJSON(),
19867		autorest.AsGet(),
19868		autorest.WithBaseURL(to.String(vnglr.NextLink)))
19869}
19870
19871// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
19872type VirtualNetworkGatewayListResultPage struct {
19873	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
19874	vnglr VirtualNetworkGatewayListResult
19875}
19876
19877// NextWithContext advances to the next page of values.  If there was an error making
19878// the request the page does not advance and the error is returned.
19879func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
19880	if tracing.IsEnabled() {
19881		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
19882		defer func() {
19883			sc := -1
19884			if page.Response().Response.Response != nil {
19885				sc = page.Response().Response.Response.StatusCode
19886			}
19887			tracing.EndSpan(ctx, sc, err)
19888		}()
19889	}
19890	for {
19891		next, err := page.fn(ctx, page.vnglr)
19892		if err != nil {
19893			return err
19894		}
19895		page.vnglr = next
19896		if !next.hasNextLink() || !next.IsEmpty() {
19897			break
19898		}
19899	}
19900	return nil
19901}
19902
19903// Next advances to the next page of values.  If there was an error making
19904// the request the page does not advance and the error is returned.
19905// Deprecated: Use NextWithContext() instead.
19906func (page *VirtualNetworkGatewayListResultPage) Next() error {
19907	return page.NextWithContext(context.Background())
19908}
19909
19910// NotDone returns true if the page enumeration should be started or is not yet complete.
19911func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
19912	return !page.vnglr.IsEmpty()
19913}
19914
19915// Response returns the raw server response from the last page request.
19916func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
19917	return page.vnglr
19918}
19919
19920// Values returns the slice of values for the current page or nil if there are no values.
19921func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
19922	if page.vnglr.IsEmpty() {
19923		return nil
19924	}
19925	return *page.vnglr.Value
19926}
19927
19928// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
19929func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
19930	return VirtualNetworkGatewayListResultPage{
19931		fn:    getNextPage,
19932		vnglr: cur,
19933	}
19934}
19935
19936// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
19937type VirtualNetworkGatewayPropertiesFormat struct {
19938	// IPConfigurations - IP configurations for virtual network gateway.
19939	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
19940	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
19941	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
19942	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
19943	VpnType VpnType `json:"vpnType,omitempty"`
19944	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
19945	EnableBgp *bool `json:"enableBgp,omitempty"`
19946	// ActiveActive - ActiveActive flag
19947	ActiveActive *bool `json:"activeActive,omitempty"`
19948	// 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.
19949	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
19950	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
19951	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
19952	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
19953	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
19954	// BgpSettings - Virtual network gateway's BGP speaker settings.
19955	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
19956	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
19957	ResourceGUID *string `json:"resourceGuid,omitempty"`
19958	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19959	ProvisioningState *string `json:"provisioningState,omitempty"`
19960}
19961
19962// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
19963func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
19964	objectMap := make(map[string]interface{})
19965	if vngpf.IPConfigurations != nil {
19966		objectMap["ipConfigurations"] = vngpf.IPConfigurations
19967	}
19968	if vngpf.GatewayType != "" {
19969		objectMap["gatewayType"] = vngpf.GatewayType
19970	}
19971	if vngpf.VpnType != "" {
19972		objectMap["vpnType"] = vngpf.VpnType
19973	}
19974	if vngpf.EnableBgp != nil {
19975		objectMap["enableBgp"] = vngpf.EnableBgp
19976	}
19977	if vngpf.ActiveActive != nil {
19978		objectMap["activeActive"] = vngpf.ActiveActive
19979	}
19980	if vngpf.GatewayDefaultSite != nil {
19981		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
19982	}
19983	if vngpf.Sku != nil {
19984		objectMap["sku"] = vngpf.Sku
19985	}
19986	if vngpf.VpnClientConfiguration != nil {
19987		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
19988	}
19989	if vngpf.BgpSettings != nil {
19990		objectMap["bgpSettings"] = vngpf.BgpSettings
19991	}
19992	if vngpf.ResourceGUID != nil {
19993		objectMap["resourceGuid"] = vngpf.ResourceGUID
19994	}
19995	return json.Marshal(objectMap)
19996}
19997
19998// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19999// long-running operation.
20000type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
20001	azure.FutureAPI
20002	// Result returns the result of the asynchronous operation.
20003	// If the operation has not completed it will return an error.
20004	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
20005}
20006
20007// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20008func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20009	var azFuture azure.Future
20010	if err := json.Unmarshal(body, &azFuture); err != nil {
20011		return err
20012	}
20013	future.FutureAPI = &azFuture
20014	future.Result = future.result
20015	return nil
20016}
20017
20018// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
20019func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20020	var done bool
20021	done, err = future.DoneWithContext(context.Background(), client)
20022	if err != nil {
20023		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20024		return
20025	}
20026	if !done {
20027		vng.Response.Response = future.Response()
20028		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
20029		return
20030	}
20031	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20032	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20033		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
20034		if err != nil {
20035			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
20036		}
20037	}
20038	return
20039}
20040
20041// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
20042// long-running operation.
20043type VirtualNetworkGatewaysDeleteFuture struct {
20044	azure.FutureAPI
20045	// Result returns the result of the asynchronous operation.
20046	// If the operation has not completed it will return an error.
20047	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
20048}
20049
20050// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20051func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
20052	var azFuture azure.Future
20053	if err := json.Unmarshal(body, &azFuture); err != nil {
20054		return err
20055	}
20056	future.FutureAPI = &azFuture
20057	future.Result = future.result
20058	return nil
20059}
20060
20061// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
20062func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
20063	var done bool
20064	done, err = future.DoneWithContext(context.Background(), client)
20065	if err != nil {
20066		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
20067		return
20068	}
20069	if !done {
20070		ar.Response = future.Response()
20071		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
20072		return
20073	}
20074	ar.Response = future.Response()
20075	return
20076}
20077
20078// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
20079// results of a long-running operation.
20080type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
20081	azure.FutureAPI
20082	// Result returns the result of the asynchronous operation.
20083	// If the operation has not completed it will return an error.
20084	Result func(VirtualNetworkGatewaysClient) (String, error)
20085}
20086
20087// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20088func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
20089	var azFuture azure.Future
20090	if err := json.Unmarshal(body, &azFuture); err != nil {
20091		return err
20092	}
20093	future.FutureAPI = &azFuture
20094	future.Result = future.result
20095	return nil
20096}
20097
20098// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
20099func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
20100	var done bool
20101	done, err = future.DoneWithContext(context.Background(), client)
20102	if err != nil {
20103		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
20104		return
20105	}
20106	if !done {
20107		s.Response.Response = future.Response()
20108		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
20109		return
20110	}
20111	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20112	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20113		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
20114		if err != nil {
20115			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
20116		}
20117	}
20118	return
20119}
20120
20121// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
20122// of a long-running operation.
20123type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
20124	azure.FutureAPI
20125	// Result returns the result of the asynchronous operation.
20126	// If the operation has not completed it will return an error.
20127	Result func(VirtualNetworkGatewaysClient) (String, error)
20128}
20129
20130// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20131func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
20132	var azFuture azure.Future
20133	if err := json.Unmarshal(body, &azFuture); err != nil {
20134		return err
20135	}
20136	future.FutureAPI = &azFuture
20137	future.Result = future.result
20138	return nil
20139}
20140
20141// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
20142func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
20143	var done bool
20144	done, err = future.DoneWithContext(context.Background(), client)
20145	if err != nil {
20146		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
20147		return
20148	}
20149	if !done {
20150		s.Response.Response = future.Response()
20151		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
20152		return
20153	}
20154	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20155	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20156		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
20157		if err != nil {
20158			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
20159		}
20160	}
20161	return
20162}
20163
20164// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
20165// of a long-running operation.
20166type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
20167	azure.FutureAPI
20168	// Result returns the result of the asynchronous operation.
20169	// If the operation has not completed it will return an error.
20170	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
20171}
20172
20173// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20174func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
20175	var azFuture azure.Future
20176	if err := json.Unmarshal(body, &azFuture); err != nil {
20177		return err
20178	}
20179	future.FutureAPI = &azFuture
20180	future.Result = future.result
20181	return nil
20182}
20183
20184// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
20185func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
20186	var done bool
20187	done, err = future.DoneWithContext(context.Background(), client)
20188	if err != nil {
20189		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
20190		return
20191	}
20192	if !done {
20193		grlr.Response.Response = future.Response()
20194		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
20195		return
20196	}
20197	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20198	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
20199		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
20200		if err != nil {
20201			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
20202		}
20203	}
20204	return
20205}
20206
20207// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
20208// a long-running operation.
20209type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
20210	azure.FutureAPI
20211	// Result returns the result of the asynchronous operation.
20212	// If the operation has not completed it will return an error.
20213	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
20214}
20215
20216// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20217func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
20218	var azFuture azure.Future
20219	if err := json.Unmarshal(body, &azFuture); err != nil {
20220		return err
20221	}
20222	future.FutureAPI = &azFuture
20223	future.Result = future.result
20224	return nil
20225}
20226
20227// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
20228func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
20229	var done bool
20230	done, err = future.DoneWithContext(context.Background(), client)
20231	if err != nil {
20232		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
20233		return
20234	}
20235	if !done {
20236		bpslr.Response.Response = future.Response()
20237		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
20238		return
20239	}
20240	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20241	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
20242		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
20243		if err != nil {
20244			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
20245		}
20246	}
20247	return
20248}
20249
20250// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
20251// a long-running operation.
20252type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
20253	azure.FutureAPI
20254	// Result returns the result of the asynchronous operation.
20255	// If the operation has not completed it will return an error.
20256	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
20257}
20258
20259// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20260func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
20261	var azFuture azure.Future
20262	if err := json.Unmarshal(body, &azFuture); err != nil {
20263		return err
20264	}
20265	future.FutureAPI = &azFuture
20266	future.Result = future.result
20267	return nil
20268}
20269
20270// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
20271func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
20272	var done bool
20273	done, err = future.DoneWithContext(context.Background(), client)
20274	if err != nil {
20275		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
20276		return
20277	}
20278	if !done {
20279		grlr.Response.Response = future.Response()
20280		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
20281		return
20282	}
20283	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20284	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
20285		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
20286		if err != nil {
20287			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
20288		}
20289	}
20290	return
20291}
20292
20293// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
20294// results of a long-running operation.
20295type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
20296	azure.FutureAPI
20297	// Result returns the result of the asynchronous operation.
20298	// If the operation has not completed it will return an error.
20299	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
20300}
20301
20302// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20303func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
20304	var azFuture azure.Future
20305	if err := json.Unmarshal(body, &azFuture); err != nil {
20306		return err
20307	}
20308	future.FutureAPI = &azFuture
20309	future.Result = future.result
20310	return nil
20311}
20312
20313// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
20314func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
20315	var done bool
20316	done, err = future.DoneWithContext(context.Background(), client)
20317	if err != nil {
20318		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
20319		return
20320	}
20321	if !done {
20322		vcipp.Response.Response = future.Response()
20323		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
20324		return
20325	}
20326	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20327	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
20328		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
20329		if err != nil {
20330			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
20331		}
20332	}
20333	return
20334}
20335
20336// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
20337// results of a long-running operation.
20338type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
20339	azure.FutureAPI
20340	// Result returns the result of the asynchronous operation.
20341	// If the operation has not completed it will return an error.
20342	Result func(VirtualNetworkGatewaysClient) (String, error)
20343}
20344
20345// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20346func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
20347	var azFuture azure.Future
20348	if err := json.Unmarshal(body, &azFuture); err != nil {
20349		return err
20350	}
20351	future.FutureAPI = &azFuture
20352	future.Result = future.result
20353	return nil
20354}
20355
20356// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
20357func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
20358	var done bool
20359	done, err = future.DoneWithContext(context.Background(), client)
20360	if err != nil {
20361		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
20362		return
20363	}
20364	if !done {
20365		s.Response.Response = future.Response()
20366		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
20367		return
20368	}
20369	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20370	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
20371		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
20372		if err != nil {
20373			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
20374		}
20375	}
20376	return
20377}
20378
20379// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
20380type VirtualNetworkGatewaySku struct {
20381	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
20382	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
20383	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
20384	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
20385	// Capacity - The capacity.
20386	Capacity *int32 `json:"capacity,omitempty"`
20387}
20388
20389// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
20390// long-running operation.
20391type VirtualNetworkGatewaysResetFuture struct {
20392	azure.FutureAPI
20393	// Result returns the result of the asynchronous operation.
20394	// If the operation has not completed it will return an error.
20395	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
20396}
20397
20398// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20399func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
20400	var azFuture azure.Future
20401	if err := json.Unmarshal(body, &azFuture); err != nil {
20402		return err
20403	}
20404	future.FutureAPI = &azFuture
20405	future.Result = future.result
20406	return nil
20407}
20408
20409// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
20410func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20411	var done bool
20412	done, err = future.DoneWithContext(context.Background(), client)
20413	if err != nil {
20414		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
20415		return
20416	}
20417	if !done {
20418		vng.Response.Response = future.Response()
20419		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
20420		return
20421	}
20422	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20423	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20424		vng, err = client.ResetResponder(vng.Response.Response)
20425		if err != nil {
20426			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
20427		}
20428	}
20429	return
20430}
20431
20432// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
20433// results of a long-running operation.
20434type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
20435	azure.FutureAPI
20436	// Result returns the result of the asynchronous operation.
20437	// If the operation has not completed it will return an error.
20438	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
20439}
20440
20441// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20442func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
20443	var azFuture azure.Future
20444	if err := json.Unmarshal(body, &azFuture); err != nil {
20445		return err
20446	}
20447	future.FutureAPI = &azFuture
20448	future.Result = future.result
20449	return nil
20450}
20451
20452// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
20453func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
20454	var done bool
20455	done, err = future.DoneWithContext(context.Background(), client)
20456	if err != nil {
20457		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
20458		return
20459	}
20460	if !done {
20461		ar.Response = future.Response()
20462		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
20463		return
20464	}
20465	ar.Response = future.Response()
20466	return
20467}
20468
20469// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
20470// results of a long-running operation.
20471type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
20472	azure.FutureAPI
20473	// Result returns the result of the asynchronous operation.
20474	// If the operation has not completed it will return an error.
20475	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
20476}
20477
20478// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20479func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
20480	var azFuture azure.Future
20481	if err := json.Unmarshal(body, &azFuture); err != nil {
20482		return err
20483	}
20484	future.FutureAPI = &azFuture
20485	future.Result = future.result
20486	return nil
20487}
20488
20489// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
20490func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
20491	var done bool
20492	done, err = future.DoneWithContext(context.Background(), client)
20493	if err != nil {
20494		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
20495		return
20496	}
20497	if !done {
20498		vcipp.Response.Response = future.Response()
20499		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
20500		return
20501	}
20502	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20503	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
20504		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
20505		if err != nil {
20506			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
20507		}
20508	}
20509	return
20510}
20511
20512// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20513// long-running operation.
20514type VirtualNetworkGatewaysUpdateTagsFuture struct {
20515	azure.FutureAPI
20516	// Result returns the result of the asynchronous operation.
20517	// If the operation has not completed it will return an error.
20518	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
20519}
20520
20521// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20522func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20523	var azFuture azure.Future
20524	if err := json.Unmarshal(body, &azFuture); err != nil {
20525		return err
20526	}
20527	future.FutureAPI = &azFuture
20528	future.Result = future.result
20529	return nil
20530}
20531
20532// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
20533func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
20534	var done bool
20535	done, err = future.DoneWithContext(context.Background(), client)
20536	if err != nil {
20537		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20538		return
20539	}
20540	if !done {
20541		vng.Response.Response = future.Response()
20542		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
20543		return
20544	}
20545	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20546	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
20547		vng, err = client.UpdateTagsResponder(vng.Response.Response)
20548		if err != nil {
20549			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
20550		}
20551	}
20552	return
20553}
20554
20555// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
20556type VirtualNetworkListResult struct {
20557	autorest.Response `json:"-"`
20558	// Value - Gets a list of VirtualNetwork resources in a resource group.
20559	Value *[]VirtualNetwork `json:"value,omitempty"`
20560	// NextLink - The URL to get the next set of results.
20561	NextLink *string `json:"nextLink,omitempty"`
20562}
20563
20564// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
20565type VirtualNetworkListResultIterator struct {
20566	i    int
20567	page VirtualNetworkListResultPage
20568}
20569
20570// NextWithContext advances to the next value.  If there was an error making
20571// the request the iterator does not advance and the error is returned.
20572func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
20573	if tracing.IsEnabled() {
20574		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
20575		defer func() {
20576			sc := -1
20577			if iter.Response().Response.Response != nil {
20578				sc = iter.Response().Response.Response.StatusCode
20579			}
20580			tracing.EndSpan(ctx, sc, err)
20581		}()
20582	}
20583	iter.i++
20584	if iter.i < len(iter.page.Values()) {
20585		return nil
20586	}
20587	err = iter.page.NextWithContext(ctx)
20588	if err != nil {
20589		iter.i--
20590		return err
20591	}
20592	iter.i = 0
20593	return nil
20594}
20595
20596// Next advances to the next value.  If there was an error making
20597// the request the iterator does not advance and the error is returned.
20598// Deprecated: Use NextWithContext() instead.
20599func (iter *VirtualNetworkListResultIterator) Next() error {
20600	return iter.NextWithContext(context.Background())
20601}
20602
20603// NotDone returns true if the enumeration should be started or is not yet complete.
20604func (iter VirtualNetworkListResultIterator) NotDone() bool {
20605	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20606}
20607
20608// Response returns the raw server response from the last page request.
20609func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
20610	return iter.page.Response()
20611}
20612
20613// Value returns the current value or a zero-initialized value if the
20614// iterator has advanced beyond the end of the collection.
20615func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
20616	if !iter.page.NotDone() {
20617		return VirtualNetwork{}
20618	}
20619	return iter.page.Values()[iter.i]
20620}
20621
20622// Creates a new instance of the VirtualNetworkListResultIterator type.
20623func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
20624	return VirtualNetworkListResultIterator{page: page}
20625}
20626
20627// IsEmpty returns true if the ListResult contains no values.
20628func (vnlr VirtualNetworkListResult) IsEmpty() bool {
20629	return vnlr.Value == nil || len(*vnlr.Value) == 0
20630}
20631
20632// hasNextLink returns true if the NextLink is not empty.
20633func (vnlr VirtualNetworkListResult) hasNextLink() bool {
20634	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
20635}
20636
20637// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
20638// It returns nil if no more results exist.
20639func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
20640	if !vnlr.hasNextLink() {
20641		return nil, nil
20642	}
20643	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20644		autorest.AsJSON(),
20645		autorest.AsGet(),
20646		autorest.WithBaseURL(to.String(vnlr.NextLink)))
20647}
20648
20649// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
20650type VirtualNetworkListResultPage struct {
20651	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
20652	vnlr VirtualNetworkListResult
20653}
20654
20655// NextWithContext advances to the next page of values.  If there was an error making
20656// the request the page does not advance and the error is returned.
20657func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
20658	if tracing.IsEnabled() {
20659		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
20660		defer func() {
20661			sc := -1
20662			if page.Response().Response.Response != nil {
20663				sc = page.Response().Response.Response.StatusCode
20664			}
20665			tracing.EndSpan(ctx, sc, err)
20666		}()
20667	}
20668	for {
20669		next, err := page.fn(ctx, page.vnlr)
20670		if err != nil {
20671			return err
20672		}
20673		page.vnlr = next
20674		if !next.hasNextLink() || !next.IsEmpty() {
20675			break
20676		}
20677	}
20678	return nil
20679}
20680
20681// Next advances to the next page of values.  If there was an error making
20682// the request the page does not advance and the error is returned.
20683// Deprecated: Use NextWithContext() instead.
20684func (page *VirtualNetworkListResultPage) Next() error {
20685	return page.NextWithContext(context.Background())
20686}
20687
20688// NotDone returns true if the page enumeration should be started or is not yet complete.
20689func (page VirtualNetworkListResultPage) NotDone() bool {
20690	return !page.vnlr.IsEmpty()
20691}
20692
20693// Response returns the raw server response from the last page request.
20694func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
20695	return page.vnlr
20696}
20697
20698// Values returns the slice of values for the current page or nil if there are no values.
20699func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
20700	if page.vnlr.IsEmpty() {
20701		return nil
20702	}
20703	return *page.vnlr.Value
20704}
20705
20706// Creates a new instance of the VirtualNetworkListResultPage type.
20707func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
20708	return VirtualNetworkListResultPage{
20709		fn:   getNextPage,
20710		vnlr: cur,
20711	}
20712}
20713
20714// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
20715type VirtualNetworkListUsageResult struct {
20716	autorest.Response `json:"-"`
20717	// Value - READ-ONLY; VirtualNetwork usage stats.
20718	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
20719	// NextLink - The URL to get the next set of results.
20720	NextLink *string `json:"nextLink,omitempty"`
20721}
20722
20723// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
20724func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
20725	objectMap := make(map[string]interface{})
20726	if vnlur.NextLink != nil {
20727		objectMap["nextLink"] = vnlur.NextLink
20728	}
20729	return json.Marshal(objectMap)
20730}
20731
20732// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
20733// values.
20734type VirtualNetworkListUsageResultIterator struct {
20735	i    int
20736	page VirtualNetworkListUsageResultPage
20737}
20738
20739// NextWithContext advances to the next value.  If there was an error making
20740// the request the iterator does not advance and the error is returned.
20741func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
20742	if tracing.IsEnabled() {
20743		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
20744		defer func() {
20745			sc := -1
20746			if iter.Response().Response.Response != nil {
20747				sc = iter.Response().Response.Response.StatusCode
20748			}
20749			tracing.EndSpan(ctx, sc, err)
20750		}()
20751	}
20752	iter.i++
20753	if iter.i < len(iter.page.Values()) {
20754		return nil
20755	}
20756	err = iter.page.NextWithContext(ctx)
20757	if err != nil {
20758		iter.i--
20759		return err
20760	}
20761	iter.i = 0
20762	return nil
20763}
20764
20765// Next advances to the next value.  If there was an error making
20766// the request the iterator does not advance and the error is returned.
20767// Deprecated: Use NextWithContext() instead.
20768func (iter *VirtualNetworkListUsageResultIterator) Next() error {
20769	return iter.NextWithContext(context.Background())
20770}
20771
20772// NotDone returns true if the enumeration should be started or is not yet complete.
20773func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
20774	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20775}
20776
20777// Response returns the raw server response from the last page request.
20778func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
20779	return iter.page.Response()
20780}
20781
20782// Value returns the current value or a zero-initialized value if the
20783// iterator has advanced beyond the end of the collection.
20784func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
20785	if !iter.page.NotDone() {
20786		return VirtualNetworkUsage{}
20787	}
20788	return iter.page.Values()[iter.i]
20789}
20790
20791// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
20792func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
20793	return VirtualNetworkListUsageResultIterator{page: page}
20794}
20795
20796// IsEmpty returns true if the ListResult contains no values.
20797func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
20798	return vnlur.Value == nil || len(*vnlur.Value) == 0
20799}
20800
20801// hasNextLink returns true if the NextLink is not empty.
20802func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
20803	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
20804}
20805
20806// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
20807// It returns nil if no more results exist.
20808func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
20809	if !vnlur.hasNextLink() {
20810		return nil, nil
20811	}
20812	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20813		autorest.AsJSON(),
20814		autorest.AsGet(),
20815		autorest.WithBaseURL(to.String(vnlur.NextLink)))
20816}
20817
20818// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
20819type VirtualNetworkListUsageResultPage struct {
20820	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
20821	vnlur VirtualNetworkListUsageResult
20822}
20823
20824// NextWithContext advances to the next page of values.  If there was an error making
20825// the request the page does not advance and the error is returned.
20826func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
20827	if tracing.IsEnabled() {
20828		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
20829		defer func() {
20830			sc := -1
20831			if page.Response().Response.Response != nil {
20832				sc = page.Response().Response.Response.StatusCode
20833			}
20834			tracing.EndSpan(ctx, sc, err)
20835		}()
20836	}
20837	for {
20838		next, err := page.fn(ctx, page.vnlur)
20839		if err != nil {
20840			return err
20841		}
20842		page.vnlur = next
20843		if !next.hasNextLink() || !next.IsEmpty() {
20844			break
20845		}
20846	}
20847	return nil
20848}
20849
20850// Next advances to the next page of values.  If there was an error making
20851// the request the page does not advance and the error is returned.
20852// Deprecated: Use NextWithContext() instead.
20853func (page *VirtualNetworkListUsageResultPage) Next() error {
20854	return page.NextWithContext(context.Background())
20855}
20856
20857// NotDone returns true if the page enumeration should be started or is not yet complete.
20858func (page VirtualNetworkListUsageResultPage) NotDone() bool {
20859	return !page.vnlur.IsEmpty()
20860}
20861
20862// Response returns the raw server response from the last page request.
20863func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
20864	return page.vnlur
20865}
20866
20867// Values returns the slice of values for the current page or nil if there are no values.
20868func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
20869	if page.vnlur.IsEmpty() {
20870		return nil
20871	}
20872	return *page.vnlur.Value
20873}
20874
20875// Creates a new instance of the VirtualNetworkListUsageResultPage type.
20876func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
20877	return VirtualNetworkListUsageResultPage{
20878		fn:    getNextPage,
20879		vnlur: cur,
20880	}
20881}
20882
20883// VirtualNetworkPeering peerings in a virtual network resource.
20884type VirtualNetworkPeering struct {
20885	autorest.Response `json:"-"`
20886	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
20887	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
20888	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20889	Name *string `json:"name,omitempty"`
20890	// Etag - A unique read-only string that changes whenever the resource is updated.
20891	Etag *string `json:"etag,omitempty"`
20892	// ID - Resource ID.
20893	ID *string `json:"id,omitempty"`
20894}
20895
20896// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
20897func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
20898	objectMap := make(map[string]interface{})
20899	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
20900		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
20901	}
20902	if vnp.Name != nil {
20903		objectMap["name"] = vnp.Name
20904	}
20905	if vnp.Etag != nil {
20906		objectMap["etag"] = vnp.Etag
20907	}
20908	if vnp.ID != nil {
20909		objectMap["id"] = vnp.ID
20910	}
20911	return json.Marshal(objectMap)
20912}
20913
20914// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
20915func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
20916	var m map[string]*json.RawMessage
20917	err := json.Unmarshal(body, &m)
20918	if err != nil {
20919		return err
20920	}
20921	for k, v := range m {
20922		switch k {
20923		case "properties":
20924			if v != nil {
20925				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
20926				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
20927				if err != nil {
20928					return err
20929				}
20930				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
20931			}
20932		case "name":
20933			if v != nil {
20934				var name string
20935				err = json.Unmarshal(*v, &name)
20936				if err != nil {
20937					return err
20938				}
20939				vnp.Name = &name
20940			}
20941		case "etag":
20942			if v != nil {
20943				var etag string
20944				err = json.Unmarshal(*v, &etag)
20945				if err != nil {
20946					return err
20947				}
20948				vnp.Etag = &etag
20949			}
20950		case "id":
20951			if v != nil {
20952				var ID string
20953				err = json.Unmarshal(*v, &ID)
20954				if err != nil {
20955					return err
20956				}
20957				vnp.ID = &ID
20958			}
20959		}
20960	}
20961
20962	return nil
20963}
20964
20965// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
20966// belong to a virtual network.
20967type VirtualNetworkPeeringListResult struct {
20968	autorest.Response `json:"-"`
20969	// Value - The peerings in a virtual network.
20970	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
20971	// NextLink - The URL to get the next set of results.
20972	NextLink *string `json:"nextLink,omitempty"`
20973}
20974
20975// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
20976// values.
20977type VirtualNetworkPeeringListResultIterator struct {
20978	i    int
20979	page VirtualNetworkPeeringListResultPage
20980}
20981
20982// NextWithContext advances to the next value.  If there was an error making
20983// the request the iterator does not advance and the error is returned.
20984func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
20985	if tracing.IsEnabled() {
20986		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
20987		defer func() {
20988			sc := -1
20989			if iter.Response().Response.Response != nil {
20990				sc = iter.Response().Response.Response.StatusCode
20991			}
20992			tracing.EndSpan(ctx, sc, err)
20993		}()
20994	}
20995	iter.i++
20996	if iter.i < len(iter.page.Values()) {
20997		return nil
20998	}
20999	err = iter.page.NextWithContext(ctx)
21000	if err != nil {
21001		iter.i--
21002		return err
21003	}
21004	iter.i = 0
21005	return nil
21006}
21007
21008// Next advances to the next value.  If there was an error making
21009// the request the iterator does not advance and the error is returned.
21010// Deprecated: Use NextWithContext() instead.
21011func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
21012	return iter.NextWithContext(context.Background())
21013}
21014
21015// NotDone returns true if the enumeration should be started or is not yet complete.
21016func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
21017	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21018}
21019
21020// Response returns the raw server response from the last page request.
21021func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
21022	return iter.page.Response()
21023}
21024
21025// Value returns the current value or a zero-initialized value if the
21026// iterator has advanced beyond the end of the collection.
21027func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
21028	if !iter.page.NotDone() {
21029		return VirtualNetworkPeering{}
21030	}
21031	return iter.page.Values()[iter.i]
21032}
21033
21034// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
21035func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
21036	return VirtualNetworkPeeringListResultIterator{page: page}
21037}
21038
21039// IsEmpty returns true if the ListResult contains no values.
21040func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
21041	return vnplr.Value == nil || len(*vnplr.Value) == 0
21042}
21043
21044// hasNextLink returns true if the NextLink is not empty.
21045func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
21046	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
21047}
21048
21049// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
21050// It returns nil if no more results exist.
21051func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
21052	if !vnplr.hasNextLink() {
21053		return nil, nil
21054	}
21055	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21056		autorest.AsJSON(),
21057		autorest.AsGet(),
21058		autorest.WithBaseURL(to.String(vnplr.NextLink)))
21059}
21060
21061// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
21062type VirtualNetworkPeeringListResultPage struct {
21063	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
21064	vnplr VirtualNetworkPeeringListResult
21065}
21066
21067// NextWithContext advances to the next page of values.  If there was an error making
21068// the request the page does not advance and the error is returned.
21069func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
21070	if tracing.IsEnabled() {
21071		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
21072		defer func() {
21073			sc := -1
21074			if page.Response().Response.Response != nil {
21075				sc = page.Response().Response.Response.StatusCode
21076			}
21077			tracing.EndSpan(ctx, sc, err)
21078		}()
21079	}
21080	for {
21081		next, err := page.fn(ctx, page.vnplr)
21082		if err != nil {
21083			return err
21084		}
21085		page.vnplr = next
21086		if !next.hasNextLink() || !next.IsEmpty() {
21087			break
21088		}
21089	}
21090	return nil
21091}
21092
21093// Next advances to the next page of values.  If there was an error making
21094// the request the page does not advance and the error is returned.
21095// Deprecated: Use NextWithContext() instead.
21096func (page *VirtualNetworkPeeringListResultPage) Next() error {
21097	return page.NextWithContext(context.Background())
21098}
21099
21100// NotDone returns true if the page enumeration should be started or is not yet complete.
21101func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
21102	return !page.vnplr.IsEmpty()
21103}
21104
21105// Response returns the raw server response from the last page request.
21106func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
21107	return page.vnplr
21108}
21109
21110// Values returns the slice of values for the current page or nil if there are no values.
21111func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
21112	if page.vnplr.IsEmpty() {
21113		return nil
21114	}
21115	return *page.vnplr.Value
21116}
21117
21118// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
21119func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
21120	return VirtualNetworkPeeringListResultPage{
21121		fn:    getNextPage,
21122		vnplr: cur,
21123	}
21124}
21125
21126// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
21127type VirtualNetworkPeeringPropertiesFormat struct {
21128	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
21129	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
21130	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
21131	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
21132	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
21133	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
21134	// UseRemoteGateways - If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
21135	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
21136	// RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
21137	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
21138	// RemoteAddressSpace - The reference of the remote virtual network address space.
21139	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
21140	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
21141	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
21142	// ProvisioningState - The provisioning state of the resource.
21143	ProvisioningState *string `json:"provisioningState,omitempty"`
21144}
21145
21146// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21147// long-running operation.
21148type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
21149	azure.FutureAPI
21150	// Result returns the result of the asynchronous operation.
21151	// If the operation has not completed it will return an error.
21152	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
21153}
21154
21155// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21156func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21157	var azFuture azure.Future
21158	if err := json.Unmarshal(body, &azFuture); err != nil {
21159		return err
21160	}
21161	future.FutureAPI = &azFuture
21162	future.Result = future.result
21163	return nil
21164}
21165
21166// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
21167func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
21168	var done bool
21169	done, err = future.DoneWithContext(context.Background(), client)
21170	if err != nil {
21171		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21172		return
21173	}
21174	if !done {
21175		vnp.Response.Response = future.Response()
21176		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
21177		return
21178	}
21179	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21180	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
21181		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
21182		if err != nil {
21183			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
21184		}
21185	}
21186	return
21187}
21188
21189// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
21190// long-running operation.
21191type VirtualNetworkPeeringsDeleteFuture struct {
21192	azure.FutureAPI
21193	// Result returns the result of the asynchronous operation.
21194	// If the operation has not completed it will return an error.
21195	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
21196}
21197
21198// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21199func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
21200	var azFuture azure.Future
21201	if err := json.Unmarshal(body, &azFuture); err != nil {
21202		return err
21203	}
21204	future.FutureAPI = &azFuture
21205	future.Result = future.result
21206	return nil
21207}
21208
21209// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
21210func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
21211	var done bool
21212	done, err = future.DoneWithContext(context.Background(), client)
21213	if err != nil {
21214		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
21215		return
21216	}
21217	if !done {
21218		ar.Response = future.Response()
21219		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
21220		return
21221	}
21222	ar.Response = future.Response()
21223	return
21224}
21225
21226// VirtualNetworkPropertiesFormat properties of the virtual network.
21227type VirtualNetworkPropertiesFormat struct {
21228	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
21229	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
21230	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
21231	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
21232	// Subnets - A list of subnets in a Virtual Network.
21233	Subnets *[]Subnet `json:"subnets,omitempty"`
21234	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
21235	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
21236	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
21237	ResourceGUID *string `json:"resourceGuid,omitempty"`
21238	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21239	ProvisioningState *string `json:"provisioningState,omitempty"`
21240	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in the virtual network. It requires a DDoS protection plan associated with the resource.
21241	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
21242	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
21243	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
21244	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
21245	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
21246}
21247
21248// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21249// long-running operation.
21250type VirtualNetworksCreateOrUpdateFuture struct {
21251	azure.FutureAPI
21252	// Result returns the result of the asynchronous operation.
21253	// If the operation has not completed it will return an error.
21254	Result func(VirtualNetworksClient) (VirtualNetwork, error)
21255}
21256
21257// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21258func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21259	var azFuture azure.Future
21260	if err := json.Unmarshal(body, &azFuture); err != nil {
21261		return err
21262	}
21263	future.FutureAPI = &azFuture
21264	future.Result = future.result
21265	return nil
21266}
21267
21268// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
21269func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
21270	var done bool
21271	done, err = future.DoneWithContext(context.Background(), client)
21272	if err != nil {
21273		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21274		return
21275	}
21276	if !done {
21277		vn.Response.Response = future.Response()
21278		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
21279		return
21280	}
21281	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21282	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
21283		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
21284		if err != nil {
21285			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
21286		}
21287	}
21288	return
21289}
21290
21291// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21292// operation.
21293type VirtualNetworksDeleteFuture struct {
21294	azure.FutureAPI
21295	// Result returns the result of the asynchronous operation.
21296	// If the operation has not completed it will return an error.
21297	Result func(VirtualNetworksClient) (autorest.Response, error)
21298}
21299
21300// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21301func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
21302	var azFuture azure.Future
21303	if err := json.Unmarshal(body, &azFuture); err != nil {
21304		return err
21305	}
21306	future.FutureAPI = &azFuture
21307	future.Result = future.result
21308	return nil
21309}
21310
21311// result is the default implementation for VirtualNetworksDeleteFuture.Result.
21312func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
21313	var done bool
21314	done, err = future.DoneWithContext(context.Background(), client)
21315	if err != nil {
21316		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
21317		return
21318	}
21319	if !done {
21320		ar.Response = future.Response()
21321		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
21322		return
21323	}
21324	ar.Response = future.Response()
21325	return
21326}
21327
21328// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21329// long-running operation.
21330type VirtualNetworksUpdateTagsFuture struct {
21331	azure.FutureAPI
21332	// Result returns the result of the asynchronous operation.
21333	// If the operation has not completed it will return an error.
21334	Result func(VirtualNetworksClient) (VirtualNetwork, error)
21335}
21336
21337// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21338func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21339	var azFuture azure.Future
21340	if err := json.Unmarshal(body, &azFuture); err != nil {
21341		return err
21342	}
21343	future.FutureAPI = &azFuture
21344	future.Result = future.result
21345	return nil
21346}
21347
21348// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
21349func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
21350	var done bool
21351	done, err = future.DoneWithContext(context.Background(), client)
21352	if err != nil {
21353		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21354		return
21355	}
21356	if !done {
21357		vn.Response.Response = future.Response()
21358		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
21359		return
21360	}
21361	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21362	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
21363		vn, err = client.UpdateTagsResponder(vn.Response.Response)
21364		if err != nil {
21365			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
21366		}
21367	}
21368	return
21369}
21370
21371// VirtualNetworkUsage usage details for subnet.
21372type VirtualNetworkUsage struct {
21373	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
21374	CurrentValue *float64 `json:"currentValue,omitempty"`
21375	// ID - READ-ONLY; Subnet identifier.
21376	ID *string `json:"id,omitempty"`
21377	// Limit - READ-ONLY; Indicates the size of the subnet.
21378	Limit *float64 `json:"limit,omitempty"`
21379	// Name - READ-ONLY; The name containing common and localized value for usage.
21380	Name *VirtualNetworkUsageName `json:"name,omitempty"`
21381	// Unit - READ-ONLY; Usage units. Returns 'Count'
21382	Unit *string `json:"unit,omitempty"`
21383}
21384
21385// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
21386func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
21387	objectMap := make(map[string]interface{})
21388	return json.Marshal(objectMap)
21389}
21390
21391// VirtualNetworkUsageName usage strings container.
21392type VirtualNetworkUsageName struct {
21393	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
21394	LocalizedValue *string `json:"localizedValue,omitempty"`
21395	// Value - READ-ONLY; Subnet size and usage string.
21396	Value *string `json:"value,omitempty"`
21397}
21398
21399// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
21400func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
21401	objectMap := make(map[string]interface{})
21402	return json.Marshal(objectMap)
21403}
21404
21405// VirtualWAN virtualWAN Resource.
21406type VirtualWAN struct {
21407	autorest.Response     `json:"-"`
21408	*VirtualWanProperties `json:"properties,omitempty"`
21409	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21410	Etag *string `json:"etag,omitempty"`
21411	// ID - Resource ID.
21412	ID *string `json:"id,omitempty"`
21413	// Name - READ-ONLY; Resource name.
21414	Name *string `json:"name,omitempty"`
21415	// Type - READ-ONLY; Resource type.
21416	Type *string `json:"type,omitempty"`
21417	// Location - Resource location.
21418	Location *string `json:"location,omitempty"`
21419	// Tags - Resource tags.
21420	Tags map[string]*string `json:"tags"`
21421}
21422
21423// MarshalJSON is the custom marshaler for VirtualWAN.
21424func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
21425	objectMap := make(map[string]interface{})
21426	if vw.VirtualWanProperties != nil {
21427		objectMap["properties"] = vw.VirtualWanProperties
21428	}
21429	if vw.ID != nil {
21430		objectMap["id"] = vw.ID
21431	}
21432	if vw.Location != nil {
21433		objectMap["location"] = vw.Location
21434	}
21435	if vw.Tags != nil {
21436		objectMap["tags"] = vw.Tags
21437	}
21438	return json.Marshal(objectMap)
21439}
21440
21441// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
21442func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
21443	var m map[string]*json.RawMessage
21444	err := json.Unmarshal(body, &m)
21445	if err != nil {
21446		return err
21447	}
21448	for k, v := range m {
21449		switch k {
21450		case "properties":
21451			if v != nil {
21452				var virtualWanProperties VirtualWanProperties
21453				err = json.Unmarshal(*v, &virtualWanProperties)
21454				if err != nil {
21455					return err
21456				}
21457				vw.VirtualWanProperties = &virtualWanProperties
21458			}
21459		case "etag":
21460			if v != nil {
21461				var etag string
21462				err = json.Unmarshal(*v, &etag)
21463				if err != nil {
21464					return err
21465				}
21466				vw.Etag = &etag
21467			}
21468		case "id":
21469			if v != nil {
21470				var ID string
21471				err = json.Unmarshal(*v, &ID)
21472				if err != nil {
21473					return err
21474				}
21475				vw.ID = &ID
21476			}
21477		case "name":
21478			if v != nil {
21479				var name string
21480				err = json.Unmarshal(*v, &name)
21481				if err != nil {
21482					return err
21483				}
21484				vw.Name = &name
21485			}
21486		case "type":
21487			if v != nil {
21488				var typeVar string
21489				err = json.Unmarshal(*v, &typeVar)
21490				if err != nil {
21491					return err
21492				}
21493				vw.Type = &typeVar
21494			}
21495		case "location":
21496			if v != nil {
21497				var location string
21498				err = json.Unmarshal(*v, &location)
21499				if err != nil {
21500					return err
21501				}
21502				vw.Location = &location
21503			}
21504		case "tags":
21505			if v != nil {
21506				var tags map[string]*string
21507				err = json.Unmarshal(*v, &tags)
21508				if err != nil {
21509					return err
21510				}
21511				vw.Tags = tags
21512			}
21513		}
21514	}
21515
21516	return nil
21517}
21518
21519// VirtualWanProperties parameters for VirtualWAN
21520type VirtualWanProperties struct {
21521	// DisableVpnEncryption - Vpn encryption to be disabled or not.
21522	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
21523	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
21524	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
21525	// VpnSites - READ-ONLY
21526	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
21527	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21528	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21529}
21530
21531// MarshalJSON is the custom marshaler for VirtualWanProperties.
21532func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
21533	objectMap := make(map[string]interface{})
21534	if vwp.DisableVpnEncryption != nil {
21535		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
21536	}
21537	if vwp.ProvisioningState != "" {
21538		objectMap["provisioningState"] = vwp.ProvisioningState
21539	}
21540	return json.Marshal(objectMap)
21541}
21542
21543// VirtualWANsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21544// long-running operation.
21545type VirtualWANsCreateOrUpdateFuture struct {
21546	azure.FutureAPI
21547	// Result returns the result of the asynchronous operation.
21548	// If the operation has not completed it will return an error.
21549	Result func(VirtualWANsClient) (VirtualWAN, error)
21550}
21551
21552// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21553func (future *VirtualWANsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21554	var azFuture azure.Future
21555	if err := json.Unmarshal(body, &azFuture); err != nil {
21556		return err
21557	}
21558	future.FutureAPI = &azFuture
21559	future.Result = future.result
21560	return nil
21561}
21562
21563// result is the default implementation for VirtualWANsCreateOrUpdateFuture.Result.
21564func (future *VirtualWANsCreateOrUpdateFuture) result(client VirtualWANsClient) (vw VirtualWAN, err error) {
21565	var done bool
21566	done, err = future.DoneWithContext(context.Background(), client)
21567	if err != nil {
21568		err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21569		return
21570	}
21571	if !done {
21572		vw.Response.Response = future.Response()
21573		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsCreateOrUpdateFuture")
21574		return
21575	}
21576	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21577	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
21578		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
21579		if err != nil {
21580			err = autorest.NewErrorWithError(err, "network.VirtualWANsCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
21581		}
21582	}
21583	return
21584}
21585
21586// VirtualWANsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21587// operation.
21588type VirtualWANsDeleteFuture struct {
21589	azure.FutureAPI
21590	// Result returns the result of the asynchronous operation.
21591	// If the operation has not completed it will return an error.
21592	Result func(VirtualWANsClient) (autorest.Response, error)
21593}
21594
21595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21596func (future *VirtualWANsDeleteFuture) UnmarshalJSON(body []byte) error {
21597	var azFuture azure.Future
21598	if err := json.Unmarshal(body, &azFuture); err != nil {
21599		return err
21600	}
21601	future.FutureAPI = &azFuture
21602	future.Result = future.result
21603	return nil
21604}
21605
21606// result is the default implementation for VirtualWANsDeleteFuture.Result.
21607func (future *VirtualWANsDeleteFuture) result(client VirtualWANsClient) (ar autorest.Response, err error) {
21608	var done bool
21609	done, err = future.DoneWithContext(context.Background(), client)
21610	if err != nil {
21611		err = autorest.NewErrorWithError(err, "network.VirtualWANsDeleteFuture", "Result", future.Response(), "Polling failure")
21612		return
21613	}
21614	if !done {
21615		ar.Response = future.Response()
21616		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsDeleteFuture")
21617		return
21618	}
21619	ar.Response = future.Response()
21620	return
21621}
21622
21623// VirtualWANsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
21624// operation.
21625type VirtualWANsUpdateTagsFuture struct {
21626	azure.FutureAPI
21627	// Result returns the result of the asynchronous operation.
21628	// If the operation has not completed it will return an error.
21629	Result func(VirtualWANsClient) (VirtualWAN, error)
21630}
21631
21632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21633func (future *VirtualWANsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21634	var azFuture azure.Future
21635	if err := json.Unmarshal(body, &azFuture); err != nil {
21636		return err
21637	}
21638	future.FutureAPI = &azFuture
21639	future.Result = future.result
21640	return nil
21641}
21642
21643// result is the default implementation for VirtualWANsUpdateTagsFuture.Result.
21644func (future *VirtualWANsUpdateTagsFuture) result(client VirtualWANsClient) (vw VirtualWAN, err error) {
21645	var done bool
21646	done, err = future.DoneWithContext(context.Background(), client)
21647	if err != nil {
21648		err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21649		return
21650	}
21651	if !done {
21652		vw.Response.Response = future.Response()
21653		err = azure.NewAsyncOpIncompleteError("network.VirtualWANsUpdateTagsFuture")
21654		return
21655	}
21656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21657	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
21658		vw, err = client.UpdateTagsResponder(vw.Response.Response)
21659		if err != nil {
21660			err = autorest.NewErrorWithError(err, "network.VirtualWANsUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
21661		}
21662	}
21663	return
21664}
21665
21666// VpnClientConfiguration vpnClientConfiguration for P2S client.
21667type VpnClientConfiguration struct {
21668	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
21669	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
21670	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
21671	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
21672	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
21673	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
21674	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
21675	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
21676	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
21677	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
21678	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
21679	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
21680	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
21681	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
21682}
21683
21684// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
21685type VpnClientIPsecParameters struct {
21686	autorest.Response `json:"-"`
21687	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
21688	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
21689	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
21690	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
21691	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
21692	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
21693	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
21694	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
21695	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
21696	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
21697	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
21698	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
21699	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
21700	DhGroup DhGroup `json:"dhGroup,omitempty"`
21701	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
21702	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
21703}
21704
21705// VpnClientParameters vpn Client Parameters for package generation
21706type VpnClientParameters struct {
21707	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
21708	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
21709	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
21710	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
21711	// RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication.
21712	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
21713	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
21714	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
21715}
21716
21717// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
21718type VpnClientRevokedCertificate struct {
21719	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
21720	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
21721	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21722	Name *string `json:"name,omitempty"`
21723	// Etag - A unique read-only string that changes whenever the resource is updated.
21724	Etag *string `json:"etag,omitempty"`
21725	// ID - Resource ID.
21726	ID *string `json:"id,omitempty"`
21727}
21728
21729// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
21730func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
21731	objectMap := make(map[string]interface{})
21732	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
21733		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
21734	}
21735	if vcrc.Name != nil {
21736		objectMap["name"] = vcrc.Name
21737	}
21738	if vcrc.Etag != nil {
21739		objectMap["etag"] = vcrc.Etag
21740	}
21741	if vcrc.ID != nil {
21742		objectMap["id"] = vcrc.ID
21743	}
21744	return json.Marshal(objectMap)
21745}
21746
21747// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
21748func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
21749	var m map[string]*json.RawMessage
21750	err := json.Unmarshal(body, &m)
21751	if err != nil {
21752		return err
21753	}
21754	for k, v := range m {
21755		switch k {
21756		case "properties":
21757			if v != nil {
21758				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
21759				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
21760				if err != nil {
21761					return err
21762				}
21763				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
21764			}
21765		case "name":
21766			if v != nil {
21767				var name string
21768				err = json.Unmarshal(*v, &name)
21769				if err != nil {
21770					return err
21771				}
21772				vcrc.Name = &name
21773			}
21774		case "etag":
21775			if v != nil {
21776				var etag string
21777				err = json.Unmarshal(*v, &etag)
21778				if err != nil {
21779					return err
21780				}
21781				vcrc.Etag = &etag
21782			}
21783		case "id":
21784			if v != nil {
21785				var ID string
21786				err = json.Unmarshal(*v, &ID)
21787				if err != nil {
21788					return err
21789				}
21790				vcrc.ID = &ID
21791			}
21792		}
21793	}
21794
21795	return nil
21796}
21797
21798// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
21799// network gateway.
21800type VpnClientRevokedCertificatePropertiesFormat struct {
21801	// Thumbprint - The revoked VPN client certificate thumbprint.
21802	Thumbprint *string `json:"thumbprint,omitempty"`
21803	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21804	ProvisioningState *string `json:"provisioningState,omitempty"`
21805}
21806
21807// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
21808func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
21809	objectMap := make(map[string]interface{})
21810	if vcrcpf.Thumbprint != nil {
21811		objectMap["thumbprint"] = vcrcpf.Thumbprint
21812	}
21813	return json.Marshal(objectMap)
21814}
21815
21816// VpnClientRootCertificate VPN client root certificate of virtual network gateway
21817type VpnClientRootCertificate struct {
21818	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
21819	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
21820	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21821	Name *string `json:"name,omitempty"`
21822	// Etag - A unique read-only string that changes whenever the resource is updated.
21823	Etag *string `json:"etag,omitempty"`
21824	// ID - Resource ID.
21825	ID *string `json:"id,omitempty"`
21826}
21827
21828// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
21829func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
21830	objectMap := make(map[string]interface{})
21831	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
21832		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
21833	}
21834	if vcrc.Name != nil {
21835		objectMap["name"] = vcrc.Name
21836	}
21837	if vcrc.Etag != nil {
21838		objectMap["etag"] = vcrc.Etag
21839	}
21840	if vcrc.ID != nil {
21841		objectMap["id"] = vcrc.ID
21842	}
21843	return json.Marshal(objectMap)
21844}
21845
21846// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
21847func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
21848	var m map[string]*json.RawMessage
21849	err := json.Unmarshal(body, &m)
21850	if err != nil {
21851		return err
21852	}
21853	for k, v := range m {
21854		switch k {
21855		case "properties":
21856			if v != nil {
21857				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
21858				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
21859				if err != nil {
21860					return err
21861				}
21862				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
21863			}
21864		case "name":
21865			if v != nil {
21866				var name string
21867				err = json.Unmarshal(*v, &name)
21868				if err != nil {
21869					return err
21870				}
21871				vcrc.Name = &name
21872			}
21873		case "etag":
21874			if v != nil {
21875				var etag string
21876				err = json.Unmarshal(*v, &etag)
21877				if err != nil {
21878					return err
21879				}
21880				vcrc.Etag = &etag
21881			}
21882		case "id":
21883			if v != nil {
21884				var ID string
21885				err = json.Unmarshal(*v, &ID)
21886				if err != nil {
21887					return err
21888				}
21889				vcrc.ID = &ID
21890			}
21891		}
21892	}
21893
21894	return nil
21895}
21896
21897// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
21898type VpnClientRootCertificatePropertiesFormat struct {
21899	// PublicCertData - The certificate public data.
21900	PublicCertData *string `json:"publicCertData,omitempty"`
21901	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21902	ProvisioningState *string `json:"provisioningState,omitempty"`
21903}
21904
21905// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
21906func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
21907	objectMap := make(map[string]interface{})
21908	if vcrcpf.PublicCertData != nil {
21909		objectMap["publicCertData"] = vcrcpf.PublicCertData
21910	}
21911	return json.Marshal(objectMap)
21912}
21913
21914// VpnConnection vpnConnection Resource.
21915type VpnConnection struct {
21916	autorest.Response        `json:"-"`
21917	*VpnConnectionProperties `json:"properties,omitempty"`
21918	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21919	Name *string `json:"name,omitempty"`
21920	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21921	Etag *string `json:"etag,omitempty"`
21922	// ID - Resource ID.
21923	ID *string `json:"id,omitempty"`
21924}
21925
21926// MarshalJSON is the custom marshaler for VpnConnection.
21927func (vc VpnConnection) MarshalJSON() ([]byte, error) {
21928	objectMap := make(map[string]interface{})
21929	if vc.VpnConnectionProperties != nil {
21930		objectMap["properties"] = vc.VpnConnectionProperties
21931	}
21932	if vc.Name != nil {
21933		objectMap["name"] = vc.Name
21934	}
21935	if vc.ID != nil {
21936		objectMap["id"] = vc.ID
21937	}
21938	return json.Marshal(objectMap)
21939}
21940
21941// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
21942func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
21943	var m map[string]*json.RawMessage
21944	err := json.Unmarshal(body, &m)
21945	if err != nil {
21946		return err
21947	}
21948	for k, v := range m {
21949		switch k {
21950		case "properties":
21951			if v != nil {
21952				var vpnConnectionProperties VpnConnectionProperties
21953				err = json.Unmarshal(*v, &vpnConnectionProperties)
21954				if err != nil {
21955					return err
21956				}
21957				vc.VpnConnectionProperties = &vpnConnectionProperties
21958			}
21959		case "name":
21960			if v != nil {
21961				var name string
21962				err = json.Unmarshal(*v, &name)
21963				if err != nil {
21964					return err
21965				}
21966				vc.Name = &name
21967			}
21968		case "etag":
21969			if v != nil {
21970				var etag string
21971				err = json.Unmarshal(*v, &etag)
21972				if err != nil {
21973					return err
21974				}
21975				vc.Etag = &etag
21976			}
21977		case "id":
21978			if v != nil {
21979				var ID string
21980				err = json.Unmarshal(*v, &ID)
21981				if err != nil {
21982					return err
21983				}
21984				vc.ID = &ID
21985			}
21986		}
21987	}
21988
21989	return nil
21990}
21991
21992// VpnConnectionProperties parameters for VpnConnection
21993type VpnConnectionProperties struct {
21994	// RemoteVpnSite - Id of the connected vpn site.
21995	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
21996	// RoutingWeight - routing weight for vpn connection.
21997	RoutingWeight *int32 `json:"routingWeight,omitempty"`
21998	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
21999	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
22000	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
22001	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
22002	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
22003	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
22004	// ConnectionBandwidthInMbps - READ-ONLY; Expected bandwidth in MBPS.
22005	ConnectionBandwidthInMbps *int32 `json:"connectionBandwidthInMbps,omitempty"`
22006	// SharedKey - SharedKey for the vpn connection.
22007	SharedKey *string `json:"sharedKey,omitempty"`
22008	// EnableBgp - EnableBgp flag
22009	EnableBgp *bool `json:"enableBgp,omitempty"`
22010	// IpsecPolicies - The IPSec Policies to be considered by this connection.
22011	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
22012	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22013	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22014}
22015
22016// MarshalJSON is the custom marshaler for VpnConnectionProperties.
22017func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
22018	objectMap := make(map[string]interface{})
22019	if vcp.RemoteVpnSite != nil {
22020		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
22021	}
22022	if vcp.RoutingWeight != nil {
22023		objectMap["routingWeight"] = vcp.RoutingWeight
22024	}
22025	if vcp.ConnectionStatus != "" {
22026		objectMap["connectionStatus"] = vcp.ConnectionStatus
22027	}
22028	if vcp.SharedKey != nil {
22029		objectMap["sharedKey"] = vcp.SharedKey
22030	}
22031	if vcp.EnableBgp != nil {
22032		objectMap["enableBgp"] = vcp.EnableBgp
22033	}
22034	if vcp.IpsecPolicies != nil {
22035		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
22036	}
22037	if vcp.ProvisioningState != "" {
22038		objectMap["provisioningState"] = vcp.ProvisioningState
22039	}
22040	return json.Marshal(objectMap)
22041}
22042
22043// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22044// long-running operation.
22045type VpnConnectionsCreateOrUpdateFuture struct {
22046	azure.FutureAPI
22047	// Result returns the result of the asynchronous operation.
22048	// If the operation has not completed it will return an error.
22049	Result func(VpnConnectionsClient) (VpnConnection, error)
22050}
22051
22052// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22053func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22054	var azFuture azure.Future
22055	if err := json.Unmarshal(body, &azFuture); err != nil {
22056		return err
22057	}
22058	future.FutureAPI = &azFuture
22059	future.Result = future.result
22060	return nil
22061}
22062
22063// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
22064func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
22065	var done bool
22066	done, err = future.DoneWithContext(context.Background(), client)
22067	if err != nil {
22068		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22069		return
22070	}
22071	if !done {
22072		vc.Response.Response = future.Response()
22073		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
22074		return
22075	}
22076	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22077	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
22078		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
22079		if err != nil {
22080			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
22081		}
22082	}
22083	return
22084}
22085
22086// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22087// operation.
22088type VpnConnectionsDeleteFuture struct {
22089	azure.FutureAPI
22090	// Result returns the result of the asynchronous operation.
22091	// If the operation has not completed it will return an error.
22092	Result func(VpnConnectionsClient) (autorest.Response, error)
22093}
22094
22095// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22096func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
22097	var azFuture azure.Future
22098	if err := json.Unmarshal(body, &azFuture); err != nil {
22099		return err
22100	}
22101	future.FutureAPI = &azFuture
22102	future.Result = future.result
22103	return nil
22104}
22105
22106// result is the default implementation for VpnConnectionsDeleteFuture.Result.
22107func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
22108	var done bool
22109	done, err = future.DoneWithContext(context.Background(), client)
22110	if err != nil {
22111		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
22112		return
22113	}
22114	if !done {
22115		ar.Response = future.Response()
22116		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
22117		return
22118	}
22119	ar.Response = future.Response()
22120	return
22121}
22122
22123// VpnDeviceScriptParameters vpn device configuration script generation parameters
22124type VpnDeviceScriptParameters struct {
22125	// Vendor - The vendor for the vpn device.
22126	Vendor *string `json:"vendor,omitempty"`
22127	// DeviceFamily - The device family for the vpn device.
22128	DeviceFamily *string `json:"deviceFamily,omitempty"`
22129	// FirmwareVersion - The firmware version for the vpn device.
22130	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
22131}
22132
22133// VpnGateway vpnGateway Resource.
22134type VpnGateway struct {
22135	autorest.Response     `json:"-"`
22136	*VpnGatewayProperties `json:"properties,omitempty"`
22137	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
22138	Etag *string `json:"etag,omitempty"`
22139	// ID - Resource ID.
22140	ID *string `json:"id,omitempty"`
22141	// Name - READ-ONLY; Resource name.
22142	Name *string `json:"name,omitempty"`
22143	// Type - READ-ONLY; Resource type.
22144	Type *string `json:"type,omitempty"`
22145	// Location - Resource location.
22146	Location *string `json:"location,omitempty"`
22147	// Tags - Resource tags.
22148	Tags map[string]*string `json:"tags"`
22149}
22150
22151// MarshalJSON is the custom marshaler for VpnGateway.
22152func (vg VpnGateway) MarshalJSON() ([]byte, error) {
22153	objectMap := make(map[string]interface{})
22154	if vg.VpnGatewayProperties != nil {
22155		objectMap["properties"] = vg.VpnGatewayProperties
22156	}
22157	if vg.ID != nil {
22158		objectMap["id"] = vg.ID
22159	}
22160	if vg.Location != nil {
22161		objectMap["location"] = vg.Location
22162	}
22163	if vg.Tags != nil {
22164		objectMap["tags"] = vg.Tags
22165	}
22166	return json.Marshal(objectMap)
22167}
22168
22169// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
22170func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
22171	var m map[string]*json.RawMessage
22172	err := json.Unmarshal(body, &m)
22173	if err != nil {
22174		return err
22175	}
22176	for k, v := range m {
22177		switch k {
22178		case "properties":
22179			if v != nil {
22180				var vpnGatewayProperties VpnGatewayProperties
22181				err = json.Unmarshal(*v, &vpnGatewayProperties)
22182				if err != nil {
22183					return err
22184				}
22185				vg.VpnGatewayProperties = &vpnGatewayProperties
22186			}
22187		case "etag":
22188			if v != nil {
22189				var etag string
22190				err = json.Unmarshal(*v, &etag)
22191				if err != nil {
22192					return err
22193				}
22194				vg.Etag = &etag
22195			}
22196		case "id":
22197			if v != nil {
22198				var ID string
22199				err = json.Unmarshal(*v, &ID)
22200				if err != nil {
22201					return err
22202				}
22203				vg.ID = &ID
22204			}
22205		case "name":
22206			if v != nil {
22207				var name string
22208				err = json.Unmarshal(*v, &name)
22209				if err != nil {
22210					return err
22211				}
22212				vg.Name = &name
22213			}
22214		case "type":
22215			if v != nil {
22216				var typeVar string
22217				err = json.Unmarshal(*v, &typeVar)
22218				if err != nil {
22219					return err
22220				}
22221				vg.Type = &typeVar
22222			}
22223		case "location":
22224			if v != nil {
22225				var location string
22226				err = json.Unmarshal(*v, &location)
22227				if err != nil {
22228					return err
22229				}
22230				vg.Location = &location
22231			}
22232		case "tags":
22233			if v != nil {
22234				var tags map[string]*string
22235				err = json.Unmarshal(*v, &tags)
22236				if err != nil {
22237					return err
22238				}
22239				vg.Tags = tags
22240			}
22241		}
22242	}
22243
22244	return nil
22245}
22246
22247// VpnGatewayProperties parameters for VpnGateway
22248type VpnGatewayProperties struct {
22249	// VirtualHub - The VirtualHub to which the gateway belongs
22250	VirtualHub *SubResource `json:"virtualHub,omitempty"`
22251	// Connections - list of all vpn connections to the gateway.
22252	Connections *[]VpnConnection `json:"connections,omitempty"`
22253	// BgpSettings - Local network gateway's BGP speaker settings.
22254	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
22255	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22256	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22257	// Policies - The policies applied to this vpn gateway.
22258	Policies *Policies `json:"policies,omitempty"`
22259}
22260
22261// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22262// long-running operation.
22263type VpnGatewaysCreateOrUpdateFuture struct {
22264	azure.FutureAPI
22265	// Result returns the result of the asynchronous operation.
22266	// If the operation has not completed it will return an error.
22267	Result func(VpnGatewaysClient) (VpnGateway, error)
22268}
22269
22270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22271func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22272	var azFuture azure.Future
22273	if err := json.Unmarshal(body, &azFuture); err != nil {
22274		return err
22275	}
22276	future.FutureAPI = &azFuture
22277	future.Result = future.result
22278	return nil
22279}
22280
22281// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
22282func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
22283	var done bool
22284	done, err = future.DoneWithContext(context.Background(), client)
22285	if err != nil {
22286		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22287		return
22288	}
22289	if !done {
22290		vg.Response.Response = future.Response()
22291		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
22292		return
22293	}
22294	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22295	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
22296		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
22297		if err != nil {
22298			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
22299		}
22300	}
22301	return
22302}
22303
22304// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22305// operation.
22306type VpnGatewaysDeleteFuture struct {
22307	azure.FutureAPI
22308	// Result returns the result of the asynchronous operation.
22309	// If the operation has not completed it will return an error.
22310	Result func(VpnGatewaysClient) (autorest.Response, error)
22311}
22312
22313// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22314func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
22315	var azFuture azure.Future
22316	if err := json.Unmarshal(body, &azFuture); err != nil {
22317		return err
22318	}
22319	future.FutureAPI = &azFuture
22320	future.Result = future.result
22321	return nil
22322}
22323
22324// result is the default implementation for VpnGatewaysDeleteFuture.Result.
22325func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
22326	var done bool
22327	done, err = future.DoneWithContext(context.Background(), client)
22328	if err != nil {
22329		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
22330		return
22331	}
22332	if !done {
22333		ar.Response = future.Response()
22334		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
22335		return
22336	}
22337	ar.Response = future.Response()
22338	return
22339}
22340
22341// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22342// operation.
22343type VpnGatewaysUpdateTagsFuture struct {
22344	azure.FutureAPI
22345	// Result returns the result of the asynchronous operation.
22346	// If the operation has not completed it will return an error.
22347	Result func(VpnGatewaysClient) (VpnGateway, error)
22348}
22349
22350// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22351func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22352	var azFuture azure.Future
22353	if err := json.Unmarshal(body, &azFuture); err != nil {
22354		return err
22355	}
22356	future.FutureAPI = &azFuture
22357	future.Result = future.result
22358	return nil
22359}
22360
22361// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
22362func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
22363	var done bool
22364	done, err = future.DoneWithContext(context.Background(), client)
22365	if err != nil {
22366		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22367		return
22368	}
22369	if !done {
22370		vg.Response.Response = future.Response()
22371		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
22372		return
22373	}
22374	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22375	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
22376		vg, err = client.UpdateTagsResponder(vg.Response.Response)
22377		if err != nil {
22378			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
22379		}
22380	}
22381	return
22382}
22383
22384// VpnSite vpnSite Resource.
22385type VpnSite struct {
22386	autorest.Response  `json:"-"`
22387	*VpnSiteProperties `json:"properties,omitempty"`
22388	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
22389	Etag *string `json:"etag,omitempty"`
22390	// ID - Resource ID.
22391	ID *string `json:"id,omitempty"`
22392	// Name - READ-ONLY; Resource name.
22393	Name *string `json:"name,omitempty"`
22394	// Type - READ-ONLY; Resource type.
22395	Type *string `json:"type,omitempty"`
22396	// Location - Resource location.
22397	Location *string `json:"location,omitempty"`
22398	// Tags - Resource tags.
22399	Tags map[string]*string `json:"tags"`
22400}
22401
22402// MarshalJSON is the custom marshaler for VpnSite.
22403func (vs VpnSite) MarshalJSON() ([]byte, error) {
22404	objectMap := make(map[string]interface{})
22405	if vs.VpnSiteProperties != nil {
22406		objectMap["properties"] = vs.VpnSiteProperties
22407	}
22408	if vs.ID != nil {
22409		objectMap["id"] = vs.ID
22410	}
22411	if vs.Location != nil {
22412		objectMap["location"] = vs.Location
22413	}
22414	if vs.Tags != nil {
22415		objectMap["tags"] = vs.Tags
22416	}
22417	return json.Marshal(objectMap)
22418}
22419
22420// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
22421func (vs *VpnSite) UnmarshalJSON(body []byte) error {
22422	var m map[string]*json.RawMessage
22423	err := json.Unmarshal(body, &m)
22424	if err != nil {
22425		return err
22426	}
22427	for k, v := range m {
22428		switch k {
22429		case "properties":
22430			if v != nil {
22431				var vpnSiteProperties VpnSiteProperties
22432				err = json.Unmarshal(*v, &vpnSiteProperties)
22433				if err != nil {
22434					return err
22435				}
22436				vs.VpnSiteProperties = &vpnSiteProperties
22437			}
22438		case "etag":
22439			if v != nil {
22440				var etag string
22441				err = json.Unmarshal(*v, &etag)
22442				if err != nil {
22443					return err
22444				}
22445				vs.Etag = &etag
22446			}
22447		case "id":
22448			if v != nil {
22449				var ID string
22450				err = json.Unmarshal(*v, &ID)
22451				if err != nil {
22452					return err
22453				}
22454				vs.ID = &ID
22455			}
22456		case "name":
22457			if v != nil {
22458				var name string
22459				err = json.Unmarshal(*v, &name)
22460				if err != nil {
22461					return err
22462				}
22463				vs.Name = &name
22464			}
22465		case "type":
22466			if v != nil {
22467				var typeVar string
22468				err = json.Unmarshal(*v, &typeVar)
22469				if err != nil {
22470					return err
22471				}
22472				vs.Type = &typeVar
22473			}
22474		case "location":
22475			if v != nil {
22476				var location string
22477				err = json.Unmarshal(*v, &location)
22478				if err != nil {
22479					return err
22480				}
22481				vs.Location = &location
22482			}
22483		case "tags":
22484			if v != nil {
22485				var tags map[string]*string
22486				err = json.Unmarshal(*v, &tags)
22487				if err != nil {
22488					return err
22489				}
22490				vs.Tags = tags
22491			}
22492		}
22493	}
22494
22495	return nil
22496}
22497
22498// VpnSiteID vpnSite Resource.
22499type VpnSiteID struct {
22500	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
22501	VpnSite *string `json:"vpnSite,omitempty"`
22502}
22503
22504// MarshalJSON is the custom marshaler for VpnSiteID.
22505func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
22506	objectMap := make(map[string]interface{})
22507	return json.Marshal(objectMap)
22508}
22509
22510// VpnSiteProperties parameters for VpnSite
22511type VpnSiteProperties struct {
22512	// VirtualWAN - The VirtualWAN to which the vpnSite belongs
22513	VirtualWAN *SubResource `json:"virtualWAN,omitempty"`
22514	// DeviceProperties - The device properties
22515	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
22516	// IPAddress - The ip-address for the vpn-site.
22517	IPAddress *string `json:"ipAddress,omitempty"`
22518	// SiteKey - The key for vpn-site that can be used for connections.
22519	SiteKey *string `json:"siteKey,omitempty"`
22520	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
22521	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
22522	// BgpProperties - The set of bgp properties.
22523	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
22524	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22525	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22526}
22527
22528// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
22529// long-running operation.
22530type VpnSitesConfigurationDownloadFuture struct {
22531	azure.FutureAPI
22532	// Result returns the result of the asynchronous operation.
22533	// If the operation has not completed it will return an error.
22534	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
22535}
22536
22537// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22538func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
22539	var azFuture azure.Future
22540	if err := json.Unmarshal(body, &azFuture); err != nil {
22541		return err
22542	}
22543	future.FutureAPI = &azFuture
22544	future.Result = future.result
22545	return nil
22546}
22547
22548// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
22549func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
22550	var done bool
22551	done, err = future.DoneWithContext(context.Background(), client)
22552	if err != nil {
22553		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
22554		return
22555	}
22556	if !done {
22557		ar.Response = future.Response()
22558		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
22559		return
22560	}
22561	ar.Response = future.Response()
22562	return
22563}
22564
22565// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22566// operation.
22567type VpnSitesCreateOrUpdateFuture struct {
22568	azure.FutureAPI
22569	// Result returns the result of the asynchronous operation.
22570	// If the operation has not completed it will return an error.
22571	Result func(VpnSitesClient) (VpnSite, error)
22572}
22573
22574// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22575func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22576	var azFuture azure.Future
22577	if err := json.Unmarshal(body, &azFuture); err != nil {
22578		return err
22579	}
22580	future.FutureAPI = &azFuture
22581	future.Result = future.result
22582	return nil
22583}
22584
22585// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
22586func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
22587	var done bool
22588	done, err = future.DoneWithContext(context.Background(), client)
22589	if err != nil {
22590		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22591		return
22592	}
22593	if !done {
22594		vs.Response.Response = future.Response()
22595		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
22596		return
22597	}
22598	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22599	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
22600		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
22601		if err != nil {
22602			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
22603		}
22604	}
22605	return
22606}
22607
22608// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22609// operation.
22610type VpnSitesDeleteFuture struct {
22611	azure.FutureAPI
22612	// Result returns the result of the asynchronous operation.
22613	// If the operation has not completed it will return an error.
22614	Result func(VpnSitesClient) (autorest.Response, error)
22615}
22616
22617// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22618func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
22619	var azFuture azure.Future
22620	if err := json.Unmarshal(body, &azFuture); err != nil {
22621		return err
22622	}
22623	future.FutureAPI = &azFuture
22624	future.Result = future.result
22625	return nil
22626}
22627
22628// result is the default implementation for VpnSitesDeleteFuture.Result.
22629func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
22630	var done bool
22631	done, err = future.DoneWithContext(context.Background(), client)
22632	if err != nil {
22633		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
22634		return
22635	}
22636	if !done {
22637		ar.Response = future.Response()
22638		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
22639		return
22640	}
22641	ar.Response = future.Response()
22642	return
22643}
22644
22645// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22646// operation.
22647type VpnSitesUpdateTagsFuture struct {
22648	azure.FutureAPI
22649	// Result returns the result of the asynchronous operation.
22650	// If the operation has not completed it will return an error.
22651	Result func(VpnSitesClient) (VpnSite, error)
22652}
22653
22654// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22655func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22656	var azFuture azure.Future
22657	if err := json.Unmarshal(body, &azFuture); err != nil {
22658		return err
22659	}
22660	future.FutureAPI = &azFuture
22661	future.Result = future.result
22662	return nil
22663}
22664
22665// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
22666func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
22667	var done bool
22668	done, err = future.DoneWithContext(context.Background(), client)
22669	if err != nil {
22670		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22671		return
22672	}
22673	if !done {
22674		vs.Response.Response = future.Response()
22675		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
22676		return
22677	}
22678	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22679	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
22680		vs, err = client.UpdateTagsResponder(vs.Response.Response)
22681		if err != nil {
22682			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
22683		}
22684	}
22685	return
22686}
22687
22688// Watcher network watcher in a resource group.
22689type Watcher struct {
22690	autorest.Response `json:"-"`
22691	// Etag - A unique read-only string that changes whenever the resource is updated.
22692	Etag                     *string `json:"etag,omitempty"`
22693	*WatcherPropertiesFormat `json:"properties,omitempty"`
22694	// ID - Resource ID.
22695	ID *string `json:"id,omitempty"`
22696	// Name - READ-ONLY; Resource name.
22697	Name *string `json:"name,omitempty"`
22698	// Type - READ-ONLY; Resource type.
22699	Type *string `json:"type,omitempty"`
22700	// Location - Resource location.
22701	Location *string `json:"location,omitempty"`
22702	// Tags - Resource tags.
22703	Tags map[string]*string `json:"tags"`
22704}
22705
22706// MarshalJSON is the custom marshaler for Watcher.
22707func (w Watcher) MarshalJSON() ([]byte, error) {
22708	objectMap := make(map[string]interface{})
22709	if w.Etag != nil {
22710		objectMap["etag"] = w.Etag
22711	}
22712	if w.WatcherPropertiesFormat != nil {
22713		objectMap["properties"] = w.WatcherPropertiesFormat
22714	}
22715	if w.ID != nil {
22716		objectMap["id"] = w.ID
22717	}
22718	if w.Location != nil {
22719		objectMap["location"] = w.Location
22720	}
22721	if w.Tags != nil {
22722		objectMap["tags"] = w.Tags
22723	}
22724	return json.Marshal(objectMap)
22725}
22726
22727// UnmarshalJSON is the custom unmarshaler for Watcher struct.
22728func (w *Watcher) UnmarshalJSON(body []byte) error {
22729	var m map[string]*json.RawMessage
22730	err := json.Unmarshal(body, &m)
22731	if err != nil {
22732		return err
22733	}
22734	for k, v := range m {
22735		switch k {
22736		case "etag":
22737			if v != nil {
22738				var etag string
22739				err = json.Unmarshal(*v, &etag)
22740				if err != nil {
22741					return err
22742				}
22743				w.Etag = &etag
22744			}
22745		case "properties":
22746			if v != nil {
22747				var watcherPropertiesFormat WatcherPropertiesFormat
22748				err = json.Unmarshal(*v, &watcherPropertiesFormat)
22749				if err != nil {
22750					return err
22751				}
22752				w.WatcherPropertiesFormat = &watcherPropertiesFormat
22753			}
22754		case "id":
22755			if v != nil {
22756				var ID string
22757				err = json.Unmarshal(*v, &ID)
22758				if err != nil {
22759					return err
22760				}
22761				w.ID = &ID
22762			}
22763		case "name":
22764			if v != nil {
22765				var name string
22766				err = json.Unmarshal(*v, &name)
22767				if err != nil {
22768					return err
22769				}
22770				w.Name = &name
22771			}
22772		case "type":
22773			if v != nil {
22774				var typeVar string
22775				err = json.Unmarshal(*v, &typeVar)
22776				if err != nil {
22777					return err
22778				}
22779				w.Type = &typeVar
22780			}
22781		case "location":
22782			if v != nil {
22783				var location string
22784				err = json.Unmarshal(*v, &location)
22785				if err != nil {
22786					return err
22787				}
22788				w.Location = &location
22789			}
22790		case "tags":
22791			if v != nil {
22792				var tags map[string]*string
22793				err = json.Unmarshal(*v, &tags)
22794				if err != nil {
22795					return err
22796				}
22797				w.Tags = tags
22798			}
22799		}
22800	}
22801
22802	return nil
22803}
22804
22805// WatcherListResult list of network watcher resources.
22806type WatcherListResult struct {
22807	autorest.Response `json:"-"`
22808	Value             *[]Watcher `json:"value,omitempty"`
22809}
22810
22811// WatcherPropertiesFormat the network watcher properties.
22812type WatcherPropertiesFormat struct {
22813	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22814	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22815}
22816
22817// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
22818func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
22819	objectMap := make(map[string]interface{})
22820	return json.Marshal(objectMap)
22821}
22822
22823// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
22824// long-running operation.
22825type WatchersCheckConnectivityFuture struct {
22826	azure.FutureAPI
22827	// Result returns the result of the asynchronous operation.
22828	// If the operation has not completed it will return an error.
22829	Result func(WatchersClient) (ConnectivityInformation, error)
22830}
22831
22832// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22833func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
22834	var azFuture azure.Future
22835	if err := json.Unmarshal(body, &azFuture); err != nil {
22836		return err
22837	}
22838	future.FutureAPI = &azFuture
22839	future.Result = future.result
22840	return nil
22841}
22842
22843// result is the default implementation for WatchersCheckConnectivityFuture.Result.
22844func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
22845	var done bool
22846	done, err = future.DoneWithContext(context.Background(), client)
22847	if err != nil {
22848		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
22849		return
22850	}
22851	if !done {
22852		ci.Response.Response = future.Response()
22853		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
22854		return
22855	}
22856	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22857	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
22858		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
22859		if err != nil {
22860			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
22861		}
22862	}
22863	return
22864}
22865
22866// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22867// operation.
22868type WatchersDeleteFuture struct {
22869	azure.FutureAPI
22870	// Result returns the result of the asynchronous operation.
22871	// If the operation has not completed it will return an error.
22872	Result func(WatchersClient) (autorest.Response, error)
22873}
22874
22875// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22876func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
22877	var azFuture azure.Future
22878	if err := json.Unmarshal(body, &azFuture); err != nil {
22879		return err
22880	}
22881	future.FutureAPI = &azFuture
22882	future.Result = future.result
22883	return nil
22884}
22885
22886// result is the default implementation for WatchersDeleteFuture.Result.
22887func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
22888	var done bool
22889	done, err = future.DoneWithContext(context.Background(), client)
22890	if err != nil {
22891		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
22892		return
22893	}
22894	if !done {
22895		ar.Response = future.Response()
22896		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
22897		return
22898	}
22899	ar.Response = future.Response()
22900	return
22901}
22902
22903// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
22904// long-running operation.
22905type WatchersGetAzureReachabilityReportFuture struct {
22906	azure.FutureAPI
22907	// Result returns the result of the asynchronous operation.
22908	// If the operation has not completed it will return an error.
22909	Result func(WatchersClient) (AzureReachabilityReport, error)
22910}
22911
22912// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22913func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
22914	var azFuture azure.Future
22915	if err := json.Unmarshal(body, &azFuture); err != nil {
22916		return err
22917	}
22918	future.FutureAPI = &azFuture
22919	future.Result = future.result
22920	return nil
22921}
22922
22923// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
22924func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
22925	var done bool
22926	done, err = future.DoneWithContext(context.Background(), client)
22927	if err != nil {
22928		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
22929		return
22930	}
22931	if !done {
22932		arr.Response.Response = future.Response()
22933		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
22934		return
22935	}
22936	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22937	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
22938		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
22939		if err != nil {
22940			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
22941		}
22942	}
22943	return
22944}
22945
22946// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
22947// long-running operation.
22948type WatchersGetFlowLogStatusFuture struct {
22949	azure.FutureAPI
22950	// Result returns the result of the asynchronous operation.
22951	// If the operation has not completed it will return an error.
22952	Result func(WatchersClient) (FlowLogInformation, error)
22953}
22954
22955// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22956func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
22957	var azFuture azure.Future
22958	if err := json.Unmarshal(body, &azFuture); err != nil {
22959		return err
22960	}
22961	future.FutureAPI = &azFuture
22962	future.Result = future.result
22963	return nil
22964}
22965
22966// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
22967func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
22968	var done bool
22969	done, err = future.DoneWithContext(context.Background(), client)
22970	if err != nil {
22971		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
22972		return
22973	}
22974	if !done {
22975		fli.Response.Response = future.Response()
22976		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
22977		return
22978	}
22979	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22980	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
22981		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
22982		if err != nil {
22983			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
22984		}
22985	}
22986	return
22987}
22988
22989// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
22990// of a long-running operation.
22991type WatchersGetNetworkConfigurationDiagnosticFuture struct {
22992	azure.FutureAPI
22993	// Result returns the result of the asynchronous operation.
22994	// If the operation has not completed it will return an error.
22995	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
22996}
22997
22998// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22999func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
23000	var azFuture azure.Future
23001	if err := json.Unmarshal(body, &azFuture); err != nil {
23002		return err
23003	}
23004	future.FutureAPI = &azFuture
23005	future.Result = future.result
23006	return nil
23007}
23008
23009// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
23010func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
23011	var done bool
23012	done, err = future.DoneWithContext(context.Background(), client)
23013	if err != nil {
23014		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
23015		return
23016	}
23017	if !done {
23018		cdr.Response.Response = future.Response()
23019		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
23020		return
23021	}
23022	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23023	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
23024		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
23025		if err != nil {
23026			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
23027		}
23028	}
23029	return
23030}
23031
23032// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
23033// operation.
23034type WatchersGetNextHopFuture struct {
23035	azure.FutureAPI
23036	// Result returns the result of the asynchronous operation.
23037	// If the operation has not completed it will return an error.
23038	Result func(WatchersClient) (NextHopResult, error)
23039}
23040
23041// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23042func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
23043	var azFuture azure.Future
23044	if err := json.Unmarshal(body, &azFuture); err != nil {
23045		return err
23046	}
23047	future.FutureAPI = &azFuture
23048	future.Result = future.result
23049	return nil
23050}
23051
23052// result is the default implementation for WatchersGetNextHopFuture.Result.
23053func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
23054	var done bool
23055	done, err = future.DoneWithContext(context.Background(), client)
23056	if err != nil {
23057		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
23058		return
23059	}
23060	if !done {
23061		nhr.Response.Response = future.Response()
23062		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
23063		return
23064	}
23065	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23066	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
23067		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
23068		if err != nil {
23069			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
23070		}
23071	}
23072	return
23073}
23074
23075// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
23076// long-running operation.
23077type WatchersGetTroubleshootingFuture struct {
23078	azure.FutureAPI
23079	// Result returns the result of the asynchronous operation.
23080	// If the operation has not completed it will return an error.
23081	Result func(WatchersClient) (TroubleshootingResult, error)
23082}
23083
23084// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23085func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
23086	var azFuture azure.Future
23087	if err := json.Unmarshal(body, &azFuture); err != nil {
23088		return err
23089	}
23090	future.FutureAPI = &azFuture
23091	future.Result = future.result
23092	return nil
23093}
23094
23095// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
23096func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
23097	var done bool
23098	done, err = future.DoneWithContext(context.Background(), client)
23099	if err != nil {
23100		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
23101		return
23102	}
23103	if !done {
23104		tr.Response.Response = future.Response()
23105		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
23106		return
23107	}
23108	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23109	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
23110		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
23111		if err != nil {
23112			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
23113		}
23114	}
23115	return
23116}
23117
23118// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
23119// long-running operation.
23120type WatchersGetTroubleshootingResultFuture struct {
23121	azure.FutureAPI
23122	// Result returns the result of the asynchronous operation.
23123	// If the operation has not completed it will return an error.
23124	Result func(WatchersClient) (TroubleshootingResult, error)
23125}
23126
23127// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23128func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
23129	var azFuture azure.Future
23130	if err := json.Unmarshal(body, &azFuture); err != nil {
23131		return err
23132	}
23133	future.FutureAPI = &azFuture
23134	future.Result = future.result
23135	return nil
23136}
23137
23138// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
23139func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
23140	var done bool
23141	done, err = future.DoneWithContext(context.Background(), client)
23142	if err != nil {
23143		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
23144		return
23145	}
23146	if !done {
23147		tr.Response.Response = future.Response()
23148		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
23149		return
23150	}
23151	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23152	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
23153		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
23154		if err != nil {
23155			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
23156		}
23157	}
23158	return
23159}
23160
23161// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
23162// long-running operation.
23163type WatchersGetVMSecurityRulesFuture struct {
23164	azure.FutureAPI
23165	// Result returns the result of the asynchronous operation.
23166	// If the operation has not completed it will return an error.
23167	Result func(WatchersClient) (SecurityGroupViewResult, error)
23168}
23169
23170// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23171func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
23172	var azFuture azure.Future
23173	if err := json.Unmarshal(body, &azFuture); err != nil {
23174		return err
23175	}
23176	future.FutureAPI = &azFuture
23177	future.Result = future.result
23178	return nil
23179}
23180
23181// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
23182func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
23183	var done bool
23184	done, err = future.DoneWithContext(context.Background(), client)
23185	if err != nil {
23186		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
23187		return
23188	}
23189	if !done {
23190		sgvr.Response.Response = future.Response()
23191		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
23192		return
23193	}
23194	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23195	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
23196		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
23197		if err != nil {
23198			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
23199		}
23200	}
23201	return
23202}
23203
23204// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
23205// long-running operation.
23206type WatchersListAvailableProvidersFuture struct {
23207	azure.FutureAPI
23208	// Result returns the result of the asynchronous operation.
23209	// If the operation has not completed it will return an error.
23210	Result func(WatchersClient) (AvailableProvidersList, error)
23211}
23212
23213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23214func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
23215	var azFuture azure.Future
23216	if err := json.Unmarshal(body, &azFuture); err != nil {
23217		return err
23218	}
23219	future.FutureAPI = &azFuture
23220	future.Result = future.result
23221	return nil
23222}
23223
23224// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
23225func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
23226	var done bool
23227	done, err = future.DoneWithContext(context.Background(), client)
23228	if err != nil {
23229		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
23230		return
23231	}
23232	if !done {
23233		apl.Response.Response = future.Response()
23234		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
23235		return
23236	}
23237	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23238	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
23239		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
23240		if err != nil {
23241			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
23242		}
23243	}
23244	return
23245}
23246
23247// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
23248// long-running operation.
23249type WatchersSetFlowLogConfigurationFuture struct {
23250	azure.FutureAPI
23251	// Result returns the result of the asynchronous operation.
23252	// If the operation has not completed it will return an error.
23253	Result func(WatchersClient) (FlowLogInformation, error)
23254}
23255
23256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23257func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
23258	var azFuture azure.Future
23259	if err := json.Unmarshal(body, &azFuture); err != nil {
23260		return err
23261	}
23262	future.FutureAPI = &azFuture
23263	future.Result = future.result
23264	return nil
23265}
23266
23267// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
23268func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
23269	var done bool
23270	done, err = future.DoneWithContext(context.Background(), client)
23271	if err != nil {
23272		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
23273		return
23274	}
23275	if !done {
23276		fli.Response.Response = future.Response()
23277		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
23278		return
23279	}
23280	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23281	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
23282		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
23283		if err != nil {
23284			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
23285		}
23286	}
23287	return
23288}
23289
23290// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
23291// operation.
23292type WatchersVerifyIPFlowFuture struct {
23293	azure.FutureAPI
23294	// Result returns the result of the asynchronous operation.
23295	// If the operation has not completed it will return an error.
23296	Result func(WatchersClient) (VerificationIPFlowResult, error)
23297}
23298
23299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23300func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
23301	var azFuture azure.Future
23302	if err := json.Unmarshal(body, &azFuture); err != nil {
23303		return err
23304	}
23305	future.FutureAPI = &azFuture
23306	future.Result = future.result
23307	return nil
23308}
23309
23310// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
23311func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
23312	var done bool
23313	done, err = future.DoneWithContext(context.Background(), client)
23314	if err != nil {
23315		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
23316		return
23317	}
23318	if !done {
23319		vifr.Response.Response = future.Response()
23320		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
23321		return
23322	}
23323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23324	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
23325		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
23326		if err != nil {
23327			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
23328		}
23329	}
23330	return
23331}
23332